Viskores  1.0
cont/CellLocatorBoundingIntervalHierarchy.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 
19 #ifndef viskores_cont_CellLocatorBoundingIntervalHierarchy_h
20 #define viskores_cont_CellLocatorBoundingIntervalHierarchy_h
21 
23 
24 #include <viskores/Types.h>
27 
29 
32 
33 namespace viskores
34 {
35 namespace cont
36 {
37 
49 class VISKORES_CONT_EXPORT CellLocatorBoundingIntervalHierarchy
51 {
52 public:
54 
55  using CellLocatorExecList =
58 
59  using ExecObjType =
61  using LastCell = typename ExecObjType::LastCell;
62 
67  viskores::IdComponent maxLeafSize = 5)
68  : NumPlanes(numPlanes)
69  , MaxLeafSize(maxLeafSize)
70  , Nodes()
71  , ProcessedCellIds()
72  {
73  }
74 
83  {
84  this->NumPlanes = numPlanes;
85  this->SetModified();
86  }
89 
99  {
100  this->MaxLeafSize = maxLeafSize;
101  this->SetModified();
102  }
104  VISKORES_CONT viskores::Id GetMaxLeafSize() { return this->MaxLeafSize; }
105 
106  VISKORES_CONT ExecObjType PrepareForExecution(viskores::cont::DeviceAdapterId device,
107  viskores::cont::Token& token) const;
108 
109 private:
114 
115  VISKORES_CONT void Build() override;
116 
117  struct MakeExecObject;
118 };
119 
120 } // namespace cont
121 } // namespace viskores
122 
123 #endif // viskores_cont_CellLocatorBoundingIntervalHierarchy_h
viskores::cont::CellLocatorBase
Base class for all CellLocator classes.
Definition: CellLocatorBase.h:42
viskores::cont::CellLocatorBoundingIntervalHierarchy
A cell locator that performs a recursive division of space.
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:49
viskores::cont::CellLocatorBoundingIntervalHierarchy::SetNumberOfSplittingPlanes
void SetNumberOfSplittingPlanes(viskores::IdComponent numPlanes)
Specify the number of splitting planes to use each time a region is divided.
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:82
ArrayHandle.h
viskores::cont::CellLocatorBoundingIntervalHierarchy::GetNumberOfSplittingPlanes
viskores::IdComponent GetNumberOfSplittingPlanes()
Specify the number of splitting planes to use each time a region is divided.
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:88
CellLocatorMultiplexer.h
CellLocatorBase.h
Types.h
viskores::cont::CellLocatorBoundingIntervalHierarchy::LastCell
typename ExecObjType::LastCell LastCell
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:61
viskores::cont::CellLocatorBoundingIntervalHierarchy::ProcessedCellIds
viskores::cont::ArrayHandle< viskores::Id > ProcessedCellIds
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:113
ArrayHandleTransform.h
viskores::ListApply
typename detail::ListApplyImpl< List, Target >::type ListApply
Applies the list of types to a template.
Definition: List.h:146
viskores::cont::CellLocatorBoundingIntervalHierarchy::CellLocatorBoundingIntervalHierarchy
CellLocatorBoundingIntervalHierarchy(viskores::IdComponent numPlanes=4, viskores::IdComponent maxLeafSize=5)
Construct a CellLocatorBoundingIntervalHierarchy while optionally specifying the number of splitting ...
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:66
viskores::cont::ArrayHandle< viskores::exec::CellLocatorBoundingIntervalHierarchyNode >
viskores::exec::CellLocatorBoundingIntervalHierarchy
Structure for locating cells.
Definition: exec/CellLocatorBoundingIntervalHierarchy.h:82
viskores::IdComponent
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
viskores::cont::CellLocatorBoundingIntervalHierarchy::NumPlanes
viskores::IdComponent NumPlanes
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:110
viskores::cont::CellLocatorBoundingIntervalHierarchy::CellLocatorExecList
viskores::ListTransform< SupportedCellSets, viskores::exec::CellLocatorBoundingIntervalHierarchy > CellLocatorExecList
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:57
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
viskores::cont::CellLocatorBoundingIntervalHierarchy::SupportedCellSets
::viskores::cont::internal::CellSetList SupportedCellSets
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:53
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::CellLocatorBoundingIntervalHierarchy::GetMaxLeafSize
viskores::Id GetMaxLeafSize()
Specify the number of cells in each leaf.
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:104
viskores::cont::CellLocatorBoundingIntervalHierarchy::MaxLeafSize
viskores::IdComponent MaxLeafSize
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:111
viskores::cont::DeviceAdapterId
An object used to specify a device.
Definition: DeviceAdapterTag.h:66
viskores::cont::CellLocatorBoundingIntervalHierarchy::SetMaxLeafSize
void SetMaxLeafSize(viskores::IdComponent maxLeafSize)
Specify the number of cells in each leaf.
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:98
viskores::cont::CellLocatorBoundingIntervalHierarchy::Nodes
viskores::cont::ArrayHandle< viskores::exec::CellLocatorBoundingIntervalHierarchyNode > Nodes
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:112
viskores::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:43
viskores::cont::CellLocatorBoundingIntervalHierarchy::ExecObjType
viskores::ListApply< CellLocatorExecList, viskores::exec::CellLocatorMultiplexer > ExecObjType
Definition: cont/CellLocatorBoundingIntervalHierarchy.h:60
CellLocatorBoundingIntervalHierarchy.h
viskores_cont_export.h