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

#include <cudamalloc_resource.hpp>

Inheritance diagram for mgcpp::cudamalloc_resource:
Inheritance graph
[legend]
Collaboration diagram for mgcpp::cudamalloc_resource:
Collaboration graph
[legend]

Public Member Functions

size_t allocated_bytes () const noexcept
 
- Public Member Functions inherited from mgcpp::device_memory_resource
 device_memory_resource (size_t device_id)
 
size_t device_id () const
 
- Public Member Functions inherited from mgcpp::memory_resource
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
 

Static Public Member Functions

static cudamalloc_resourceinstance (size_t device_id)
 

Protected Member Functions

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

Member Function Documentation

◆ allocated_bytes()

size_t mgcpp::cudamalloc_resource::allocated_bytes ( ) const
noexcept

◆ do_allocate()

void* mgcpp::cudamalloc_resource::do_allocate ( size_t  bytes)
overrideprotectedvirtual

◆ do_deallocate()

void mgcpp::cudamalloc_resource::do_deallocate ( void *  p,
size_t  bytes 
)
overrideprotectedvirtual

◆ do_is_equal()

bool mgcpp::cudamalloc_resource::do_is_equal ( const memory_resource other) const
overrideprotectedvirtualnoexcept

◆ instance()

static cudamalloc_resource* mgcpp::cudamalloc_resource::instance ( size_t  device_id)
static

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