VTK-m  2.3
cont/CellLocatorBoundingIntervalHierarchy.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 
11 #ifndef vtk_m_cont_CellLocatorBoundingIntervalHierarchy_h
12 #define vtk_m_cont_CellLocatorBoundingIntervalHierarchy_h
13 
15 
16 #include <vtkm/Types.h>
17 #include <vtkm/cont/ArrayHandle.h>
19 
21 
24 
25 namespace vtkm
26 {
27 namespace cont
28 {
29 
42 {
43 public:
45 
46  using CellLocatorExecList =
48 
50  using LastCell = typename ExecObjType::LastCell;
51 
54  VTKM_CONT
56  vtkm::IdComponent maxLeafSize = 5)
57  : NumPlanes(numPlanes)
58  , MaxLeafSize(maxLeafSize)
59  , Nodes()
60  , ProcessedCellIds()
61  {
62  }
63 
72  {
73  this->NumPlanes = numPlanes;
74  this->SetModified();
75  }
78 
88  {
89  this->MaxLeafSize = maxLeafSize;
90  this->SetModified();
91  }
93  VTKM_CONT vtkm::Id GetMaxLeafSize() { return this->MaxLeafSize; }
94 
95  VTKM_CONT ExecObjType PrepareForExecution(vtkm::cont::DeviceAdapterId device,
96  vtkm::cont::Token& token) const;
97 
98 private:
103 
104  VTKM_CONT void Build() override;
105 
106  struct MakeExecObject;
107 };
108 
109 } // namespace cont
110 } // namespace vtkm
111 
112 #endif // vtk_m_cont_CellLocatorBoundingIntervalHierarchy_h
vtkm::cont::ArrayHandle< vtkm::exec::CellLocatorBoundingIntervalHierarchyNode >
ArrayHandle.h
CellLocatorMultiplexer.h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
CellLocatorBase.h
Types.h
vtkm::cont::CellLocatorBoundingIntervalHierarchy::NumPlanes
vtkm::IdComponent NumPlanes
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:99
vtkm::IdComponent
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
vtkm::ListApply
typename detail::ListApplyImpl< List, Target >::type ListApply
Applies the list of types to a template.
Definition: List.h:138
ArrayHandleTransform.h
vtkm::cont::CellLocatorBoundingIntervalHierarchy::MaxLeafSize
vtkm::IdComponent MaxLeafSize
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:100
vtkm::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
vtkm::cont::CellLocatorBoundingIntervalHierarchy::CellLocatorExecList
vtkm::ListTransform< SupportedCellSets, vtkm::exec::CellLocatorBoundingIntervalHierarchy > CellLocatorExecList
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:47
vtkm::cont::CellLocatorBoundingIntervalHierarchy::SetMaxLeafSize
void SetMaxLeafSize(vtkm::IdComponent maxLeafSize)
Specify the number of cells in each leaf.
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:87
VTKM_DEFAULT_CELL_SET_LIST
#define VTKM_DEFAULT_CELL_SET_LIST
Definition: DefaultTypes.h:77
vtkm::cont::CellLocatorBoundingIntervalHierarchy::ExecObjType
vtkm::ListApply< CellLocatorExecList, vtkm::exec::CellLocatorMultiplexer > ExecObjType
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:49
vtkm::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:598
vtkm::cont::CellLocatorBase
Base class for all CellLocator classes.
Definition: CellLocatorBase.h:34
VTKM_CONT_EXPORT
#define VTKM_CONT_EXPORT
Definition: vtkm_cont_export.h:44
vtkm_cont_export.h
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::cont::CellLocatorBoundingIntervalHierarchy::SetNumberOfSplittingPlanes
void SetNumberOfSplittingPlanes(vtkm::IdComponent numPlanes)
Specify the number of splitting planes to use each time a region is divided.
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:71
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::cont::CellLocatorBoundingIntervalHierarchy::GetNumberOfSplittingPlanes
vtkm::IdComponent GetNumberOfSplittingPlanes()
Specify the number of splitting planes to use each time a region is divided.
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:77
vtkm::cont::CellLocatorBoundingIntervalHierarchy::CellLocatorBoundingIntervalHierarchy
CellLocatorBoundingIntervalHierarchy(vtkm::IdComponent numPlanes=4, vtkm::IdComponent maxLeafSize=5)
Construct a CellLocatorBoundingIntervalHierarchy while optionally specifying the number of splitting ...
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:55
vtkm::cont::CellLocatorBoundingIntervalHierarchy
A cell locator that performs a recursive division of space.
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:41
vtkm::cont::DeviceAdapterId
An object used to specify a device.
Definition: DeviceAdapterTag.h:58
vtkm::cont::CellLocatorBoundingIntervalHierarchy::LastCell
typename ExecObjType::LastCell LastCell
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:50
vtkm::cont::CellLocatorBoundingIntervalHierarchy::GetMaxLeafSize
vtkm::Id GetMaxLeafSize()
Specify the number of cells in each leaf.
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:93
vtkm::cont::CellLocatorBoundingIntervalHierarchy::Nodes
vtkm::cont::ArrayHandle< vtkm::exec::CellLocatorBoundingIntervalHierarchyNode > Nodes
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:101
vtkm::cont::CellLocatorBoundingIntervalHierarchy::ProcessedCellIds
vtkm::cont::ArrayHandle< vtkm::Id > ProcessedCellIds
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:102
vtkm::cont::CellLocatorBoundingIntervalHierarchy::SupportedCellSets
::vtkm::cont::internal::CellSetList SupportedCellSets
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:44
CellLocatorBoundingIntervalHierarchy.h