Viskores  1.0
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
viskores::cont::CellLocatorUniformBins Class Reference

A locator that uses a uniform grid. More...

#include <CellLocatorUniformBins.h>

Inheritance diagram for viskores::cont::CellLocatorUniformBins:
viskores::cont::CellLocatorBase viskores::cont::ExecutionObjectBase

Public Types

using SupportedCellSets = ::viskores::cont::internal::CellSetList
 
using CellExecObjectList = viskores::ListTransform< SupportedCellSets, CellSetContToExec >
 
using CellLocatorExecList = viskores::ListTransform< CellExecObjectList, viskores::exec::CellLocatorUniformBins >
 
using ExecObjType = viskores::ListApply< CellLocatorExecList, viskores::exec::CellLocatorMultiplexer >
 
using LastCell = typename ExecObjType::LastCell
 

Public Member Functions

 CellLocatorUniformBins ()=default
 
void SetDims (const viskores::Id3 &dims)
 Specify the dimensions of the grid used to establish bins. More...
 
viskores::Id3 GetDims () const
 Specify the dimensions of the grid used to establish bins. More...
 
void PrintSummary (std::ostream &out) const
 Print a summary of the state of this locator. More...
 
ExecObjType PrepareForExecution (viskores::cont::DeviceAdapterId device, viskores::cont::Token &token) const
 
- Public Member Functions inherited from viskores::cont::CellLocatorBase
virtual ~CellLocatorBase ()=default
 
const viskores::cont::UnknownCellSetGetCellSet () const
 Specify the CellSet defining the structure of the cells being searched. More...
 
void SetCellSet (const viskores::cont::UnknownCellSet &cellSet)
 Specify the CellSet defining the structure of the cells being searched. More...
 
const viskores::cont::CoordinateSystemGetCoordinates () const
 Specify the CoordinateSystem defining the location of the cells. More...
 
void SetCoordinates (const viskores::cont::CoordinateSystem &coords)
 Specify the CoordinateSystem defining the location of the cells. More...
 
void SetCoordinates (const viskores::cont::UnknownArrayHandle &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< viskores::TopologyElementTagCell, viskores::TopologyElementTagPoint >
 
using CellIdArrayType = viskores::cont::ArrayHandle< viskores::Id >
 
using CellIdOffsetArrayType = viskores::cont::ArrayHandle< viskores::Id >
 

Private Member Functions

void Build () override
 

Private Attributes

viskores::Vec3f InvSpacing
 
viskores::Vec3f MaxPoint
 
viskores::Vec3f Origin
 
viskores::Id3 UniformDims
 
viskores::Id3 MaxCellIds
 
viskores::cont::ArrayHandleGroupVecVariable< CellIdArrayType, CellIdOffsetArrayTypeCellIds
 

Additional Inherited Members

- Protected Member Functions inherited from viskores::cont::CellLocatorBase
void SetModified ()
 
bool GetModified () const
 

Detailed Description

A locator that uses a uniform grid.

CellLocatorUniformBins creates a cell search structure using a single uniform grid. The size of the uniform grid is specified using the SetDims method. In general, the CellLocatorTwoLevel has the better performance. However, there are some cases where this is not the case. One example of this is a uniformly dense triangle grid. In some cases the CellLocatorUniformBins produces a more efficient search structure, especially for GPUs where memory access patterns are critical to performance.

Member Typedef Documentation

◆ CellExecObjectList

◆ CellIdArrayType

◆ CellIdOffsetArrayType

◆ CellLocatorExecList

◆ CellSetContToExec

template<typename CellSetCont >
using viskores::cont::CellLocatorUniformBins::CellSetContToExec = typename CellSetCont::template ExecConnectivityType<viskores::TopologyElementTagCell, viskores::TopologyElementTagPoint>
private

◆ ExecObjType

◆ LastCell

using viskores::cont::CellLocatorUniformBins::LastCell = typename ExecObjType::LastCell

◆ SupportedCellSets

using viskores::cont::CellLocatorUniformBins::SupportedCellSets = ::viskores::cont::internal::CellSetList

Constructor & Destructor Documentation

◆ CellLocatorUniformBins()

viskores::cont::CellLocatorUniformBins::CellLocatorUniformBins ( )
default

Member Function Documentation

◆ Build()

void viskores::cont::CellLocatorUniformBins::Build ( )
overrideprivatevirtual

◆ GetDims()

viskores::Id3 viskores::cont::CellLocatorUniformBins::GetDims ( ) const
inline

Specify the dimensions of the grid used to establish bins.

This locator will establish a grid over the bounds of the input data that contains the number of bins specified by these dimensions in each direction. Larger dimensions will reduce the number of cells in each bin, but will require more memory. SetDims() must be called before Update().

◆ PrepareForExecution()

ExecObjType viskores::cont::CellLocatorUniformBins::PrepareForExecution ( viskores::cont::DeviceAdapterId  device,
viskores::cont::Token token 
) const

◆ PrintSummary()

void viskores::cont::CellLocatorUniformBins::PrintSummary ( std::ostream &  out) const

Print a summary of the state of this locator.

◆ SetDims()

void viskores::cont::CellLocatorUniformBins::SetDims ( const viskores::Id3 dims)
inline

Specify the dimensions of the grid used to establish bins.

This locator will establish a grid over the bounds of the input data that contains the number of bins specified by these dimensions in each direction. Larger dimensions will reduce the number of cells in each bin, but will require more memory. SetDims() must be called before Update().

Member Data Documentation

◆ CellIds

viskores::cont::ArrayHandleGroupVecVariable<CellIdArrayType, CellIdOffsetArrayType> viskores::cont::CellLocatorUniformBins::CellIds
private

◆ InvSpacing

viskores::Vec3f viskores::cont::CellLocatorUniformBins::InvSpacing
private

◆ MaxCellIds

viskores::Id3 viskores::cont::CellLocatorUniformBins::MaxCellIds
private

◆ MaxPoint

viskores::Vec3f viskores::cont::CellLocatorUniformBins::MaxPoint
private

◆ Origin

viskores::Vec3f viskores::cont::CellLocatorUniformBins::Origin
private

◆ UniformDims

viskores::Id3 viskores::cont::CellLocatorUniformBins::UniformDims
private

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