Constants

MAGMA defines a few constant parameters, such as `MagmaTrans, MagmaNoTrans`, that are equivalent of CBLAS and LAPACK parameters.

The naming and numbering of these parameters follow that of [CBLAS from Netlib](http://www.netlib.org/blas/blast-forum/cblas.tgz) and the [C Interface to LAPACK from Netlib](http://www.netlib.org/lapack/lapwrapc/), and [PLASMA](http://icl.utk.edu/plasma/).

MAGMA includes functions, `lapack_xyz_const()`, which take MAGMA's integer constants and return LAPACK's string constants, where `xyz` is a MAGMA type such as `uplo`, `trans`, etc. From the standpoint of LAPACK, only the first letter of each string is significant. Nevertheless, the functions return meaningful strings, such as "No transpose", "Transpose", "Upper", "Lower", etc. Similarly, there are functions to go from MAGMA's integer constants to CBLAS, OpenCL's clBLAS, and CUDA's cuBLAS integer constants.

There are also functions, `magma_xyz_const()`, to go in the opposite direction, from LAPACK's string constants to MAGMA's integer constants.

The most common constants are those defined for BLAS routines:

Whether a matrix is not transposed, transposed, or conjugate-transposed. For a real matrix, Trans and ConjTrans have the same meaning.

Whether the lower or upper triangle of a matrix is given, or the full matrix.

Whether the matrix is on the left or right.

Whether the diagonal is assumed to be unit (all ones) or not.

Additional constants for specific routines are defined in the documentation for the routines.

Because MAGMA, CBLAS, LAPACK, CUBLAS, and clBlas use potentially different constants, converters between them are provided.

These convert LAPACK constants to MAGMA constants. Note that the meaning of LAPACK constants depends on the context: 'N' can mean False, NoTrans, NonUnit, NoVec, etc. Here, curly braces { } group similar constants.

. | Function | . | Description ----------- | ---- | ---- | ----------- magma_bool_t | magma_bool_const | ( character ) | Map 'N', 'Y'
to MagmaTrue, MagmaFalse magma_order_t | magma_order_const | ( character ) | Map 'R', 'C'
to MagmaRowMajor, MagmaColMajor magma_trans_t | magma_trans_const | ( character ) | Map 'N', 'T', 'C'
to MagmaNoTrans, MagmaTrans, MagmaConjTrans magma_uplo_t | magma_uplo_const | ( character ) | Map 'L', 'U'
to MagmaLower, MagmaUpper magma_diag_t | magma_diag_const | ( character ) | Map 'N', 'U'
to MagmaNonUnit, MagmaUnit magma_side_t | magma_side_const | ( character ) | Map 'L', 'R'
to MagmaLeft, MagmaRight magma_norm_t | magma_norm_const | ( character ) | Map 'O', '1', '2', 'F', 'E', 'I', 'M'
to Magma{One, Two, Frobenius, Inf, Max}Norm magma_dist_t | magma_dist_const | ( character ) | Map 'U', 'S', 'N'
to MagmaDist{Uniform, Symmetric, Normal} magma_vec_t | magma_vec_const | ( character ) | Map 'V', 'N', 'I', 'A', 'S', 'O'
to MagmaVec, Magma{No, I, All, Some, Overwrite}Vec magma_range_t | magma_range_const | ( character ) | Map 'A', 'V', 'I'
to MagmaRange{All, V, I} magma_vect_t | magma_vect_const | ( character ) | Map 'Q', 'P'
to MagmaQ, MagmaP magma_direct_t | magma_direct_const | ( character ) | Map 'F', 'B'
to MagmaForward, MagmaBackward magma_storev_t | magma_storev_const | ( character ) | Map 'C', 'R'
to MagmaColumnwise, MagmaRowwise

These do the inverse map, converting MAGMA to LAPACK constants. From the standpoint of LAPACK, only the first letter of each string is significant. Nevertheless, the functions return meaningful strings, such as "No transpose", "Transpose". Substitute `lapacke` for `lapack` to get version that returns single char instead of string (const char*).

. | Function | . | Description ----------- | ---- | ---- | ----------- const char* | lapack_bool_const | ( magma_bool_t ) | Inverse of magma_bool_const() const char* | lapack_order_const | ( magma_order_t ) | Inverse of magma_order_const() const char* | lapack_trans_const | ( magma_trans_t ) | Inverse of magma_trans_const() const char* | lapack_uplo_const | ( magma_uplo_t ) | Inverse of magma_uplo_const() const char* | lapack_diag_const | ( magma_diag_t ) | Inverse of magma_diag_const() const char* | lapack_side_const | ( magma_side_t ) | Inverse of magma_side_const() const char* | lapack_norm_const | ( magma_norm_t ) | Inverse of magma_norm_const() const char* | lapack_dist_const | ( magma_dist_t ) | Inverse of magma_dist_const() const char* | lapack_vec_const | ( magma_vec_t ) | Inverse of magma_vec_const() const char* | lapack_range_const | ( magma_range_t ) | Inverse of magma_range_const() const char* | lapack_vect_const | ( magma_vect_t ) | Inverse of magma_vect_const() const char* | lapack_direct_const | ( magma_direct_t ) | Inverse of magma_direct_const() const char* | lapack_storev_const | ( magma_storev_t ) | Inverse of magma_storev_const() const char* | lapack_const | ( constant ) | Map any MAGMA constant, Magma*, to an LAPACK string constant char | lapacke_const | ( constant ) | Map any MAGMA constant, Magma*, to an LAPACKE character

To convert MAGMA to Nvidia's CUBLAS constants:

. | Function | . | Description ----------- | ---- | ---- | ----------- cublasOperation_t | cublas_trans_const | ( trans ) | Map MagmaNoTrans, MagmaTrans, MagmaConjTrans
to CUBLAS_OP_N, CUBLAS_OP_T, CUBLAS_OP_C cublasFillMode_t | cublas_uplo_const | ( uplo ) | Map MagmaLower, MagmaUpper
to CUBLAS_FILL_MODE_LOWER, CUBLAS_FILL_MODE_UPPER cublasDiagType_t | cublas_diag_const | ( diag ) | Map MagmaNonUnit, MagmaUnit
to CUBLAS_DIAG_NON_UNIT, CUBLAS_DIAG_UNIT cublasSideMode_t | cublas_side_const | ( side ) | Map MagmaLeft, MagmaRight
to CUBLAS_SIDE_LEFT, CUBLAS_SIDE_Right

To convert MAGMA to AMD's clBlas constants:

. | Function | . | Description ----------- | ---- | ---- | ----------- clblasOrder | clblas_order_const | ( order ) | Map MagmaRowMajor, MagmaColMajor
to clAmdBlasRowMajor, clAmdBlasColumnMajor clblasTranspose | clblas_trans_const | ( trans ) | Map MagmaNoTrans, MagmaTrans, MagmaConjTrans
to clAmdBlasNoTrans, clAmdBlasTrans, clAmdBlasConjTrans clblasUplo | clblas_uplo_const | ( uplo ) | Map MagmaLower, MagmaUpper
to clAmdBlasLower, clAmdBlasUpper clblasDiag | clblas_diag_const | ( diag ) | Map MagmaNonUnit, MagmaUnit
to clAmdBlasNonUnit, clAmdBlasUnit clblasSide | clblas_side_const | ( side ) | Map MagmaLeft, MagmaRight
to clAmdBlasLeft, clAmdBlasRight

To convert MAGMA to CBLAS constants:

. | Function | . | Description ----------- | ---- | ---- | ----------- enum CBLAS_ORDER | cblas_order_const | ( order ) | Map MagmaRowMajor, MagmaColMajor
to CblasRowMajor, CblasColMajor enum CBLAS_TRANSPOSE | cblas_trans_const | ( trans ) | Map MagmaNoTrans, MagmaTrans, MagmaConjTrans
to CblasNoTrans, CblasTrans, CblasConjTrans enum CBLAS_UPLO | cblas_uplo_const | ( uplo ) | Map MagmaLower, MagmaUpper
to CblasLower, CblasUpper enum CBLAS_DIAG | cblas_diag_const | ( diag ) | Map MagmaNonUnit, MagmaUnit
to CblasNonUnit, CblasUnit enum CBLAS_SIDE | cblas_side_const | ( side ) | Map MagmaLeft, MagmaRight
to CblasLeft, CblasRight


Generated on 3 May 2015 for MAGMA by  doxygen 1.6.1