VTK-m  2.0
CellLocatorGeneral.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 #ifndef vtk_m_cont_CellLocatorGeneral_h
11 #define vtk_m_cont_CellLocatorGeneral_h
12 
16 
18 
19 #include <vtkm/cont/Variant.h>
20 
21 #include <functional>
22 #include <memory>
23 
24 namespace vtkm
25 {
26 namespace cont
27 {
28 
41 class VTKM_CONT_EXPORT CellLocatorGeneral
42  : public vtkm::cont::internal::CellLocatorBase<CellLocatorGeneral>
43 {
44  using Superclass = vtkm::cont::internal::CellLocatorBase<CellLocatorGeneral>;
45 
46 public:
50 
51  using ExecLocatorList =
53  vtkm::cont::internal::ExecutionObjectType<vtkm::cont::CellLocatorRectilinearGrid>,
54  vtkm::cont::internal::ExecutionObjectType<vtkm::cont::CellLocatorTwoLevel>>;
55 
57  using LastCell = typename ExecObjType::LastCell;
58 
59  VTKM_CONT ExecObjType PrepareForExecution(vtkm::cont::DeviceAdapterId device,
60  vtkm::cont::Token& token) const;
61 
62 private:
63  vtkm::cont::ListAsVariant<ContLocatorList> LocatorImpl;
64 
65  friend Superclass;
66  VTKM_CONT void Build();
67 
68  struct PrepareFunctor;
69 };
70 }
71 } // vtkm::cont
72 
73 #endif // vtk_m_cont_CellLocatorGeneral_h
vtkm::cont::CellLocatorRectilinearGrid
Definition: cont/CellLocatorRectilinearGrid.h:22
CellLocatorMultiplexer.h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::ListApply
typename detail::ListApplyImpl< List, Target >::type ListApply
Applies the list of types to a template.
Definition: List.h:132
Variant.h
vtkm::cont::CellLocatorGeneral::Superclass
vtkm::cont::internal::CellLocatorBase< CellLocatorGeneral > Superclass
Definition: CellLocatorGeneral.h:44
CellLocatorUniformGrid.h
vtkm::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
CellLocatorTwoLevel.h
vtkm::cont::CellLocatorGeneral::Superclass
friend Superclass
Definition: CellLocatorGeneral.h:65
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::cont::CellLocatorGeneral::ExecObjType
vtkm::ListApply< ExecLocatorList, vtkm::exec::CellLocatorMultiplexer > ExecObjType
Definition: CellLocatorGeneral.h:56
vtkm::cont::CellLocatorGeneral
A CellLocator that works generally well for any supported cell set.
Definition: CellLocatorGeneral.h:41
vtkm::cont::CellLocatorGeneral::LocatorImpl
vtkm::cont::ListAsVariant< ContLocatorList > LocatorImpl
Definition: CellLocatorGeneral.h:63
vtkm::cont::DeviceAdapterId
Definition: DeviceAdapterTag.h:52
vtkm::cont::CellLocatorGeneral::LastCell
typename ExecObjType::LastCell LastCell
Definition: CellLocatorGeneral.h:57
CellLocatorRectilinearGrid.h
vtkm::cont::CellLocatorUniformGrid
Definition: cont/CellLocatorUniformGrid.h:22
vtkm::List
Definition: List.h:34
vtkm::cont::CellLocatorTwoLevel
A locator that uses 2 nested levels of grids.
Definition: cont/CellLocatorTwoLevel.h:43