Fermat
Public Types | Public Methods | Static Public Methods | List of all members
cugar::byte_caching_device_allocator Struct Reference

Detailed description

Implements a caching device allocator based on CUB's

#include <allocator.h>

Public Types

typedef char value_type
 
typedef char * pointer
 
typedef const char * const_pointer
 
typedef char & reference
 
typedef const char & const_reference
 
typedef size_t size_type
 
typedef int64 difference_type
 

Public Methods

CUGAR_HOST_DEVICE char * allocate (size_type num_bytes)
 
CUGAR_HOST_DEVICE void deallocate (char *ptr, size_type n)
 

Static Public Methods

static void init (const size_t max_cached_bytes=128u *1024u *1024u)
 

Member Function Documentation

◆ allocate()

CUGAR_HOST_DEVICE char* cugar::byte_caching_device_allocator::allocate ( size_type  num_bytes)
inline

allocate a new chunk

◆ deallocate()

CUGAR_HOST_DEVICE void cugar::byte_caching_device_allocator::deallocate ( char *  ptr,
size_type  n 
)
inline

deallocate a previously allocated chunk

◆ init()

static void cugar::byte_caching_device_allocator::init ( const size_t  max_cached_bytes = 128u*1024u*1024u)
inlinestatic

initialize the global pooled allocator


The documentation for this struct was generated from the following files: