11#include <Kokkos_Core.hpp>
15template <
class T,
class MemorySpace>
53 return static_cast<T*
>(Kokkos::kokkos_malloc<MemorySpace>(
sizeof(T) *
n));
58 return static_cast<T*
>(Kokkos::kokkos_malloc<MemorySpace>(label,
sizeof(T) *
n));
63 Kokkos::kokkos_free(
p);
67template <
class T,
class MST,
class U,
class MSU>
73template <
class T,
class MST,
class U,
class MSU>
Definition kokkos_allocator.hpp:17
constexpr KokkosAllocator(KokkosAllocator< U, MemorySpace > const &) noexcept
Definition kokkos_allocator.hpp:36
void deallocate(T *p, std::size_t) const
Definition kokkos_allocator.hpp:61
T * allocate(std::size_t n) const
Definition kokkos_allocator.hpp:51
constexpr KokkosAllocator(KokkosAllocator &&x) noexcept=default
constexpr KokkosAllocator & operator=(KokkosAllocator const &x)=default
~KokkosAllocator()=default
constexpr KokkosAllocator & operator=(KokkosAllocator< U, MemorySpace > const &) noexcept
Definition kokkos_allocator.hpp:47
constexpr KokkosAllocator()=default
T value_type
Definition kokkos_allocator.hpp:19
MemorySpace memory_space
Definition kokkos_allocator.hpp:21
constexpr KokkosAllocator & operator=(KokkosAllocator &&x) noexcept=default
constexpr KokkosAllocator(KokkosAllocator const &x)=default
T * allocate(std::string const &label, std::size_t n) const
Definition kokkos_allocator.hpp:56
Definition kokkos_allocator.hpp:25
The top-level namespace of DDC.
Definition aligned_allocator.hpp:11
constexpr bool enable_chunk
Definition chunk_traits.hpp:16
constexpr bool operator!=(AlignedAllocator< T, NT > const &, AlignedAllocator< U, NU > const &) noexcept
Definition aligned_allocator.hpp:65
constexpr bool operator==(AlignedAllocator< T, NT > const &, AlignedAllocator< U, NU > const &) noexcept
Definition aligned_allocator.hpp:59