RenderMan API  23.0
RixShadingContext::Allocator Class Reference

#include <RixShading.h>

Public Member Functions

 Allocator (RixShadingContext const *sCtx)
 
template<typename T >
T * Allocate (int num)
 
template<typename T >
T * AllocFor (MemCategory memcat, int num)
 
template<typename T >
T * AllocForVolume (int num)
 
template<typename T >
T * AllocForBxdf (int num)
 
template<typename T >
T * AllocForPattern (int num)
 

Detailed Description

Allocator is a utility (fully inlined) class to assist with tedious memory pool allocations. Uses templates to support the variety of atomic datatypes. Refer to above comments on Allocate for destructor policies.

Usage: RixShadingContext::Allocator m(sCtx); float *scmem = m.Allocate<float>(n); // default lifetime float *smem = m.AllocForBxdf<float>(n);

Definition at line 1295 of file RixShading.h.

Constructor & Destructor Documentation

◆ Allocator()

RixShadingContext::Allocator::Allocator ( RixShadingContext const *  sCtx)
inline

Definition at line 1298 of file RixShading.h.

Member Function Documentation

◆ Allocate()

template<typename T >
T* RixShadingContext::Allocator::Allocate ( int  num)
inline

Definition at line 1301 of file RixShading.h.

◆ AllocFor()

template<typename T >
T* RixShadingContext::Allocator::AllocFor ( MemCategory  memcat,
int  num 
)
inline

Definition at line 1307 of file RixShading.h.

◆ AllocForBxdf()

template<typename T >
T* RixShadingContext::Allocator::AllocForBxdf ( int  num)
inline

Definition at line 1321 of file RixShading.h.

◆ AllocForPattern()

template<typename T >
T* RixShadingContext::Allocator::AllocForPattern ( int  num)
inline

Definition at line 1327 of file RixShading.h.

◆ AllocForVolume()

template<typename T >
T* RixShadingContext::Allocator::AllocForVolume ( int  num)
inline

Definition at line 1313 of file RixShading.h.


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