20 #ifndef vtkmConnectivityExec_h
21 #define vtkmConnectivityExec_h
25 #include <vtkm/CellShape.h>
26 #include <vtkm/TopologyElementTag.h>
27 #include <vtkm/cont/ArrayHandle.h>
28 #include <vtkm/VecFromPortal.h>
30 #include <vtkm/cont/serial/DeviceAdapterSerial.h>
31 #include <vtkm/cont/cuda/DeviceAdapterCuda.h>
32 #include <vtkm/cont/tbb/DeviceAdapterTBB.h>
39 typedef vtkm::cont::ArrayHandle<vtkm::UInt8, tovtkm::vtkAOSArrayContainerTag>
41 typedef vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkCellArrayContainerTag>
42 ConnectivityHandleType;
43 typedef vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkAOSArrayContainerTag>
46 typedef typename ShapeHandleType::template ExecutionTypes<Device>::PortalConst
48 typedef typename ConnectivityHandleType::template ExecutionTypes<
49 Device>::PortalConst ConnectivityPortalType;
51 typename OffsetHandleType::template ExecutionTypes<Device>::PortalConst
52 IndexOffsetPortalType;
57 VTKM_SUPPRESS_EXEC_WARNINGS
63 const ConnectivityPortalType& connPortal,
64 const IndexOffsetPortalType& indexOffsetPortal);
66 VTKM_SUPPRESS_EXEC_WARNINGS
68 vtkm::Id GetNumberOfElements()
const;
75 typedef vtkm::VecFromPortal<ConnectivityPortalType>
IndicesType;
86 ShapePortalType Shapes;
87 ConnectivityPortalType Connectivity;
88 IndexOffsetPortalType IndexOffsets;
94 typedef vtkm::cont::ArrayHandle<vtkm::Id, tovtkm::vtkCellArrayContainerTag>
95 ConnectivityHandleType;
96 typedef typename ConnectivityHandleType::template ExecutionTypes<
97 Device>::PortalConst ConnectivityPortalType;
102 VTKM_SUPPRESS_EXEC_WARNINGS
109 vtkm::IdComponent numPointsPerCell,
110 vtkm::UInt8 shapeType);
113 vtkm::Id GetNumberOfElements()
const;
131 ConnectivityPortalType Connectivity;
132 vtkm::Id NumberOfCells;
133 vtkm::IdComponent NumberOfPointsPerCell;
134 vtkm::UInt8 ShapeType;
140 typedef vtkm::cont::ArrayHandle<vtkm::Id> ConnectivityHandleType;
141 typedef vtkm::cont::ArrayHandle<vtkm::IdComponent> NumIndicesHandleType;
142 typedef vtkm::cont::ArrayHandle<vtkm::Id> OffsetHandleType;
144 typedef typename ConnectivityHandleType::template ExecutionTypes<
145 Device>::PortalConst ConnectivityPortalType;
147 typedef typename OffsetHandleType::template ExecutionTypes<Device>::PortalConst
148 IndexOffsetPortalType;
150 typedef typename NumIndicesHandleType::template ExecutionTypes<Device>::PortalConst
151 NumIndicesPortalType;
156 VTKM_SUPPRESS_EXEC_WARNINGS
162 const NumIndicesPortalType& numIndicesPortal,
163 const IndexOffsetPortalType& indexOffsetPortal);
166 vtkm::Id GetNumberOfElements()
const;
184 ConnectivityPortalType Connectivity;
185 NumIndicesPortalType NumIndices;
186 IndexOffsetPortalType IndexOffsets;
194 #ifdef VTKM_ENABLE_TBB
201 #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