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

#include <nda/concepts.hpp>

Detailed Description

Check if a given type satisfies the memory handle concept.

Memory handles are used to manage memory. They are responsible for providing access to the data which can be located on the stack (CPU), the heap (CPU), the device (GPU) or on unified memory (see nda::mem::AddressSpace).

Template Parameters
HType to check.
TValue type of the handle.

Definition at line 184 of file concepts.hpp.

Concept definition

template<typename H, typename T typename std::remove_cvref_t<H>::value_type>
concept nda::mem::Handle = requires(H const &h) {
requires std::is_same_v<typename std::remove_cvref_t<H>::value_type, T>;
{ h.is_null() } noexcept -> std::same_as<bool>;
{ h.data() } noexcept -> std::same_as<T *>;
{ H::address_space } -> std::same_as<AddressSpace const &>;
}
Check if a given type satisfies the memory handle concept.
Definition concepts.hpp:184