52 static constexpr bool is_conj_array_expr =
false;
55 template <MemoryArray A>
56 static constexpr bool is_conj_array_expr<expr_call<detail::conj_f, A>> =
true;
60 requires(!std::is_same_v<A, std::remove_cvref_t<A>>)
61 static constexpr bool is_conj_array_expr<A> = is_conj_array_expr<std::remove_cvref_t<A>>;
66 static constexpr bool has_F_layout = []() {
67 if constexpr (is_conj_array_expr<A>)
68 return has_F_layout<
decltype(std::get<0>(std::declval<A>().a))>;
70 return std::remove_cvref_t<A>::is_stride_order_Fortran();
76 static constexpr bool has_C_layout = []() {
77 if constexpr (is_conj_array_expr<A>)
78 return has_C_layout<
decltype(std::get<0>(std::declval<A>().a))>;
80 return std::remove_cvref_t<A>::is_stride_order_C();
90 template <
bool conj,
bool transpose>
91 const char get_op = []() {
92 static_assert(!(conj and not
transpose),
"Error in nda::blas::get_op: Cannot use conjugate operation alone in blas operations");
108 template <MemoryMatrix A>
110 return a.indexmap().strides()[has_F_layout<A> ? 1 : 0];
120 template <MemoryMatrix A>
122 return a.shape()[has_F_layout<A> ? 1 : 0];
Check if a given type satisfies the memory array concept.
Provides concepts for the nda library.
auto transpose(A &&a)
Transpose the memory layout of an nda::MemoryArray or an nda::expr_call.
int get_ld(A const &a)
Get the leading dimension in LAPACK jargon of an nda::MemoryMatrix.
std::complex< double > dcomplex
Alias for std::complex<double> type.
int get_ncols(A const &a)
Get the number of columns in LAPACK jargon of an nda::MemoryMatrix.
Provides lazy function calls on arrays/views.
Provides some custom implementations of standard mathematical functions used for lazy,...