Implements a caching device allocator based on CUB's
#include <allocator.h>
|
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 |
|
|
CUGAR_HOST_DEVICE char * | allocate (size_type num_bytes) |
|
CUGAR_HOST_DEVICE void | deallocate (char *ptr, size_type n) |
|
|
static void | init (const size_t max_cached_bytes=128u *1024u *1024u) |
|
◆ allocate()
CUGAR_HOST_DEVICE char* cugar::byte_caching_device_allocator::allocate |
( |
size_type |
num_bytes | ) |
|
|
inline |
◆ 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:
- C:/p4research/research/jpantaleoni/Fermat-Public/contrib/cugar/basic/cuda/allocator.h
- C:/p4research/research/jpantaleoni/Fermat-Public/contrib/cugar/basic/cuda/allocator.cpp