VTK-m  2.2
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 
31 {
32 public:
34 
35  using CellLocatorExecList =
37 
39  using LastCell = typename ExecObjType::LastCell;
40 
41  VTKM_CONT
43  vtkm::IdComponent maxLeafSize = 5)
44  : NumPlanes(numPlanes)
45  , MaxLeafSize(maxLeafSize)
46  , Nodes()
47  , ProcessedCellIds()
48  {
49  }
50 
51  VTKM_CONT
53  {
54  this->NumPlanes = numPlanes;
55  this->SetModified();
56  }
57 
58  VTKM_CONT
59  vtkm::IdComponent GetNumberOfSplittingPlanes() { return this->NumPlanes; }
60 
61  VTKM_CONT
63  {
64  this->MaxLeafSize = maxLeafSize;
65  this->SetModified();
66  }
67 
68  VTKM_CONT
69  vtkm::Id GetMaxLeafSize() { return this->MaxLeafSize; }
70 
71  VTKM_CONT ExecObjType PrepareForExecution(vtkm::cont::DeviceAdapterId device,
72  vtkm::cont::Token& token) const;
73 
74 private:
79 
80  VTKM_CONT void Build() override;
81 
82  struct MakeExecObject;
83 };
84 
85 } // namespace cont
86 } // namespace vtkm
87 
88 #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:75
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:76
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:36
vtkm::cont::CellLocatorBoundingIntervalHierarchy::SetMaxLeafSize
void SetMaxLeafSize(vtkm::IdComponent maxLeafSize)
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:62
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:38
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:35
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)
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:52
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::cont::CellLocatorBoundingIntervalHierarchy::GetNumberOfSplittingPlanes
vtkm::IdComponent GetNumberOfSplittingPlanes()
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:59
vtkm::cont::CellLocatorBoundingIntervalHierarchy::CellLocatorBoundingIntervalHierarchy
CellLocatorBoundingIntervalHierarchy(vtkm::IdComponent numPlanes=4, vtkm::IdComponent maxLeafSize=5)
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:42
vtkm::cont::CellLocatorBoundingIntervalHierarchy
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:30
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:39
vtkm::cont::CellLocatorBoundingIntervalHierarchy::GetMaxLeafSize
vtkm::Id GetMaxLeafSize()
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:69
vtkm::cont::CellLocatorBoundingIntervalHierarchy::Nodes
vtkm::cont::ArrayHandle< vtkm::exec::CellLocatorBoundingIntervalHierarchyNode > Nodes
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:77
vtkm::cont::CellLocatorBoundingIntervalHierarchy::ProcessedCellIds
vtkm::cont::ArrayHandle< vtkm::Id > ProcessedCellIds
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:78
vtkm::cont::CellLocatorBoundingIntervalHierarchy::SupportedCellSets
::vtkm::cont::internal::CellSetList SupportedCellSets
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:33
CellLocatorBoundingIntervalHierarchy.h