57 if ( (_Tp*)ptr == (_Tp *) NULL ) {
58 printf(
"Grid CPU Allocator got NULL for %lu bytes\n",(
unsigned long) bytes );
60 assert( ( (_Tp*)ptr != (_Tp *)NULL ) );
106 if ( (_Tp*)ptr == (_Tp *) NULL ) {
107 printf(
"Grid Shared Allocator got NULL for %lu bytes\n",(
unsigned long) bytes );
109 assert( ( (_Tp*)ptr != (_Tp *)NULL ) );
130template<
typename _Tp>
154 if ( (_Tp*)ptr == (_Tp *) NULL ) {
155 printf(
"Grid Device Allocator got NULL for %lu bytes\n",(
unsigned long) bytes );
157 assert( ( (_Tp*)ptr != (_Tp *)NULL ) );
177template<
class T>
using hostVector = std::vector<T,alignedAllocator<T> >;
178template<
class T>
using Vector = std::vector<T,uvmAllocator<T> >;
179template<
class T>
using uvmVector = std::vector<T,uvmAllocator<T> >;
std::vector< T, devAllocator< T > > deviceVector
bool operator==(const alignedAllocator< _Tp > &, const alignedAllocator< _Tp > &)
std::vector< T, uvmAllocator< T > > Vector
std::vector< T, uvmAllocator< T > > uvmVector
std::vector< T, alignedAllocator< T > > hostVector
bool operator!=(const alignedAllocator< _Tp > &, const alignedAllocator< _Tp > &)
#define profilerAllocate(bytes)
#define profilerFree(bytes)
#define NAMESPACE_BEGIN(A)
static void CpuFree(void *ptr, size_t bytes)
static void * CpuAllocate(size_t bytes)
static void SharedFree(void *ptr, size_t bytes)
static void * SharedAllocate(size_t bytes)
static void * AcceleratorAllocate(size_t bytes)
static void AcceleratorFree(void *ptr, size_t bytes)
size_type max_size() const
pointer address(reference __x) const
void construct(pointer __p)
std::ptrdiff_t difference_type
void construct(pointer __p, const _Tp &__val)
void deallocate(pointer __p, size_type __n)
const _Tp * const_pointer
const _Tp & const_reference
pointer allocate(size_type __n, const void *_p=0)
alignedAllocator(const alignedAllocator &)
void destroy(pointer __p)
alignedAllocator(const alignedAllocator< _Tp1 > &)
void destroy(pointer __p)
const _Tp * const_pointer
devAllocator(const devAllocator< _Tp1 > &)
pointer address(reference __x) const
const _Tp & const_reference
size_type max_size() const
pointer allocate(size_type __n, const void *_p=0)
void construct(pointer __p)
void construct(pointer __p, const _Tp &__val)
devAllocator(const devAllocator &)
std::ptrdiff_t difference_type
void deallocate(pointer __p, size_type __n)
void construct(pointer __p)
pointer address(reference __x) const
uvmAllocator(const uvmAllocator< _Tp1 > &)
void destroy(pointer __p)
const _Tp * const_pointer
void construct(pointer __p, const _Tp &__val)
uvmAllocator(const uvmAllocator &)
const _Tp & const_reference
pointer allocate(size_type __n, const void *_p=0)
std::ptrdiff_t difference_type
size_type max_size() const
void deallocate(pointer __p, size_type __n)
alignedAllocator< _Tp1 > other
devAllocator< _Tp1 > other
uvmAllocator< _Tp1 > other