TRIQS/nda 1.3.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches
nda::MemoryArray Concept Reference

#include <nda/concepts.hpp>

Detailed Description

Check if a given type satisfies the memory array concept.

In addition to the requirements of the nda::Array concept, memory arrays provide access to the underlying memory storage and use an nda::idx_map to specify the layout of the data in memory.

An example of a type satisfying the nda::Array but not the nda::MemoryArray concept is nda::expr.

Template Parameters
AType to check.

Definition at line 248 of file concepts.hpp.

Concept definition

template<typename A, typename A_t std::remove_cvref_t<A>>
concept nda::MemoryArray = Array<A> && requires(A &a) {
typename A_t::storage_t;
typename A_t::value_type;
{
a.data()
} -> std::same_as<std::conditional_t<std::is_const_v<std::remove_reference_t<A>> || std::is_const_v<typename A_t::value_type>,
{ a.indexmap().strides() } -> StdArrayOfLong;
}
Check if a given type satisfies the array concept.
Definition concepts.hpp:230
Check if a given type satisfies the memory array concept.
Definition concepts.hpp:248
Check if a given type satisfies the memory handle concept.
Definition concepts.hpp:184
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.
Definition traits.hpp:192