![]() |
RenderMan
26.0
|
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) |
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);
|
inline |
|
inline |
References RixShadingContext::Allocate(), and RixShadingContext::k_BxdfMem.
|
inline |
|
inline |
References RixShadingContext::Allocate(), and RixShadingContext::k_BxdfMem.
|
inline |
References RixShadingContext::Allocate(), and RixShadingContext::k_PatternMem.
Referenced by RixShiftCtxInU(), and RixShiftCtxInV().
|
inline |
References RixShadingContext::Allocate(), and RixShadingContext::k_BxdfMem.