13 #ifndef QMCPLUSPLUS_ACCESS_TRAITS_H 14 #define QMCPLUSPLUS_ACCESS_TRAITS_H 25 template<
class Allocator>
38 static void attachReference(Allocator& from, Allocator& to, std::ptrdiff_t ptr_offset);
45 template<
class Allocator>
46 using IsHostSafe = std::enable_if_t<qmc_allocator_traits<Allocator>::is_host_accessible>;
48 template<
class Allocator>
49 using IsNotHostSafe = std::enable_if_t<!qmc_allocator_traits<Allocator>::is_host_accessible>;
51 template<
class Allocator>
52 using IsDualSpace = std::enable_if_t<qmc_allocator_traits<Allocator>::is_dual_space>;
55 #endif // QMCPLUSPLUS_ACCESS_TRAITS_H static constexpr bool is_dual_space
helper functions for EinsplineSetBuilder
static void updateTo(Allocator &a, value_type *host_ptr, size_t n, size_t offset=0)
typename Allocator::value_type value_type
void fill_n(T *x, size_t count, const T &value)
static void deviceSideCopyN(Allocator &a, size_t to, size_t n, size_t from)
std::enable_if_t< qmc_allocator_traits< Allocator >::is_host_accessible > IsHostSafe
std::enable_if_t<!qmc_allocator_traits< Allocator >::is_host_accessible > IsNotHostSafe
static void attachReference(Allocator &from, Allocator &to, std::ptrdiff_t ptr_offset)
So we can write generic tests that work with all QMCPACK allocators.
static constexpr bool is_host_accessible
template class analogous to std::allocator_traits.
static void updateFrom(Allocator &a, value_type *host_ptr, size_t n, size_t offset=0)
std::enable_if_t< qmc_allocator_traits< Allocator >::is_dual_space > IsDualSpace
static void fill_n(value_type *ptr, size_t n, const value_type &value)
QMCTraits::FullPrecRealType value_type