33 #ifndef SHARK_LINALG_BLAS_KERNELS_ATLAS_POTRF_H 34 #define SHARK_LINALG_BLAS_KERNELS_ATLAS_POTRF_H 36 #include "../cblas/cblas_inc.hpp" 46 CBLAS_ORDER
const Order, CBLAS_UPLO
const Uplo,
47 int const N,
float *A,
int const lda
49 return clapack_spotrf(Order, Uplo, N, A, lda);
53 CBLAS_ORDER
const Order, CBLAS_UPLO
const Uplo,
54 int const N,
double *A,
int const lda
56 return clapack_dpotrf(Order, Uplo, N, A, lda);
60 CBLAS_ORDER
const Order, CBLAS_UPLO
const Uplo,
61 int const N, std::complex<float>* A,
int const lda
63 return clapack_cpotrf(Order, Uplo, N, static_cast<void *>(A), lda);
67 CBLAS_ORDER
const Order, CBLAS_UPLO
const Uplo,
68 int const N, std::complex<double>* A,
int const lda
70 return clapack_zpotrf(Order, Uplo, N, static_cast<void *>(A), lda);
73 template <
typename Triangular,
typename SymmA>
75 matrix_container<SymmA>& A,
78 CBLAS_UPLO
const uplo = Triangular::is_upper ? CblasUpper : CblasLower;
79 CBLAS_ORDER
const stor_ord =
80 (CBLAS_ORDER)storage_order<typename SymmA::orientation>::value;
82 std::size_t n = A().size1();
86 stor_ord, uplo, (
int)n,
88 traits::leading_dimension(A())
92 template<
class Storage,
class T>
93 struct optimized_potrf_detail {
94 typedef boost::mpl::false_ type;
97 struct optimized_potrf_detail <
101 typedef boost::mpl::true_ type;
104 struct optimized_potrf_detail <
108 typedef boost::mpl::true_ type;
111 struct optimized_potrf_detail <
115 typedef boost::mpl::true_ type;
119 struct optimized_potrf_detail <
123 typedef boost::mpl::true_ type;
127 struct has_optimized_potrf
128 :
public optimized_potrf_detail <
129 typename M::storage_category,
130 typename M::value_type