Main Page Class List Class Members

# Nv::Blast::SharedMemory Class Reference

`#include <NvBlastTkTaskImpl.h>`

List of all members.

## Public Member Functions
void | addReference (size_t n)
void | addReference ()
void | allocate (TkFamilyImpl &)
bool | isUsed ()
void | release ()
bool | removeReference ()
NvBlastActor ** | reserveNewActors (size_t n)
TkActor ** | reserveNewTkActors (size_t n)
void | reset ()
| SharedMemory ()
## Public Attributes
TkEventQueue | m_events
| event queue shared across a group's actors of the same family
uint32_t | m_eventsCount
| expected number of events
uint32_t | m_eventsMemory
| expected memory size for event data

## Detailed Description

Holds the memory used by TkWorker for each family in each group.

## Constructor & Destructor Documentation

Nv::Blast::SharedMemory::SharedMemory | ( |  | ) | `[inline]`

## Member Function Documentation

void Nv::Blast::SharedMemory::addReference | ( | size_t | n | ) | `[inline]`

Increments the reference count by n.

void Nv::Blast::SharedMemory::addReference | ( |  | ) | `[inline]`

Increments the reference count.

void Nv::Blast::SharedMemory::allocate | ( | TkFamilyImpl & |  | ) |

Allocates buffers to hold

bool Nv::Blast::SharedMemory::isUsed | ( |  | ) | `[inline]`

Checks if the reference count is not zero.

void Nv::Blast::SharedMemory::release | ( | void |  | ) | `[inline]`

Release the internal buffers' memory.

bool Nv::Blast::SharedMemory::removeReference | ( |  | ) | `[inline]`

Decrements the reference count. Returns true if the count reached zero.

NvBlastActor** Nv::Blast::SharedMemory::reserveNewActors | ( | size_t | n | ) | `[inline]`

Reserves n entries from preallocated memory.

TkActor** Nv::Blast::SharedMemory::reserveNewTkActors | ( | size_t | n | ) | `[inline]`

Reserves n entries from preallocated memory.

void Nv::Blast::SharedMemory::reset | ( |  | ) | `[inline]`

Resets the internal buffers to reserve from their beginning. Preserves the allocated memory.

## Member Data Documentation

TkEventQueue Nv::Blast::SharedMemory::m_events

event queue shared across a group's actors of the same family

uint32_t Nv::Blast::SharedMemory::m_eventsCount

expected number of events

uint32_t Nv::Blast::SharedMemory::m_eventsMemory

expected memory size for event data

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

- sdk/toolkit/source/NvBlastTkTaskImpl.h