TRIQS/nda 1.3.0
Multi-dimensional array library for C++
|
Currently supported address spaces and tools to work with them.
See nda::mem::AddressSpace for currently supported address spaces.
Enumerations | |
enum class | nda::mem::AddressSpace |
Enum providing identifiers for the different memory address spaces. More... | |
Variables | |
template<AddressSpace... AdrSpcs> | |
static const auto | nda::mem::check_adr_sp_valid |
Check validity of a set of nda::mem::AddressSpace values. | |
template<AddressSpace A1, AddressSpace A2 = None, AddressSpace... As> | |
constexpr AddressSpace | nda::mem::combine |
Promotion rules for nda::mem::AddressSpace values. | |
template<MemoryArray A1, MemoryArray... As> | |
constexpr AddressSpace | nda::mem::common_addr_space = combine<get_addr_space<A1>, get_addr_space<As>...> |
Get common address space for a number of given nda::MemoryArray types. | |
template<typename T > | |
static constexpr AddressSpace | nda::mem::get_addr_space = mem::None |
Variable template providing the address space for different types. | |
template<MemoryArray A> | |
static constexpr AddressSpace | nda::mem::get_addr_space< A > = A::storage_t::address_space |
Specialization of nda::mem::get_addr_space for nda::Memory Array types. | |
template<char OP, ArrayOrScalar L, ArrayOrScalar R> | |
static constexpr AddressSpace | nda::mem::get_addr_space< expr< OP, L, R > > = combine<get_addr_space<L>, get_addr_space<R>> |
Specialization of nda::mem::get_addr_space for binary expressions involving two nda::ArrayOrScalar types. | |
template<typename F , Array... As> | |
static constexpr AddressSpace | nda::mem::get_addr_space< expr_call< F, As... > > = combine<get_addr_space<As>...> |
Specialization of nda::mem::get_addr_space for function call expressions involving nda::Array types. | |
template<char OP, Array A> | |
static constexpr AddressSpace | nda::mem::get_addr_space< expr_unary< OP, A > > = get_addr_space<A> |
Specialization of nda::mem::get_addr_space for unary expressions involving an nda::Array type. | |
template<Handle H> | |
static constexpr AddressSpace | nda::mem::get_addr_space< H > = H::address_space |
Specialization of nda::mem::get_addr_space for nda::Handle types. | |
template<typename... Ts> | |
static constexpr bool | nda::mem::have_compatible_addr_space = (have_host_compatible_addr_space<Ts...> or have_device_compatible_addr_space<Ts...>) |
Constexpr variable that is true if all given types have compatible address spaces. | |
template<typename... Ts> | |
static constexpr bool | nda::mem::have_device_compatible_addr_space = ((on_device<Ts> or on_unified<Ts>)and...) |
Constexpr variable that is true if all given types have an address space compatible with Device . | |
template<typename... Ts> | |
static constexpr bool | nda::mem::have_host_compatible_addr_space = ((on_host<Ts> or on_unified<Ts>)and...) |
Constexpr variable that is true if all given types have an address space compatible with Host . | |
template<typename A0 , typename... A> | |
static constexpr bool | nda::mem::have_same_addr_space = ((get_addr_space<A0> == get_addr_space<A>)and... and true) |
Constexpr variable that is true if all given types have the same address space. | |
template<typename... Ts> | |
static constexpr bool | nda::mem::on_device = ((get_addr_space<Ts> == mem::Device) and ...) |
Constexpr variable that is true if all given types have a Device address space. | |
template<typename... Ts> | |
static constexpr bool | nda::mem::on_host = ((get_addr_space<Ts> == mem::Host) and ...) |
Constexpr variable that is true if all given types have a Host address space. | |
template<typename... Ts> | |
static constexpr bool | nda::mem::on_unified = ((get_addr_space<Ts> == mem::Unified) and ...) |
Constexpr variable that is true if all given types have a Unified address space. | |
|
strong |
#include <nda/mem/address_space.hpp>
Enum providing identifiers for the different memory address spaces.
The following address spaces are available:
None
: No address space.Host
: Address on CPU RAM.Device
: Address on GPU memory.Unified
: CUDA Unified memory address. Definition at line 60 of file address_space.hpp.
|
static |
#include <nda/mem/address_space.hpp>
Check validity of a set of nda::mem::AddressSpace values.
Checks that the address spaces are not None
and that the Device
or Unified
address spaces are only used when compiling with GPU support.
AdrSpcs | Address spaces to check. |
Definition at line 151 of file address_space.hpp.
|
constexpr |
#include <nda/mem/address_space.hpp>
Promotion rules for nda::mem::AddressSpace values.
Host
and Device
address spaces are not compatible and will result in a compilation error.
The promotion rules are as follows:
None
-> Host
-> Unified
.None
-> Device
-> Unified
.A1 | First address space. |
A2 | Second address space. |
As | Remaining address spaces. |
Definition at line 104 of file address_space.hpp.
|
constexpr |
#include <nda/mem/address_space.hpp>
Get common address space for a number of given nda::MemoryArray types.
See nda::mem::combine for how the address spaces are combined.
A1 | nda::MemoryArray type. |
As | nda::MemoryArray types. |
Definition at line 120 of file address_space.hpp.
|
staticconstexpr |
#include <nda/mem/address_space.hpp>
Variable template providing the address space for different types.
Has to be specialized for each type/concept separately.
T | Type for which to get the address space. |
Definition at line 80 of file address_space.hpp.