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

#include <NvBlastTkTaskImpl.h>

List of all members.

Public Member Functions

void allocate (size_t capacity)
void release ()
T * reserve (size_t n)
void reset ()
 SharedBuffer ()


Detailed Description

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

A preallocated, shared array from which can be allocated from in tasks. Intended to be used when the maximum amount of data (e.g. for a family) is known in advance. No further allocations take place on exhaustion. Exhaustion asserts in debug builds and overflows otherwise.

Constructor & Destructor Documentation

template<typename T>
Nv::Blast::SharedBuffer< T >::SharedBuffer (  )  [inline]


Member Function Documentation

template<typename T>
void Nv::Blast::SharedBuffer< T >::allocate ( size_t  capacity  )  [inline]

Preallocates memory for capacity elements.

template<typename T>
void Nv::Blast::SharedBuffer< T >::release ( void   )  [inline]

Frees the preallocated array.

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

Atomically gets a pointer to the first element of an array of n elements.

template<typename T>
void Nv::Blast::SharedBuffer< T >::reset (  )  [inline]

Preserves the memory allocated but resets to reserve from the beginning of the array.


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