Allocator for page-aligned AND CUDA-registered pinned host memory. More...
#include <bounce_buffer.hpp>
Public Member Functions | |
| void * | allocate (std::size_t size) |
| Allocate page-aligned CUDA-registered pinned host memory. More... | |
| void | deallocate (void *buffer, std::size_t size) |
| Deallocate memory previously allocated by this allocator. More... | |
Allocator for page-aligned AND CUDA-registered pinned host memory.
Combines the benefits of both page alignment (for Direct I/O) and CUDA registration (for efficient host-device transfers). Uses std::aligned_alloc followed by cudaMemHostRegister to achieve both properties.
Definition at line 77 of file bounce_buffer.hpp.
| void* kvikio::CudaPageAlignedPinnedAllocator::allocate | ( | std::size_t | size | ) |
Allocate page-aligned CUDA-registered pinned host memory.
| size | Requested size in bytes (will be rounded up to page boundary) |
| void kvikio::CudaPageAlignedPinnedAllocator::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) |