Loading...
Searching...
No Matches
getrs: LU forward and back solves
Dense LA » Linear system solvers » General matrices: LU

## Functions

magma_int_t | magma_cgetrs_expert_gpu_work (magma_trans_t trans, magma_int_t n, magma_int_t nrhs, magmaFloatComplex_ptr dA, magma_int_t ldda, magma_int_t *ipiv, magmaFloatComplex_ptr dB, magma_int_t lddb, magma_int_t *info, magma_mode_t mode, void *host_work, magma_int_t *lwork_host, void *device_work, magma_int_t *lwork_device, magma_queue_t queue)
| CGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by CGETRF_GPU.
magma_int_t | magma_cgetrs_gpu (magma_trans_t trans, magma_int_t n, magma_int_t nrhs, magmaFloatComplex_ptr dA, magma_int_t ldda, magma_int_t *ipiv, magmaFloatComplex_ptr dB, magma_int_t lddb, magma_int_t *info)
| CGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by CGETRF_GPU.
magma_int_t | magma_dgetrs_expert_gpu_work (magma_trans_t trans, magma_int_t n, magma_int_t nrhs, magmaDouble_ptr dA, magma_int_t ldda, magma_int_t *ipiv, magmaDouble_ptr dB, magma_int_t lddb, magma_int_t *info, magma_mode_t mode, void *host_work, magma_int_t *lwork_host, void *device_work, magma_int_t *lwork_device, magma_queue_t queue)
| DGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by DGETRF_GPU.
magma_int_t | magma_dgetrs_gpu (magma_trans_t trans, magma_int_t n, magma_int_t nrhs, magmaDouble_ptr dA, magma_int_t ldda, magma_int_t *ipiv, magmaDouble_ptr dB, magma_int_t lddb, magma_int_t *info)
| DGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by DGETRF_GPU.
magma_int_t | magma_dsgetrs_gpu (magma_trans_t trans, magma_int_t n, magma_int_t nrhs, magmaFloat_ptr dA, magma_int_t ldda, magmaInt_ptr dipiv, magmaDouble_ptr dB, magma_int_t lddb, magmaDouble_ptr dX, magma_int_t lddx, magmaFloat_ptr dSX, magma_int_t *info)
| DSGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by MAGMA_SGETRF_GPU.
magma_int_t | magma_sgetrs_expert_gpu_work (magma_trans_t trans, magma_int_t n, magma_int_t nrhs, magmaFloat_ptr dA, magma_int_t ldda, magma_int_t *ipiv, magmaFloat_ptr dB, magma_int_t lddb, magma_int_t *info, magma_mode_t mode, void *host_work, magma_int_t *lwork_host, void *device_work, magma_int_t *lwork_device, magma_queue_t queue)
| SGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by SGETRF_GPU.
magma_int_t | magma_sgetrs_gpu (magma_trans_t trans, magma_int_t n, magma_int_t nrhs, magmaFloat_ptr dA, magma_int_t ldda, magma_int_t *ipiv, magmaFloat_ptr dB, magma_int_t lddb, magma_int_t *info)
| SGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by SGETRF_GPU.
magma_int_t | magma_zcgetrs_gpu (magma_trans_t trans, magma_int_t n, magma_int_t nrhs, magmaFloatComplex_ptr dA, magma_int_t ldda, magmaInt_ptr dipiv, magmaDoubleComplex_ptr dB, magma_int_t lddb, magmaDoubleComplex_ptr dX, magma_int_t lddx, magmaFloatComplex_ptr dSX, magma_int_t *info)
| ZCGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by MAGMA_CGETRF_GPU.
magma_int_t | magma_zgetrs_expert_gpu_work (magma_trans_t trans, magma_int_t n, magma_int_t nrhs, magmaDoubleComplex_ptr dA, magma_int_t ldda, magma_int_t *ipiv, magmaDoubleComplex_ptr dB, magma_int_t lddb, magma_int_t *info, magma_mode_t mode, void *host_work, magma_int_t *lwork_host, void *device_work, magma_int_t *lwork_device, magma_queue_t queue)
| ZGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by ZGETRF_GPU.
magma_int_t | magma_zgetrs_gpu (magma_trans_t trans, magma_int_t n, magma_int_t nrhs, magmaDoubleComplex_ptr dA, magma_int_t ldda, magma_int_t *ipiv, magmaDoubleComplex_ptr dB, magma_int_t lddb, magma_int_t *info)
| ZGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by ZGETRF_GPU.

## Detailed Description

## Function Documentation

## magma_cgetrs_expert_gpu_work()

magma_int_t magma_cgetrs_expert_gpu_work | ( | magma_trans_t | trans,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaFloatComplex_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t * | ipiv,
|  | magmaFloatComplex_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info,
|  | magma_mode_t | mode,
|  | void * | host_work,
|  | magma_int_t * | lwork_host,
|  | void * | device_work,
|  | magma_int_t * | lwork_device,
|  | magma_queue_t | queue )

CGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by CGETRF_GPU.

This is an expert interface, which exposes more controls to the user.

Parameters

  [in]

  trans

  magma_trans_t Specifies the form of the system of equations:
  - = MagmaNoTrans: A * X = B (No transpose)
  - = MagmaTrans: A**T * X = B (Transpose)
  - = MagmaConjTrans: A**H * X = B (Conjugate transpose)

  [in] | n | INTEGER The order of the matrix A. N >= 0.
  [in] | nrhs | INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  [in] | dA | COMPLEX array on the GPU, dimension (LDDA,N) The factors L and U from the factorization A = P*L*U as computed by CGETRF_GPU.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [in] | ipiv | INTEGER array, dimension (N) The pivot indices from CGETRF; for 1 <= i <= N, row i of the matrix was interchanged with row IPIV(i).
  [in,out] | dB | COMPLEX array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
  [in] | lddb | INTEGER The leading dimension of the array B. LDDB >= max(1,N).

  [out]

  info

  INTEGER
  - = 0: successful exit
  - < 0: if INFO = -i, the i-th argument had an illegal value

  [in]

  mode

  magma_mode_t
  - = MagmaNative: Factorize dA using GPU only mode (currently not implemented);
  - = MagmaHybrid: Factorize dA using Hybrid (CPU/GPU) mode.

  [in,out] | host_work | Workspace, allocated on host (CPU) memory. For faster CPU-GPU communication, user can allocate it as pinned memory using magma_malloc_pinned()

  [in,out]

  lwork_host

  INTEGER pointer The size of the workspace (host_work) in bytes
  - lwork_host[0] < 0: a workspace query is assumed, the routine calculates the required amount of workspace and returns it in lwork_host. The workspace itself is not referenced, and no factorization is performed.

- lwork[0] >= 0: the routine assumes that the user has provided a workspace with the size in lwork_host.

Parameters

  [in,out] | device_work | Workspace, allocated on device (GPU) memory.

  [in,out]

  lwork_device

  INTEGER pointer The size of the workspace (device_work) in bytes
  - lwork_device[0] < 0: a workspace query is assumed, the routine calculates the required amount of workspace and returns it in lwork_device. The workspace itself is not referenced, and no factorization is performed.
  - lwork_device[0] >= 0: the routine assumes that the user has provided a workspace with the size in lwork_device.

  [in]

  queue

  magma_queue_t
  - created/destroyed by the user outside the routine
  - Used for kernel execution

## magma_cgetrs_gpu()

magma_int_t magma_cgetrs_gpu | ( | magma_trans_t | trans,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaFloatComplex_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t * | ipiv,
|  | magmaFloatComplex_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info )

CGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by CGETRF_GPU.

Parameters

  [in]

  trans

  magma_trans_t Specifies the form of the system of equations:
  - = MagmaNoTrans: A * X = B (No transpose)
  - = MagmaTrans: A**T * X = B (Transpose)
  - = MagmaConjTrans: A**H * X = B (Conjugate transpose)

  [in] | n | INTEGER The order of the matrix A. N >= 0.
  [in] | nrhs | INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  [in] | dA | COMPLEX array on the GPU, dimension (LDDA,N) The factors L and U from the factorization A = P*L*U as computed by CGETRF_GPU.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [in] | ipiv | INTEGER array, dimension (N) The pivot indices from CGETRF; for 1 <= i <= N, row i of the matrix was interchanged with row IPIV(i).
  [in,out] | dB | COMPLEX array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
  [in] | lddb | INTEGER The leading dimension of the array B. LDDB >= max(1,N).

  [out]

  info

  INTEGER
  - = 0: successful exit
  - < 0: if INFO = -i, the i-th argument had an illegal value

## magma_dgetrs_expert_gpu_work()

magma_int_t magma_dgetrs_expert_gpu_work | ( | magma_trans_t | trans,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaDouble_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t * | ipiv,
|  | magmaDouble_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info,
|  | magma_mode_t | mode,
|  | void * | host_work,
|  | magma_int_t * | lwork_host,
|  | void * | device_work,
|  | magma_int_t * | lwork_device,
|  | magma_queue_t | queue )

DGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by DGETRF_GPU.

This is an expert interface, which exposes more controls to the user.

Parameters

  [in]

  trans

  magma_trans_t Specifies the form of the system of equations:
  - = MagmaNoTrans: A * X = B (No transpose)
  - = MagmaTrans: A**T * X = B (Transpose)
  - = MagmaConjTrans: A**H * X = B (Conjugate transpose)

  [in] | n | INTEGER The order of the matrix A. N >= 0.
  [in] | nrhs | INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  [in] | dA | DOUBLE PRECISION array on the GPU, dimension (LDDA,N) The factors L and U from the factorization A = P*L*U as computed by DGETRF_GPU.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [in] | ipiv | INTEGER array, dimension (N) The pivot indices from DGETRF; for 1 <= i <= N, row i of the matrix was interchanged with row IPIV(i).
  [in,out] | dB | DOUBLE PRECISION array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
  [in] | lddb | INTEGER The leading dimension of the array B. LDDB >= max(1,N).

  [out]

  info

  INTEGER
  - = 0: successful exit
  - < 0: if INFO = -i, the i-th argument had an illegal value

  [in]

  mode

  magma_mode_t
  - = MagmaNative: Factorize dA using GPU only mode (currently not implemented);
  - = MagmaHybrid: Factorize dA using Hybrid (CPU/GPU) mode.

  [in,out] | host_work | Workspace, allocated on host (CPU) memory. For faster CPU-GPU communication, user can allocate it as pinned memory using magma_malloc_pinned()

  [in,out]

  lwork_host

  INTEGER pointer The size of the workspace (host_work) in bytes
  - lwork_host[0] < 0: a workspace query is assumed, the routine calculates the required amount of workspace and returns it in lwork_host. The workspace itself is not referenced, and no factorization is performed.

- lwork[0] >= 0: the routine assumes that the user has provided a workspace with the size in lwork_host.

Parameters

  [in,out] | device_work | Workspace, allocated on device (GPU) memory.

  [in,out]

  lwork_device

  INTEGER pointer The size of the workspace (device_work) in bytes
  - lwork_device[0] < 0: a workspace query is assumed, the routine calculates the required amount of workspace and returns it in lwork_device. The workspace itself is not referenced, and no factorization is performed.
  - lwork_device[0] >= 0: the routine assumes that the user has provided a workspace with the size in lwork_device.

  [in]

  queue

  magma_queue_t
  - created/destroyed by the user outside the routine
  - Used for kernel execution

## magma_dgetrs_gpu()

magma_int_t magma_dgetrs_gpu | ( | magma_trans_t | trans,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaDouble_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t * | ipiv,
|  | magmaDouble_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info )

DGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by DGETRF_GPU.

Parameters

  [in]

  trans

  magma_trans_t Specifies the form of the system of equations:
  - = MagmaNoTrans: A * X = B (No transpose)
  - = MagmaTrans: A**T * X = B (Transpose)
  - = MagmaConjTrans: A**H * X = B (Conjugate transpose)

  [in] | n | INTEGER The order of the matrix A. N >= 0.
  [in] | nrhs | INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  [in] | dA | DOUBLE PRECISION array on the GPU, dimension (LDDA,N) The factors L and U from the factorization A = P*L*U as computed by DGETRF_GPU.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [in] | ipiv | INTEGER array, dimension (N) The pivot indices from DGETRF; for 1 <= i <= N, row i of the matrix was interchanged with row IPIV(i).
  [in,out] | dB | DOUBLE PRECISION array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
  [in] | lddb | INTEGER The leading dimension of the array B. LDDB >= max(1,N).

  [out]

  info

  INTEGER
  - = 0: successful exit
  - < 0: if INFO = -i, the i-th argument had an illegal value

## magma_dsgetrs_gpu()

magma_int_t magma_dsgetrs_gpu | ( | magma_trans_t | trans,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaFloat_ptr | dA,
|  | magma_int_t | ldda,
|  | magmaInt_ptr | dipiv,
|  | magmaDouble_ptr | dB,
|  | magma_int_t | lddb,
|  | magmaDouble_ptr | dX,
|  | magma_int_t | lddx,
|  | magmaFloat_ptr | dSX,
|  | magma_int_t * | info )

DSGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by MAGMA_SGETRF_GPU.

B and X are in DOUBLE PRECISION, and A is in SINGLE PRECISION. This routine is used in the mixed precision iterative solver magma_dsgesv.

Parameters

  [in]

  trans

  magma_trans_t Specifies the form of the system of equations:
  - = MagmaNoTrans: A * X = B (No transpose)
  - = MagmaTrans: A**T * X = B (Transpose)
  - = MagmaConjTrans: A**H * X = B (Conjugate transpose)

  [in] | n | INTEGER The order of the matrix A. N >= 0.
  [in] | nrhs | INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  [in] | dA | SINGLE PRECISION array on the GPU, dimension (LDDA,N) The factors L and U from the factorization A = P*L*U as computed by CGETRF_GPU.
  [in] | ldda | INTEGER The leading dimension of the array dA. LDDA >= max(1,N).
  [in] | dipiv | INTEGER array on the GPU, dimension (N) The pivot indices; for 1 <= i <= N, after permuting, row i of the matrix was moved to row dIPIV(i). Note this is different than IPIV from DGETRF, where interchanges are applied one-after-another.
  [in] | dB | DOUBLE PRECISION array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B.
  [in] | lddb | INTEGER The leading dimension of the arrays X and B. LDDB >= max(1,N).
  [out] | dX | DOUBLE PRECISION array on the GPU, dimension (LDDX, NRHS) On exit, the solution matrix dX.
  [in] | lddx | INTEGER The leading dimension of the array dX, LDDX >= max(1,N).
  | dSX | (workspace) SINGLE PRECISION array on the GPU used as workspace, dimension (N, NRHS)

  [out]

  info

  INTEGER
  - = 0: successful exit
  - < 0: if INFO = -i, the i-th argument had an illegal value

## magma_sgetrs_expert_gpu_work()

magma_int_t magma_sgetrs_expert_gpu_work | ( | magma_trans_t | trans,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaFloat_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t * | ipiv,
|  | magmaFloat_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info,
|  | magma_mode_t | mode,
|  | void * | host_work,
|  | magma_int_t * | lwork_host,
|  | void * | device_work,
|  | magma_int_t * | lwork_device,
|  | magma_queue_t | queue )

SGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by SGETRF_GPU.

This is an expert interface, which exposes more controls to the user.

Parameters

  [in]

  trans

  magma_trans_t Specifies the form of the system of equations:
  - = MagmaNoTrans: A * X = B (No transpose)
  - = MagmaTrans: A**T * X = B (Transpose)
  - = MagmaConjTrans: A**H * X = B (Conjugate transpose)

  [in] | n | INTEGER The order of the matrix A. N >= 0.
  [in] | nrhs | INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  [in] | dA | REAL array on the GPU, dimension (LDDA,N) The factors L and U from the factorization A = P*L*U as computed by SGETRF_GPU.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [in] | ipiv | INTEGER array, dimension (N) The pivot indices from SGETRF; for 1 <= i <= N, row i of the matrix was interchanged with row IPIV(i).
  [in,out] | dB | REAL array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
  [in] | lddb | INTEGER The leading dimension of the array B. LDDB >= max(1,N).

  [out]

  info

  INTEGER
  - = 0: successful exit
  - < 0: if INFO = -i, the i-th argument had an illegal value

  [in]

  mode

  magma_mode_t
  - = MagmaNative: Factorize dA using GPU only mode (currently not implemented);
  - = MagmaHybrid: Factorize dA using Hybrid (CPU/GPU) mode.

  [in,out] | host_work | Workspace, allocated on host (CPU) memory. For faster CPU-GPU communication, user can allocate it as pinned memory using magma_malloc_pinned()

  [in,out]

  lwork_host

  INTEGER pointer The size of the workspace (host_work) in bytes
  - lwork_host[0] < 0: a workspace query is assumed, the routine calculates the required amount of workspace and returns it in lwork_host. The workspace itself is not referenced, and no factorization is performed.

- lwork[0] >= 0: the routine assumes that the user has provided a workspace with the size in lwork_host.

Parameters

  [in,out] | device_work | Workspace, allocated on device (GPU) memory.

  [in,out]

  lwork_device

  INTEGER pointer The size of the workspace (device_work) in bytes
  - lwork_device[0] < 0: a workspace query is assumed, the routine calculates the required amount of workspace and returns it in lwork_device. The workspace itself is not referenced, and no factorization is performed.
  - lwork_device[0] >= 0: the routine assumes that the user has provided a workspace with the size in lwork_device.

  [in]

  queue

  magma_queue_t
  - created/destroyed by the user outside the routine
  - Used for kernel execution

## magma_sgetrs_gpu()

magma_int_t magma_sgetrs_gpu | ( | magma_trans_t | trans,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaFloat_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t * | ipiv,
|  | magmaFloat_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info )

SGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by SGETRF_GPU.

Parameters

  [in]

  trans

  magma_trans_t Specifies the form of the system of equations:
  - = MagmaNoTrans: A * X = B (No transpose)
  - = MagmaTrans: A**T * X = B (Transpose)
  - = MagmaConjTrans: A**H * X = B (Conjugate transpose)

  [in] | n | INTEGER The order of the matrix A. N >= 0.
  [in] | nrhs | INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  [in] | dA | REAL array on the GPU, dimension (LDDA,N) The factors L and U from the factorization A = P*L*U as computed by SGETRF_GPU.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [in] | ipiv | INTEGER array, dimension (N) The pivot indices from SGETRF; for 1 <= i <= N, row i of the matrix was interchanged with row IPIV(i).
  [in,out] | dB | REAL array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
  [in] | lddb | INTEGER The leading dimension of the array B. LDDB >= max(1,N).

  [out]

  info

  INTEGER
  - = 0: successful exit
  - < 0: if INFO = -i, the i-th argument had an illegal value

## magma_zcgetrs_gpu()

magma_int_t magma_zcgetrs_gpu | ( | magma_trans_t | trans,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaFloatComplex_ptr | dA,
|  | magma_int_t | ldda,
|  | magmaInt_ptr | dipiv,
|  | magmaDoubleComplex_ptr | dB,
|  | magma_int_t | lddb,
|  | magmaDoubleComplex_ptr | dX,
|  | magma_int_t | lddx,
|  | magmaFloatComplex_ptr | dSX,
|  | magma_int_t * | info )

ZCGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by MAGMA_CGETRF_GPU.

B and X are in COMPLEX_16, and A is in COMPLEX. This routine is used in the mixed precision iterative solver magma_zcgesv.

Parameters

  [in]

  trans

  magma_trans_t Specifies the form of the system of equations:
  - = MagmaNoTrans: A * X = B (No transpose)
  - = MagmaTrans: A**T * X = B (Transpose)
  - = MagmaConjTrans: A**H * X = B (Conjugate transpose)

  [in] | n | INTEGER The order of the matrix A. N >= 0.
  [in] | nrhs | INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  [in] | dA | COMPLEX array on the GPU, dimension (LDDA,N) The factors L and U from the factorization A = P*L*U as computed by CGETRF_GPU.
  [in] | ldda | INTEGER The leading dimension of the array dA. LDDA >= max(1,N).
  [in] | dipiv | INTEGER array on the GPU, dimension (N) The pivot indices; for 1 <= i <= N, after permuting, row i of the matrix was moved to row dIPIV(i). Note this is different than IPIV from ZGETRF, where interchanges are applied one-after-another.
  [in] | dB | COMPLEX_16 array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B.
  [in] | lddb | INTEGER The leading dimension of the arrays X and B. LDDB >= max(1,N).
  [out] | dX | COMPLEX_16 array on the GPU, dimension (LDDX, NRHS) On exit, the solution matrix dX.
  [in] | lddx | INTEGER The leading dimension of the array dX, LDDX >= max(1,N).
  | dSX | (workspace) COMPLEX array on the GPU used as workspace, dimension (N, NRHS)

  [out]

  info

  INTEGER
  - = 0: successful exit
  - < 0: if INFO = -i, the i-th argument had an illegal value

## magma_zgetrs_expert_gpu_work()

magma_int_t magma_zgetrs_expert_gpu_work | ( | magma_trans_t | trans,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaDoubleComplex_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t * | ipiv,
|  | magmaDoubleComplex_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info,
|  | magma_mode_t | mode,
|  | void * | host_work,
|  | magma_int_t * | lwork_host,
|  | void * | device_work,
|  | magma_int_t * | lwork_device,
|  | magma_queue_t | queue )

ZGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by ZGETRF_GPU.

This is an expert interface, which exposes more controls to the user.

Parameters

  [in]

  trans

  magma_trans_t Specifies the form of the system of equations:
  - = MagmaNoTrans: A * X = B (No transpose)
  - = MagmaTrans: A**T * X = B (Transpose)
  - = MagmaConjTrans: A**H * X = B (Conjugate transpose)

  [in] | n | INTEGER The order of the matrix A. N >= 0.
  [in] | nrhs | INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  [in] | dA | COMPLEX_16 array on the GPU, dimension (LDDA,N) The factors L and U from the factorization A = P*L*U as computed by ZGETRF_GPU.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [in] | ipiv | INTEGER array, dimension (N) The pivot indices from ZGETRF; for 1 <= i <= N, row i of the matrix was interchanged with row IPIV(i).
  [in,out] | dB | COMPLEX_16 array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
  [in] | lddb | INTEGER The leading dimension of the array B. LDDB >= max(1,N).

  [out]

  info

  INTEGER
  - = 0: successful exit
  - < 0: if INFO = -i, the i-th argument had an illegal value

  [in]

  mode

  magma_mode_t
  - = MagmaNative: Factorize dA using GPU only mode (currently not implemented);
  - = MagmaHybrid: Factorize dA using Hybrid (CPU/GPU) mode.

  [in,out] | host_work | Workspace, allocated on host (CPU) memory. For faster CPU-GPU communication, user can allocate it as pinned memory using magma_malloc_pinned()

  [in,out]

  lwork_host

  INTEGER pointer The size of the workspace (host_work) in bytes
  - lwork_host[0] < 0: a workspace query is assumed, the routine calculates the required amount of workspace and returns it in lwork_host. The workspace itself is not referenced, and no factorization is performed.

- lwork[0] >= 0: the routine assumes that the user has provided a workspace with the size in lwork_host.

Parameters

  [in,out] | device_work | Workspace, allocated on device (GPU) memory.

  [in,out]

  lwork_device

  INTEGER pointer The size of the workspace (device_work) in bytes
  - lwork_device[0] < 0: a workspace query is assumed, the routine calculates the required amount of workspace and returns it in lwork_device. The workspace itself is not referenced, and no factorization is performed.
  - lwork_device[0] >= 0: the routine assumes that the user has provided a workspace with the size in lwork_device.

  [in]

  queue

  magma_queue_t
  - created/destroyed by the user outside the routine
  - Used for kernel execution

## magma_zgetrs_gpu()

magma_int_t magma_zgetrs_gpu | ( | magma_trans_t | trans,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaDoubleComplex_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t * | ipiv,
|  | magmaDoubleComplex_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info )

ZGETRS solves a system of linear equations A * X = B, A**T * X = B, or A**H * X = B with a general N-by-N matrix A using the LU factorization computed by ZGETRF_GPU.

Parameters

  [in]

  trans

  magma_trans_t Specifies the form of the system of equations:
  - = MagmaNoTrans: A * X = B (No transpose)
  - = MagmaTrans: A**T * X = B (Transpose)
  - = MagmaConjTrans: A**H * X = B (Conjugate transpose)

  [in] | n | INTEGER The order of the matrix A. N >= 0.
  [in] | nrhs | INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  [in] | dA | COMPLEX_16 array on the GPU, dimension (LDDA,N) The factors L and U from the factorization A = P*L*U as computed by ZGETRF_GPU.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [in] | ipiv | INTEGER array, dimension (N) The pivot indices from ZGETRF; for 1 <= i <= N, row i of the matrix was interchanged with row IPIV(i).
  [in,out] | dB | COMPLEX_16 array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
  [in] | lddb | INTEGER The leading dimension of the array B. LDDB >= max(1,N).

  [out]

  info

  INTEGER
  - = 0: successful exit
  - < 0: if INFO = -i, the i-th argument had an illegal value