Collective Variables Module - Developer Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
colvars_gpu::CudaHostAllocator< T > Class Template Reference

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 &)
 

Detailed Description

template<typename T>
class colvars_gpu::CudaHostAllocator< T >

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.

Template Parameters
TThe type of elements to allocate

The documentation for this class was generated from the following file: