20 #ifndef vtkmConnectivityExec_h 21 #define vtkmConnectivityExec_h 23 #ifndef VTK_WRAPPING_CXX 27 #include <vtkm/CellShape.h> 28 #include <vtkm/TopologyElementTag.h> 29 #include <vtkm/cont/ArrayHandle.h> 30 #include <vtkm/VecFromPortal.h> 32 #include <vtkm/cont/serial/DeviceAdapterSerial.h> 33 #include <vtkm/cont/cuda/DeviceAdapterCuda.h> 34 #include <vtkm/cont/openmp/DeviceAdapterOpenMP.h> 35 #include <vtkm/cont/tbb/DeviceAdapterTBB.h> 42 typedef vtkm::cont::ArrayHandle<vtkm::UInt8, tovtkm::vtkAOSArrayContainerTag>
44 typedef vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkCellArrayContainerTag>
45 ConnectivityHandleType;
46 typedef vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkAOSArrayContainerTag>
49 typedef typename ShapeHandleType::template ExecutionTypes<Device>::PortalConst
51 typedef typename ConnectivityHandleType::template ExecutionTypes<
52 Device>::PortalConst ConnectivityPortalType;
54 typename OffsetHandleType::template ExecutionTypes<Device>::PortalConst
55 IndexOffsetPortalType;
60 VTKM_SUPPRESS_EXEC_WARNINGS
66 const ConnectivityPortalType& connPortal,
67 const IndexOffsetPortalType& indexOffsetPortal);
69 VTKM_SUPPRESS_EXEC_WARNINGS
71 vtkm::Id GetNumberOfElements()
const;
76 CellShapeTag GetCellShape(vtkm::Id
index)
const;
78 typedef vtkm::VecFromPortal<ConnectivityPortalType>
IndicesType;
86 IndicesType GetIndices(vtkm::Id
index)
const;
89 ShapePortalType Shapes;
90 ConnectivityPortalType Connectivity;
91 IndexOffsetPortalType IndexOffsets;
97 typedef vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkCellArrayContainerTag>
98 ConnectivityHandleType;
99 typedef typename ConnectivityHandleType::template ExecutionTypes<
100 Device>::PortalConst ConnectivityPortalType;
105 VTKM_SUPPRESS_EXEC_WARNINGS
112 vtkm::IdComponent numPointsPerCell,
113 vtkm::UInt8 shapeType);
116 vtkm::Id GetNumberOfElements()
const;
121 CellShapeTag GetCellShape(vtkm::Id
index)
const;
131 IndicesType GetIndices(vtkm::Id
index)
const;
134 ConnectivityPortalType Connectivity;
135 vtkm::Id NumberOfCells;
136 vtkm::IdComponent NumberOfPointsPerCell;
137 vtkm::UInt8 ShapeType;
143 typedef vtkm::cont::ArrayHandle<vtkm::Id> ConnectivityHandleType;
144 typedef vtkm::cont::ArrayHandle<vtkm::IdComponent> NumIndicesHandleType;
145 typedef vtkm::cont::ArrayHandle<vtkm::Id> OffsetHandleType;
147 typedef typename ConnectivityHandleType::template ExecutionTypes<
148 Device>::PortalConst ConnectivityPortalType;
150 typedef typename OffsetHandleType::template ExecutionTypes<Device>::PortalConst
151 IndexOffsetPortalType;
153 typedef typename NumIndicesHandleType::template ExecutionTypes<Device>::PortalConst
154 NumIndicesPortalType;
159 VTKM_SUPPRESS_EXEC_WARNINGS
165 const NumIndicesPortalType& numIndicesPortal,
166 const IndexOffsetPortalType& indexOffsetPortal);
169 vtkm::Id GetNumberOfElements()
const;
174 CellShapeTag
GetCellShape(vtkm::Id)
const {
return vtkm::CellShapeTagVertex(); }
184 IndicesType GetIndices(vtkm::Id
index)
const;
187 ConnectivityPortalType Connectivity;
188 NumIndicesPortalType NumIndices;
189 IndexOffsetPortalType IndexOffsets;
197 #ifdef VTKM_ENABLE_TBB 203 #ifdef VTKM_ENABLE_OPENMP 210 #if defined(VTKM_ENABLE_CUDA) && defined(VTKM_CUDA) vtkm::CellShapeTagGeneric CellShapeTag
vtkm::Id SchedulingRangeType
vtkm::VecFromPortal< ConnectivityPortalType > IndicesType
vtkm::VecFromPortal< ConnectivityPortalType > IndicesType
vtkm::Id SchedulingRangeType
vtkm::CellShapeTagVertex CellShapeTag
vtkm::CellShapeTagGeneric CellShapeTag
VTKM_EXEC CellShapeTag GetCellShape(vtkm::Id) const
vtkm::VecFromPortal< ConnectivityPortalType > IndicesType
vtkm::Id SchedulingRangeType