Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::MemoryPool Class Reference

#include <mitsuba/bidir/mempool.h>

Public Member Functions

 MemoryPool (size_t nEntries=128)
 Create a new memory pool with aninitial set of 128 entries. More...
 
 ~MemoryPool ()
 Destruct the memory pool and release all entries. More...
 
PathEdgeallocEdge ()
 Acquire an edge. More...
 
PathVertexallocVertex ()
 Acquire an vertex. More...
 
void release (PathEdge *edge)
 Release an edge. More...
 
void release (PathVertex *vertex)
 Release an entry. More...
 
bool unused () const
 Check if every entry has been released. More...
 
size_t edgeSize ()
 Return the currently allocated amount of storage for edges. More...
 
size_t vertexSize ()
 Return the currently allocated amount of storage for vertices. More...
 
std::string toString () const
 Return a human-readable description. More...
 

Constructor & Destructor Documentation

mitsuba::MemoryPool::MemoryPool ( size_t  nEntries = 128)
inline

Create a new memory pool with aninitial set of 128 entries.

mitsuba::MemoryPool::~MemoryPool ( )
inline

Destruct the memory pool and release all entries.

Member Function Documentation

PathEdge* mitsuba::MemoryPool::allocEdge ( )
inline

Acquire an edge.

PathVertex* mitsuba::MemoryPool::allocVertex ( )
inline

Acquire an vertex.

size_t mitsuba::MemoryPool::edgeSize ( )
inline

Return the currently allocated amount of storage for edges.

void mitsuba::MemoryPool::release ( PathEdge edge)
inline

Release an edge.

void mitsuba::MemoryPool::release ( PathVertex vertex)
inline

Release an entry.

std::string mitsuba::MemoryPool::toString ( ) const
inline

Return a human-readable description.

bool mitsuba::MemoryPool::unused ( ) const
inline

Check if every entry has been released.

size_t mitsuba::MemoryPool::vertexSize ( )
inline

Return the currently allocated amount of storage for vertices.


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