C# Класс SIMDPrototyping.Trees.SingleArray.Tree

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Add ( int leafId, BoundingBox &box ) : void
AddGlobal ( int leafId, BoundingBox &leafBounds ) : void

Tests every possible insertion path to find the one which minimizes the tree's heuristic cost.

AgglomerativeRefine ( int nodeIndex, QuickList &spareNodes, bool &nodesInvalidated ) : void

Collects a limited set of subtrees hanging from the specified node and performs a local treelet rebuild using a bottom-up agglomerative approach.

BinnedRefine ( int nodeIndex, QuickList &subtreeReferences, int maximumSubtrees, QuickList &treeletInternalNodes, QuickList &spareNodes, BinnedResources &resources, bool &nodesInvalidated ) : void
BottomUpAgglomerativeRefine ( ) : void

Executes one pass of bottom-up refinement.

BottomUpBinnedRefine ( int maximumSubtrees ) : void

Executes one pass of bottom-up refinement.

BuildVolumeHeuristic ( int leafIds, BoundingBox leafBounds, int start, int length = -1 ) : void
CollectSubtrees ( int nodeIndex, int maximumSubtrees, SubtreeHeapEntry entries, QuickList &subtrees, QuickList &internalNodes, float &treeletCost ) : void
CollectSubtreesDirect ( int nodeIndex, int maximumSubtrees, QuickList &subtrees, QuickQueue &internalNodes, float &treeletCost ) : void
ComputeMaximumDepth ( ) : int
CreateBinnedResources ( BufferPool bufferPool, int maximumSubtreeCount, int &buffer, MemoryRegion &region, BinnedResources &resources ) : void
CreateOptimized ( ) : Tree

Creates a cache optimized copy of the tree that uses the minimum amount of memory possible.

CreateOptimized ( Leaf optimizedLeavesArray, Node optimizedNodesArray ) : void

Creates a cache optimized version of the tree in the given leaves and nodes arrays.

GetCacheOptimizeTuning ( int maximumSubtrees, float costChange, float cacheOptimizeAggressivenessScale ) : int
GetRefineTuning ( int frameIndex, int refinementCandidatesCount, float refineAggressivenessScale, float costChange, int threadCount, int &targetRefinementCount, int &refinementPeriod, int &refinementOffset ) : void
GetRefitAndMarkTuning ( int &maximumSubtrees, int &estimatedRefinementCandidateCount, int &leafCountThreshold ) : void
MeasureCacheQuality ( ) : float
MeasureCacheQuality ( int nodeIndex ) : float
MeasureCostMetric ( ) : float
MeasureNodeOccupancy ( int &nodeCount, int &childCount ) : void
PartialRefine ( int offset, int skip, QuickList &spareNodes, int maximumSubtrees, QuickList &treeletInternalNodes, BinnedResources &binnedResources, bool &nodesInvalidated ) : void
RecursiveRefine ( int maximumSubtrees, int treeSizeSeed, QuickList &treeletInternalNodes, QuickList &spareNodes, BinnedResources &binnedResources, bool &nodesInvalidated ) : void
Refit ( ) : void
RefitAndRefine ( int frameIndex, IParallelLooper looper, RefitAndRefineMultithreadedContext context, float refineAggressivenessScale = 1, float cacheOptimizeAggressivenessScale = 1 ) : int
RefitAndRefine ( int frameIndex, float refineAggressivenessScale = 1, float cacheOptimizeAggressivenessScale = 1 ) : int
RefitNonrecursive2 ( ) : void
RefitNonrecursive22 ( ) : void
RemoveAt ( int leafIndex ) : LeafMove
RemoveUnusedInternalNodes ( QuickList &spareNodes ) : void
SweepBuild ( int leafIds, BoundingBox leafBounds, int start, int length = -1, BufferPool intPool = null, BufferPool floatPool = null ) : void
TopDownAgglomerativeRefine ( ) : void
TopDownBinnedRefine ( int maximumSubtrees ) : void
Validate ( ) : void

Приватные методы

Метод Описание
BuildStagingChild ( int parent, int indexInParent, TempNode tempNodes, int tempNodeIndex, int collapseCount, Node stagingNodes, int &stagingNodeCount, float &treeletCost ) : int
CheckForRefinementOverlaps ( int nodeIndex, QuickList &refinementTargets ) : void
CollapseTree ( int depthRemaining, TempNode tempNodes, int tempNodeIndex, int nodeChildren, int &childCount, BoundingBox nodeBounds, int leafCounts ) : void
CollectNodesForMultithreadedRefit ( int threadCount, QuickList &refitAndMarkTargets, int refinementLeafCountThreshold, QuickList &refinementCandidates ) : void
CollectNodesForMultithreadedRefit ( int nodeIndex, int multithreadingLeafCountThreshold, QuickList &refitAndMarkTargets, int refinementLeafCountThreshold, QuickList &refinementCandidates ) : void
CollectSubtreesForNodeDirect ( int nodeIndex, int remainingDepth, QuickList &subtrees, QuickQueue &internalNodes, float &treeletCost ) : void
ComputeBestCostChange ( int nodeIndex, BoundingBox &newLeafBounds, Path &candidate, Path &best ) : void
ComputeBoundsMetric ( BoundingBox &boundingBox ) : float
ComputeMaximumDepth ( Node node, int currentDepth ) : int
CreateStagingNodeBinned ( BinnedResources &resources, int start, int count, int &stagingNodeCount, float &childTreeletsCost ) : int
CreateSweepBuilderNode ( int parentIndex, int indexInParent, SweepResources &leaves, int start, int count ) : int
FindPartition ( SweepResources &leaves, int start, int count, int &splitIndex, BoundingBox &a, BoundingBox &b, int &leafCountA, int &leafCountB ) : void
FindPartitionBinned ( BinnedResources &resources, int start, int count, int &splitIndex, BoundingBox &a, BoundingBox &b, int &leafCountA, int &leafCountB ) : void
FindPartitionForAxis ( BoundingBox boundingBoxes, BoundingBox aMerged, float centroids, int indexMap, int count, int &splitIndex, float &cost, BoundingBox &a, BoundingBox &b, int &leafCountA, int &leafCountB ) : void
GetChoiceList ( List choices ) : string
GetLeafBoundingBox ( int leafIndex, BoundingBox &boundingBox ) : void
GetVolumeSplitIndex ( int leafIds, BoundingBox leafBounds, int start, int length ) : int
InsertLeafIntoEmptySlot ( int leafId, BoundingBox &leafBox, int nodeIndex, int childIndex, Node node, bool &leavesInvalidated ) : void
MeasureCacheQuality ( int nodeIndex, int &foundNodes, float &nodeScore, int &scorableNodeCount ) : void
MeasureNodeOccupancy ( Node node, int &nodeCount, int &childCount ) : void
MergeLeafNodes ( int newLeafId, BoundingBox &newLeafBounds, int parentIndex, int indexInParent, BoundingBox &merged, bool &nodesInvalidated, bool &leavesInvalidated ) : void
OptimizeBFS ( Node optimizedNodes, Leaf optimizedLeaves, int &optimizedNodeCount, int &optimizedLeafCount ) : void
OptimizeDFS ( int optimizedParentIndex, int nodeIndex, Node optimizedNodes, Leaf optimizedLeaves, int &optimizedNodeCount, int &optimizedLeafCount ) : int
OptimizeGroupDFS ( Node optimizedNodes, Leaf optimizedLeaves, int &optimizedNodeCount, int &optimizedLeafCount ) : void
OptimizeGroupDFS ( int optimizedNodeIndex, int optimizedParentNodeIndex, int nodeIndex, Node optimizedNodes, Leaf optimizedLeaves, int &optimizedNodeCount, int &optimizedLeafCount ) : void
PartialRefine ( int index, int depth, int offset, int skip, QuickList &subtreeReferences, QuickList &treeletInternalNodes, QuickList &spareNodes, int maximumSubtrees, BinnedResources &binnedResources, bool &nodesInvalidated ) : void
RecursiveRefine ( int nodeIndex, int maximumSubtrees, int &treeSizeSeed, QuickList &treeletInternalNodes, QuickList &spareNodes, BinnedResources &binnedResources, bool &nodesInvalidated ) : void
Refit ( int nodeIndex, BoundingBox &boundingBox ) : void
Refit2 ( int nodeIndex, BoundingBox &boundingBox ) : void
Refit4 ( int nodeIndex, BoundingBox &boundingBox ) : void
RefitAndMark ( int leafCountThreshold, QuickList &refinementCandidates ) : float
RefitAndMark ( int index, int leafCountThreshold, QuickList &refinementCandidates, BoundingBox &boundingBox ) : float
RefitAndMeasure ( int nodeIndex, BoundingBox &boundingBox ) : float
RefitCached ( int nodeIndex, BoundingBox &boundingBox ) : void
RefitForRemoval ( Node node ) : void
RefitSwitch4 ( int nodeIndex, BoundingBox &boundingBox ) : void
ReifyChildren ( int internalNodeIndex, Node stagingNodes, QuickList &subtrees, QuickList &treeletInternalNodes, int &nextInternalNodeIndexToUse, QuickList &spareNodes, bool &nodesInvalidated ) : void
ReifyStagingNode ( int parent, int indexInParent, Node stagingNodes, int stagingNodeIndex, QuickList &subtrees, QuickList &treeletInternalNodes, int &nextInternalNodeIndexToUse, QuickList &spareNodes, bool &nodesInvalidated ) : int
ReifyStagingNodes ( int treeletRootIndex, Node stagingNodes, QuickList &subtrees, QuickList &treeletInternalNodes, int &nextInternalNodeIndexToUse, QuickList &spareNodes, bool &nodesInvalidated ) : void
RemoveNodeAt ( int nodeIndex ) : void
SetLeafBoundingBox ( int leafIndex, BoundingBox &boundingBox ) : void
Split ( int leafIds, BoundingBox leafBounds, int start, int length, int recursionRemaining, Queue subnodes ) : void
Split ( int leafIds, BoundingBox leafBounds, int start, int length, int recursionRemaining, int starts, int min, int max ) : void
SplitLeavesIntoChildren ( int depthRemaining, SweepResources &leaves, int start, int count, int nodeIndex ) : void
SplitSubtreesIntoChildrenBinned ( int depthRemaining, BinnedResources &resources, int start, int count, int stagingNodeIndex, int &stagingNodesCount, float &childrenTreeletsCost ) : void
SwapPaths ( Path &candidate, Path &best, float newCostIncrease, int childIndex ) : void
TopDownAgglomerativeRefine ( int nodeIndex, QuickList &spareNodes ) : void
TopDownBinnedRefine ( int nodeIndex, int maximumSubtrees, QuickList &subtreeReferences, QuickList &treeletInternalNodes, QuickList &spareNodes, BinnedResources &resources ) : void
TryToBottomUpAgglomerativeRefine ( int refinementFlags, int nodeIndex, QuickList &spareInternalNodes ) : void
TryToBottomUpBinnedRefine ( int refinementFlags, int nodeIndex, int maximumSubtrees, QuickList &subtreeReferences, QuickList &treeletInternalNodes, BinnedResources &resources, QuickList &spareInternalNodes ) : void
UpdateLeafBoundingBox ( int leafIndex, BoundingBox &boundingBox ) : void
Validate ( int nodeIndex, int expectedParentIndex, int expectedIndexInParent, BoundingBox &expectedBoundingBox, int &foundLeafCount ) : void
ValidateLeafNodeIndices ( ) : void
ValidateLeaves ( ) : void
ValidateRefineFlags ( int index ) : void
ValidateStaging ( Node stagingNodes, QuickList &subtreeNodePointers, int treeletParent, int treeletIndexInParent ) : void
ValidateStaging ( Node stagingNodes, int stagingNodeIndex, QuickList &subtreeNodePointers, QuickList &collectedSubtreeReferences, QuickList &internalReferences, int &foundSubtrees, int &foundLeafCount ) : void
VolumeHeuristicAddNode ( int parentNodeIndex, int indexInParent, int leafIds, BoundingBox leafBounds, int start, int length, BoundingBox &mergedBoundingBox, int &nodeIndex ) : void

Описание методов

Add() публичный Метод

public Add ( int leafId, BoundingBox &box ) : void
leafId int
box BoundingBox
Результат void

AddGlobal() публичный Метод

Tests every possible insertion path to find the one which minimizes the tree's heuristic cost.
public AddGlobal ( int leafId, BoundingBox &leafBounds ) : void
leafId int
leafBounds BoundingBox
Результат void

AgglomerativeRefine() публичный Метод

Collects a limited set of subtrees hanging from the specified node and performs a local treelet rebuild using a bottom-up agglomerative approach.
public AgglomerativeRefine ( int nodeIndex, QuickList &spareNodes, bool &nodesInvalidated ) : void
nodeIndex int Root of the refinement treelet.
spareNodes QuickList
nodesInvalidated bool True if the refinement process invalidated node pointers, false otherwise.
Результат void

BinnedRefine() публичный Метод

public BinnedRefine ( int nodeIndex, QuickList &subtreeReferences, int maximumSubtrees, QuickList &treeletInternalNodes, QuickList &spareNodes, BinnedResources &resources, bool &nodesInvalidated ) : void
nodeIndex int
subtreeReferences QuickList
maximumSubtrees int
treeletInternalNodes QuickList
spareNodes QuickList
resources BinnedResources
nodesInvalidated bool
Результат void

BottomUpAgglomerativeRefine() публичный Метод

Executes one pass of bottom-up refinement.
public BottomUpAgglomerativeRefine ( ) : void
Результат void

BottomUpBinnedRefine() публичный Метод

Executes one pass of bottom-up refinement.
public BottomUpBinnedRefine ( int maximumSubtrees ) : void
maximumSubtrees int
Результат void

BuildVolumeHeuristic() публичный Метод

public BuildVolumeHeuristic ( int leafIds, BoundingBox leafBounds, int start, int length = -1 ) : void
leafIds int
leafBounds BoundingBox
start int
length int
Результат void

CollectSubtrees() публичный Метод

public CollectSubtrees ( int nodeIndex, int maximumSubtrees, SubtreeHeapEntry entries, QuickList &subtrees, QuickList &internalNodes, float &treeletCost ) : void
nodeIndex int
maximumSubtrees int
entries SubtreeHeapEntry
subtrees QuickList
internalNodes QuickList
treeletCost float
Результат void

CollectSubtreesDirect() публичный Метод

public CollectSubtreesDirect ( int nodeIndex, int maximumSubtrees, QuickList &subtrees, QuickQueue &internalNodes, float &treeletCost ) : void
nodeIndex int
maximumSubtrees int
subtrees QuickList
internalNodes QuickQueue
treeletCost float
Результат void

ComputeMaximumDepth() публичный Метод

public ComputeMaximumDepth ( ) : int
Результат int

CreateBinnedResources() публичный статический Метод

public static CreateBinnedResources ( BufferPool bufferPool, int maximumSubtreeCount, int &buffer, MemoryRegion &region, BinnedResources &resources ) : void
bufferPool BufferPool
maximumSubtreeCount int
buffer int
region MemoryRegion
resources BinnedResources
Результат void

CreateOptimized() публичный Метод

Creates a cache optimized copy of the tree that uses the minimum amount of memory possible.
public CreateOptimized ( ) : Tree
Результат Tree

CreateOptimized() публичный Метод

Creates a cache optimized version of the tree in the given leaves and nodes arrays.
public CreateOptimized ( Leaf optimizedLeavesArray, Node optimizedNodesArray ) : void
optimizedLeavesArray Leaf Array to fill with optimized leaves.
optimizedNodesArray Node Array to fill with optimized nodes.
Результат void

GetCacheOptimizeTuning() публичный Метод

public GetCacheOptimizeTuning ( int maximumSubtrees, float costChange, float cacheOptimizeAggressivenessScale ) : int
maximumSubtrees int
costChange float
cacheOptimizeAggressivenessScale float
Результат int

GetRefineTuning() публичный Метод

public GetRefineTuning ( int frameIndex, int refinementCandidatesCount, float refineAggressivenessScale, float costChange, int threadCount, int &targetRefinementCount, int &refinementPeriod, int &refinementOffset ) : void
frameIndex int
refinementCandidatesCount int
refineAggressivenessScale float
costChange float
threadCount int
targetRefinementCount int
refinementPeriod int
refinementOffset int
Результат void

GetRefitAndMarkTuning() публичный Метод

public GetRefitAndMarkTuning ( int &maximumSubtrees, int &estimatedRefinementCandidateCount, int &leafCountThreshold ) : void
maximumSubtrees int
estimatedRefinementCandidateCount int
leafCountThreshold int
Результат void

MeasureCacheQuality() публичный Метод

public MeasureCacheQuality ( ) : float
Результат float

MeasureCacheQuality() публичный Метод

public MeasureCacheQuality ( int nodeIndex ) : float
nodeIndex int
Результат float

MeasureCostMetric() публичный Метод

public MeasureCostMetric ( ) : float
Результат float

MeasureNodeOccupancy() публичный Метод

public MeasureNodeOccupancy ( int &nodeCount, int &childCount ) : void
nodeCount int
childCount int
Результат void

PartialRefine() публичный Метод

public PartialRefine ( int offset, int skip, QuickList &spareNodes, int maximumSubtrees, QuickList &treeletInternalNodes, BinnedResources &binnedResources, bool &nodesInvalidated ) : void
offset int
skip int
spareNodes QuickList
maximumSubtrees int
treeletInternalNodes QuickList
binnedResources BinnedResources
nodesInvalidated bool
Результат void

RecursiveRefine() публичный Метод

public RecursiveRefine ( int maximumSubtrees, int treeSizeSeed, QuickList &treeletInternalNodes, QuickList &spareNodes, BinnedResources &binnedResources, bool &nodesInvalidated ) : void
maximumSubtrees int
treeSizeSeed int
treeletInternalNodes QuickList
spareNodes QuickList
binnedResources BinnedResources
nodesInvalidated bool
Результат void

Refit() публичный Метод

public Refit ( ) : void
Результат void

RefitAndRefine() публичный Метод

public RefitAndRefine ( int frameIndex, IParallelLooper looper, RefitAndRefineMultithreadedContext context, float refineAggressivenessScale = 1, float cacheOptimizeAggressivenessScale = 1 ) : int
frameIndex int
looper IParallelLooper
context RefitAndRefineMultithreadedContext
refineAggressivenessScale float
cacheOptimizeAggressivenessScale float
Результат int

RefitAndRefine() публичный Метод

public RefitAndRefine ( int frameIndex, float refineAggressivenessScale = 1, float cacheOptimizeAggressivenessScale = 1 ) : int
frameIndex int
refineAggressivenessScale float
cacheOptimizeAggressivenessScale float
Результат int

RefitNonrecursive2() публичный Метод

public RefitNonrecursive2 ( ) : void
Результат void

RefitNonrecursive22() публичный Метод

public RefitNonrecursive22 ( ) : void
Результат void

RemoveAt() публичный Метод

public RemoveAt ( int leafIndex ) : LeafMove
leafIndex int
Результат LeafMove

RemoveUnusedInternalNodes() публичный Метод

public RemoveUnusedInternalNodes ( QuickList &spareNodes ) : void
spareNodes QuickList
Результат void

SweepBuild() публичный Метод

public SweepBuild ( int leafIds, BoundingBox leafBounds, int start, int length = -1, BufferPool intPool = null, BufferPool floatPool = null ) : void
leafIds int
leafBounds BoundingBox
start int
length int
intPool BufferPool
floatPool BufferPool
Результат void

TopDownAgglomerativeRefine() публичный Метод

public TopDownAgglomerativeRefine ( ) : void
Результат void

TopDownBinnedRefine() публичный Метод

public TopDownBinnedRefine ( int maximumSubtrees ) : void
maximumSubtrees int
Результат void

Validate() публичный Метод

public Validate ( ) : void
Результат void