ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Allocator that uses CUDA to allocate CPU memory. More...
#include <CudaHostAllocator.hpp>
Public Types | |
using | value_type = T |
using | pointer = T * |
using | reference = T & |
using | const_reference = std::add_const_t< reference > |
Public Member Functions | |
CudaHostAllocator () noexcept=default | |
template<class U > | |
CudaHostAllocator (const CudaHostAllocator< U > &) | |
template<class U > | |
bool | operator== (const CudaHostAllocator< U > &) const |
template<class U > | |
bool | operator!= (const CudaHostAllocator< U > &) const |
T * | allocate (const std::size_t n) const |
void | deallocate (T *const p, std::size_t) const noexcept |
Allocator that uses CUDA to allocate CPU memory.
Using the CUDA allocator can have performance benefits, because it returns pinned memory that is suitable for DMA.
T | Type to allocate memory for. |
Definition at line 38 of file CudaHostAllocator.hpp.
using CudaHostAllocator< T >::const_reference = std::add_const_t<reference> |
Definition at line 42 of file CudaHostAllocator.hpp.
using CudaHostAllocator< T >::pointer = T * |
Definition at line 40 of file CudaHostAllocator.hpp.
using CudaHostAllocator< T >::reference = T & |
Definition at line 41 of file CudaHostAllocator.hpp.
using CudaHostAllocator< T >::value_type = T |
Definition at line 39 of file CudaHostAllocator.hpp.
|
defaultnoexcept |
|
inlineexplicit |
Definition at line 45 of file CudaHostAllocator.hpp.
|
inline |
Definition at line 53 of file CudaHostAllocator.hpp.
References cuda_malloc_host().
|
inlinenoexcept |
Definition at line 61 of file CudaHostAllocator.hpp.
References cuda_free_host().
|
inline |
Definition at line 49 of file CudaHostAllocator.hpp.
|
inline |
Definition at line 46 of file CudaHostAllocator.hpp.