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().
static const T& atlas::tmp_real | ( | const std::complex< T > & | X | ) | [inline, static] |
Definition at line 57 of file atlas_proto.hpp.
arma_inline eT atlas::cblas_dot | ( | const int | N, | |
const eT * | X, | |||
const eT * | Y | |||
) | [inline] |
Definition at line 64 of file atlas_proto.hpp.
Referenced by op_dot::direct_dot().
00065 { 00066 arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); 00067 00068 if(is_float<eT>::value == true) 00069 { 00070 typedef float T; 00071 return eT( cblas_sdot(N, (const T*)X, 1, (const T*)Y, 1) ); 00072 } 00073 else 00074 if(is_double<eT>::value == true) 00075 { 00076 typedef double T; 00077 return eT( cblas_ddot(N, (const T*)X, 1, (const T*)Y, 1) ); 00078 } 00079 else 00080 { 00081 return eT(0); 00082 } 00083 }
arma_inline eT atlas::cx_cblas_dot | ( | const int | N, | |
const eT * | X, | |||
const eT * | Y | |||
) | [inline] |
Definition at line 90 of file atlas_proto.hpp.
00091 { 00092 arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); 00093 00094 if(is_supported_complex_float<eT>::value == true) 00095 { 00096 typedef typename std::complex<float> T; 00097 00098 T out; 00099 cblas_cdotu_sub(N, (const T*)X, 1, (const T*)Y, 1, &out); 00100 00101 return eT(out); 00102 } 00103 else 00104 if(is_supported_complex_double<eT>::value == true) 00105 { 00106 typedef typename std::complex<double> T; 00107 00108 T out; 00109 cblas_zdotu_sub(N, (const T*)X, 1, (const T*)Y, 1, &out); 00110 00111 return eT(out); 00112 } 00113 else 00114 { 00115 return eT(0); 00116 } 00117 }
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().
00134 { 00135 arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); 00136 00137 if(is_float<eT>::value == true) 00138 { 00139 typedef float T; 00140 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); 00141 } 00142 else 00143 if(is_double<eT>::value == true) 00144 { 00145 typedef double T; 00146 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); 00147 } 00148 else 00149 if(is_supported_complex_float<eT>::value == true) 00150 { 00151 typedef std::complex<float> T; 00152 cblas_cgemv(Order, TransA, M, N, (const T*)&alpha, (const T*)A, lda, (const T*)X, incX, (const T*)&beta, (T*)Y, incY); 00153 } 00154 else 00155 if(is_supported_complex_double<eT>::value == true) 00156 { 00157 typedef std::complex<double> T; 00158 cblas_zgemv(Order, TransA, M, N, (const T*)&alpha, (const T*)A, lda, (const T*)X, incX, (const T*)&beta, (T*)Y, incY); 00159 } 00160 }
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().
00175 { 00176 arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); 00177 00178 if(is_float<eT>::value == true) 00179 { 00180 typedef float T; 00181 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); 00182 } 00183 else 00184 if(is_double<eT>::value == true) 00185 { 00186 typedef double T; 00187 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); 00188 } 00189 else 00190 if(is_supported_complex_float<eT>::value == true) 00191 { 00192 typedef std::complex<float> T; 00193 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); 00194 } 00195 else 00196 if(is_supported_complex_double<eT>::value == true) 00197 { 00198 typedef std::complex<double> T; 00199 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); 00200 } 00201 }
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().
00213 { 00214 arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); 00215 00216 if(is_float<eT>::value == true) 00217 { 00218 typedef float T; 00219 return clapack_sgetrf(Order, M, N, (T*)A, lda, ipiv); 00220 } 00221 else 00222 if(is_double<eT>::value == true) 00223 { 00224 typedef double T; 00225 return clapack_dgetrf(Order, M, N, (T*)A, lda, ipiv); 00226 } 00227 else 00228 if(is_supported_complex_float<eT>::value == true) 00229 { 00230 typedef std::complex<float> T; 00231 return clapack_cgetrf(Order, M, N, (T*)A, lda, ipiv); 00232 } 00233 else 00234 if(is_supported_complex_double<eT>::value == true) 00235 { 00236 typedef std::complex<double> T; 00237 return clapack_zgetrf(Order, M, N, (T*)A, lda, ipiv); 00238 } 00239 else 00240 { 00241 return -1; 00242 } 00243 }
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().
00255 { 00256 arma_type_check<is_supported_blas_type<eT>::value == false>::apply(); 00257 00258 if(is_float<eT>::value == true) 00259 { 00260 typedef float T; 00261 return clapack_sgetri(Order, N, (T*)A, lda, ipiv); 00262 } 00263 else 00264 if(is_double<eT>::value == true) 00265 { 00266 typedef double T; 00267 return clapack_dgetri(Order, N, (T*)A, lda, ipiv); 00268 } 00269 else 00270 if(is_supported_complex_float<eT>::value == true) 00271 { 00272 typedef std::complex<float> T; 00273 return clapack_cgetri(Order, N, (T*)A, lda, ipiv); 00274 } 00275 else 00276 if(is_supported_complex_double<eT>::value == true) 00277 { 00278 typedef std::complex<double> T; 00279 return clapack_zgetri(Order, N, (T*)A, lda, ipiv); 00280 } 00281 else 00282 { 00283 return -1; 00284 } 00285 }