atlas Namespace Reference

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 >
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)

Detailed Description

namespace for ATLAS functions (imported from the global namespace)


Function Documentation

template<typename eT >
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().

00054 { return X; }

template<typename T >
static const T& atlas::tmp_real ( const std::complex< T > &  X  )  [inline, static]

Definition at line 57 of file atlas_proto.hpp.

00057 { return X.real(); }

template<typename eT >
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 98 of file atlas_proto.hpp.

References tmp_real().

00107     {
00108     arma_type_check<is_supported_blas_type<eT>::value == false>::apply();
00109     
00110     if(is_float<eT>::value == true)
00111       {
00112       typedef float T;
00113       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);
00114       }
00115     else
00116     if(is_double<eT>::value == true)
00117       {
00118       typedef double T;
00119       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);
00120       }
00121     else
00122     if(is_supported_complex_float<eT>::value == true)
00123       {
00124       typedef std::complex<float> T;
00125       cblas_cgemv(Order, TransA, M, N, (const T*)&alpha, (const T*)A, lda, (const T*)X, incX, (const T*)&beta, (T*)Y, incY);
00126       }
00127     else
00128     if(is_supported_complex_double<eT>::value == true)
00129       {
00130       typedef std::complex<double> T;
00131       cblas_zgemv(Order, TransA, M, N, (const T*)&alpha, (const T*)A, lda, (const T*)X, incX, (const T*)&beta, (T*)Y, incY);
00132       }
00133     }

template<typename eT >
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 141 of file atlas_proto.hpp.

References tmp_real().

00148     {
00149     arma_type_check<is_supported_blas_type<eT>::value == false>::apply();
00150     
00151     if(is_float<eT>::value == true)
00152       {
00153       typedef float T;
00154       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);
00155       }
00156     else
00157     if(is_double<eT>::value == true)
00158       {
00159       typedef double T;
00160       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);
00161       }
00162     else
00163     if(is_supported_complex_float<eT>::value == true)
00164       {
00165       typedef std::complex<float> T;
00166       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);
00167       }
00168     else
00169     if(is_supported_complex_double<eT>::value == true)
00170       {
00171       typedef std::complex<double> T;
00172       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);
00173       }
00174     }

template<typename eT >
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 182 of file atlas_proto.hpp.

Referenced by auxlib::det(), auxlib::inv_inplace(), auxlib::inv_noalias(), auxlib::log_det(), and auxlib::lu().

00186     {
00187     arma_type_check<is_supported_blas_type<eT>::value == false>::apply();
00188     
00189     if(is_float<eT>::value == true)
00190       {
00191       typedef float T;
00192       return clapack_sgetrf(Order, M, N, (T*)A, lda, ipiv);
00193       }
00194     else
00195     if(is_double<eT>::value == true)
00196       {
00197       typedef double T;
00198       return clapack_dgetrf(Order, M, N, (T*)A, lda, ipiv);
00199       }
00200     else
00201     if(is_supported_complex_float<eT>::value == true)
00202       {
00203       typedef std::complex<float> T;
00204       return clapack_cgetrf(Order, M, N, (T*)A, lda, ipiv);
00205       }
00206     else
00207     if(is_supported_complex_double<eT>::value == true)
00208       {
00209       typedef std::complex<double> T;
00210       return clapack_zgetrf(Order, M, N, (T*)A, lda, ipiv);
00211       }
00212     else
00213       {
00214       return -1;
00215       }
00216     }

template<typename eT >
int atlas::clapack_getri ( const enum CBLAS_ORDER  Order,
const int  N,
eT *  A,
const int  lda,
const int *  ipiv 
) [inline]

Definition at line 224 of file atlas_proto.hpp.

Referenced by auxlib::inv_inplace(), and auxlib::inv_noalias().

00228     {
00229     arma_type_check<is_supported_blas_type<eT>::value == false>::apply();
00230     
00231     if(is_float<eT>::value == true)
00232       {
00233       typedef float T;
00234       return clapack_sgetri(Order, N, (T*)A, lda, ipiv);
00235       }
00236     else
00237     if(is_double<eT>::value == true)
00238       {
00239       typedef double T;
00240       return clapack_dgetri(Order, N, (T*)A, lda, ipiv);
00241       }
00242     else
00243     if(is_supported_complex_float<eT>::value == true)
00244       {
00245       typedef std::complex<float> T;
00246       return clapack_cgetri(Order, N, (T*)A, lda, ipiv);
00247       }
00248     else
00249     if(is_supported_complex_double<eT>::value == true)
00250       {
00251       typedef std::complex<double> T;
00252       return clapack_zgetri(Order, N, (T*)A, lda, ipiv);
00253       }
00254     else
00255       {
00256       return -1;
00257       }
00258     }