Nv::Blast::LocalBuffer< T > Class Template Reference

#include <NvBlastTkTaskImpl.h>

List of all members.

Public Member Functions

T * allocate (size_t n)
void clear ()
void initialize (T *block, size_t capacity)


Detailed Description

template<typename T>
class Nv::Blast::LocalBuffer< T >

Allocates from a preallocated, externally owned memory block initialized with. When blocks run out of space, new ones are allocated and owned by this class.

Member Function Documentation

template<typename T>
T* Nv::Blast::LocalBuffer< T >::allocate ( size_t  n  )  [inline]

Returns the pointer to the first element of an array of n elements. Allocates a new block of memory when exhausted, its size being the larger of n and capacity set with initialize().

template<typename T>
void Nv::Blast::LocalBuffer< T >::clear (  )  [inline]

Release the additionally allocated memory blocks. The externally owned memory block remains untouched.

template<typename T>
void Nv::Blast::LocalBuffer< T >::initialize ( T *  block,
size_t  capacity 
) [inline]

Set the externally owned memory block to start allocating from, with a size of capacity elements.


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