namespace for ATLAS functions (imported from the global namespace) More...
Functions | |
template<typename eT > | |
static const eT & | tmp_real (const eT &X) |
template<typename T > | |
static const T & | tmp_real (const std::complex< T > &X) |
template<typename eT > | |
arma_inline eT | cblas_dot (const int N, const eT *X, const eT *Y) |
template<typename eT > | |
arma_inline eT | cx_cblas_dot (const int N, const eT *X, const eT *Y) |
template<typename eT > | |
void | cblas_gemv (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const eT alpha, const eT *A, const int lda, const eT *X, const int incX, const eT beta, eT *Y, const int incY) |
template<typename eT > | |
void | cblas_gemm (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const eT alpha, const eT *A, const int lda, const eT *B, const int ldb, const eT beta, eT *C, const int ldc) |
template<typename eT > | |
int | clapack_getrf (const enum CBLAS_ORDER Order, const int M, const int N, eT *A, const int lda, int *ipiv) |
template<typename eT > | |
int | clapack_getri (const enum CBLAS_ORDER Order, const int N, eT *A, const int lda, const int *ipiv) |
namespace for ATLAS functions (imported from the global namespace)
static const eT& atlas::tmp_real | ( | const eT & | X | ) | [inline, static] |
Definition at line 54 of file atlas_proto.hpp.
Referenced by cblas_gemm(), cblas_gemv(), auxlib::inv_inplace(), auxlib::inv_noalias(), and auxlib::qr().
{ return X; }
static const T& atlas::tmp_real | ( | const std::complex< T > & | X | ) | [inline, static] |
Definition at line 57 of file atlas_proto.hpp.
{ return X.real(); }
arma_inline eT atlas::cblas_dot | ( | const int | N, | |
const eT * | X, | |||
const eT * | Y | |||
) |
Definition at line 64 of file atlas_proto.hpp.
Referenced by op_dot::direct_dot().
{ arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); if(is_float<eT>::value == true) { typedef float T; return eT( cblas_sdot(N, (const T*)X, 1, (const T*)Y, 1) ); } else if(is_double<eT>::value == true) { typedef double T; return eT( cblas_ddot(N, (const T*)X, 1, (const T*)Y, 1) ); } else { return eT(0); } }
arma_inline eT atlas::cx_cblas_dot | ( | const int | N, | |
const eT * | X, | |||
const eT * | Y | |||
) |
Definition at line 90 of file atlas_proto.hpp.
{ arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); if(is_supported_complex_float<eT>::value == true) { typedef typename std::complex<float> T; T out; cblas_cdotu_sub(N, (const T*)X, 1, (const T*)Y, 1, &out); return eT(out); } else if(is_supported_complex_double<eT>::value == true) { typedef typename std::complex<double> T; T out; cblas_zdotu_sub(N, (const T*)X, 1, (const T*)Y, 1, &out); return eT(out); } else { return eT(0); } }
void atlas::cblas_gemv | ( | const enum CBLAS_ORDER | Order, | |
const enum CBLAS_TRANSPOSE | TransA, | |||
const int | M, | |||
const int | N, | |||
const eT | alpha, | |||
const eT * | A, | |||
const int | lda, | |||
const eT * | X, | |||
const int | incX, | |||
const eT | beta, | |||
eT * | Y, | |||
const int | incY | |||
) | [inline] |
Definition at line 125 of file atlas_proto.hpp.
References tmp_real().
{ arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); if(is_float<eT>::value == true) { typedef float T; cblas_sgemv(Order, TransA, M, N, (const T)tmp_real(alpha), (const T*)A, lda, (const T*)X, incX, (const T)tmp_real(beta), (T*)Y, incY); } else if(is_double<eT>::value == true) { typedef double T; cblas_dgemv(Order, TransA, M, N, (const T)tmp_real(alpha), (const T*)A, lda, (const T*)X, incX, (const T)tmp_real(beta), (T*)Y, incY); } else if(is_supported_complex_float<eT>::value == true) { typedef std::complex<float> T; cblas_cgemv(Order, TransA, M, N, (const T*)&alpha, (const T*)A, lda, (const T*)X, incX, (const T*)&beta, (T*)Y, incY); } else if(is_supported_complex_double<eT>::value == true) { typedef std::complex<double> T; cblas_zgemv(Order, TransA, M, N, (const T*)&alpha, (const T*)A, lda, (const T*)X, incX, (const T*)&beta, (T*)Y, incY); } }
void atlas::cblas_gemm | ( | const enum CBLAS_ORDER | Order, | |
const enum CBLAS_TRANSPOSE | TransA, | |||
const enum CBLAS_TRANSPOSE | TransB, | |||
const int | M, | |||
const int | N, | |||
const int | K, | |||
const eT | alpha, | |||
const eT * | A, | |||
const int | lda, | |||
const eT * | B, | |||
const int | ldb, | |||
const eT | beta, | |||
eT * | C, | |||
const int | ldc | |||
) | [inline] |
Definition at line 168 of file atlas_proto.hpp.
References tmp_real().
{ arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); if(is_float<eT>::value == true) { typedef float T; cblas_sgemm(Order, TransA, TransB, M, N, K, (const T)tmp_real(alpha), (const T*)A, lda, (const T*)B, ldb, (const T)tmp_real(beta), (T*)C, ldc); } else if(is_double<eT>::value == true) { typedef double T; cblas_dgemm(Order, TransA, TransB, M, N, K, (const T)tmp_real(alpha), (const T*)A, lda, (const T*)B, ldb, (const T)tmp_real(beta), (T*)C, ldc); } else if(is_supported_complex_float<eT>::value == true) { typedef std::complex<float> T; cblas_cgemm(Order, TransA, TransB, M, N, K, (const T*)&alpha, (const T*)A, lda, (const T*)B, ldb, (const T*)&beta, (T*)C, ldc); } else if(is_supported_complex_double<eT>::value == true) { typedef std::complex<double> T; cblas_zgemm(Order, TransA, TransB, M, N, K, (const T*)&alpha, (const T*)A, lda, (const T*)B, ldb, (const T*)&beta, (T*)C, ldc); } }
int atlas::clapack_getrf | ( | const enum CBLAS_ORDER | Order, | |
const int | M, | |||
const int | N, | |||
eT * | A, | |||
const int | lda, | |||
int * | ipiv | |||
) | [inline] |
Definition at line 209 of file atlas_proto.hpp.
Referenced by auxlib::det(), auxlib::inv_inplace(), auxlib::inv_noalias(), auxlib::log_det(), and auxlib::lu().
{ arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); if(is_float<eT>::value == true) { typedef float T; return clapack_sgetrf(Order, M, N, (T*)A, lda, ipiv); } else if(is_double<eT>::value == true) { typedef double T; return clapack_dgetrf(Order, M, N, (T*)A, lda, ipiv); } else if(is_supported_complex_float<eT>::value == true) { typedef std::complex<float> T; return clapack_cgetrf(Order, M, N, (T*)A, lda, ipiv); } else if(is_supported_complex_double<eT>::value == true) { typedef std::complex<double> T; return clapack_zgetrf(Order, M, N, (T*)A, lda, ipiv); } else { return -1; } }
int atlas::clapack_getri | ( | const enum CBLAS_ORDER | Order, | |
const int | N, | |||
eT * | A, | |||
const int | lda, | |||
const int * | ipiv | |||
) | [inline] |
Definition at line 251 of file atlas_proto.hpp.
Referenced by auxlib::inv_inplace(), and auxlib::inv_noalias().
{ arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); if(is_float<eT>::value == true) { typedef float T; return clapack_sgetri(Order, N, (T*)A, lda, ipiv); } else if(is_double<eT>::value == true) { typedef double T; return clapack_dgetri(Order, N, (T*)A, lda, ipiv); } else if(is_supported_complex_float<eT>::value == true) { typedef std::complex<float> T; return clapack_cgetri(Order, N, (T*)A, lda, ipiv); } else if(is_supported_complex_double<eT>::value == true) { typedef std::complex<double> T; return clapack_zgetri(Order, N, (T*)A, lda, ipiv); } else { return -1; } }