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

#include <MultiPageAllocator.h>

Public Member Functions

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

Detailed Description

Allocates multiple pages of memory

Constructor & Destructor Documentation

◆ MultiPageAllocator()

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

Constructor

◆ ~MultiPageAllocator()

groupallocator::MultiPageAllocator::~MultiPageAllocator ( )
inline

Delete function

Member Function Documentation

◆ allocate()

template<class T >
void groupallocator::MultiPageAllocator::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: