Loading...
Searching...
No Matches
potrs: Cholesky forward and back solves
Dense LA » Linear system solvers » Symmetric/Hermitian positive definite: Cholesky

## Functions

magma_int_t | magma_cpotrs_expert_gpu_work (magma_uplo_t uplo, magma_int_t n, magma_int_t nrhs, magmaFloatComplex_ptr dA, magma_int_t ldda, magmaFloatComplex_ptr dB, magma_int_t lddb, magma_int_t *info, void *host_work, magma_int_t *lwork_host, void *device_work, magma_int_t *lwork_device, magma_queue_t queue)
| CPOTRS solves a system of linear equations A*X = B with a Hermitian positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by CPOTRF.
magma_int_t | magma_cpotrs_gpu (magma_uplo_t uplo, magma_int_t n, magma_int_t nrhs, magmaFloatComplex_ptr dA, magma_int_t ldda, magmaFloatComplex_ptr dB, magma_int_t lddb, magma_int_t *info)
| CPOTRS solves a system of linear equations A*X = B with a Hermitian positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by CPOTRF.
magma_int_t | magma_dpotrs_expert_gpu_work (magma_uplo_t uplo, magma_int_t n, magma_int_t nrhs, magmaDouble_ptr dA, magma_int_t ldda, magmaDouble_ptr dB, magma_int_t lddb, magma_int_t *info, void *host_work, magma_int_t *lwork_host, void *device_work, magma_int_t *lwork_device, magma_queue_t queue)
| DPOTRS solves a system of linear equations A*X = B with a symmetric positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by DPOTRF.
magma_int_t | magma_dpotrs_gpu (magma_uplo_t uplo, magma_int_t n, magma_int_t nrhs, magmaDouble_ptr dA, magma_int_t ldda, magmaDouble_ptr dB, magma_int_t lddb, magma_int_t *info)
| DPOTRS solves a system of linear equations A*X = B with a symmetric positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by DPOTRF.
magma_int_t | magma_spotrs_expert_gpu_work (magma_uplo_t uplo, magma_int_t n, magma_int_t nrhs, magmaFloat_ptr dA, magma_int_t ldda, magmaFloat_ptr dB, magma_int_t lddb, magma_int_t *info, void *host_work, magma_int_t *lwork_host, void *device_work, magma_int_t *lwork_device, magma_queue_t queue)
| SPOTRS solves a system of linear equations A*X = B with a symmetric positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by SPOTRF.
magma_int_t | magma_spotrs_gpu (magma_uplo_t uplo, magma_int_t n, magma_int_t nrhs, magmaFloat_ptr dA, magma_int_t ldda, magmaFloat_ptr dB, magma_int_t lddb, magma_int_t *info)
| SPOTRS solves a system of linear equations A*X = B with a symmetric positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by SPOTRF.
magma_int_t | magma_zpotrs_expert_gpu_work (magma_uplo_t uplo, magma_int_t n, magma_int_t nrhs, magmaDoubleComplex_ptr dA, magma_int_t ldda, magmaDoubleComplex_ptr dB, magma_int_t lddb, magma_int_t *info, void *host_work, magma_int_t *lwork_host, void *device_work, magma_int_t *lwork_device, magma_queue_t queue)
| ZPOTRS solves a system of linear equations A*X = B with a Hermitian positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by ZPOTRF.
magma_int_t | magma_zpotrs_gpu (magma_uplo_t uplo, magma_int_t n, magma_int_t nrhs, magmaDoubleComplex_ptr dA, magma_int_t ldda, magmaDoubleComplex_ptr dB, magma_int_t lddb, magma_int_t *info)
| ZPOTRS solves a system of linear equations A*X = B with a Hermitian positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by ZPOTRF.

## Detailed Description

## Function Documentation

## magma_cpotrs_expert_gpu_work()

magma_int_t magma_cpotrs_expert_gpu_work | ( | magma_uplo_t | uplo,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaFloatComplex_ptr | dA,
|  | magma_int_t | ldda,
|  | magmaFloatComplex_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info,
|  | void * | host_work,
|  | magma_int_t * | lwork_host,
|  | void * | device_work,
|  | magma_int_t * | lwork_device,
|  | magma_queue_t | queue )

CPOTRS solves a system of linear equations A*X = B with a Hermitian positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by CPOTRF.

This is an expert API, exposing more controls to the user

Parameters

  [in]

  uplo

  magma_uplo_t
  - = MagmaUpper: Upper triangle of A is stored;
  - = MagmaLower: Lower triangle of A is stored.

  [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 triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H, as computed by CPOTRF.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [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,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 computation 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 computation 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

## magma_cpotrs_gpu()

magma_int_t magma_cpotrs_gpu | ( | magma_uplo_t | uplo,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaFloatComplex_ptr | dA,
|  | magma_int_t | ldda,
|  | magmaFloatComplex_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info )

CPOTRS solves a system of linear equations A*X = B with a Hermitian positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by CPOTRF.

Parameters

  [in]

  uplo

  magma_uplo_t
  - = MagmaUpper: Upper triangle of A is stored;
  - = MagmaLower: Lower triangle of A is stored.

  [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 triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H, as computed by CPOTRF.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [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_dpotrs_expert_gpu_work()

magma_int_t magma_dpotrs_expert_gpu_work | ( | magma_uplo_t | uplo,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaDouble_ptr | dA,
|  | magma_int_t | ldda,
|  | magmaDouble_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info,
|  | void * | host_work,
|  | magma_int_t * | lwork_host,
|  | void * | device_work,
|  | magma_int_t * | lwork_device,
|  | magma_queue_t | queue )

DPOTRS solves a system of linear equations A*X = B with a symmetric positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by DPOTRF.

This is an expert API, exposing more controls to the user

Parameters

  [in]

  uplo

  magma_uplo_t
  - = MagmaUpper: Upper triangle of A is stored;
  - = MagmaLower: Lower triangle of A is stored.

  [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 triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H, as computed by DPOTRF.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [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,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 computation 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 computation 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

## magma_dpotrs_gpu()

magma_int_t magma_dpotrs_gpu | ( | magma_uplo_t | uplo,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaDouble_ptr | dA,
|  | magma_int_t | ldda,
|  | magmaDouble_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info )

DPOTRS solves a system of linear equations A*X = B with a symmetric positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by DPOTRF.

Parameters

  [in]

  uplo

  magma_uplo_t
  - = MagmaUpper: Upper triangle of A is stored;
  - = MagmaLower: Lower triangle of A is stored.

  [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 triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H, as computed by DPOTRF.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [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_spotrs_expert_gpu_work()

magma_int_t magma_spotrs_expert_gpu_work | ( | magma_uplo_t | uplo,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaFloat_ptr | dA,
|  | magma_int_t | ldda,
|  | magmaFloat_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info,
|  | void * | host_work,
|  | magma_int_t * | lwork_host,
|  | void * | device_work,
|  | magma_int_t * | lwork_device,
|  | magma_queue_t | queue )

SPOTRS solves a system of linear equations A*X = B with a symmetric positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by SPOTRF.

This is an expert API, exposing more controls to the user

Parameters

  [in]

  uplo

  magma_uplo_t
  - = MagmaUpper: Upper triangle of A is stored;
  - = MagmaLower: Lower triangle of A is stored.

  [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 triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H, as computed by SPOTRF.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [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,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 computation 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 computation 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

## magma_spotrs_gpu()

magma_int_t magma_spotrs_gpu | ( | magma_uplo_t | uplo,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaFloat_ptr | dA,
|  | magma_int_t | ldda,
|  | magmaFloat_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info )

SPOTRS solves a system of linear equations A*X = B with a symmetric positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by SPOTRF.

Parameters

  [in]

  uplo

  magma_uplo_t
  - = MagmaUpper: Upper triangle of A is stored;
  - = MagmaLower: Lower triangle of A is stored.

  [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 triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H, as computed by SPOTRF.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [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_zpotrs_expert_gpu_work()

magma_int_t magma_zpotrs_expert_gpu_work | ( | magma_uplo_t | uplo,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaDoubleComplex_ptr | dA,
|  | magma_int_t | ldda,
|  | magmaDoubleComplex_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info,
|  | void * | host_work,
|  | magma_int_t * | lwork_host,
|  | void * | device_work,
|  | magma_int_t * | lwork_device,
|  | magma_queue_t | queue )

ZPOTRS solves a system of linear equations A*X = B with a Hermitian positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by ZPOTRF.

This is an expert API, exposing more controls to the user

Parameters

  [in]

  uplo

  magma_uplo_t
  - = MagmaUpper: Upper triangle of A is stored;
  - = MagmaLower: Lower triangle of A is stored.

  [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 triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H, as computed by ZPOTRF.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [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,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 computation 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 computation 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

## magma_zpotrs_gpu()

magma_int_t magma_zpotrs_gpu | ( | magma_uplo_t | uplo,
|  | magma_int_t | n,
|  | magma_int_t | nrhs,
|  | magmaDoubleComplex_ptr | dA,
|  | magma_int_t | ldda,
|  | magmaDoubleComplex_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t * | info )

ZPOTRS solves a system of linear equations A*X = B with a Hermitian positive definite matrix A using the Cholesky factorization A = U**H*U or A = L*L**H computed by ZPOTRF.

Parameters

  [in]

  uplo

  magma_uplo_t
  - = MagmaUpper: Upper triangle of A is stored;
  - = MagmaLower: Lower triangle of A is stored.

  [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 triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H, as computed by ZPOTRF.
  [in] | ldda | INTEGER The leading dimension of the array A. LDDA >= max(1,N).
  [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