mgcpp
A C++ Math Library Based on CUDA
Public Member Functions | Protected Member Functions | List of all members
mgcpp::memory_resource Class Referenceabstract

#include <memory_resource.hpp>

Inheritance diagram for mgcpp::memory_resource:
Inheritance graph
[legend]

Public Member Functions

virtual ~memory_resource ()=default
 
void * allocate (size_t bytes)
 
void deallocate (void *p, size_t bytes)
 
bool is_equal (const memory_resource &other) const noexcept
 

Protected Member Functions

virtual void * do_allocate (size_t bytes)=0
 
virtual void do_deallocate (void *p, size_t bytes)=0
 
virtual bool do_is_equal (const memory_resource &other) const noexcept=0
 

Constructor & Destructor Documentation

◆ ~memory_resource()

virtual mgcpp::memory_resource::~memory_resource ( )
virtualdefault

Member Function Documentation

◆ allocate()

void* mgcpp::memory_resource::allocate ( size_t  bytes)
inline

◆ deallocate()

void mgcpp::memory_resource::deallocate ( void *  p,
size_t  bytes 
)
inline

◆ do_allocate()

virtual void* mgcpp::memory_resource::do_allocate ( size_t  bytes)
protectedpure virtual

◆ do_deallocate()

virtual void mgcpp::memory_resource::do_deallocate ( void *  p,
size_t  bytes 
)
protectedpure virtual

◆ do_is_equal()

virtual bool mgcpp::memory_resource::do_is_equal ( const memory_resource other) const
protectedpure virtualnoexcept

◆ is_equal()

bool mgcpp::memory_resource::is_equal ( const memory_resource other) const
inlinenoexcept

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