MAGMA  1.5.0
Matrix Algebra for GPU and Multicore Architectures
 All Files Functions Groups

Functions

magma_int_t magma_spotrf (magma_uplo_t uplo, magma_int_t n, float *A, magma_int_t lda, magma_int_t *info)
 SPOTRF computes the Cholesky factorization of a real symmetric positive definite matrix A. More...
 
magma_int_t magma_spotrf2_mgpu (int num_gpus, magma_uplo_t uplo, magma_int_t m, magma_int_t n, magma_int_t off_i, magma_int_t off_j, magma_int_t nb, float **d_lA, magma_int_t ldda, float **d_lP, magma_int_t lddp, float *A, magma_int_t lda, magma_int_t h, magma_queue_t stream[][3], magma_event_t event[][5], magma_int_t *info)
 SPOTRF computes the Cholesky factorization of a real symmetric positive definite matrix dA. More...
 
magma_int_t magma_spotrf3_mgpu (magma_int_t num_gpus, magma_uplo_t uplo, magma_int_t m, magma_int_t n, magma_int_t off_i, magma_int_t off_j, magma_int_t nb, float *d_lA[], magma_int_t ldda, float *d_lP[], magma_int_t lddp, float *A, magma_int_t lda, magma_int_t h, magma_queue_t stream[][3], magma_event_t event[][5], magma_int_t *info)
 SPOTRF computes the Cholesky factorization of a real symmetric positive definite matrix dA. More...
 
magma_int_t magma_spotrf_gpu (magma_uplo_t uplo, magma_int_t n, float *dA, magma_int_t ldda, magma_int_t *info)
 SPOTRF computes the Cholesky factorization of a real symmetric positive definite matrix dA. More...
 
magma_int_t magma_spotrf_m (magma_int_t num_gpus0, magma_uplo_t uplo, magma_int_t n, float *A, magma_int_t lda, magma_int_t *info)
 SPOTRF_OOC computes the Cholesky factorization of a real symmetric positive definite matrix A. More...
 
magma_int_t magma_spotrf_mgpu (magma_int_t num_gpus, magma_uplo_t uplo, magma_int_t n, float **d_lA, magma_int_t ldda, magma_int_t *info)
 SPOTRF computes the Cholesky factorization of a real symmetric positive definite matrix dA. More...
 
magma_int_t magma_spotri (magma_uplo_t uplo, magma_int_t n, float *A, magma_int_t lda, magma_int_t *info)
 SPOTRI computes the inverse of a real symmetric positive definite matrix A using the Cholesky factorization A = U**T*U or A = L*L**T computed by SPOTRF. More...
 
magma_int_t magma_spotri_gpu (magma_uplo_t uplo, magma_int_t n, float *dA, magma_int_t ldda, magma_int_t *info)
 SPOTRI computes the inverse of a real symmetric positive definite matrix A using the Cholesky factorization A = U**T*U or A = L*L**T computed by SPOTRF. More...
 
magma_int_t magma_spotrs_gpu (magma_uplo_t uplo, magma_int_t n, magma_int_t nrhs, float *dA, magma_int_t ldda, float *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**T*U or A = L*L**T computed by SPOTRF. More...
 

Detailed Description

Function Documentation

magma_int_t magma_spotrf ( magma_uplo_t  uplo,
magma_int_t  n,
float *  A,
magma_int_t  lda,
magma_int_t *  info 
)

SPOTRF computes the Cholesky factorization of a real symmetric positive definite matrix A.

This version does not require work space on the GPU passed as input. GPU memory is allocated in the routine.

The factorization has the form A = U**T * U, if uplo = MagmaUpper, or A = L * L**T, if uplo = MagmaLower, where U is an upper triangular matrix and L is lower triangular.

This is the block version of the algorithm, calling Level 3 BLAS. If the current stream is NULL, this version replaces it with user defined stream to overlap computation with communication.

Parameters
[in]uplomagma_uplo_t
  • = MagmaUpper: Upper triangle of A is stored;
  • = MagmaLower: Lower triangle of A is stored.
[in]nINTEGER The order of the matrix A. N >= 0.
[in,out]AREAL array, dimension (LDA,N) On entry, the symmetric matrix A. If uplo = MagmaUpper, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If uplo = MagmaLower, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.
On exit, if INFO = 0, the factor U or L from the Cholesky factorization A = U**T * U or A = L * L**T.
Higher performance is achieved if A is in pinned memory, e.g. allocated using magma_malloc_pinned.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.
  • > 0: if INFO = i, the leading minor of order i is not positive definite, and the factorization could not be completed.
magma_int_t magma_spotrf2_mgpu ( int  num_gpus,
magma_uplo_t  uplo,
magma_int_t  m,
magma_int_t  n,
magma_int_t  off_i,
magma_int_t  off_j,
magma_int_t  nb,
float **  d_lA,
magma_int_t  ldda,
float **  d_lP,
magma_int_t  lddp,
float *  A,
magma_int_t  lda,
magma_int_t  h,
magma_queue_t  stream[][3],
magma_event_t  event[][5],
magma_int_t *  info 
)

SPOTRF computes the Cholesky factorization of a real symmetric positive definite matrix dA.

The factorization has the form dA = U**T * U, if UPLO = MagmaUpper, or dA = L * L**T, if UPLO = MagmaLower, where U is an upper triangular matrix and L is lower triangular.

This is the block version of the algorithm, calling Level 3 BLAS.

Parameters
[in]uplomagma_uplo_t
  • = MagmaUpper: Upper triangle of dA is stored;
  • = MagmaLower: Lower triangle of dA is stored.
[in]nINTEGER The order of the matrix dA. N >= 0.
[in,out]dAREAL array on the GPU, dimension (LDDA,N) On entry, the symmetric matrix dA. If UPLO = MagmaUpper, the leading N-by-N upper triangular part of dA contains the upper triangular part of the matrix dA, and the strictly lower triangular part of dA is not referenced. If UPLO = MagmaLower, the leading N-by-N lower triangular part of dA contains the lower triangular part of the matrix dA, and the strictly upper triangular part of dA is not referenced.
On exit, if INFO = 0, the factor U or L from the Cholesky factorization dA = U**T * U or dA = L * L**T.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,N). To benefit from coalescent memory accesses LDDA must be divisible by 16.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
  • > 0: if INFO = i, the leading minor of order i is not positive definite, and the factorization could not be completed.
magma_int_t magma_spotrf3_mgpu ( magma_int_t  num_gpus,
magma_uplo_t  uplo,
magma_int_t  m,
magma_int_t  n,
magma_int_t  off_i,
magma_int_t  off_j,
magma_int_t  nb,
float *  d_lA[],
magma_int_t  ldda,
float *  d_lP[],
magma_int_t  lddp,
float *  A,
magma_int_t  lda,
magma_int_t  h,
magma_queue_t  stream[][3],
magma_event_t  event[][5],
magma_int_t *  info 
)

SPOTRF computes the Cholesky factorization of a real symmetric positive definite matrix dA.

Auxiliary subroutine for spotrf2_ooc. It is multiple gpu interface to compute Cholesky of a "rectangular" matrix.

The factorization has the form dA = U**T * U, if UPLO = MagmaUpper, or dA = L * L**T, if UPLO = MagmaLower, where U is an upper triangular matrix and L is lower triangular.

This is the block version of the algorithm, calling Level 3 BLAS.

Parameters
[in]uplomagma_uplo_t
  • = MagmaUpper: Upper triangle of dA is stored;
  • = MagmaLower: Lower triangle of dA is stored.
[in]nINTEGER The order of the matrix dA. N >= 0.
[in,out]dAREAL array on the GPU, dimension (LDDA,N) On entry, the symmetric matrix dA. If UPLO = MagmaUpper, the leading N-by-N upper triangular part of dA contains the upper triangular part of the matrix dA, and the strictly lower triangular part of dA is not referenced. If UPLO = MagmaLower, the leading N-by-N lower triangular part of dA contains the lower triangular part of the matrix dA, and the strictly upper triangular part of dA is not referenced.
On exit, if INFO = 0, the factor U or L from the Cholesky factorization dA = U**T * U or dA = L * L**T.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,N). To benefit from coalescent memory accesses LDDA must be divisible by 16.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
  • > 0: if INFO = i, the leading minor of order i is not positive definite, and the factorization could not be completed.
magma_int_t magma_spotrf_gpu ( magma_uplo_t  uplo,
magma_int_t  n,
float *  dA,
magma_int_t  ldda,
magma_int_t *  info 
)

SPOTRF computes the Cholesky factorization of a real symmetric positive definite matrix dA.

The factorization has the form dA = U**T * U, if UPLO = MagmaUpper, or dA = L * L**T, if UPLO = MagmaLower, where U is an upper triangular matrix and L is lower triangular.

This is the block version of the algorithm, calling Level 3 BLAS. If the current stream is NULL, this version replaces it with user defined stream to overlap computation with communication.

Parameters
[in]uplomagma_uplo_t
  • = MagmaUpper: Upper triangle of dA is stored;
  • = MagmaLower: Lower triangle of dA is stored.
[in]nINTEGER The order of the matrix dA. N >= 0.
[in,out]dAREAL array on the GPU, dimension (LDDA,N) On entry, the symmetric matrix dA. If UPLO = MagmaUpper, the leading N-by-N upper triangular part of dA contains the upper triangular part of the matrix dA, and the strictly lower triangular part of dA is not referenced. If UPLO = MagmaLower, the leading N-by-N lower triangular part of dA contains the lower triangular part of the matrix dA, and the strictly upper triangular part of dA is not referenced.
On exit, if INFO = 0, the factor U or L from the Cholesky factorization dA = U**T * U or dA = L * L**T.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,N). To benefit from coalescent memory accesses LDDA must be divisible by 16.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
  • > 0: if INFO = i, the leading minor of order i is not positive definite, and the factorization could not be completed.
magma_int_t magma_spotrf_m ( magma_int_t  num_gpus0,
magma_uplo_t  uplo,
magma_int_t  n,
float *  A,
magma_int_t  lda,
magma_int_t *  info 
)

SPOTRF_OOC computes the Cholesky factorization of a real symmetric positive definite matrix A.

This version does not require work space on the GPU passed as input. GPU memory is allocated in the routine. The matrix A may not fit entirely in the GPU memory.

The factorization has the form A = U**T * U, if UPLO = MagmaUpper, or A = L * L**T, if UPLO = MagmaLower, where U is an upper triangular matrix and L is lower triangular.

This is the block version of the algorithm, calling Level 3 BLAS.

Parameters
[in]uplomagma_uplo_t
  • = MagmaUpper: Upper triangle of A is stored;
  • = MagmaLower: Lower triangle of A is stored.
[in]nINTEGER The order of the matrix A. N >= 0.
[in,out]AREAL array, dimension (LDA,N) On entry, the symmetric matrix A. If UPLO = MagmaUpper, the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = MagmaLower, the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.
On exit, if INFO = 0, the factor U or L from the Cholesky factorization A = U**T * U or A = L * L**T.
Higher performance is achieved if A is in pinned memory, e.g. allocated using magma_malloc_pinned.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.
  • > 0: if INFO = i, the leading minor of order i is not positive definite, and the factorization could not be completed.
magma_int_t magma_spotrf_mgpu ( magma_int_t  num_gpus,
magma_uplo_t  uplo,
magma_int_t  n,
float **  d_lA,
magma_int_t  ldda,
magma_int_t *  info 
)

SPOTRF computes the Cholesky factorization of a real symmetric positive definite matrix dA.

The factorization has the form dA = U**T * U, if UPLO = MagmaUpper, or dA = L * L**T, if UPLO = MagmaLower, where U is an upper triangular matrix and L is lower triangular.

This is the block version of the algorithm, calling Level 3 BLAS.

Parameters
[in]uplomagma_uplo_t
  • = MagmaUpper: Upper triangle of dA is stored;
  • = MagmaLower: Lower triangle of dA is stored.
[in]nINTEGER The order of the matrix dA. N >= 0.
[in,out]dAREAL array on the GPU, dimension (LDDA,N) On entry, the symmetric matrix dA. If UPLO = MagmaUpper, the leading N-by-N upper triangular part of dA contains the upper triangular part of the matrix dA, and the strictly lower triangular part of dA is not referenced. If UPLO = MagmaLower, the leading N-by-N lower triangular part of dA contains the lower triangular part of the matrix dA, and the strictly upper triangular part of dA is not referenced.
On exit, if INFO = 0, the factor U or L from the Cholesky factorization dA = U**T * U or dA = L * L**T.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,N). To benefit from coalescent memory accesses LDDA must be divisible by 16.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
  • > 0: if INFO = i, the leading minor of order i is not positive definite, and the factorization could not be completed.
magma_int_t magma_spotri ( magma_uplo_t  uplo,
magma_int_t  n,
float *  A,
magma_int_t  lda,
magma_int_t *  info 
)

SPOTRI computes the inverse of a real symmetric positive definite matrix A using the Cholesky factorization A = U**T*U or A = L*L**T computed by SPOTRF.

Parameters
[in]uplomagma_uplo_t
  • = MagmaUpper: Upper triangle of A is stored;
  • = MagmaLower: Lower triangle of A is stored.
[in]nINTEGER The order of the matrix A. N >= 0.
[in,out]AREAL array, dimension (LDA,N) On entry, the triangular factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T, as computed by SPOTRF. On exit, the upper or lower triangle of the (symmetric) inverse of A, overwriting the input factor U or L.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
  • > 0: if INFO = i, the (i,i) element of the factor U or L is zero, and the inverse could not be computed.
magma_int_t magma_spotri_gpu ( magma_uplo_t  uplo,
magma_int_t  n,
float *  dA,
magma_int_t  ldda,
magma_int_t *  info 
)

SPOTRI computes the inverse of a real symmetric positive definite matrix A using the Cholesky factorization A = U**T*U or A = L*L**T computed by SPOTRF.

Parameters
[in]uplomagma_uplo_t
  • = MagmaUpper: Upper triangle of A is stored;
  • = MagmaLower: Lower triangle of A is stored.
[in]nINTEGER The order of the matrix A. N >= 0.
[in,out]dAREAL array on the GPU, dimension (LDA,N) On entry, the triangular factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T, as computed by SPOTRF. On exit, the upper or lower triangle of the (symmetric) inverse of A, overwriting the input factor U or L.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,N).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
  • > 0: if INFO = i, the (i,i) element of the factor U or L is zero, and the inverse could not be computed.
magma_int_t magma_spotrs_gpu ( magma_uplo_t  uplo,
magma_int_t  n,
magma_int_t  nrhs,
float *  dA,
magma_int_t  ldda,
float *  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**T*U or A = L*L**T computed by SPOTRF.

Parameters
[in]uplomagma_uplo_t
  • = MagmaUpper: Upper triangle of A is stored;
  • = MagmaLower: Lower triangle of A is stored.
[in]nINTEGER The order of the matrix A. N >= 0.
[in]nrhsINTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
[in]dAREAL array on the GPU, dimension (LDDA,N) The triangular factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T, as computed by SPOTRF.
[in]lddaINTEGER The leading dimension of the array A. LDDA >= max(1,N).
[in,out]dBREAL array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
[in]lddbINTEGER The leading dimension of the array B. LDDB >= max(1,N).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value