52 template <
typename A,
int R>
55 []<
auto... Is>(std::index_sequence<Is...>,
auto const &aa) ->
decltype(aa(
long(Is)...)) {
return aa(
long(Is)...);}
56 (std::make_index_sequence<R>{}, a);
65 template <
auto... Is,
typename A>
66 auto call_on_R_longs(std::index_sequence<Is...>, A
const &a) ->
decltype(a((
long{Is})...));
79 template <
typename A,
int R>
80 concept CallableWithLongs =
requires(A
const &a) {
81 { detail::call_on_R_longs(std::make_index_sequence<R>{}, a) };
90 constexpr bool is_std_array_of_long_v =
false;
94 requires(!std::is_same_v<T, std::remove_cvref_t<T>>)
95 constexpr bool is_std_array_of_long_v<T> = is_std_array_of_long_v<std::remove_cvref_t<T>>;
99 constexpr bool is_std_array_of_long_v<std::array<long, R>> =
true;
118 template <
typename S>
125 template <
typename S>
136 template <
typename T,
template <
typename...>
class TMPLT>
165 template <
typename A>
167 { a.allocate(
size_t{}) }
noexcept -> std::same_as<blk_t>;
168 { a.allocate_zero(
size_t{}) }
noexcept -> std::same_as<blk_t>;
169 { a.deallocate(std::declval<blk_t>()) }
noexcept;
170 { A::address_space } -> std::same_as<AddressSpace const &>;
183 template <typename H, typename T = typename std::remove_cvref_t<H>::value_type>
185 requires std::is_same_v<typename std::remove_cvref_t<H>::value_type, T>;
186 { h.is_null() }
noexcept -> std::same_as<bool>;
187 { h.data() }
noexcept -> std::same_as<T *>;
188 { H::address_space } -> std::same_as<AddressSpace const &>;
200 template <typename H, typename T = typename std::remove_cvref_t<H>::value_type>
202 requires not std::is_const_v<typename std::remove_cvref_t<H>::value_type>;
203 { h.size() }
noexcept -> std::same_as<long>;
229 template <
typename A>
230 concept Array =
requires(A
const &a) {
232 { a.size() } -> std::same_as<long>;
247 template <
typename A,
typename A_t = std::remove_cvref_t<A>>
249 typename A_t::storage_t;
251 typename A_t::value_type;
254 } -> std::same_as<std::conditional_t<std::is_const_v<std::remove_reference_t<A>> || std::is_const_v<typename A_t::value_type>,
265 template <
typename A,
int R>
274 template <
typename A,
int R>
281 template <
typename AS>
289 template <
typename M>
297 template <
typename V>
305 template <
typename M>
313 template <
typename V>
324 template <
typename A,
typename B>
327 typename std::remove_cvref_t<A>::value_type;
338 template <
typename A,
typename U>
Check if a given type satisfies the array concept.
Check if a given type satisfies the array initializer concept for a given nda::MemoryArray type.
Check if a given type is an nda::Array of a certain rank.
Check if if a given type is either an nda::Array or an nda::Scalar.
Check if a given type can be called with a certain number of long arguments.
Check if a given type is either a double or complex type.
Check if a given type is constructible from the value type of a given nda::Array type.
Check if a given type is an instantiation of some other template type.
Check if a given type is a matrix, i.e. an nda::ArrayOfRank<2>.
Check if a given type satisfies the memory array concept.
Check if a given type is an nda::MemoryArray of a certain rank.
Check if a given type is a memory matrix, i.e. an nda::MemoryArrayOfRank<2>.
Check if a given type is a memory vector, i.e. an nda::MemoryArrayOfRank<1>.
Check if a given type is either an arithmetic or complex type.
Check if a given type is of type std::array<long, R> for some arbitrary R.
Check if a given type is a vector, i.e. an nda::ArrayOfRank<1>.
Check if a given type satisfies the allocator concept.
Check if a given type satisfies the memory handle concept.
Check if a given type satisfies the owning memory handle concept.
constexpr int get_rank
Constexpr variable that specifies the rank of an nda::Array or of a contiguous 1-dimensional range.
std::decay_t< decltype(get_first_element(std::declval< A const >()))> get_value_t
Get the value type of an array/view or a scalar type.
AddressSpace
Enum providing identifiers for the different memory address spaces.
constexpr bool is_instantiation_of_v
Constexpr variable that is true if type T is an instantiation of TMPLT (see nda::is_instantiation_of)...
constexpr bool is_double_or_complex_v
Constexpr variable that is true if type T is a std::complex type or a double type.
constexpr bool is_scalar_v
Constexpr variable that is true if type S is a scalar type, i.e. arithmetic or complex.
Provides missing concepts for older compiler versions.
Provides type traits for the nda library.