Go to the source code of this file.
Namespaces | |||||||||||||||||||||||||||||||||||||
namespace | af | ||||||||||||||||||||||||||||||||||||
Enumerations | |||||||||||||||||||||||||||||||||||||
enum | afSolve { af_solve_none = 0, af_solve_posdef = 1, af_solve_nonposdef = 2, af_solve_gaussian = 3, af_solve_pseudo = 4, af_solve_ctrans = 256, af_solve_trans = 512, af_solve_uppertri = 1024, af_solve_lowertri = 2048 } | ||||||||||||||||||||||||||||||||||||
Functions | |||||||||||||||||||||||||||||||||||||
array | lu (const array &in) | ||||||||||||||||||||||||||||||||||||
LU factorization (packed) | |||||||||||||||||||||||||||||||||||||
void | lu (array &lower, array &upper, const array &in) | ||||||||||||||||||||||||||||||||||||
LU factorization. | |||||||||||||||||||||||||||||||||||||
void | lu (array &lower, array &upper, array &pivot, const array &in) | ||||||||||||||||||||||||||||||||||||
LU factorization (with pivoting) | |||||||||||||||||||||||||||||||||||||
array | qr (const array &in) | ||||||||||||||||||||||||||||||||||||
QR factorization (packed). | |||||||||||||||||||||||||||||||||||||
void | qr (array &q, array &r, const array &in) | ||||||||||||||||||||||||||||||||||||
QR factorization. | |||||||||||||||||||||||||||||||||||||
void | qr (array &q, array &r, array &tau, const array &in) | ||||||||||||||||||||||||||||||||||||
QR factorization with tau . | |||||||||||||||||||||||||||||||||||||
array | cholesky (unsigned &info, const array &X, bool is_upper=true) | ||||||||||||||||||||||||||||||||||||
Cholesky decomposition ("Y^T * Y == X"). | |||||||||||||||||||||||||||||||||||||
array | hessenberg (const array &in) | ||||||||||||||||||||||||||||||||||||
Hessenberg matrix form. | |||||||||||||||||||||||||||||||||||||
void | hessenberg (array &h, array &q, const array &in) | ||||||||||||||||||||||||||||||||||||
Hessenberg matrix h with unitary permutation matrix q . | |||||||||||||||||||||||||||||||||||||
array | eigen (const array &in, bool is_diag=false) | ||||||||||||||||||||||||||||||||||||
Eigenvalues. | |||||||||||||||||||||||||||||||||||||
void | eigen (array &values, array &vectors, const array &in) | ||||||||||||||||||||||||||||||||||||
Eigenvalues and eigenvectors. | |||||||||||||||||||||||||||||||||||||
array | svd (const array &in, bool is_diag=false) | ||||||||||||||||||||||||||||||||||||
Singular values. | |||||||||||||||||||||||||||||||||||||
void | svd (array &s, array &u, array &v, const array &in) | ||||||||||||||||||||||||||||||||||||
Singular values with unitary bases: in = u * s * v. | |||||||||||||||||||||||||||||||||||||
array | inv (const array &in) | ||||||||||||||||||||||||||||||||||||
Matrix inversion. | |||||||||||||||||||||||||||||||||||||
array | pinv (const array &in) | ||||||||||||||||||||||||||||||||||||
Pseudo inverse. | |||||||||||||||||||||||||||||||||||||
array | mpow (const array &base, double exponent) | ||||||||||||||||||||||||||||||||||||
Matrix power. | |||||||||||||||||||||||||||||||||||||
unsigned | rank (const array &in, double tolerance=1e-5) | ||||||||||||||||||||||||||||||||||||
Rank of matrix. | |||||||||||||||||||||||||||||||||||||
template<typename T > | |||||||||||||||||||||||||||||||||||||
T | det (const array &in) | ||||||||||||||||||||||||||||||||||||
Matrix determinant. | |||||||||||||||||||||||||||||||||||||
array | solve (const array &A, const array &B, afSolve options=af_solve_none) | ||||||||||||||||||||||||||||||||||||
Solve linear system. | |||||||||||||||||||||||||||||||||||||
Device pointer interface: lu Decomposition | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
afError | af_lu_S (int *d_piv, float *d_U, float *d_L, unsigned m, unsigned n, unsigned batch) | ||||||||||||||||||||||||||||||||||||
lu Decomposition on single precision data. No DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_lu_C (int *d_piv, cuComplex *d_U, cuComplex *d_L, unsigned m, unsigned n, unsigned batch) | ||||||||||||||||||||||||||||||||||||
lu Decomposition on single precision, complex data. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_lu_D (int *d_piv, double *d_U, double *d_L, unsigned m, unsigned n, unsigned batch) | ||||||||||||||||||||||||||||||||||||
lu Decomposition on double precision data. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_lu_Z (int *d_piv, cuDoubleComplex *d_U, cuDoubleComplex *d_L, unsigned m, unsigned n, unsigned batch) | ||||||||||||||||||||||||||||||||||||
lu Decomposition on double precision, complex data. DLA license required. | |||||||||||||||||||||||||||||||||||||
Device pointer interface: qr decomposition | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
afError | af_qr_S (float *d_tau, float *d_R, float *d_Q, unsigned m, unsigned n, unsigned k, unsigned batch) | ||||||||||||||||||||||||||||||||||||
qr decomposition on single precision data. | |||||||||||||||||||||||||||||||||||||
afError | af_qr_C (cuComplex *d_tau, cuComplex *d_R, cuComplex *d_Q, unsigned m, unsigned n, unsigned k, unsigned batch) | ||||||||||||||||||||||||||||||||||||
qr decomposition on single precision, complex data. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_qr_D (double *d_tau, double *d_R, double *d_Q, unsigned m, unsigned n, unsigned k, unsigned batch) | ||||||||||||||||||||||||||||||||||||
qr decomposition on double precision data. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_qr_Z (cuDoubleComplex *d_tau, cuDoubleComplex *d_R, cuDoubleComplex *d_Q, unsigned m, unsigned n, unsigned k, unsigned batch) | ||||||||||||||||||||||||||||||||||||
qr decomposition on double precision, complex data. DLA license required. | |||||||||||||||||||||||||||||||||||||
Device pointer interface: Cholesky decomposition | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
afError | af_cholesky_S (float *d_R, unsigned *info, unsigned n, const float *d_A, bool is_upper, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Cholesky decomposition, single precision data. No DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_cholesky_C (cuComplex *d_R, unsigned *info, unsigned n, const cuComplex *d_A, bool is_upper, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Cholesky decomposition, single precision complex data. DLA license reqd. | |||||||||||||||||||||||||||||||||||||
afError | af_cholesky_D (double *d_R, unsigned *info, unsigned n, const double *d_A, bool is_upper, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Cholesky decomposition, double precision data. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_cholesky_Z (cuDoubleComplex *d_R, unsigned *info, unsigned n, const cuDoubleComplex *d_A, bool is_upper, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Cholesky decomposition, double precision, complex data. DLA license reqd. | |||||||||||||||||||||||||||||||||||||
Device pointer interface: Hessenberg Matrix | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
afError | af_hessenberg_S (float *d_H, float *d_Q, unsigned n, const float *d_A, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Find the hessenberg matrix on single precision data. | |||||||||||||||||||||||||||||||||||||
afError | af_hessenberg_C (cuComplex *d_H, cuComplex *d_Q, unsigned n, const cuComplex *d_A, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Find the hessenberg matrix on single precision complex datax. | |||||||||||||||||||||||||||||||||||||
afError | af_hessenberg_D (double *d_H, double *d_Q, unsigned n, const double *d_A, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Find the hessenberg matrix on double precision data. | |||||||||||||||||||||||||||||||||||||
afError | af_hessenberg_Z (cuDoubleComplex *d_H, cuDoubleComplex *d_Q, unsigned n, const cuDoubleComplex *d_A, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Find the hessenberg matrix on double precision complex data. | |||||||||||||||||||||||||||||||||||||
Device pointer interface: Eigen vectors and Eigen values | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
afError | af_eigen_S (void **d_Val, void **d_Vec, bool *is_imag, unsigned n, const float *d_A, bool is_diag, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Eigen value decomposition of single precision input. | |||||||||||||||||||||||||||||||||||||
afError | af_eigen_D (void **d_Val, void **d_Vec, bool *is_imag, unsigned n, const double *d_A, bool is_diag, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Eigen value decomposition of single precision complex input. | |||||||||||||||||||||||||||||||||||||
afError | af_eigen_C (void **d_Val, cuComplex *d_Vec, bool *is_imag, unsigned n, const cuComplex *d_A, bool is_diag, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Eigen value decomposition of double precision input. | |||||||||||||||||||||||||||||||||||||
afError | af_eigen_Z (void **d_Val, cuDoubleComplex *d_Vec, bool *is_imag, unsigned n, const cuDoubleComplex *d_A, bool is_diag, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Eigen value decomposition of double precision complex input. | |||||||||||||||||||||||||||||||||||||
Device pointer interface: Singular value decomposition | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
afError | af_svd_S (float *d_S, float *d_U, float *d_V, char jobU, char jobV, unsigned m, unsigned n, const float *d_A, unsigned m_, unsigned n_, bool is_diag, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Singular value decomposition on single precision input DLA license not required. | |||||||||||||||||||||||||||||||||||||
afError | af_svd_C (float *d_S, cuComplex *d_U, cuComplex *d_V, char jobU, char jobV, unsigned m, unsigned n, const cuComplex *d_A, unsigned m_, unsigned n_, bool is_diag, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Singular value decomposition on single precision complex input DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_svd_D (double *d_S, double *d_U, double *d_V, char jobU, char jobV, unsigned m, unsigned n, const double *d_A, unsigned m_, unsigned n_, bool is_diag, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Singular value decomposition on double precision input DLA license not required. | |||||||||||||||||||||||||||||||||||||
afError | af_svd_Z (double *d_S, cuDoubleComplex *d_U, cuDoubleComplex *d_V, char jobU, char jobV, unsigned m, unsigned n, const cuDoubleComplex *d_A, unsigned m_, unsigned n_, bool is_diag, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Singular value decomposition on double precision complex input DLA license not required. | |||||||||||||||||||||||||||||||||||||
Device pointer interface: Matrix inversion | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
afError | af_inv_S (float *out, unsigned n, float *d_in, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Inversion of single precision matrix. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_inv_C (cuComplex *out, unsigned n, cuComplex *d_in, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Inversion of single precision complex matrix. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_inv_D (double *out, unsigned n, double *d_in, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Inversion of double precision matrix. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_inv_Z (cuDoubleComplex *out, unsigned n, cuDoubleComplex *d_in, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Inversion of double precision complex matrix. DLA license required. | |||||||||||||||||||||||||||||||||||||
Device pointer interface: Matrix determinant | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
afError | af_det_S (float *res, unsigned n, float *d_X, bool inplace, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Determinant of single precision matrix. DLA license not required. | |||||||||||||||||||||||||||||||||||||
afError | af_det_C (cuComplex *res, unsigned n, cuComplex *d_X, bool inplace, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Determinant of single precision complex matrix. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_det_D (double *res, unsigned n, double *d_X, bool inplace, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Determinant of double precision matrix. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_det_Z (cuDoubleComplex *res, unsigned n, cuDoubleComplex *d_X, bool inplace, unsigned batch) | ||||||||||||||||||||||||||||||||||||
Determinant of double precision complex matrix. DLA license required. | |||||||||||||||||||||||||||||||||||||
Device pointer interface: Matrix power | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
afError | af_matrixPower_S (void **d_out, unsigned n, const float *d_in, float power, unsigned batch, bool *is_cplx) | ||||||||||||||||||||||||||||||||||||
Matrix power for single precision matrix. | |||||||||||||||||||||||||||||||||||||
afError | af_matrixPower_C (void **d_out, unsigned n, const cuComplex *d_in, float power, unsigned batch, bool *is_cplx) | ||||||||||||||||||||||||||||||||||||
Matrix power for single precision, complex matrix. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_matrixPower_D (void **d_out, unsigned n, const double *d_in, double power, unsigned batch, bool *is_cplx) | ||||||||||||||||||||||||||||||||||||
Matrix power for double precision matrix. DLA license required. | |||||||||||||||||||||||||||||||||||||
afError | af_matrixPower_Z (void **d_out, unsigned n, const cuDoubleComplex *d_in, double power, unsigned batch, bool *is_cplx) | ||||||||||||||||||||||||||||||||||||
Matrix power for double precision, complex matrix. DLA license required. | |||||||||||||||||||||||||||||||||||||
Device pointer interface: Solving linear systems. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
afError | af_linearSolve_SS (float *d_X, unsigned m, unsigned n, const float *d_A, unsigned batch_A, unsigned k, const float *d_B, unsigned batch_B, unsigned opts) | ||||||||||||||||||||||||||||||||||||
Solve a single precision system. DLA not required for opts = 0, 3. | |||||||||||||||||||||||||||||||||||||
afError | af_linearSolve_CC (cuComplex *d_X, unsigned m, unsigned n, const cuComplex *d_A, unsigned batch_A, unsigned k, const cuComplex *d_B, unsigned batch_B, unsigned opts) | ||||||||||||||||||||||||||||||||||||
Solve a single precision complex system. DLA not required for opts = 3. | |||||||||||||||||||||||||||||||||||||
afError | af_linearSolve_DD (double *d_X, unsigned m, unsigned n, const double *d_A, unsigned batch_A, unsigned k, const double *d_B, unsigned batch_B, unsigned opts) | ||||||||||||||||||||||||||||||||||||
Solve a double precision system. DLA not required for opts = 3. | |||||||||||||||||||||||||||||||||||||
afError | af_linearSolve_ZZ (cuDoubleComplex *d_X, unsigned m, unsigned n, const cuDoubleComplex *d_A, unsigned batch_A, unsigned k, const cuDoubleComplex *d_B, unsigned batch_B, unsigned opts) | ||||||||||||||||||||||||||||||||||||
Solve a double precision complex system. DLA not required for opts = 3. | |||||||||||||||||||||||||||||||||||||
Get original pivot indices | |||||||||||||||||||||||||||||||||||||
d_piv returned by af_lu_* contain indices from their updated locations. af_piv_final gives the original locations of each of the pivots.
| |||||||||||||||||||||||||||||||||||||
afError | af_piv_final_I (int *d_out, unsigned m, unsigned k, const int *d_piv, unsigned batch) | ||||||||||||||||||||||||||||||||||||
afError | af_piv_final_U (unsigned *d_out, unsigned m, unsigned k, const int *d_piv, unsigned batch) | ||||||||||||||||||||||||||||||||||||
afError | af_piv_final_S (float *d_out, unsigned m, unsigned k, const int *d_piv, unsigned batch) | ||||||||||||||||||||||||||||||||||||
afError | af_piv_final_D (double *d_out, unsigned m, unsigned k, const int *d_piv, unsigned batch) |
afError af_piv_final_I | ( | int * | d_out, |
unsigned | m, | ||
unsigned | k, | ||
const int * | d_piv, | ||
unsigned | batch | ||
) |
afError af_piv_final_U | ( | unsigned * | d_out, |
unsigned | m, | ||
unsigned | k, | ||
const int * | d_piv, | ||
unsigned | batch | ||
) |
afError af_piv_final_S | ( | float * | d_out, |
unsigned | m, | ||
unsigned | k, | ||
const int * | d_piv, | ||
unsigned | batch | ||
) |
afError af_piv_final_D | ( | double * | d_out, |
unsigned | m, | ||
unsigned | k, | ||
const int * | d_piv, | ||
unsigned | batch | ||
) |