Stokhos Package Browser (Single Doxygen Collection) Version of the Day
|
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. | |
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.
Definition at line 95 of file Stokhos_MemoryTraits.hpp.
|
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.
Definition at line 122 of file Stokhos_MemoryTraits.hpp.
|
inlinestatic |
Free memory allocated by alloc()
Definition at line 145 of file Stokhos_MemoryTraits.hpp.
|
static |
Bytes to which memory allocations are aligned.
Definition at line 109 of file Stokhos_MemoryTraits.hpp.