![]() |
MAGMA 2.10.0
Matrix Algebra for GPU and Multicore Architectures
|
Functions | |
| magma_int_t | magma_cgesvd (magma_vec_t jobu, magma_vec_t jobvt, magma_int_t m, magma_int_t n, magmaFloatComplex *A, magma_int_t lda, float *s, magmaFloatComplex *U, magma_int_t ldu, magmaFloatComplex *VT, magma_int_t ldvt, magmaFloatComplex *work, magma_int_t lwork, float *rwork, magma_int_t *info) |
| CGESVD computes the singular value decomposition (SVD) of a complex M-by-N matrix A, optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_cgesvj_blocked_expert_batched (magma_vec_t jobu_org, magma_vec_t jobv_org, magma_int_t morg, magma_int_t norg, magmaFloatComplex **dA_array, magma_int_t ldda, float **dS_array, magmaFloatComplex **dU_array, magma_int_t lddu, magmaFloatComplex **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, magma_int_t nb, magma_int_t max_sweeps, magma_int_t heevj_max_sweeps, float heevj_tol, float heevj_tol_min, float heevj_tol_scal, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_cgesvj_expert_batched (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaFloatComplex **dA_array, magma_int_t ldda, float **dS_array, magmaFloatComplex **dU_array, magma_int_t lddu, magmaFloatComplex **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_cgesvj_expert_batched_strided (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaFloatComplex_ptr dA, magma_int_t ldda, magma_int_t strideA, magmaFloat_ptr dS, magma_int_t strideS, magmaFloatComplex_ptr dU, magma_int_t lddu, magma_int_t strideU, magmaFloatComplex_ptr dV, magma_int_t lddv, magma_int_t strideV, magmaInt_ptr dinfo_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_cgesvj_batched (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaFloatComplex **dA_array, magma_int_t ldda, float **dS_array, magmaFloatComplex **dU_array, magma_int_t lddu, magmaFloatComplex **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, magma_int_t batchCount, magma_queue_t queue) |
| CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_cgesvj_batched_strided (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaFloatComplex_ptr dA, magma_int_t ldda, magma_int_t strideA, magmaFloat_ptr dS, magma_int_t strideS, magmaFloatComplex_ptr dU, magma_int_t lddu, magma_int_t strideU, magmaFloatComplex_ptr dV, magma_int_t lddv, magma_int_t strideV, magmaInt_ptr dinfo_array, magma_int_t batchCount, magma_queue_t queue) |
| CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_cgesvj_qr_expert_batched (magma_vec_t jobu_org, magma_vec_t jobv_org, magma_int_t morg, magma_int_t norg, magmaFloatComplex **dA_array, magma_int_t ldda, float **dS_array, magmaFloatComplex **dU_array, magma_int_t lddu, magmaFloatComplex **dV_array, magma_int_t lddv, magma_int_t *info_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A, optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_dgesvd (magma_vec_t jobu, magma_vec_t jobvt, magma_int_t m, magma_int_t n, double *A, magma_int_t lda, double *s, double *U, magma_int_t ldu, double *VT, magma_int_t ldvt, double *work, magma_int_t lwork, magma_int_t *info) |
| DGESVD computes the singular value decomposition (SVD) of a real M-by-N matrix A, optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_dgesvj_blocked_expert_batched (magma_vec_t jobu_org, magma_vec_t jobv_org, magma_int_t morg, magma_int_t norg, double **dA_array, magma_int_t ldda, double **dS_array, double **dU_array, magma_int_t lddu, double **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, magma_int_t nb, magma_int_t max_sweeps, magma_int_t heevj_max_sweeps, double heevj_tol, double heevj_tol_min, double heevj_tol_scal, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_dgesvj_expert_batched (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, double **dA_array, magma_int_t ldda, double **dS_array, double **dU_array, magma_int_t lddu, double **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_dgesvj_expert_batched_strided (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaDouble_ptr dA, magma_int_t ldda, magma_int_t strideA, magmaDouble_ptr dS, magma_int_t strideS, magmaDouble_ptr dU, magma_int_t lddu, magma_int_t strideU, magmaDouble_ptr dV, magma_int_t lddv, magma_int_t strideV, magmaInt_ptr dinfo_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_dgesvj_batched (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, double **dA_array, magma_int_t ldda, double **dS_array, double **dU_array, magma_int_t lddu, double **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, magma_int_t batchCount, magma_queue_t queue) |
| DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_dgesvj_batched_strided (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaDouble_ptr dA, magma_int_t ldda, magma_int_t strideA, magmaDouble_ptr dS, magma_int_t strideS, magmaDouble_ptr dU, magma_int_t lddu, magma_int_t strideU, magmaDouble_ptr dV, magma_int_t lddv, magma_int_t strideV, magmaInt_ptr dinfo_array, magma_int_t batchCount, magma_queue_t queue) |
| DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_dgesvj_qr_expert_batched (magma_vec_t jobu_org, magma_vec_t jobv_org, magma_int_t morg, magma_int_t norg, double **dA_array, magma_int_t ldda, double **dS_array, double **dU_array, magma_int_t lddu, double **dV_array, magma_int_t lddv, magma_int_t *info_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A, optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_sgesvd (magma_vec_t jobu, magma_vec_t jobvt, magma_int_t m, magma_int_t n, float *A, magma_int_t lda, float *s, float *U, magma_int_t ldu, float *VT, magma_int_t ldvt, float *work, magma_int_t lwork, magma_int_t *info) |
| SGESVD computes the singular value decomposition (SVD) of a real M-by-N matrix A, optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_sgesvj_blocked_expert_batched (magma_vec_t jobu_org, magma_vec_t jobv_org, magma_int_t morg, magma_int_t norg, float **dA_array, magma_int_t ldda, float **dS_array, float **dU_array, magma_int_t lddu, float **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, magma_int_t nb, magma_int_t max_sweeps, magma_int_t heevj_max_sweeps, float heevj_tol, float heevj_tol_min, float heevj_tol_scal, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_sgesvj_expert_batched (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, float **dA_array, magma_int_t ldda, float **dS_array, float **dU_array, magma_int_t lddu, float **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_sgesvj_expert_batched_strided (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaFloat_ptr dA, magma_int_t ldda, magma_int_t strideA, magmaFloat_ptr dS, magma_int_t strideS, magmaFloat_ptr dU, magma_int_t lddu, magma_int_t strideU, magmaFloat_ptr dV, magma_int_t lddv, magma_int_t strideV, magmaInt_ptr dinfo_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_sgesvj_batched (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, float **dA_array, magma_int_t ldda, float **dS_array, float **dU_array, magma_int_t lddu, float **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, magma_int_t batchCount, magma_queue_t queue) |
| SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_sgesvj_batched_strided (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaFloat_ptr dA, magma_int_t ldda, magma_int_t strideA, magmaFloat_ptr dS, magma_int_t strideS, magmaFloat_ptr dU, magma_int_t lddu, magma_int_t strideU, magmaFloat_ptr dV, magma_int_t lddv, magma_int_t strideV, magmaInt_ptr dinfo_array, magma_int_t batchCount, magma_queue_t queue) |
| SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_sgesvj_qr_expert_batched (magma_vec_t jobu_org, magma_vec_t jobv_org, magma_int_t morg, magma_int_t norg, float **dA_array, magma_int_t ldda, float **dS_array, float **dU_array, magma_int_t lddu, float **dV_array, magma_int_t lddv, magma_int_t *info_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A, optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_zgesvd (magma_vec_t jobu, magma_vec_t jobvt, magma_int_t m, magma_int_t n, magmaDoubleComplex *A, magma_int_t lda, double *s, magmaDoubleComplex *U, magma_int_t ldu, magmaDoubleComplex *VT, magma_int_t ldvt, magmaDoubleComplex *work, magma_int_t lwork, double *rwork, magma_int_t *info) |
| ZGESVD computes the singular value decomposition (SVD) of a complex M-by-N matrix A, optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_zgesvj_blocked_expert_batched (magma_vec_t jobu_org, magma_vec_t jobv_org, magma_int_t morg, magma_int_t norg, magmaDoubleComplex **dA_array, magma_int_t ldda, double **dS_array, magmaDoubleComplex **dU_array, magma_int_t lddu, magmaDoubleComplex **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, magma_int_t nb, magma_int_t max_sweeps, magma_int_t heevj_max_sweeps, double heevj_tol, double heevj_tol_min, double heevj_tol_scal, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_zgesvj_expert_batched (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaDoubleComplex **dA_array, magma_int_t ldda, double **dS_array, magmaDoubleComplex **dU_array, magma_int_t lddu, magmaDoubleComplex **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_zgesvj_expert_batched_strided (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaDoubleComplex_ptr dA, magma_int_t ldda, magma_int_t strideA, magmaDouble_ptr dS, magma_int_t strideS, magmaDoubleComplex_ptr dU, magma_int_t lddu, magma_int_t strideU, magmaDoubleComplex_ptr dV, magma_int_t lddv, magma_int_t strideV, magmaInt_ptr dinfo_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_zgesvj_batched (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaDoubleComplex **dA_array, magma_int_t ldda, double **dS_array, magmaDoubleComplex **dU_array, magma_int_t lddu, magmaDoubleComplex **dV_array, magma_int_t lddv, magma_int_t *dinfo_array, magma_int_t batchCount, magma_queue_t queue) |
| ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_zgesvj_batched_strided (magma_vec_t jobu, magma_vec_t jobv, magma_int_t morg, magma_int_t norg, magmaDoubleComplex_ptr dA, magma_int_t ldda, magma_int_t strideA, magmaDouble_ptr dS, magma_int_t strideS, magmaDoubleComplex_ptr dU, magma_int_t lddu, magma_int_t strideU, magmaDoubleComplex_ptr dV, magma_int_t lddv, magma_int_t strideV, magmaInt_ptr dinfo_array, magma_int_t batchCount, magma_queue_t queue) |
| ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_zgesvj_qr_expert_batched (magma_vec_t jobu_org, magma_vec_t jobv_org, magma_int_t morg, magma_int_t norg, magmaDoubleComplex **dA_array, magma_int_t ldda, double **dS_array, magmaDoubleComplex **dU_array, magma_int_t lddu, magmaDoubleComplex **dV_array, magma_int_t lddv, magma_int_t *info_array, void *device_work, int64_t *device_lwork, magma_int_t batchCount, magma_queue_t queue) |
| ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A, optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_cgesvj_batched_small_sm (magma_vec_t jobu, magma_vec_t jobv, magma_int_t m, magma_int_t n, magmaFloatComplex **dA_array, magma_int_t ldda, float **dS_array, magmaFloatComplex **dU_array, magma_int_t lddu, magmaFloatComplex **dV_array, magma_int_t lddv, magma_int_t *info_array, magma_int_t batchCount, magma_queue_t queue) |
| CGESVJ computes the singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_dgesvj_batched_small_sm (magma_vec_t jobu, magma_vec_t jobv, magma_int_t m, magma_int_t n, double **dA_array, magma_int_t ldda, double **dS_array, double **dU_array, magma_int_t lddu, double **dV_array, magma_int_t lddv, magma_int_t *info_array, magma_int_t batchCount, magma_queue_t queue) |
| DGESVJ computes the singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_sgesvj_batched_small_sm (magma_vec_t jobu, magma_vec_t jobv, magma_int_t m, magma_int_t n, float **dA_array, magma_int_t ldda, float **dS_array, float **dU_array, magma_int_t lddu, float **dV_array, magma_int_t lddv, magma_int_t *info_array, magma_int_t batchCount, magma_queue_t queue) |
| SGESVJ computes the singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t | magma_zgesvj_batched_small_sm (magma_vec_t jobu, magma_vec_t jobv, magma_int_t m, magma_int_t n, magmaDoubleComplex **dA_array, magma_int_t ldda, double **dS_array, magmaDoubleComplex **dU_array, magma_int_t lddu, magmaDoubleComplex **dV_array, magma_int_t lddv, magma_int_t *info_array, magma_int_t batchCount, magma_queue_t queue) |
| ZGESVJ computes the singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors. | |
| magma_int_t magma_cgesvd | ( | magma_vec_t | jobu, |
| magma_vec_t | jobvt, | ||
| magma_int_t | m, | ||
| magma_int_t | n, | ||
| magmaFloatComplex * | A, | ||
| magma_int_t | lda, | ||
| float * | s, | ||
| magmaFloatComplex * | U, | ||
| magma_int_t | ldu, | ||
| magmaFloatComplex * | VT, | ||
| magma_int_t | ldvt, | ||
| magmaFloatComplex * | work, | ||
| magma_int_t | lwork, | ||
| float * | rwork, | ||
| magma_int_t * | info ) |
CGESVD computes the singular value decomposition (SVD) of a complex M-by-N matrix A, optionally computing the left and/or right singular vectors.
The SVD is written
A = U * SIGMA * conjugate-transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M unitary matrix, and V is an N-by-N unitary matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
Note that the routine returns VT = V**H, not V.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobvt | magma_vec_t Specifies options for computing all or part of the matrix V**H:
|
| [in] | m | INTEGER The number of rows of the input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of the input matrix A. N >= 0. |
| [in,out] | A | COMPLEX array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | lda | INTEGER The leading dimension of the array A. LDA >= max(1,M). |
| [out] | s | REAL array, dimension (min(M,N)) The singular values of A, sorted so that S(i) >= S(i+1). |
| [out] | U | COMPLEX array, dimension (LDU,UCOL) (LDU,M) if JOBU = MagmaAllVec or (LDU,min(M,N)) if JOBU = MagmaSomeVec.
|
| [in] | ldu | INTEGER The leading dimension of the array U. LDU >= 1; if JOBU = MagmaSomeVec or MagmaAllVec, LDU >= M. |
| [out] | VT | COMPLEX array, dimension (LDVT,N)
|
| [in] | ldvt | INTEGER The leading dimension of the array VT. LDVT >= 1;
|
| [out] | work | (workspace) COMPLEX array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the required LWORK. |
| [in] | lwork | INTEGER The dimension of the array WORK. If lwork = -1, a workspace query is assumed. The optimal size for the WORK array is calculated and stored in WORK[0], and no other work except argument checking is performed. Let mx = max(M,N) and mn = min(M,N). The threshold for mx >> mn is currently mx >= 1.6*mn. For job: N=None, O=Overwrite, S=Some, A=All. Paths below assume M >= N; for N > M swap jobu and jobvt. Because of varying nb for different subroutines, formulas below are an upper bound. Querying gives an exact number. The optimal block size nb can be obtained through magma_get_dgesvd_nb(M,N). For many cases, there is a fast algorithm, and a slow algorithm that uses less workspace. Here are sizes for both cases. Optimal lwork (fast algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any 2*mn + 2*mn*nb Path 2: jobu=O, jobvt=N mn*mn + 2*mn + 2*mn*nb or mn*mn + max(2*mn + 2*mn*nb, mx*mn) Path 3: jobu=O, jobvt=A,S mn*mn + 2*mn + 2*mn*nb or mn*mn + max(2*mn + 2*mn*nb, mx*mn) Path 4: jobu=S, jobvt=N mn*mn + 2*mn + 2*mn*nb Path 5: jobu=S, jobvt=O 2*mn*mn + 2*mn + 2*mn*nb Path 6: jobu=S, jobvt=A,S mn*mn + 2*mn + 2*mn*nb Path 7: jobu=A, jobvt=N mn*mn + max(2*mn + 2*mn*nb, mn + mx*nb) Path 8: jobu=A, jobvt=O 2*mn*mn + max(2*mn + 2*mn*nb, mn + mx*nb) Path 9: jobu=A, jobvt=A,S mn*mn + max(2*mn + 2*mn*nb, mn + mx*nb) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any 2*mn + (mx + mn)*nb Optimal lwork (slow algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any n/a Path 2: jobu=O, jobvt=N 2*mn + (mx + mn)*nb Path 3-9: 2*mn + max(2*mn*nb, mx*nb) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any n/a MAGMA requires the optimal sizes above, while LAPACK has the same optimal sizes but the minimum sizes below. LAPACK minimum lwork (fast algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any 3*mn Path 2: jobu=O, jobvt=N mn*mn + 3*mn Path 3: jobu=O, jobvt=A,S mn*mn + 3*mn Path 4: jobu=S, jobvt=N mn*mn + 3*mn Path 5: jobu=S, jobvt=O 2*mn*mn + 3*mn Path 6: jobu=S, jobvt=A,S mn*mn + 3*mn Path 7: jobu=A, jobvt=N mn*mn + max(3*mn, mn + mx) Path 8: jobu=A, jobvt=O 2*mn*mn + max(3*mn, mn + mx) Path 9: jobu=A, jobvt=A,S mn*mn + max(3*mn, mn + mx) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any 2*mn + mx LAPACK minimum lwork (slow algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any n/a Path 2-9: 2*mn + mx for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any n/a |
| rwork | (workspace) REAL array, dimension (5*min(M,N)) On exit, if INFO > 0, RWORK(1:MIN(M,N)-1) contains the unconverged superdiagonal elements of an upper bidiagonal matrix B whose diagonal is in S (not necessarily sorted). B satisfies A = U * B * VT, so it has the same singular values as A, and singular vectors related by U and VT. | |
| [out] | info | INTEGER
|
| magma_int_t magma_cgesvj_blocked_expert_batched | ( | magma_vec_t | jobu_org, |
| magma_vec_t | jobv_org, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaFloatComplex ** | dA_array, | ||
| magma_int_t | ldda, | ||
| float ** | dS_array, | ||
| magmaFloatComplex ** | dU_array, | ||
| magma_int_t | lddu, | ||
| magmaFloatComplex ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| magma_int_t | nb, | ||
| magma_int_t | max_sweeps, | ||
| magma_int_t | heevj_max_sweeps, | ||
| float | heevj_tol, | ||
| float | heevj_tol_min, | ||
| float | heevj_tol_scal, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a COMPLEX array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a COMPLEX array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | nb | INTEGER The blocking size used by the algorithm. Each input matrix is subdivided into block columns of width nb each. |
| [in] | max_sweeps | INTEGER The maximum number of Jacobi sweeps. |
| [in] | heevj_max_sweeps | INTEGER The maximum number of Jacobi sweeps for the Hermitian eigensolver used to orthogonalize a pair of block columns |
| [in] | heevj_tol | DOUBLE The tolerance (as multiples of the machine epsilon) for the Hermitian eigensolver. This tolerance is used to control if an off-diagonal element in the Gram matrix should be annihilated during the Hermitian eigen-decomposition. This tolerance can be scaled down by the user as the algorithm progresses (see heevj_tol_min, and heevj_tol_scal). |
| [in] | heevj_tol_min | DOUBLE The minimum tolerance (as multiples of the machine epsilon) for the Hermitian eigensolver. The algorithm optionally scales down heevj_tol as long as it is larger than heevj_tol_min. |
| [in] | heevj_tol_scal | DOUBLE A scaling factor for heevj_tol, so that: heevj_tol[next-svd-sweep] = max( heevj_tol[current-svd-sweep] / heevj_tol_scal, heevj_tol_min) |
heevj_tol_scal >= 1
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_cgesvj_expert_batched | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaFloatComplex ** | dA_array, | ||
| magma_int_t | ldda, | ||
| float ** | dS_array, | ||
| magmaFloatComplex ** | dU_array, | ||
| magma_int_t | lddu, | ||
| magmaFloatComplex ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a COMPLEX array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a COMPLEX array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_cgesvj_expert_batched_strided | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaFloatComplex_ptr | dA, | ||
| magma_int_t | ldda, | ||
| magma_int_t | strideA, | ||
| magmaFloat_ptr | dS, | ||
| magma_int_t | strideS, | ||
| magmaFloatComplex_ptr | dU, | ||
| magma_int_t | lddu, | ||
| magma_int_t | strideU, | ||
| magmaFloatComplex_ptr | dV, | ||
| magma_int_t | lddv, | ||
| magma_int_t | strideV, | ||
| magmaInt_ptr | dinfo_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [in] | strideA | INTEGER The stride (in elements) between two consecutive A matrices. strideA >= (LDDA*N). |
| [out] | dS | Pointer to the beginning of an array of pointers whose length is (batchCount), such that S[i+1] = S[i] + strideS Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [in] | strideS | INTEGER The stride (in elements) between two consecutive S vectors. strideS >= MIN(M, N). |
| [out] | dU | Pointer to the beginning of an array of pointers whose length is (batchCount), such that U[i+1] = U[i] + strideU Each is a COMPLEX array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [in] | strideU | INTEGER The stride (in elements) between two consecutive U matrices. strideU >= (LDDU * MIN(M,N)). |
| [out] | dV | Pointer to the beginning of an array of pointers whose length is (batchCount), such that V[i+1] = V[i] + strideV Each is a COMPLEX array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [in] | strideV | INTEGER The stride (in elements) between two consecutive V matrices. strideU >= (LDDV * MIN(M,N)). |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_cgesvj_batched | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaFloatComplex ** | dA_array, | ||
| magma_int_t | ldda, | ||
| float ** | dS_array, | ||
| magmaFloatComplex ** | dU_array, | ||
| magma_int_t | lddu, | ||
| magmaFloatComplex ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a COMPLEX array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a COMPLEX array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_cgesvj_batched_strided | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaFloatComplex_ptr | dA, | ||
| magma_int_t | ldda, | ||
| magma_int_t | strideA, | ||
| magmaFloat_ptr | dS, | ||
| magma_int_t | strideS, | ||
| magmaFloatComplex_ptr | dU, | ||
| magma_int_t | lddu, | ||
| magma_int_t | strideU, | ||
| magmaFloatComplex_ptr | dV, | ||
| magma_int_t | lddv, | ||
| magma_int_t | strideV, | ||
| magmaInt_ptr | dinfo_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [in] | strideA | INTEGER The stride (in elements) between two consecutive A matrices. strideA >= (LDDA*N). |
| [out] | dS | Pointer to the beginning of an array of pointers whose length is (batchCount), such that S[i+1] = S[i] + strideS Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [in] | strideS | INTEGER The stride (in elements) between two consecutive S vectors. strideS >= MIN(M, N). |
| [out] | dU | Pointer to the beginning of an array of pointers whose length is (batchCount), such that U[i+1] = U[i] + strideU Each is a COMPLEX array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [in] | strideU | INTEGER The stride (in elements) between two consecutive U matrices. strideU >= (LDDU * MIN(M,N)). |
| [out] | dV | Pointer to the beginning of an array of pointers whose length is (batchCount), such that V[i+1] = V[i] + strideV Each is a COMPLEX array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [in] | strideV | INTEGER The stride (in elements) between two consecutive V matrices. strideU >= (LDDV * MIN(M,N)). |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_cgesvj_qr_expert_batched | ( | magma_vec_t | jobu_org, |
| magma_vec_t | jobv_org, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaFloatComplex ** | dA_array, | ||
| magma_int_t | ldda, | ||
| float ** | dS_array, | ||
| magmaFloatComplex ** | dU_array, | ||
| magma_int_t | lddu, | ||
| magmaFloatComplex ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | info_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
CGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A, optionally computing the left and/or right singular vectors.
The routine first computes a QR factorization of A, followed by an SVD on the R factor. Compared to a direct SVD, better performance is expected on tall-skinny matrices.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a COMPLEX array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a COMPLEX array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_dgesvd | ( | magma_vec_t | jobu, |
| magma_vec_t | jobvt, | ||
| magma_int_t | m, | ||
| magma_int_t | n, | ||
| double * | A, | ||
| magma_int_t | lda, | ||
| double * | s, | ||
| double * | U, | ||
| magma_int_t | ldu, | ||
| double * | VT, | ||
| magma_int_t | ldvt, | ||
| double * | work, | ||
| magma_int_t | lwork, | ||
| magma_int_t * | info ) |
DGESVD computes the singular value decomposition (SVD) of a real M-by-N matrix A, optionally computing the left and/or right singular vectors.
The SVD is written
A = U * SIGMA * transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
Note that the routine returns VT = V**T, not V.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobvt | magma_vec_t Specifies options for computing all or part of the matrix V**T:
|
| [in] | m | INTEGER The number of rows of the input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of the input matrix A. N >= 0. |
| [in,out] | A | DOUBLE PRECISION array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | lda | INTEGER The leading dimension of the array A. LDA >= max(1,M). |
| [out] | s | DOUBLE PRECISION array, dimension (min(M,N)) The singular values of A, sorted so that S(i) >= S(i+1). |
| [out] | U | DOUBLE PRECISION array, dimension (LDU,UCOL) (LDU,M) if JOBU = MagmaAllVec or (LDU,min(M,N)) if JOBU = MagmaSomeVec.
|
| [in] | ldu | INTEGER The leading dimension of the array U. LDU >= 1; if JOBU = MagmaSomeVec or MagmaAllVec, LDU >= M. |
| [out] | VT | DOUBLE PRECISION array, dimension (LDVT,N)
|
| [in] | ldvt | INTEGER The leading dimension of the array VT. LDVT >= 1;
|
| [out] | work | (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the required LWORK. if INFO > 0, WORK(2:MIN(M,N)) contains the unconverged superdiagonal elements of an upper bidiagonal matrix B whose diagonal is in S (not necessarily sorted). B satisfies A = U * B * VT, so it has the same singular values as A, and singular vectors related by U and VT. |
| [in] | lwork | INTEGER The dimension of the array WORK. If lwork = -1, a workspace query is assumed. The optimal size for the WORK array is calculated and stored in WORK[0], and no other work except argument checking is performed. Let mx = max(M,N) and mn = min(M,N). The threshold for mx >> mn is currently mx >= 1.6*mn. For job: N=None, O=Overwrite, S=Some, A=All. Paths below assume M >= N; for N > M swap jobu and jobvt. Because of varying nb for different subroutines, formulas below are an upper bound. Querying gives an exact number. The optimal block size nb can be obtained through magma_get_dgesvd_nb(M,N). For many cases, there is a fast algorithm, and a slow algorithm that uses less workspace. Here are sizes for both cases. Optimal lwork (fast algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any 3*mn + 2*mn*nb Path 2: jobu=O, jobvt=N mn*mn + 3*mn + 2*mn*nb or mn*mn + max(3*mn + 2*mn*nb, mn + mx*mn) Path 3: jobu=O, jobvt=A,S mn*mn + 3*mn + 2*mn*nb or mn*mn + max(3*mn + 2*mn*nb, mn + mx*mn) Path 4: jobu=S, jobvt=N mn*mn + 3*mn + 2*mn*nb Path 5: jobu=S, jobvt=O 2*mn*mn + 3*mn + 2*mn*nb Path 6: jobu=S, jobvt=A,S mn*mn + 3*mn + 2*mn*nb Path 7: jobu=A, jobvt=N mn*mn + max(3*mn + 2*mn*nb, mn + mx*nb) Path 8: jobu=A, jobvt=O 2*mn*mn + max(3*mn + 2*mn*nb, mn + mx*nb) Path 9: jobu=A, jobvt=A,S mn*mn + max(3*mn + 2*mn*nb, mn + mx*nb) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any 3*mn + (mx + mn)*nb Optimal lwork (slow algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any n/a Path 2: jobu=O, jobvt=N 3*mn + (mx + mn)*nb Path 3-9: 3*mn + max(2*mn*nb, mx*nb) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any n/a MAGMA requires the optimal sizes above, while LAPACK has the same optimal sizes but the minimum sizes below. LAPACK minimum lwork (fast algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any 5*mn Path 2: jobu=O, jobvt=N mn*mn + 5*mn Path 3: jobu=O, jobvt=A,S mn*mn + 5*mn Path 4: jobu=S, jobvt=N mn*mn + 5*mn Path 5: jobu=S, jobvt=O 2*mn*mn + 5*mn Path 6: jobu=S, jobvt=A,S mn*mn + 5*mn Path 7: jobu=A, jobvt=N mn*mn + max(5*mn, mn + mx) Path 8: jobu=A, jobvt=O 2*mn*mn + max(5*mn, mn + mx) Path 9: jobu=A, jobvt=A,S mn*mn + max(5*mn, mn + mx) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any max(3*mn + mx, 5*mn) LAPACK minimum lwork (slow algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any n/a Path 2-9: max(3*mn + mx, 5*mn) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any n/a |
| [out] | info | INTEGER
|
| magma_int_t magma_dgesvj_blocked_expert_batched | ( | magma_vec_t | jobu_org, |
| magma_vec_t | jobv_org, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| double ** | dA_array, | ||
| magma_int_t | ldda, | ||
| double ** | dS_array, | ||
| double ** | dU_array, | ||
| magma_int_t | lddu, | ||
| double ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| magma_int_t | nb, | ||
| magma_int_t | max_sweeps, | ||
| magma_int_t | heevj_max_sweeps, | ||
| double | heevj_tol, | ||
| double | heevj_tol_min, | ||
| double | heevj_tol_scal, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a DOUBLE PRECISION array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | nb | INTEGER The blocking size used by the algorithm. Each input matrix is subdivided into block columns of width nb each. |
| [in] | max_sweeps | INTEGER The maximum number of Jacobi sweeps. |
| [in] | heevj_max_sweeps | INTEGER The maximum number of Jacobi sweeps for the symmetric eigensolver used to orthogonalize a pair of block columns |
| [in] | heevj_tol | DOUBLE The tolerance (as multiples of the machine epsilon) for the symmetric eigensolver. This tolerance is used to control if an off-diagonal element in the Gram matrix should be annihilated during the symmetric eigen-decomposition. This tolerance can be scaled down by the user as the algorithm progresses (see heevj_tol_min, and heevj_tol_scal). |
| [in] | heevj_tol_min | DOUBLE The minimum tolerance (as multiples of the machine epsilon) for the symmetric eigensolver. The algorithm optionally scales down heevj_tol as long as it is larger than heevj_tol_min. |
| [in] | heevj_tol_scal | DOUBLE A scaling factor for heevj_tol, so that: heevj_tol[next-svd-sweep] = max( heevj_tol[current-svd-sweep] / heevj_tol_scal, heevj_tol_min) |
heevj_tol_scal >= 1
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_dgesvj_expert_batched | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| double ** | dA_array, | ||
| magma_int_t | ldda, | ||
| double ** | dS_array, | ||
| double ** | dU_array, | ||
| magma_int_t | lddu, | ||
| double ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a DOUBLE PRECISION array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_dgesvj_expert_batched_strided | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaDouble_ptr | dA, | ||
| magma_int_t | ldda, | ||
| magma_int_t | strideA, | ||
| magmaDouble_ptr | dS, | ||
| magma_int_t | strideS, | ||
| magmaDouble_ptr | dU, | ||
| magma_int_t | lddu, | ||
| magma_int_t | strideU, | ||
| magmaDouble_ptr | dV, | ||
| magma_int_t | lddv, | ||
| magma_int_t | strideV, | ||
| magmaInt_ptr | dinfo_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a DOUBLE PRECISION array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [in] | strideA | INTEGER The stride (in elements) between two consecutive A matrices. strideA >= (LDDA*N). |
| [out] | dS | Pointer to the beginning of an array of pointers whose length is (batchCount), such that S[i+1] = S[i] + strideS Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [in] | strideS | INTEGER The stride (in elements) between two consecutive S vectors. strideS >= MIN(M, N). |
| [out] | dU | Pointer to the beginning of an array of pointers whose length is (batchCount), such that U[i+1] = U[i] + strideU Each is a DOUBLE PRECISION array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [in] | strideU | INTEGER The stride (in elements) between two consecutive U matrices. strideU >= (LDDU * MIN(M,N)). |
| [out] | dV | Pointer to the beginning of an array of pointers whose length is (batchCount), such that V[i+1] = V[i] + strideV Each is a DOUBLE PRECISION array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [in] | strideV | INTEGER The stride (in elements) between two consecutive V matrices. strideU >= (LDDV * MIN(M,N)). |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_dgesvj_batched | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| double ** | dA_array, | ||
| magma_int_t | ldda, | ||
| double ** | dS_array, | ||
| double ** | dU_array, | ||
| magma_int_t | lddu, | ||
| double ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a DOUBLE PRECISION array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_dgesvj_batched_strided | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaDouble_ptr | dA, | ||
| magma_int_t | ldda, | ||
| magma_int_t | strideA, | ||
| magmaDouble_ptr | dS, | ||
| magma_int_t | strideS, | ||
| magmaDouble_ptr | dU, | ||
| magma_int_t | lddu, | ||
| magma_int_t | strideU, | ||
| magmaDouble_ptr | dV, | ||
| magma_int_t | lddv, | ||
| magma_int_t | strideV, | ||
| magmaInt_ptr | dinfo_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a DOUBLE PRECISION array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [in] | strideA | INTEGER The stride (in elements) between two consecutive A matrices. strideA >= (LDDA*N). |
| [out] | dS | Pointer to the beginning of an array of pointers whose length is (batchCount), such that S[i+1] = S[i] + strideS Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [in] | strideS | INTEGER The stride (in elements) between two consecutive S vectors. strideS >= MIN(M, N). |
| [out] | dU | Pointer to the beginning of an array of pointers whose length is (batchCount), such that U[i+1] = U[i] + strideU Each is a DOUBLE PRECISION array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [in] | strideU | INTEGER The stride (in elements) between two consecutive U matrices. strideU >= (LDDU * MIN(M,N)). |
| [out] | dV | Pointer to the beginning of an array of pointers whose length is (batchCount), such that V[i+1] = V[i] + strideV Each is a DOUBLE PRECISION array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [in] | strideV | INTEGER The stride (in elements) between two consecutive V matrices. strideU >= (LDDV * MIN(M,N)). |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_dgesvj_qr_expert_batched | ( | magma_vec_t | jobu_org, |
| magma_vec_t | jobv_org, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| double ** | dA_array, | ||
| magma_int_t | ldda, | ||
| double ** | dS_array, | ||
| double ** | dU_array, | ||
| magma_int_t | lddu, | ||
| double ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | info_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
DGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A, optionally computing the left and/or right singular vectors.
The routine first computes a QR factorization of A, followed by an SVD on the R factor. Compared to a direct SVD, better performance is expected on tall-skinny matrices.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a DOUBLE PRECISION array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_sgesvd | ( | magma_vec_t | jobu, |
| magma_vec_t | jobvt, | ||
| magma_int_t | m, | ||
| magma_int_t | n, | ||
| float * | A, | ||
| magma_int_t | lda, | ||
| float * | s, | ||
| float * | U, | ||
| magma_int_t | ldu, | ||
| float * | VT, | ||
| magma_int_t | ldvt, | ||
| float * | work, | ||
| magma_int_t | lwork, | ||
| magma_int_t * | info ) |
SGESVD computes the singular value decomposition (SVD) of a real M-by-N matrix A, optionally computing the left and/or right singular vectors.
The SVD is written
A = U * SIGMA * transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
Note that the routine returns VT = V**T, not V.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobvt | magma_vec_t Specifies options for computing all or part of the matrix V**T:
|
| [in] | m | INTEGER The number of rows of the input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of the input matrix A. N >= 0. |
| [in,out] | A | REAL array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | lda | INTEGER The leading dimension of the array A. LDA >= max(1,M). |
| [out] | s | REAL array, dimension (min(M,N)) The singular values of A, sorted so that S(i) >= S(i+1). |
| [out] | U | REAL array, dimension (LDU,UCOL) (LDU,M) if JOBU = MagmaAllVec or (LDU,min(M,N)) if JOBU = MagmaSomeVec.
|
| [in] | ldu | INTEGER The leading dimension of the array U. LDU >= 1; if JOBU = MagmaSomeVec or MagmaAllVec, LDU >= M. |
| [out] | VT | REAL array, dimension (LDVT,N)
|
| [in] | ldvt | INTEGER The leading dimension of the array VT. LDVT >= 1;
|
| [out] | work | (workspace) REAL array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the required LWORK. if INFO > 0, WORK(2:MIN(M,N)) contains the unconverged superdiagonal elements of an upper bidiagonal matrix B whose diagonal is in S (not necessarily sorted). B satisfies A = U * B * VT, so it has the same singular values as A, and singular vectors related by U and VT. |
| [in] | lwork | INTEGER The dimension of the array WORK. If lwork = -1, a workspace query is assumed. The optimal size for the WORK array is calculated and stored in WORK[0], and no other work except argument checking is performed. Let mx = max(M,N) and mn = min(M,N). The threshold for mx >> mn is currently mx >= 1.6*mn. For job: N=None, O=Overwrite, S=Some, A=All. Paths below assume M >= N; for N > M swap jobu and jobvt. Because of varying nb for different subroutines, formulas below are an upper bound. Querying gives an exact number. The optimal block size nb can be obtained through magma_get_sgesvd_nb(M,N). For many cases, there is a fast algorithm, and a slow algorithm that uses less workspace. Here are sizes for both cases. Optimal lwork (fast algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any 3*mn + 2*mn*nb Path 2: jobu=O, jobvt=N mn*mn + 3*mn + 2*mn*nb or mn*mn + max(3*mn + 2*mn*nb, mn + mx*mn) Path 3: jobu=O, jobvt=A,S mn*mn + 3*mn + 2*mn*nb or mn*mn + max(3*mn + 2*mn*nb, mn + mx*mn) Path 4: jobu=S, jobvt=N mn*mn + 3*mn + 2*mn*nb Path 5: jobu=S, jobvt=O 2*mn*mn + 3*mn + 2*mn*nb Path 6: jobu=S, jobvt=A,S mn*mn + 3*mn + 2*mn*nb Path 7: jobu=A, jobvt=N mn*mn + max(3*mn + 2*mn*nb, mn + mx*nb) Path 8: jobu=A, jobvt=O 2*mn*mn + max(3*mn + 2*mn*nb, mn + mx*nb) Path 9: jobu=A, jobvt=A,S mn*mn + max(3*mn + 2*mn*nb, mn + mx*nb) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any 3*mn + (mx + mn)*nb Optimal lwork (slow algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any n/a Path 2: jobu=O, jobvt=N 3*mn + (mx + mn)*nb Path 3-9: 3*mn + max(2*mn*nb, mx*nb) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any n/a MAGMA requires the optimal sizes above, while LAPACK has the same optimal sizes but the minimum sizes below. LAPACK minimum lwork (fast algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any 5*mn Path 2: jobu=O, jobvt=N mn*mn + 5*mn Path 3: jobu=O, jobvt=A,S mn*mn + 5*mn Path 4: jobu=S, jobvt=N mn*mn + 5*mn Path 5: jobu=S, jobvt=O 2*mn*mn + 5*mn Path 6: jobu=S, jobvt=A,S mn*mn + 5*mn Path 7: jobu=A, jobvt=N mn*mn + max(5*mn, mn + mx) Path 8: jobu=A, jobvt=O 2*mn*mn + max(5*mn, mn + mx) Path 9: jobu=A, jobvt=A,S mn*mn + max(5*mn, mn + mx) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any max(3*mn + mx, 5*mn) LAPACK minimum lwork (slow algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any n/a Path 2-9: max(3*mn + mx, 5*mn) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any n/a |
| [out] | info | INTEGER
|
| magma_int_t magma_sgesvj_blocked_expert_batched | ( | magma_vec_t | jobu_org, |
| magma_vec_t | jobv_org, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| float ** | dA_array, | ||
| magma_int_t | ldda, | ||
| float ** | dS_array, | ||
| float ** | dU_array, | ||
| magma_int_t | lddu, | ||
| float ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| magma_int_t | nb, | ||
| magma_int_t | max_sweeps, | ||
| magma_int_t | heevj_max_sweeps, | ||
| float | heevj_tol, | ||
| float | heevj_tol_min, | ||
| float | heevj_tol_scal, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a REAL array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | nb | INTEGER The blocking size used by the algorithm. Each input matrix is subdivided into block columns of width nb each. |
| [in] | max_sweeps | INTEGER The maximum number of Jacobi sweeps. |
| [in] | heevj_max_sweeps | INTEGER The maximum number of Jacobi sweeps for the symmetric eigensolver used to orthogonalize a pair of block columns |
| [in] | heevj_tol | DOUBLE The tolerance (as multiples of the machine epsilon) for the symmetric eigensolver. This tolerance is used to control if an off-diagonal element in the Gram matrix should be annihilated during the symmetric eigen-decomposition. This tolerance can be scaled down by the user as the algorithm progresses (see heevj_tol_min, and heevj_tol_scal). |
| [in] | heevj_tol_min | DOUBLE The minimum tolerance (as multiples of the machine epsilon) for the symmetric eigensolver. The algorithm optionally scales down heevj_tol as long as it is larger than heevj_tol_min. |
| [in] | heevj_tol_scal | DOUBLE A scaling factor for heevj_tol, so that: heevj_tol[next-svd-sweep] = max( heevj_tol[current-svd-sweep] / heevj_tol_scal, heevj_tol_min) |
heevj_tol_scal >= 1
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_sgesvj_expert_batched | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| float ** | dA_array, | ||
| magma_int_t | ldda, | ||
| float ** | dS_array, | ||
| float ** | dU_array, | ||
| magma_int_t | lddu, | ||
| float ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a REAL array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_sgesvj_expert_batched_strided | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaFloat_ptr | dA, | ||
| magma_int_t | ldda, | ||
| magma_int_t | strideA, | ||
| magmaFloat_ptr | dS, | ||
| magma_int_t | strideS, | ||
| magmaFloat_ptr | dU, | ||
| magma_int_t | lddu, | ||
| magma_int_t | strideU, | ||
| magmaFloat_ptr | dV, | ||
| magma_int_t | lddv, | ||
| magma_int_t | strideV, | ||
| magmaInt_ptr | dinfo_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a REAL array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [in] | strideA | INTEGER The stride (in elements) between two consecutive A matrices. strideA >= (LDDA*N). |
| [out] | dS | Pointer to the beginning of an array of pointers whose length is (batchCount), such that S[i+1] = S[i] + strideS Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [in] | strideS | INTEGER The stride (in elements) between two consecutive S vectors. strideS >= MIN(M, N). |
| [out] | dU | Pointer to the beginning of an array of pointers whose length is (batchCount), such that U[i+1] = U[i] + strideU Each is a REAL array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [in] | strideU | INTEGER The stride (in elements) between two consecutive U matrices. strideU >= (LDDU * MIN(M,N)). |
| [out] | dV | Pointer to the beginning of an array of pointers whose length is (batchCount), such that V[i+1] = V[i] + strideV Each is a REAL array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [in] | strideV | INTEGER The stride (in elements) between two consecutive V matrices. strideU >= (LDDV * MIN(M,N)). |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_sgesvj_batched | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| float ** | dA_array, | ||
| magma_int_t | ldda, | ||
| float ** | dS_array, | ||
| float ** | dU_array, | ||
| magma_int_t | lddu, | ||
| float ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a REAL array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_sgesvj_batched_strided | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaFloat_ptr | dA, | ||
| magma_int_t | ldda, | ||
| magma_int_t | strideA, | ||
| magmaFloat_ptr | dS, | ||
| magma_int_t | strideS, | ||
| magmaFloat_ptr | dU, | ||
| magma_int_t | lddu, | ||
| magma_int_t | strideU, | ||
| magmaFloat_ptr | dV, | ||
| magma_int_t | lddv, | ||
| magma_int_t | strideV, | ||
| magmaInt_ptr | dinfo_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a REAL array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [in] | strideA | INTEGER The stride (in elements) between two consecutive A matrices. strideA >= (LDDA*N). |
| [out] | dS | Pointer to the beginning of an array of pointers whose length is (batchCount), such that S[i+1] = S[i] + strideS Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [in] | strideS | INTEGER The stride (in elements) between two consecutive S vectors. strideS >= MIN(M, N). |
| [out] | dU | Pointer to the beginning of an array of pointers whose length is (batchCount), such that U[i+1] = U[i] + strideU Each is a REAL array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [in] | strideU | INTEGER The stride (in elements) between two consecutive U matrices. strideU >= (LDDU * MIN(M,N)). |
| [out] | dV | Pointer to the beginning of an array of pointers whose length is (batchCount), such that V[i+1] = V[i] + strideV Each is a REAL array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [in] | strideV | INTEGER The stride (in elements) between two consecutive V matrices. strideU >= (LDDV * MIN(M,N)). |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_sgesvj_qr_expert_batched | ( | magma_vec_t | jobu_org, |
| magma_vec_t | jobv_org, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| float ** | dA_array, | ||
| magma_int_t | ldda, | ||
| float ** | dS_array, | ||
| float ** | dU_array, | ||
| magma_int_t | lddu, | ||
| float ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | info_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
SGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A, optionally computing the left and/or right singular vectors.
The routine first computes a QR factorization of A, followed by an SVD on the R factor. Compared to a direct SVD, better performance is expected on tall-skinny matrices.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) orthogonal matrix, and V is an N-by-min(m,n) orthogonal matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a REAL array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_zgesvd | ( | magma_vec_t | jobu, |
| magma_vec_t | jobvt, | ||
| magma_int_t | m, | ||
| magma_int_t | n, | ||
| magmaDoubleComplex * | A, | ||
| magma_int_t | lda, | ||
| double * | s, | ||
| magmaDoubleComplex * | U, | ||
| magma_int_t | ldu, | ||
| magmaDoubleComplex * | VT, | ||
| magma_int_t | ldvt, | ||
| magmaDoubleComplex * | work, | ||
| magma_int_t | lwork, | ||
| double * | rwork, | ||
| magma_int_t * | info ) |
ZGESVD computes the singular value decomposition (SVD) of a complex M-by-N matrix A, optionally computing the left and/or right singular vectors.
The SVD is written
A = U * SIGMA * conjugate-transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M unitary matrix, and V is an N-by-N unitary matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
Note that the routine returns VT = V**H, not V.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobvt | magma_vec_t Specifies options for computing all or part of the matrix V**H:
|
| [in] | m | INTEGER The number of rows of the input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of the input matrix A. N >= 0. |
| [in,out] | A | COMPLEX_16 array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | lda | INTEGER The leading dimension of the array A. LDA >= max(1,M). |
| [out] | s | DOUBLE PRECISION array, dimension (min(M,N)) The singular values of A, sorted so that S(i) >= S(i+1). |
| [out] | U | COMPLEX_16 array, dimension (LDU,UCOL) (LDU,M) if JOBU = MagmaAllVec or (LDU,min(M,N)) if JOBU = MagmaSomeVec.
|
| [in] | ldu | INTEGER The leading dimension of the array U. LDU >= 1; if JOBU = MagmaSomeVec or MagmaAllVec, LDU >= M. |
| [out] | VT | COMPLEX_16 array, dimension (LDVT,N)
|
| [in] | ldvt | INTEGER The leading dimension of the array VT. LDVT >= 1;
|
| [out] | work | (workspace) COMPLEX_16 array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK[0] returns the required LWORK. |
| [in] | lwork | INTEGER The dimension of the array WORK. If lwork = -1, a workspace query is assumed. The optimal size for the WORK array is calculated and stored in WORK[0], and no other work except argument checking is performed. Let mx = max(M,N) and mn = min(M,N). The threshold for mx >> mn is currently mx >= 1.6*mn. For job: N=None, O=Overwrite, S=Some, A=All. Paths below assume M >= N; for N > M swap jobu and jobvt. Because of varying nb for different subroutines, formulas below are an upper bound. Querying gives an exact number. The optimal block size nb can be obtained through magma_get_dgesvd_nb(M,N). For many cases, there is a fast algorithm, and a slow algorithm that uses less workspace. Here are sizes for both cases. Optimal lwork (fast algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any 2*mn + 2*mn*nb Path 2: jobu=O, jobvt=N mn*mn + 2*mn + 2*mn*nb or mn*mn + max(2*mn + 2*mn*nb, mx*mn) Path 3: jobu=O, jobvt=A,S mn*mn + 2*mn + 2*mn*nb or mn*mn + max(2*mn + 2*mn*nb, mx*mn) Path 4: jobu=S, jobvt=N mn*mn + 2*mn + 2*mn*nb Path 5: jobu=S, jobvt=O 2*mn*mn + 2*mn + 2*mn*nb Path 6: jobu=S, jobvt=A,S mn*mn + 2*mn + 2*mn*nb Path 7: jobu=A, jobvt=N mn*mn + max(2*mn + 2*mn*nb, mn + mx*nb) Path 8: jobu=A, jobvt=O 2*mn*mn + max(2*mn + 2*mn*nb, mn + mx*nb) Path 9: jobu=A, jobvt=A,S mn*mn + max(2*mn + 2*mn*nb, mn + mx*nb) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any 2*mn + (mx + mn)*nb Optimal lwork (slow algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any n/a Path 2: jobu=O, jobvt=N 2*mn + (mx + mn)*nb Path 3-9: 2*mn + max(2*mn*nb, mx*nb) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any n/a MAGMA requires the optimal sizes above, while LAPACK has the same optimal sizes but the minimum sizes below. LAPACK minimum lwork (fast algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any 3*mn Path 2: jobu=O, jobvt=N mn*mn + 3*mn Path 3: jobu=O, jobvt=A,S mn*mn + 3*mn Path 4: jobu=S, jobvt=N mn*mn + 3*mn Path 5: jobu=S, jobvt=O 2*mn*mn + 3*mn Path 6: jobu=S, jobvt=A,S mn*mn + 3*mn Path 7: jobu=A, jobvt=N mn*mn + max(3*mn, mn + mx) Path 8: jobu=A, jobvt=O 2*mn*mn + max(3*mn, mn + mx) Path 9: jobu=A, jobvt=A,S mn*mn + max(3*mn, mn + mx) for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any 2*mn + mx LAPACK minimum lwork (slow algorithm) for mx >> mn: Path 1: jobu=N, jobvt=any n/a Path 2-9: 2*mn + mx for mx >= mn, but not mx >> mn: Path 10: jobu=any, jobvt=any n/a |
| rwork | (workspace) DOUBLE PRECISION array, dimension (5*min(M,N)) On exit, if INFO > 0, RWORK(1:MIN(M,N)-1) contains the unconverged superdiagonal elements of an upper bidiagonal matrix B whose diagonal is in S (not necessarily sorted). B satisfies A = U * B * VT, so it has the same singular values as A, and singular vectors related by U and VT. | |
| [out] | info | INTEGER
|
| magma_int_t magma_zgesvj_blocked_expert_batched | ( | magma_vec_t | jobu_org, |
| magma_vec_t | jobv_org, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaDoubleComplex ** | dA_array, | ||
| magma_int_t | ldda, | ||
| double ** | dS_array, | ||
| magmaDoubleComplex ** | dU_array, | ||
| magma_int_t | lddu, | ||
| magmaDoubleComplex ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| magma_int_t | nb, | ||
| magma_int_t | max_sweeps, | ||
| magma_int_t | heevj_max_sweeps, | ||
| double | heevj_tol, | ||
| double | heevj_tol_min, | ||
| double | heevj_tol_scal, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX_16 array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a COMPLEX_16 array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a COMPLEX_16 array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | nb | INTEGER The blocking size used by the algorithm. Each input matrix is subdivided into block columns of width nb each. |
| [in] | max_sweeps | INTEGER The maximum number of Jacobi sweeps. |
| [in] | heevj_max_sweeps | INTEGER The maximum number of Jacobi sweeps for the Hermitian eigensolver used to orthogonalize a pair of block columns |
| [in] | heevj_tol | DOUBLE The tolerance (as multiples of the machine epsilon) for the Hermitian eigensolver. This tolerance is used to control if an off-diagonal element in the Gram matrix should be annihilated during the Hermitian eigen-decomposition. This tolerance can be scaled down by the user as the algorithm progresses (see heevj_tol_min, and heevj_tol_scal). |
| [in] | heevj_tol_min | DOUBLE The minimum tolerance (as multiples of the machine epsilon) for the Hermitian eigensolver. The algorithm optionally scales down heevj_tol as long as it is larger than heevj_tol_min. |
| [in] | heevj_tol_scal | DOUBLE A scaling factor for heevj_tol, so that: heevj_tol[next-svd-sweep] = max( heevj_tol[current-svd-sweep] / heevj_tol_scal, heevj_tol_min) |
heevj_tol_scal >= 1
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_zgesvj_expert_batched | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaDoubleComplex ** | dA_array, | ||
| magma_int_t | ldda, | ||
| double ** | dS_array, | ||
| magmaDoubleComplex ** | dU_array, | ||
| magma_int_t | lddu, | ||
| magmaDoubleComplex ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX_16 array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a COMPLEX_16 array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a COMPLEX_16 array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_zgesvj_expert_batched_strided | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaDoubleComplex_ptr | dA, | ||
| magma_int_t | ldda, | ||
| magma_int_t | strideA, | ||
| magmaDouble_ptr | dS, | ||
| magma_int_t | strideS, | ||
| magmaDoubleComplex_ptr | dU, | ||
| magma_int_t | lddu, | ||
| magma_int_t | strideU, | ||
| magmaDoubleComplex_ptr | dV, | ||
| magma_int_t | lddv, | ||
| magma_int_t | strideV, | ||
| magmaInt_ptr | dinfo_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX_16 array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [in] | strideA | INTEGER The stride (in elements) between two consecutive A matrices. strideA >= (LDDA*N). |
| [out] | dS | Pointer to the beginning of an array of pointers whose length is (batchCount), such that S[i+1] = S[i] + strideS Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [in] | strideS | INTEGER The stride (in elements) between two consecutive S vectors. strideS >= MIN(M, N). |
| [out] | dU | Pointer to the beginning of an array of pointers whose length is (batchCount), such that U[i+1] = U[i] + strideU Each is a COMPLEX_16 array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [in] | strideU | INTEGER The stride (in elements) between two consecutive U matrices. strideU >= (LDDU * MIN(M,N)). |
| [out] | dV | Pointer to the beginning of an array of pointers whose length is (batchCount), such that V[i+1] = V[i] + strideV Each is a COMPLEX_16 array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [in] | strideV | INTEGER The stride (in elements) between two consecutive V matrices. strideU >= (LDDV * MIN(M,N)). |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_zgesvj_batched | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaDoubleComplex ** | dA_array, | ||
| magma_int_t | ldda, | ||
| double ** | dS_array, | ||
| magmaDoubleComplex ** | dU_array, | ||
| magma_int_t | lddu, | ||
| magmaDoubleComplex ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | dinfo_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX_16 array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a COMPLEX_16 array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a COMPLEX_16 array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_zgesvj_batched_strided | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaDoubleComplex_ptr | dA, | ||
| magma_int_t | ldda, | ||
| magma_int_t | strideA, | ||
| magmaDouble_ptr | dS, | ||
| magma_int_t | strideS, | ||
| magmaDoubleComplex_ptr | dU, | ||
| magma_int_t | lddu, | ||
| magma_int_t | strideU, | ||
| magmaDoubleComplex_ptr | dV, | ||
| magma_int_t | lddv, | ||
| magma_int_t | strideV, | ||
| magmaInt_ptr | dinfo_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is the internal blocked implementation of the algorithm, which provides extra arguments for expert users.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX_16 array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [in] | strideA | INTEGER The stride (in elements) between two consecutive A matrices. strideA >= (LDDA*N). |
| [out] | dS | Pointer to the beginning of an array of pointers whose length is (batchCount), such that S[i+1] = S[i] + strideS Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [in] | strideS | INTEGER The stride (in elements) between two consecutive S vectors. strideS >= MIN(M, N). |
| [out] | dU | Pointer to the beginning of an array of pointers whose length is (batchCount), such that U[i+1] = U[i] + strideU Each is a COMPLEX_16 array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [in] | strideU | INTEGER The stride (in elements) between two consecutive U matrices. strideU >= (LDDU * MIN(M,N)). |
| [out] | dV | Pointer to the beginning of an array of pointers whose length is (batchCount), such that V[i+1] = V[i] + strideV Each is a COMPLEX_16 array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [in] | strideV | INTEGER The stride (in elements) between two consecutive V matrices. strideU >= (LDDV * MIN(M,N)). |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_zgesvj_qr_expert_batched | ( | magma_vec_t | jobu_org, |
| magma_vec_t | jobv_org, | ||
| magma_int_t | morg, | ||
| magma_int_t | norg, | ||
| magmaDoubleComplex ** | dA_array, | ||
| magma_int_t | ldda, | ||
| double ** | dS_array, | ||
| magmaDoubleComplex ** | dU_array, | ||
| magma_int_t | lddu, | ||
| magmaDoubleComplex ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | info_array, | ||
| void * | device_work, | ||
| int64_t * | device_lwork, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
ZGESVJ computes the reduced singular value decomposition (SVD) of an M-by-N matrix A, optionally computing the left and/or right singular vectors.
The routine first computes a QR factorization of A, followed by an SVD on the R factor. Compared to a direct SVD, better performance is expected on tall-skinny matrices.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where: SIGMA is a min(m,n)-by-min(m,n) matrix which is zero except for its min(m,n) diagonal elements U is an M-by-min(m,n) unitary matrix, and V is an N-by-min(m,n) unitary matrix.
The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm.
This routines computes V, not V**H (if right vectors are required)
The one-sided Jacobi algorithm implicitly computes the left singular vectors anyway while computing the values.
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX_16 array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a COMPLEX_16 array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a COMPLEX_16 array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [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
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_cgesvj_batched_small_sm | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | m, | ||
| magma_int_t | n, | ||
| magmaFloatComplex ** | dA_array, | ||
| magma_int_t | ldda, | ||
| float ** | dS_array, | ||
| magmaFloatComplex ** | dU_array, | ||
| magma_int_t | lddu, | ||
| magmaFloatComplex ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | info_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
CGESVJ computes the singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M unitary matrix, and V is an N-by-N unitary matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
NOTES:
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is an internal routine. Each individual matrix should fit in the shared memory of the GPU. If the right singular vectors are required, additional shared memory workspace is required.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a COMPLEX array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a COMPLEX array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_dgesvj_batched_small_sm | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | m, | ||
| magma_int_t | n, | ||
| double ** | dA_array, | ||
| magma_int_t | ldda, | ||
| double ** | dS_array, | ||
| double ** | dU_array, | ||
| magma_int_t | lddu, | ||
| double ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | info_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
DGESVJ computes the singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
NOTES:
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is an internal routine. Each individual matrix should fit in the shared memory of the GPU. If the right singular vectors are required, additional shared memory workspace is required.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a DOUBLE PRECISION array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_sgesvj_batched_small_sm | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | m, | ||
| magma_int_t | n, | ||
| float ** | dA_array, | ||
| magma_int_t | ldda, | ||
| float ** | dS_array, | ||
| float ** | dU_array, | ||
| magma_int_t | lddu, | ||
| float ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | info_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
SGESVJ computes the singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
NOTES:
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is an internal routine. Each individual matrix should fit in the shared memory of the GPU. If the right singular vectors are required, additional shared memory workspace is required.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a REAL array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a REAL array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |
| magma_int_t magma_zgesvj_batched_small_sm | ( | magma_vec_t | jobu, |
| magma_vec_t | jobv, | ||
| magma_int_t | m, | ||
| magma_int_t | n, | ||
| magmaDoubleComplex ** | dA_array, | ||
| magma_int_t | ldda, | ||
| double ** | dS_array, | ||
| magmaDoubleComplex ** | dU_array, | ||
| magma_int_t | lddu, | ||
| magmaDoubleComplex ** | dV_array, | ||
| magma_int_t | lddv, | ||
| magma_int_t * | info_array, | ||
| magma_int_t | batchCount, | ||
| magma_queue_t | queue ) |
ZGESVJ computes the singular value decomposition (SVD) of an M-by-N matrix A , optionally computing the left and/or right singular vectors.
The SVD is written as:
A = U * SIGMA * conjugate-transpose(V)
where SIGMA is an M-by-N matrix which is zero except for its min(m,n) diagonal elements, U is an M-by-M unitary matrix, and V is an N-by-N unitary matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
NOTES:
This routines computes only the economy size SVD based on the one-sided Jacobi algorithm
This is the batch version of the routine, which performs the SVD on a batch of matrices having the same dimensions.
This is an internal routine. Each individual matrix should fit in the shared memory of the GPU. If the right singular vectors are required, additional shared memory workspace is required.
| [in] | jobu | magma_vec_t Specifies options for computing all or part of the matrix U:
|
| [in] | jobv | magma_vec_t Specifies options for computing the matrix V:
|
| [in] | m | INTEGER The number of rows of each input matrix A. M >= 0. |
| [in] | n | INTEGER The number of columns of each input matrix A. N >= 0. |
| [in,out] | dA_array | Array of pointers, length (batchCount). Each is a COMPLEX_16 array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit,
|
| [in] | ldda | INTEGER The leading dimension of each array A. LDA >= max(1,M). |
| [out] | dS_array | Array of pointers, length (batchCount) Each is a DOUBLE PRECISION array, dimension (min(M,N)) The singular values of each matrix A, sorted so that S(i) >= S(i+1). |
| [out] | dU_array | Array of pointers, length (batchCount) Each is a COMPLEX_16 array, dimension (LDDU,N)
|
| [in] | lddu | INTEGER The leading dimension of each array U. lddu >= max(1,M); |
| [out] | dV_array | Array of pointers, length (batchCount) Each is a COMPLEX_16 array, dimension (LDDV,N)
|
| [in] | lddv | INTEGER The leading dimension of each array V. lddv >= max(1,N); |
| [out] | info | INTEGER
|
| [in] | batchCount | INTEGER The number of matrices to operate on. |
| [in] | queue | magma_queue_t Queue to execute in. |