|
Collective Variables Module - Developer Documentation
|
Allocator for pinned host memory using cudaHostAlloc. More...
#include <colvar_gpu_support.h>
Public Types | |
| using | value_type = T |
Public Member Functions | |
| template<typename U > | |
| constexpr | CudaHostAllocator (const CudaHostAllocator< U > &) noexcept |
| T * | allocate (size_t n) |
| void | deallocate (T *ptr, size_t n) noexcept |
| template<typename U , typename... Args> | |
| void | construct (U *p, Args &&... args) |
| template<typename U > | |
| void | destroy (U *p) noexcept |
Friends | |
| bool | operator== (const CudaHostAllocator &, const CudaHostAllocator &) |
| bool | operator!= (const CudaHostAllocator &, const CudaHostAllocator &) |
Allocator for pinned host memory using cudaHostAlloc.
This allocator can be used with STL containers to allocate pinned host memory that is page-locked and directly accessible by the GPU.
| T | The type of elements to allocate |