VTK-m  2.0
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 
14 #include <vtkm/cont/vtkm_cont_export.h>
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  : public vtkm::cont::internal::CellLocatorBase<CellLocatorBoundingIntervalHierarchy>
32 {
33  using Superclass = vtkm::cont::internal::CellLocatorBase<CellLocatorBoundingIntervalHierarchy>;
34 
35 public:
36  using SupportedCellSets = VTKM_DEFAULT_CELL_SET_LIST;
37 
38  using CellLocatorExecList =
40 
42  using LastCell = typename ExecObjType::LastCell;
43 
44  VTKM_CONT
46  vtkm::IdComponent maxLeafSize = 5)
47  : NumPlanes(numPlanes)
48  , MaxLeafSize(maxLeafSize)
49  , Nodes()
50  , ProcessedCellIds()
51  {
52  }
53 
54  VTKM_CONT
56  {
57  this->NumPlanes = numPlanes;
58  this->SetModified();
59  }
60 
61  VTKM_CONT
62  vtkm::IdComponent GetNumberOfSplittingPlanes() { return this->NumPlanes; }
63 
64  VTKM_CONT
66  {
67  this->MaxLeafSize = maxLeafSize;
68  this->SetModified();
69  }
70 
71  VTKM_CONT
72  vtkm::Id GetMaxLeafSize() { return this->MaxLeafSize; }
73 
74  VTKM_CONT ExecObjType PrepareForExecution(vtkm::cont::DeviceAdapterId device,
75  vtkm::cont::Token& token) const;
76 
77 private:
82 
83  friend Superclass;
84  VTKM_CONT void Build();
85 
86  struct MakeExecObject;
87 };
88 
89 } // namespace cont
90 } // namespace vtkm
91 
92 #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
vtkm::cont::CellLocatorBoundingIntervalHierarchy::GetNumberOfSplittingPlanes
VTKM_CONT vtkm::IdComponent GetNumberOfSplittingPlanes()
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:62
CellLocatorBase.h
Types.h
vtkm::cont::CellLocatorBoundingIntervalHierarchy::NumPlanes
vtkm::IdComponent NumPlanes
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:78
vtkm::IdComponent
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
vtkm::ListApply
typename detail::ListApplyImpl< List, Target >::type ListApply
Applies the list of types to a template.
Definition: List.h:132
ArrayHandleTransform.h
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::cont::CellLocatorBoundingIntervalHierarchy::SupportedCellSets
VTKM_DEFAULT_CELL_SET_LIST SupportedCellSets
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:36
vtkm::cont::CellLocatorBoundingIntervalHierarchy::Superclass
friend Superclass
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:83
vtkm::cont::CellLocatorBoundingIntervalHierarchy::MaxLeafSize
vtkm::IdComponent MaxLeafSize
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:79
vtkm::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
vtkm::cont::CellLocatorBoundingIntervalHierarchy::GetMaxLeafSize
VTKM_CONT vtkm::Id GetMaxLeafSize()
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:72
vtkm::cont::CellLocatorBoundingIntervalHierarchy::CellLocatorExecList
vtkm::ListTransform< SupportedCellSets, vtkm::exec::CellLocatorBoundingIntervalHierarchy > CellLocatorExecList
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:39
vtkm::cont::CellLocatorBoundingIntervalHierarchy::Superclass
vtkm::cont::internal::CellLocatorBase< CellLocatorBoundingIntervalHierarchy > Superclass
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:33
vtkm::cont::CellLocatorBoundingIntervalHierarchy::ExecObjType
vtkm::ListApply< CellLocatorExecList, vtkm::exec::CellLocatorMultiplexer > ExecObjType
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:41
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:592
vtkm::cont::CellLocatorBoundingIntervalHierarchy::SetMaxLeafSize
VTKM_CONT void SetMaxLeafSize(vtkm::IdComponent maxLeafSize)
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:65
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::cont::CellLocatorBoundingIntervalHierarchy::CellLocatorBoundingIntervalHierarchy
VTKM_CONT CellLocatorBoundingIntervalHierarchy(vtkm::IdComponent numPlanes=4, vtkm::IdComponent maxLeafSize=5)
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:45
vtkm::cont::CellLocatorBoundingIntervalHierarchy
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:30
vtkm::cont::DeviceAdapterId
Definition: DeviceAdapterTag.h:52
vtkm::cont::CellLocatorBoundingIntervalHierarchy::LastCell
typename ExecObjType::LastCell LastCell
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:42
vtkm::cont::CellLocatorBoundingIntervalHierarchy::Nodes
vtkm::cont::ArrayHandle< vtkm::exec::CellLocatorBoundingIntervalHierarchyNode > Nodes
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:80
vtkm::cont::CellLocatorBoundingIntervalHierarchy::ProcessedCellIds
vtkm::cont::ArrayHandle< vtkm::Id > ProcessedCellIds
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:81
vtkm::cont::CellLocatorBoundingIntervalHierarchy::SetNumberOfSplittingPlanes
VTKM_CONT void SetNumberOfSplittingPlanes(vtkm::IdComponent numPlanes)
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:55
CellLocatorBoundingIntervalHierarchy.h