RenderManAPI  24.0
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

◆ Allocator()

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

Member Function Documentation

◆ Allocate()

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

◆ AllocFor()

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

◆ AllocForBxdf()

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

◆ AllocForPattern()

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

◆ AllocForVolume()

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

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