VTK-m
2.2
|
A locator that uses 2 nested levels of grids. More...
#include <CellLocatorTwoLevel.h>
Public Types | |
using | SupportedCellSets = ::vtkm::cont::internal::CellSetList |
using | CellExecObjectList = vtkm::ListTransform< SupportedCellSets, CellSetContToExec > |
using | CellLocatorExecList = vtkm::ListTransform< CellExecObjectList, vtkm::exec::CellLocatorTwoLevel > |
using | ExecObjType = vtkm::ListApply< CellLocatorExecList, vtkm::exec::CellLocatorMultiplexer > |
using | LastCell = typename ExecObjType::LastCell |
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 |
Public Member Functions inherited from vtkm::cont::CellLocatorBase | |
virtual | ~CellLocatorBase ()=default |
const vtkm::cont::UnknownCellSet & | GetCellSet () const |
Specify the CellSet defining the structure of the cells being searched. More... | |
void | SetCellSet (const vtkm::cont::UnknownCellSet &cellSet) |
Specify the CellSet defining the structure of the cells being searched. More... | |
const vtkm::cont::CoordinateSystem & | GetCoordinates () const |
Specify the CoordinateSystem defining the location of the cells. More... | |
void | SetCoordinates (const vtkm::cont::CoordinateSystem &coords) |
Specify the CoordinateSystem defining the location of the cells. More... | |
void | Update () const |
Build the search structure used to look up cells. More... | |
Private Types | |
template<typename CellSetCont > | |
using | CellSetContToExec = typename CellSetCont::template ExecConnectivityType< vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint > |
Private Member Functions | |
void | Build () override |
Private Attributes | |
vtkm::FloatDefault | DensityL1 |
vtkm::FloatDefault | DensityL2 |
vtkm::internal::cl_uniform_bins::Grid | TopLevel |
vtkm::cont::ArrayHandle< vtkm::internal::cl_uniform_bins::DimVec3 > | LeafDimensions |
vtkm::cont::ArrayHandle< vtkm::Id > | LeafStartIndex |
vtkm::cont::ArrayHandle< vtkm::Id > | CellStartIndex |
vtkm::cont::ArrayHandle< vtkm::Id > | CellCount |
vtkm::cont::ArrayHandle< vtkm::Id > | CellIds |
Additional Inherited Members | |
Protected Member Functions inherited from vtkm::cont::CellLocatorBase | |
void | SetModified () |
bool | GetModified () const |
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
using vtkm::cont::CellLocatorTwoLevel::CellExecObjectList = vtkm::ListTransform<SupportedCellSets, CellSetContToExec> |
using vtkm::cont::CellLocatorTwoLevel::CellLocatorExecList = vtkm::ListTransform<CellExecObjectList, vtkm::exec::CellLocatorTwoLevel> |
|
private |
using vtkm::cont::CellLocatorTwoLevel::ExecObjType = vtkm::ListApply<CellLocatorExecList, vtkm::exec::CellLocatorMultiplexer> |
using vtkm::cont::CellLocatorTwoLevel::LastCell = typename ExecObjType::LastCell |
using vtkm::cont::CellLocatorTwoLevel::SupportedCellSets = ::vtkm::cont::internal::CellSetList |
|
inline |
|
overrideprivatevirtual |
Implements vtkm::cont::CellLocatorBase.
|
inline |
|
inline |
ExecObjType vtkm::cont::CellLocatorTwoLevel::PrepareForExecution | ( | vtkm::cont::DeviceAdapterId | device, |
vtkm::cont::Token & | token | ||
) | const |
void vtkm::cont::CellLocatorTwoLevel::PrintSummary | ( | std::ostream & | out | ) | const |
|
inline |
Get/Set the desired approximate number of cells per level 1 bin.
|
inline |
Get/Set the desired approximate number of cells per level 1 bin.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |