Viskores  1.0
cont/CellLocatorUniformBins.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_cont_CellLocatorUniformBins_h
19 #define viskores_cont_CellLocatorUniformBins_h
20 
23 
26 
29 
30 
31 namespace viskores
32 {
33 namespace cont
34 {
35 
45 class VISKORES_CONT_EXPORT CellLocatorUniformBins : public viskores::cont::CellLocatorBase
46 {
47  template <typename CellSetCont>
48  using CellSetContToExec =
49  typename CellSetCont::template ExecConnectivityType<viskores::TopologyElementTagCell,
51 
52 public:
54 
56  using CellLocatorExecList =
58 
59  using ExecObjType =
61  using LastCell = typename ExecObjType::LastCell;
62 
63  CellLocatorUniformBins() = default;
64 
71  VISKORES_CONT void SetDims(const viskores::Id3& dims) { this->UniformDims = dims; }
73  VISKORES_CONT viskores::Id3 GetDims() const { return this->UniformDims; }
74 
76  void PrintSummary(std::ostream& out) const;
77 
78 public:
79  ExecObjType PrepareForExecution(viskores::cont::DeviceAdapterId device,
80  viskores::cont::Token& token) const;
81 
82 private:
83  VISKORES_CONT void Build() override;
84 
90 
93 
95 
96  struct MakeExecObject;
97 };
98 
99 }
100 } // viskores::cont
101 
102 #endif // viskores_cont_CellLocatorUniformBins_h
viskores::cont::CellLocatorUniformBins::GetDims
viskores::Id3 GetDims() const
Specify the dimensions of the grid used to establish bins.
Definition: cont/CellLocatorUniformBins.h:73
viskores::cont::CellLocatorBase
Base class for all CellLocator classes.
Definition: CellLocatorBase.h:42
ArrayHandle.h
CellLocatorMultiplexer.h
viskores::cont::CellLocatorUniformBins::CellIds
viskores::cont::ArrayHandleGroupVecVariable< CellIdArrayType, CellIdOffsetArrayType > CellIds
Definition: cont/CellLocatorUniformBins.h:94
viskores::cont::CellLocatorUniformBins::UniformDims
viskores::Id3 UniformDims
Definition: cont/CellLocatorUniformBins.h:88
viskores::TopologyElementTagCell
A tag used to identify the cell elements in a topology.
Definition: TopologyElementTag.h:32
CellLocatorBase.h
viskores::cont::CellLocatorUniformBins::CellExecObjectList
viskores::ListTransform< SupportedCellSets, CellSetContToExec > CellExecObjectList
Definition: cont/CellLocatorUniformBins.h:55
viskores::cont::CellLocatorUniformBins::LastCell
typename ExecObjType::LastCell LastCell
Definition: cont/CellLocatorUniformBins.h:61
CellSetList.h
viskores::ListApply
typename detail::ListApplyImpl< List, Target >::type ListApply
Applies the list of types to a template.
Definition: List.h:146
viskores::cont::CellLocatorUniformBins::MaxCellIds
viskores::Id3 MaxCellIds
Definition: cont/CellLocatorUniformBins.h:89
viskores::cont::ArrayHandle< viskores::Id >
viskores::TopologyElementTagPoint
A tag used to identify the point elements in a topology.
Definition: TopologyElementTag.h:42
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
VISKORES_DEFAULT_CELL_SET_LIST
#define VISKORES_DEFAULT_CELL_SET_LIST
Definition: DefaultTypes.h:85
viskores::ListTransform
typename detail::ListTransformImpl< List, Transform >::type ListTransform
Constructs a list containing all types in a source list applied to a transform template.
Definition: List.h:617
viskores::cont::CellLocatorUniformBins::InvSpacing
viskores::Vec3f InvSpacing
Definition: cont/CellLocatorUniformBins.h:85
CellLocatorUniformBins.h
viskores::cont::CellLocatorUniformBins::CellLocatorExecList
viskores::ListTransform< CellExecObjectList, viskores::exec::CellLocatorUniformBins > CellLocatorExecList
Definition: cont/CellLocatorUniformBins.h:57
viskores::cont::CellLocatorUniformBins::MaxPoint
viskores::Vec3f MaxPoint
Definition: cont/CellLocatorUniformBins.h:86
viskores::cont::CellLocatorUniformBins::Origin
viskores::Vec3f Origin
Definition: cont/CellLocatorUniformBins.h:87
viskores::cont::CellLocatorUniformBins::CellSetContToExec
typename CellSetCont::template ExecConnectivityType< viskores::TopologyElementTagCell, viskores::TopologyElementTagPoint > CellSetContToExec
Definition: cont/CellLocatorUniformBins.h:50
viskores::cont::DeviceAdapterId
An object used to specify a device.
Definition: DeviceAdapterTag.h:66
viskores::cont::CellLocatorUniformBins::SetDims
void SetDims(const viskores::Id3 &dims)
Specify the dimensions of the grid used to establish bins.
Definition: cont/CellLocatorUniformBins.h:71
viskores::cont::CellLocatorUniformBins::ExecObjType
viskores::ListApply< CellLocatorExecList, viskores::exec::CellLocatorMultiplexer > ExecObjType
Definition: cont/CellLocatorUniformBins.h:60
ArrayHandleGroupVecVariable.h
viskores::cont::CellLocatorUniformBins
A locator that uses a uniform grid.
Definition: cont/CellLocatorUniformBins.h:45
viskores::cont::ArrayHandleGroupVecVariable< CellIdArrayType, CellIdOffsetArrayType >
viskores::cont::CellLocatorUniformBins::SupportedCellSets
::viskores::cont::internal::CellSetList SupportedCellSets
Definition: cont/CellLocatorUniformBins.h:53
viskores::Vec< viskores::Id, 3 >
viskores::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:43