33 #ifndef REMORA_KERNELS_ATLAS_POTRF_H 34 #define REMORA_KERNELS_ATLAS_POTRF_H 36 #include "../cblas/cblas_inc.hpp" 45 CBLAS_ORDER
const Order, CBLAS_UPLO
const Uplo,
46 int const N,
float *A,
int const lda
48 return clapack_spotrf(Order, Uplo, N, A, lda);
52 CBLAS_ORDER
const Order, CBLAS_UPLO
const Uplo,
53 int const N,
double *A,
int const lda
55 return clapack_dpotrf(Order, Uplo, N, A, lda);
59 CBLAS_ORDER
const Order, CBLAS_UPLO
const Uplo,
60 int const N, std::complex<float>* A,
int const lda
62 return clapack_cpotrf(Order, Uplo, N, static_cast<void *>(A), lda);
66 CBLAS_ORDER
const Order, CBLAS_UPLO
const Uplo,
67 int const N, std::complex<double>* A,
int const lda
69 return clapack_zpotrf(Order, Uplo, N, static_cast<void *>(A), lda);
72 template <
typename Triangular,
typename SymmA>
74 matrix_container<SymmA, cpu_tag>& A,
77 CBLAS_UPLO
const uplo = Triangular::is_upper ? CblasUpper : CblasLower;
78 CBLAS_ORDER
const stor_ord =
79 (CBLAS_ORDER)storage_order<typename SymmA::orientation>::value;
81 std::size_t n = A().size1();
82 REMORA_SIZE_CHECK(n == A().size2());
84 auto storageA = A().raw_storage();
86 stor_ord, uplo, (
int)n,
88 storageA.leading_dimension
92 template<
class Storage,
class T>
93 struct optimized_potrf_detail {
94 typedef std::false_type type;
97 struct optimized_potrf_detail <
101 typedef std::true_type type;
104 struct optimized_potrf_detail <
108 typedef std::true_type type;
111 struct optimized_potrf_detail <
115 typedef std::true_type type;
119 struct optimized_potrf_detail <
123 typedef std::true_type type;
127 struct has_optimized_potrf
128 :
public optimized_potrf_detail <
129 typename M::storage_type::storage_tag,
130 typename M::value_type