Developer Documentation
ACG::GPUCacheOptimizerTipsify Class Reference

#include <GPUCacheOptimizer.hh>

Inheritance diagram for ACG::GPUCacheOptimizerTipsify:
ACG::GPUCacheOptimizer

Classes

struct  RingStack
 Simple and fast fixed size stack used in tipsify implementation. More...
 

Public Member Functions

 GPUCacheOptimizerTipsify (unsigned int CacheSize, unsigned int NumTris, unsigned int NumVerts, unsigned int IndexSize, const void *pIndices)
 The actual computation happens here in this constructor. More...
 
- Public Member Functions inherited from ACG::GPUCacheOptimizer
 GPUCacheOptimizer (unsigned int NumTris, unsigned int NumVerts, unsigned int IndexSize, const void *pIndices)
 constructor More...
 
const unsigned int * GetTriangleMap () const
 Retrieves the map from dst triangle to src triangle. how to remap: for each triangle t in DstTriBuffer DstTriBuffer[t] = SrcTriBuffer[TriangleMap[t]]. More...
 
void WriteIndexBuffer (unsigned int DstIndexSize, void *pDst)
 Applies the remapping on the initial pIndices constructor's param and stores the result in the given destination buffer. More...
 
unsigned int ComputeNumberOfVertexTransformations (unsigned int VertexCacheSize=16)
 Returns the total number of vertex transforms performed with a certain VertexCache.
 
float ComputeACMR (unsigned int VertexCacheSize=16)
 Measures the efficiency use of the vertex cache. ACMR: Average Cache Miss Ratio. More...
 
float ComputeATVR (unsigned int VertexCacheSize=16)
 Measures the efficiency use of the vertex cache. ATVR: Average Transform to Vertex Ratio similar to ACMR, but easier to interpret the optimal value is 1.0 given a mesh w/o duplicate vertices. More...
 

Private Member Functions

void MakeAbstract ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ACG::GPUCacheOptimizer
static void OptimizeVertices (unsigned int NumTris, unsigned int NumVerts, unsigned int IndexSize, const void *pIndices, unsigned int *pVertMap)
 Reorders vertex buffer to minimize memory address jumps. More...
 
static void RemapVertices (unsigned int NumTris, unsigned int NumVerts, const unsigned int *pVertMap, unsigned int IndexSize, void *pInOutIndices, unsigned int VertexStride, void *pInOutVertices)
 Applies the remap table of OptimizeVertices to a vertex and index buffer. More...
 
- Protected Member Functions inherited from ACG::GPUCacheOptimizer
unsigned int GetIndex (unsigned int i) const
 
- Static Protected Member Functions inherited from ACG::GPUCacheOptimizer
static unsigned int GetIndex (unsigned int i, unsigned int IndexSize, const void *pIB)
 
static void SetIndex (unsigned int i, unsigned int val, unsigned int IndexSize, void *pIB)
 
- Protected Attributes inherited from ACG::GPUCacheOptimizer
unsigned int m_NumVerts
 
unsigned int m_NumTris
 
unsigned int * m_pTriMap
 

Detailed Description

Implementation of "Fast Triangle Reordering for Vertex Locality and Reduced Overdraw" by Sander et. al. http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/index.php

Definition at line 254 of file GPUCacheOptimizer.hh.

Constructor & Destructor Documentation

◆ GPUCacheOptimizerTipsify()

ACG::GPUCacheOptimizerTipsify::GPUCacheOptimizerTipsify ( unsigned int  CacheSize,
unsigned int  NumTris,
unsigned int  NumVerts,
unsigned int  IndexSize,
const void *  pIndices 
)

The actual computation happens here in this constructor.

Parameters
NumVertsNumber of vertices
IndexSizesize in bytes of one index: 1, 2, 4 supported
pIndicesindex buffer
CacheSizenumber of entries in the vertex cache
NumTrisNumber of triangles

Definition at line 332 of file GPUCacheOptimizer.cc.


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