All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdExtComputationUtils Class Reference

#include <extComputationUtils.h>

Public Types

using ValueStore = std::unordered_map< TfToken, VtValue, TfToken::HashFunctor >
template<unsigned int CAPACITY>
using SampledValueStore = std::unordered_map< TfToken, HdTimeSampleArray< VtValue, CAPACITY >, TfToken::HashFunctor >
using ComputationDependencyMap = std::unordered_map< HdExtComputation const *, HdExtComputationConstPtrVector >

Static Public Member Functions

static HD_API ValueStore GetComputedPrimvarValues (HdExtComputationPrimvarDescriptorVector const &compPrimvars, HdSceneDelegate *sceneDelegate)
template<unsigned int CAPACITY>
static void SampleComputedPrimvarValues (HdExtComputationPrimvarDescriptorVector const &compPrimvars, HdSceneDelegate *sceneDelegate, size_t maxSampleCount, SampledValueStore< CAPACITY > *computedPrimvarValueStore)
static HD_API bool DependencySort (ComputationDependencyMap cdm, HdExtComputationConstPtrVector *sortedComps)
static HD_API void PrintDependencyMap (ComputationDependencyMap const &cdm)

Detailed Description

Definition at line 50 of file extComputationUtils.h.

Member Typedef Documentation

template<unsigned int CAPACITY>
using HdExtComputationUtils::SampledValueStore = std::unordered_map<TfToken, HdTimeSampleArray<VtValue, CAPACITY>, TfToken::HashFunctor>

Definition at line 68 of file extComputationUtils.h.

Definition at line 53 of file extComputationUtils.h.

Member Function Documentation

static HD_API bool HdExtComputationUtils::DependencySort ( ComputationDependencyMap  cdm,
HdExtComputationConstPtrVector sortedComps 
static HD_API ValueStore HdExtComputationUtils::GetComputedPrimvarValues ( HdExtComputationPrimvarDescriptorVector const compPrimvars,
HdSceneDelegate sceneDelegate 
static HD_API void HdExtComputationUtils::PrintDependencyMap ( ComputationDependencyMap const cdm)
template<unsigned int CAPACITY>
void HdExtComputationUtils::SampleComputedPrimvarValues ( HdExtComputationPrimvarDescriptorVector const compPrimvars,
HdSceneDelegate sceneDelegate,
size_t  maxSampleCount,
SampledValueStore< CAPACITY > *  computedPrimvarValueStore 

Returns a map containing the (token, samples) pairs for each computation primvar, with up to maxSampleCount samples. The participating computations are ordered based on their dependency and then, the CPU kernel is executed for each computation.

Definition at line 139 of file extComputationUtils.h.

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