Stokhos
Development
|
Specialization of MemoryTraits for host memory spaces. More...
#include <Stokhos_MemoryTraits.hpp>
Static Public Member Functions | |
static KOKKOS_INLINE_FUNCTION void * | alloc (const size_t size) |
Allocate aligned memory. More... | |
static KOKKOS_INLINE_FUNCTION void | free (void *ptr) |
Free memory allocated by alloc() | |
Static Public Attributes | |
static const unsigned | Alignment = 8 |
Bytes to which memory allocations are aligned. | |
Specialization of MemoryTraits for host memory spaces.
|
inlinestatic |
Allocate aligned memory.
Note: We don't use mm_malloc or posix_memalign, because even though this implementation is host-only, it is potentially callable from host functions marked as device functions (via the KOKKOS_INLINE_FUNCTION maco).
Also, we can't call new/delete as we may replace those with a version that calls this.
References Stokhos::MemoryTraits< MemorySpace >::Alignment.