VTK-m  1.8
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
vtkm::cont::CellLocatorTwoLevel Class Reference

A locator that uses 2 nested levels of grids. More...

#include <CellLocatorTwoLevel.h>

Inheritance diagram for vtkm::cont::CellLocatorTwoLevel:
vtkm::cont::ExecutionObjectBase

Public Types

using SupportedCellSets = VTKM_DEFAULT_CELL_SET_LIST
 
using CellExecObjectList = vtkm::ListTransform< SupportedCellSets, CellSetContToExec >
 
using CellLocatorExecList = vtkm::ListTransform< CellExecObjectList, vtkm::exec::CellLocatorTwoLevel >
 
using ExecObjType = vtkm::ListApply< CellLocatorExecList, vtkm::exec::CellLocatorMultiplexer >
 

Public Member Functions

 CellLocatorTwoLevel ()
 
void SetDensityL1 (vtkm::FloatDefault val)
 Get/Set the desired approximate number of cells per level 1 bin. More...
 
vtkm::FloatDefault GetDensityL1 () const
 
void SetDensityL2 (vtkm::FloatDefault val)
 Get/Set the desired approximate number of cells per level 1 bin. More...
 
vtkm::FloatDefault GetDensityL2 () const
 
void PrintSummary (std::ostream &out) const
 
ExecObjType PrepareForExecution (vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token) const
 

Private Types

using Superclass = vtkm::cont::internal::CellLocatorBase< CellLocatorTwoLevel >
 
template<typename CellSetCont >
using CellSetContToExec = typename CellSetCont::template ExecConnectivityType< vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint >
 

Private Member Functions

VTKM_CONT void Build ()
 

Private Attributes

friend Superclass
 
vtkm::FloatDefault DensityL1
 
vtkm::FloatDefault DensityL2
 
vtkm::internal::cl_uniform_bins::Grid TopLevel
 
vtkm::cont::ArrayHandle< vtkm::internal::cl_uniform_bins::DimVec3LeafDimensions
 
vtkm::cont::ArrayHandle< vtkm::IdLeafStartIndex
 
vtkm::cont::ArrayHandle< vtkm::IdCellStartIndex
 
vtkm::cont::ArrayHandle< vtkm::IdCellCount
 
vtkm::cont::ArrayHandle< vtkm::IdCellIds
 

Detailed Description

A locator that uses 2 nested levels of grids.

CellLocatorTwoLevel creates a cell search structure using two levels of structured grids. The first level is a coarse grid that covers the entire region of the data. It is expected that the distributions of dataset cells in this coarse grid will be very uneven. Within each bin of the coarse grid, a second level grid is defined within the spatial bounds of the coarse bin. The size of this second level grid is proportional to the number of cells in the first level. In this way, the second level grids adapt to the distribution of cells being located. The adaption is not perfect, but it is has very good space efficiency and is fast to generate and use.

The algorithm used in CellLocatorTwoLevel is described in the following publication:

Javor Kalojanov, Markus Billeter, and Philipp Slusallek. "Two-Level Grids for Ray Tracing on GPUs." Computer Graphics Forum, 2011, pages 307-314. DOI 10.1111/j.1467-8659.2011.01862.x

Member Typedef Documentation

◆ CellExecObjectList

◆ CellLocatorExecList

◆ CellSetContToExec

template<typename CellSetCont >
using vtkm::cont::CellLocatorTwoLevel::CellSetContToExec = typename CellSetCont::template ExecConnectivityType<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>
private

◆ ExecObjType

◆ Superclass

using vtkm::cont::CellLocatorTwoLevel::Superclass = vtkm::cont::internal::CellLocatorBase<CellLocatorTwoLevel>
private

◆ SupportedCellSets

using vtkm::cont::CellLocatorTwoLevel::SupportedCellSets = VTKM_DEFAULT_CELL_SET_LIST

Constructor & Destructor Documentation

◆ CellLocatorTwoLevel()

vtkm::cont::CellLocatorTwoLevel::CellLocatorTwoLevel ( )
inline

Member Function Documentation

◆ Build()

VTKM_CONT void vtkm::cont::CellLocatorTwoLevel::Build ( )
private

◆ GetDensityL1()

vtkm::FloatDefault vtkm::cont::CellLocatorTwoLevel::GetDensityL1 ( ) const
inline

◆ GetDensityL2()

vtkm::FloatDefault vtkm::cont::CellLocatorTwoLevel::GetDensityL2 ( ) const
inline

◆ PrepareForExecution()

ExecObjType vtkm::cont::CellLocatorTwoLevel::PrepareForExecution ( vtkm::cont::DeviceAdapterId  device,
vtkm::cont::Token token 
) const

◆ PrintSummary()

void vtkm::cont::CellLocatorTwoLevel::PrintSummary ( std::ostream &  out) const

◆ SetDensityL1()

void vtkm::cont::CellLocatorTwoLevel::SetDensityL1 ( vtkm::FloatDefault  val)
inline

Get/Set the desired approximate number of cells per level 1 bin.

◆ SetDensityL2()

void vtkm::cont::CellLocatorTwoLevel::SetDensityL2 ( vtkm::FloatDefault  val)
inline

Get/Set the desired approximate number of cells per level 1 bin.

Member Data Documentation

◆ CellCount

vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::CellLocatorTwoLevel::CellCount
private

◆ CellIds

vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::CellLocatorTwoLevel::CellIds
private

◆ CellStartIndex

vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::CellLocatorTwoLevel::CellStartIndex
private

◆ DensityL1

vtkm::FloatDefault vtkm::cont::CellLocatorTwoLevel::DensityL1
private

◆ DensityL2

vtkm::FloatDefault vtkm::cont::CellLocatorTwoLevel::DensityL2
private

◆ LeafDimensions

vtkm::cont::ArrayHandle<vtkm::internal::cl_uniform_bins::DimVec3> vtkm::cont::CellLocatorTwoLevel::LeafDimensions
private

◆ LeafStartIndex

vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::CellLocatorTwoLevel::LeafStartIndex
private

◆ Superclass

◆ TopLevel

vtkm::internal::cl_uniform_bins::Grid vtkm::cont::CellLocatorTwoLevel::TopLevel
private

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