Unified Memory Group Allocator
Public Member Functions | List of all members
groupallocator::InPageAllocator Class Reference

#include <InPageAllocator.h>

Public Member Functions

 InPageAllocator (std::size_t page_size)
 
 ~InPageAllocator ()
 
template<class T >
void allocate (T **ptr, size_t s, bool forceAligned128)
 
template<class T >
void free (T *ptr)
 
bool contains (size_t ptr)
 
void moveToDevice (int device, cudaStream_t stream)
 
size_t getPages ()
 
size_t getPageSize ()
 

Detailed Description

Allocates memory in a page set by page_size.

Constructor & Destructor Documentation

◆ InPageAllocator()

groupallocator::InPageAllocator::InPageAllocator ( std::size_t  page_size)
inline

Create the in page allocator.

◆ ~InPageAllocator()

groupallocator::InPageAllocator::~InPageAllocator ( )
inline

Deletes in page allocator, cuda context must exist to do so.

Member Function Documentation

◆ allocate()

template<class T >
void groupallocator::InPageAllocator::allocate ( T **  ptr,
size_t  s,
bool  forceAligned128 
)
inline

Allocates memory of type T and sets *ptr to this memory of size s

Parameters
ptr
s

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