23 template <
char OP, ArrayOrScalar L, ArrayOrScalar R>
25 template <
typename F,
Array... As>
27 template <
char OP, Array A>
29 template <
int R,
typename F>
54 using AddressSpace::Device;
57 using AddressSpace::Host;
60 using AddressSpace::None;
63 using AddressSpace::Unified;
97 "Error in nda::mem::combine: Cannot combine Host and Device address spaces");
98 if constexpr (
sizeof...(As) > 0) {
return combine<std::max(A1, A2), As...>; }
99 return std::max(A1, A2);
114 template <MemoryArray A>
122 template <
char OP, ArrayOrScalar L, ArrayOrScalar R>
126 template <
typename F,
Array... As>
130 template <
char OP, Array A>
134 template <
int R,
typename F>
147 static_assert(((AdrSpcs !=
None) & ...),
"Error in nda::mem::check_adr_sp_valid: Cannot use None address space");
149 "Error in nda::mem::check_adr_sp_valid: Device address space requires compiling with GPU support.");
153 template <
typename... Ts>
154 requires(
sizeof...(Ts) > 0)
158 template <
typename... Ts>
159 requires(
sizeof...(Ts) > 0)
163 template <
typename... Ts>
164 requires(
sizeof...(Ts) > 0)
168 template <
typename A0,
typename... A>
172 template <
typename... Ts>
176 template <
typename... Ts>
180 template <
typename... Ts>
@ Unified
Using declaration for the Unified address space (see nda::mem::AddressSpace).
@ None
Using declaration for the None address space (see nda::mem::AddressSpace).
@ Host
Using declaration for the Host address space (see nda::mem::AddressSpace).
@ Device
Using declaration for the Device address space (see nda::mem::AddressSpace).
Adapter that consists of a shape and a callable object, which takes R integers as arguments (just lik...
Check if a given type satisfies the array concept.
Provides concepts for the nda library.
Provides GPU and non-GPU specific functionality.
AddressSpace
Enum providing identifiers for the different memory address spaces.
static constexpr bool have_host_compatible_addr_space
Constexpr variable that is true if all given types have an address space compatible with Host.
static constexpr bool have_compatible_addr_space
Constexpr variable that is true if all given types have compatible address spaces.
constexpr AddressSpace combine
Promotion rules for nda::mem::AddressSpace values.
static constexpr bool have_device_compatible_addr_space
Constexpr variable that is true if all given types have an address space compatible with Device.
static constexpr bool on_device
Constexpr variable that is true if all given types have a Device address space.
static constexpr bool on_unified
Constexpr variable that is true if all given types have a Unified address space.
static constexpr AddressSpace get_addr_space
Variable template providing the address space for different types.
static constexpr bool on_host
Constexpr variable that is true if all given types have a Host address space.
constexpr AddressSpace common_addr_space
Get common address space for a number of given nda::Array types.
static const auto check_adr_sp_valid
Check validity of a set of nda::mem::AddressSpace values.
static constexpr bool have_same_addr_space
Constexpr variable that is true if all given types have the same address space.
static constexpr bool have_device
Constexpr variable that is true if the project is configured with GPU support.
A lazy function call expression on arrays/views.
Lazy unary expression for nda::Array types.
Lazy binary expression for nda::ArrayOrScalar types.