mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Specialized cases for cell-edge functions on polylines.
This commit is contained in:
parent
d310ec3aa6
commit
fea18190f4
@ -133,6 +133,15 @@ static inline VTKM_EXEC vtkm::IdComponent CellEdgeNumberOfEdges(vtkm::IdComponen
|
||||
return numPoints;
|
||||
}
|
||||
|
||||
static inline VTKM_EXEC vtkm::IdComponent CellEdgeNumberOfEdges(vtkm::IdComponent numPoints,
|
||||
vtkm::CellShapeTagPolyLine,
|
||||
const vtkm::exec::FunctorBase&)
|
||||
{
|
||||
(void)numPoints; // Silence compiler warnings.
|
||||
VTKM_ASSUME(numPoints > 0);
|
||||
return detail::CellEdgeTables{}.NumEdges(vtkm::CELL_SHAPE_POLY_LINE);
|
||||
}
|
||||
|
||||
static inline VTKM_EXEC vtkm::IdComponent CellEdgeNumberOfEdges(
|
||||
vtkm::IdComponent numPoints,
|
||||
vtkm::CellShapeTagGeneric shape,
|
||||
@ -142,6 +151,10 @@ static inline VTKM_EXEC vtkm::IdComponent CellEdgeNumberOfEdges(
|
||||
{
|
||||
return CellEdgeNumberOfEdges(numPoints, vtkm::CellShapeTagPolygon(), worklet);
|
||||
}
|
||||
else if (shape.Id == vtkm::CELL_SHAPE_POLY_LINE)
|
||||
{
|
||||
return CellEdgeNumberOfEdges(numPoints, vtkm::CellShapeTagPolyLine(), worklet);
|
||||
}
|
||||
else
|
||||
{
|
||||
return detail::CellEdgeTables{}.NumEdges(shape.Id);
|
||||
|
@ -219,7 +219,7 @@ struct TestCellFacesFunctor
|
||||
{
|
||||
for (vtkm::IdComponent numPoints = 3; numPoints < 7; numPoints++)
|
||||
{
|
||||
this->TryShapeWithNumPoints(numPoints, vtkm::CellShapeTagPolygon());
|
||||
this->TryShapeWithNumPoints(numPoints, vtkm::CellShapeTagPolyLine());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user