Allocator for CUDA pinned host memory. More...
#include <bounce_buffer.hpp>
Public Member Functions | |
| void * | allocate (std::size_t size) |
| Allocate CUDA pinned host memory. More... | |
| void | deallocate (void *buffer, std::size_t size) |
| Deallocate memory previously allocated by this allocator. More... | |
Allocator for CUDA pinned host memory.
Uses cudaMemHostAlloc to allocate pinned (page-locked) host memory that can be efficiently transferred to/from GPU device memory. The allocation is only guaranteed to be aligned to "at least 256 bytes". It is NOT guaranteed to be page aligned.
Definition at line 48 of file bounce_buffer.hpp.
| void* kvikio::CudaPinnedAllocator::allocate | ( | std::size_t | size | ) |
Allocate CUDA pinned host memory.
| size | Requested size in bytes |
| void kvikio::CudaPinnedAllocator::deallocate | ( | void * | buffer, |
| std::size_t | size | ||
| ) |
Deallocate memory previously allocated by this allocator.
| buffer | Pointer to memory to deallocate |
| size | Size of the allocation (unused, for interface consistency) |