RixShadingContext::Allocator Class Reference

RixShadingContext::Allocator Class Reference

#include <RixShading.h>

Public Member Functions

 Allocator (RixShadingContext const *sctx)
 
template<typename T >
T * Allocate (RtInt num)
 
template<typename T >
T * AllocFor (MemCategory memcat, RtInt num)
 
template<typename T >
T * AllocForVolume (RtInt num)
 
template<typename T >
T * AllocForBxdf (RtInt num)
 
template<typename T >
T * AllocForPattern (RtInt 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); RtFloat *scmem = m.Allocate<RtFloat>(n); // default lifetime RtFloat *smem = m.AllocForBxdf<RtFloat>(n);


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