RenderMan  26.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RixShadingContext::Allocator Class Reference

Allocator is a utility (fully inlined) class to assist with tedious memory pool allocations. More...

#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);

Constructor & Destructor Documentation

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

Member Function Documentation

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

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