mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
Update CellSetExtrude to not specify exec types by device
Somewhere during this edit I removed a header file that didn't strictly need to be there. This caused me to have to add ```cpp ``` in several places in the code.
This commit is contained in:
parent
3962e73b06
commit
4d8f05baef
@ -20,6 +20,7 @@
|
||||
#include <vtkm/cont/Timer.h>
|
||||
|
||||
#include <vtkm/worklet/StableSortIndices.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
@ -129,7 +129,6 @@ set(headers
|
||||
set(template_sources
|
||||
ArrayRangeCompute.hxx # Deprecated, replaced with ArrayRangeComputeTemplate.h
|
||||
CellSetExplicit.hxx
|
||||
CellSetExtrude.hxx
|
||||
CellSetStructured.hxx
|
||||
ParticleArrayCopy.hxx
|
||||
VirtualObjectHandle.hxx
|
||||
|
@ -145,7 +145,6 @@ class VTKM_ALWAYS_EXPORT CellSetExplicit : public CellSet
|
||||
using NumIndicesArrayType =
|
||||
vtkm::cont::ArrayHandleDecorator<detail::NumIndicesDecorator, OffsetsArrayType>;
|
||||
|
||||
// Should this be unified with ConnectivityType?
|
||||
using ExecConnectivityType =
|
||||
vtkm::exec::ConnectivityExplicit<typename ShapesArrayType::ReadPortalType,
|
||||
typename ConnectivityArrayType::ReadPortalType,
|
||||
|
@ -9,8 +9,12 @@
|
||||
//============================================================================
|
||||
#include <vtkm/cont/CellSetExtrude.h>
|
||||
|
||||
#include <vtkm/cont/Algorithm.h>
|
||||
#include <vtkm/cont/ArrayCopy.h>
|
||||
#include <vtkm/cont/DeviceAdapter.h>
|
||||
#include <vtkm/cont/RuntimeDeviceTracker.h>
|
||||
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
#include <vtkm/CellShape.h>
|
||||
|
||||
@ -251,5 +255,110 @@ void CellSetExtrude::PrintSummary(std::ostream& out) const
|
||||
vtkm::cont::printSummary_ArrayHandle(this->NextNode, out);
|
||||
out << " ReverseConnectivityBuilt: " << this->NumberOfPlanes << std::endl;
|
||||
}
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
struct ComputeReverseMapping : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
using ControlSignature = void(FieldIn cellIndex, WholeArrayOut cellIds);
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
template <typename PortalType>
|
||||
VTKM_EXEC void operator()(vtkm::Id cellId, PortalType&& pointIdValue) const
|
||||
{
|
||||
//3 as we are building the connectivity for triangles
|
||||
const vtkm::Id offset = 3 * cellId;
|
||||
pointIdValue.Set(offset, static_cast<vtkm::Int32>(cellId));
|
||||
pointIdValue.Set(offset + 1, static_cast<vtkm::Int32>(cellId));
|
||||
pointIdValue.Set(offset + 2, static_cast<vtkm::Int32>(cellId));
|
||||
}
|
||||
};
|
||||
|
||||
struct ComputePrevNode : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
typedef void ControlSignature(FieldIn nextNode, WholeArrayOut prevNodeArray);
|
||||
typedef void ExecutionSignature(InputIndex, _1, _2);
|
||||
|
||||
template <typename PortalType>
|
||||
VTKM_EXEC void operator()(vtkm::Id idx, vtkm::Int32 next, PortalType& prevs) const
|
||||
{
|
||||
prevs.Set(static_cast<vtkm::Id>(next), static_cast<vtkm::Int32>(idx));
|
||||
}
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
VTKM_CONT void CellSetExtrude::BuildReverseConnectivity()
|
||||
{
|
||||
vtkm::cont::Invoker invoke;
|
||||
|
||||
// create a mapping of where each key is the point id and the value
|
||||
// is the cell id. We
|
||||
const vtkm::Id numberOfPointsPerCell = 3;
|
||||
const vtkm::Id rconnSize = this->NumberOfCellsPerPlane * numberOfPointsPerCell;
|
||||
|
||||
vtkm::cont::ArrayHandle<vtkm::Int32> pointIdKey;
|
||||
vtkm::cont::ArrayCopy(this->Connectivity, pointIdKey);
|
||||
|
||||
this->RConnectivity.Allocate(rconnSize);
|
||||
invoke(ComputeReverseMapping{},
|
||||
vtkm::cont::make_ArrayHandleCounting<vtkm::Id>(0, 1, this->NumberOfCellsPerPlane),
|
||||
this->RConnectivity);
|
||||
|
||||
vtkm::cont::Algorithm::SortByKey(pointIdKey, this->RConnectivity);
|
||||
|
||||
// now we can compute the counts and offsets
|
||||
vtkm::cont::ArrayHandle<vtkm::Int32> reducedKeys;
|
||||
vtkm::cont::Algorithm::ReduceByKey(
|
||||
pointIdKey,
|
||||
vtkm::cont::make_ArrayHandleConstant(vtkm::Int32(1), static_cast<vtkm::Int32>(rconnSize)),
|
||||
reducedKeys,
|
||||
this->RCounts,
|
||||
vtkm::Add{});
|
||||
|
||||
vtkm::cont::Algorithm::ScanExclusive(this->RCounts, this->ROffsets);
|
||||
|
||||
// compute PrevNode from NextNode
|
||||
this->PrevNode.Allocate(this->NextNode.GetNumberOfValues());
|
||||
invoke(ComputePrevNode{}, this->NextNode, this->PrevNode);
|
||||
|
||||
this->ReverseConnectivityBuilt = true;
|
||||
}
|
||||
|
||||
vtkm::exec::ConnectivityExtrude CellSetExtrude::PrepareForInput(vtkm::cont::DeviceAdapterId device,
|
||||
vtkm::TopologyElementTagCell,
|
||||
vtkm::TopologyElementTagPoint,
|
||||
vtkm::cont::Token& token) const
|
||||
{
|
||||
return vtkm::exec::ConnectivityExtrude(this->Connectivity.PrepareForInput(device, token),
|
||||
this->NextNode.PrepareForInput(device, token),
|
||||
this->NumberOfCellsPerPlane,
|
||||
this->NumberOfPointsPerPlane,
|
||||
this->NumberOfPlanes,
|
||||
this->IsPeriodic);
|
||||
}
|
||||
|
||||
vtkm::exec::ReverseConnectivityExtrude CellSetExtrude::PrepareForInput(
|
||||
vtkm::cont::DeviceAdapterId device,
|
||||
vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell,
|
||||
vtkm::cont::Token& token) const
|
||||
{
|
||||
if (!this->ReverseConnectivityBuilt)
|
||||
{
|
||||
vtkm::cont::ScopedRuntimeDeviceTracker tracker(device);
|
||||
const_cast<CellSetExtrude*>(this)->BuildReverseConnectivity();
|
||||
}
|
||||
return vtkm::exec::ReverseConnectivityExtrude(this->RConnectivity.PrepareForInput(device, token),
|
||||
this->ROffsets.PrepareForInput(device, token),
|
||||
this->RCounts.PrepareForInput(device, token),
|
||||
this->PrevNode.PrepareForInput(device, token),
|
||||
this->NumberOfCellsPerPlane,
|
||||
this->NumberOfPointsPerPlane,
|
||||
this->NumberOfPlanes);
|
||||
}
|
||||
|
||||
}
|
||||
} // vtkm::cont
|
||||
|
@ -18,13 +18,34 @@
|
||||
#include <vtkm/cont/Invoker.h>
|
||||
#include <vtkm/exec/ConnectivityExtrude.h>
|
||||
#include <vtkm/exec/arg/ThreadIndicesExtrude.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename VisitTopology, typename IncidentTopology>
|
||||
struct CellSetExtrudeConnectivityChooser;
|
||||
|
||||
template <>
|
||||
struct CellSetExtrudeConnectivityChooser<vtkm::TopologyElementTagCell,
|
||||
vtkm::TopologyElementTagPoint>
|
||||
{
|
||||
using ExecConnectivityType = vtkm::exec::ConnectivityExtrude;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct CellSetExtrudeConnectivityChooser<vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell>
|
||||
{
|
||||
using ExecConnectivityType = vtkm::exec::ReverseConnectivityExtrude;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
class VTKM_CONT_EXPORT CellSetExtrude : public CellSet
|
||||
{
|
||||
public:
|
||||
@ -79,61 +100,49 @@ public:
|
||||
|
||||
bool GetIsPeriodic() const { return this->IsPeriodic; }
|
||||
|
||||
template <typename DeviceAdapter>
|
||||
using ConnectivityP2C = vtkm::exec::ConnectivityExtrude<DeviceAdapter>;
|
||||
template <typename DeviceAdapter>
|
||||
using ConnectivityC2P = vtkm::exec::ReverseConnectivityExtrude<DeviceAdapter>;
|
||||
template <typename VisitTopology, typename IncidentTopology>
|
||||
using ExecConnectivityType =
|
||||
typename detail::CellSetExtrudeConnectivityChooser<VisitTopology,
|
||||
IncidentTopology>::ExecConnectivityType;
|
||||
|
||||
template <typename DeviceAdapter, typename VisitTopology, typename IncidentTopology>
|
||||
struct ExecutionTypes;
|
||||
|
||||
template <typename DeviceAdapter>
|
||||
struct ExecutionTypes<DeviceAdapter, vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>
|
||||
struct VTKM_DEPRECATED(1.6, "Use ExecConnectivityType.") ExecutionTypes
|
||||
{
|
||||
using ExecObjectType = ConnectivityP2C<DeviceAdapter>;
|
||||
using ExecObjectType = ExecConnectivityType<VisitTopology, IncidentTopology>;
|
||||
};
|
||||
|
||||
template <typename DeviceAdapter>
|
||||
struct ExecutionTypes<DeviceAdapter, vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell>
|
||||
{
|
||||
using ExecObjectType = ConnectivityC2P<DeviceAdapter>;
|
||||
};
|
||||
vtkm::exec::ConnectivityExtrude PrepareForInput(vtkm::cont::DeviceAdapterId,
|
||||
vtkm::TopologyElementTagCell,
|
||||
vtkm::TopologyElementTagPoint,
|
||||
vtkm::cont::Token&) const;
|
||||
|
||||
template <typename Device>
|
||||
ConnectivityP2C<Device> PrepareForInput(Device,
|
||||
vtkm::TopologyElementTagCell,
|
||||
vtkm::TopologyElementTagPoint,
|
||||
vtkm::cont::Token&) const;
|
||||
vtkm::exec::ReverseConnectivityExtrude PrepareForInput(vtkm::cont::DeviceAdapterId,
|
||||
vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell,
|
||||
vtkm::cont::Token&) const;
|
||||
|
||||
template <typename Device>
|
||||
ConnectivityC2P<Device> PrepareForInput(Device,
|
||||
vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell,
|
||||
vtkm::cont::Token&) const;
|
||||
|
||||
template <typename Device>
|
||||
VTKM_DEPRECATED(1.6, "Provide a vtkm::cont::Token object when calling PrepareForInput.")
|
||||
ConnectivityP2C<Device> PrepareForInput(Device device,
|
||||
vtkm::TopologyElementTagCell visitTopology,
|
||||
vtkm::TopologyElementTagPoint incidentTopology) const
|
||||
vtkm::exec::ConnectivityExtrude PrepareForInput(
|
||||
vtkm::cont::DeviceAdapterId device,
|
||||
vtkm::TopologyElementTagCell visitTopology,
|
||||
vtkm::TopologyElementTagPoint incidentTopology) const
|
||||
{
|
||||
vtkm::cont::Token token;
|
||||
return this->PrepareForInput(device, visitTopology, incidentTopology, token);
|
||||
}
|
||||
|
||||
template <typename Device>
|
||||
VTKM_DEPRECATED(1.6, "Provide a vtkm::cont::Token object when calling PrepareForInput.")
|
||||
ConnectivityC2P<Device> PrepareForInput(Device device,
|
||||
vtkm::TopologyElementTagPoint visitTopology,
|
||||
vtkm::TopologyElementTagCell incidentTopology) const
|
||||
vtkm::exec::ReverseConnectivityExtrude PrepareForInput(
|
||||
vtkm::cont::DeviceAdapterId device,
|
||||
vtkm::TopologyElementTagPoint visitTopology,
|
||||
vtkm::TopologyElementTagCell incidentTopology) const
|
||||
{
|
||||
vtkm::cont::Token token;
|
||||
this->PrepareForInput(device, visitTopology, incidentTopology, token);
|
||||
return this->PrepareForInput(device, visitTopology, incidentTopology, token);
|
||||
}
|
||||
|
||||
private:
|
||||
template <typename Device>
|
||||
void BuildReverseConnectivity(Device);
|
||||
void BuildReverseConnectivity();
|
||||
|
||||
bool IsPeriodic;
|
||||
|
||||
@ -250,6 +259,4 @@ public:
|
||||
} // diy
|
||||
/// @endcond SERIALIZATION
|
||||
|
||||
#include <vtkm/cont/CellSetExtrude.hxx>
|
||||
|
||||
#endif // vtk_m_cont_CellSetExtrude.h
|
||||
|
@ -1,123 +0,0 @@
|
||||
//============================================================================
|
||||
// Copyright (c) Kitware, Inc.
|
||||
// All rights reserved.
|
||||
// See LICENSE.txt for details.
|
||||
//
|
||||
// This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_CellSetExtrude_hxx
|
||||
#define vtk_m_cont_CellSetExtrude_hxx
|
||||
|
||||
namespace
|
||||
{
|
||||
struct ComputeReverseMapping : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
using ControlSignature = void(FieldIn cellIndex, WholeArrayOut cellIds);
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
template <typename PortalType>
|
||||
VTKM_EXEC void operator()(vtkm::Id cellId, PortalType&& pointIdValue) const
|
||||
{
|
||||
//3 as we are building the connectivity for triangles
|
||||
const vtkm::Id offset = 3 * cellId;
|
||||
pointIdValue.Set(offset, static_cast<vtkm::Int32>(cellId));
|
||||
pointIdValue.Set(offset + 1, static_cast<vtkm::Int32>(cellId));
|
||||
pointIdValue.Set(offset + 2, static_cast<vtkm::Int32>(cellId));
|
||||
}
|
||||
};
|
||||
|
||||
struct ComputePrevNode : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
typedef void ControlSignature(FieldIn nextNode, WholeArrayOut prevNodeArray);
|
||||
typedef void ExecutionSignature(InputIndex, _1, _2);
|
||||
|
||||
template <typename PortalType>
|
||||
VTKM_EXEC void operator()(vtkm::Id idx, vtkm::Int32 next, PortalType& prevs) const
|
||||
{
|
||||
prevs.Set(static_cast<vtkm::Id>(next), static_cast<vtkm::Int32>(idx));
|
||||
}
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
{
|
||||
template <typename Device>
|
||||
VTKM_CONT void CellSetExtrude::BuildReverseConnectivity(Device)
|
||||
{
|
||||
vtkm::cont::Invoker invoke(Device{});
|
||||
|
||||
// create a mapping of where each key is the point id and the value
|
||||
// is the cell id. We
|
||||
const vtkm::Id numberOfPointsPerCell = 3;
|
||||
const vtkm::Id rconnSize = this->NumberOfCellsPerPlane * numberOfPointsPerCell;
|
||||
|
||||
vtkm::cont::ArrayHandle<vtkm::Int32> pointIdKey;
|
||||
vtkm::cont::DeviceAdapterAlgorithm<Device>::Copy(this->Connectivity, pointIdKey);
|
||||
|
||||
this->RConnectivity.Allocate(rconnSize);
|
||||
invoke(ComputeReverseMapping{},
|
||||
vtkm::cont::make_ArrayHandleCounting<vtkm::Id>(0, 1, this->NumberOfCellsPerPlane),
|
||||
this->RConnectivity);
|
||||
|
||||
vtkm::cont::DeviceAdapterAlgorithm<Device>::SortByKey(pointIdKey, this->RConnectivity);
|
||||
|
||||
// now we can compute the counts and offsets
|
||||
vtkm::cont::ArrayHandle<vtkm::Int32> reducedKeys;
|
||||
vtkm::cont::DeviceAdapterAlgorithm<Device>::ReduceByKey(
|
||||
pointIdKey,
|
||||
vtkm::cont::make_ArrayHandleConstant(vtkm::Int32(1), static_cast<vtkm::Int32>(rconnSize)),
|
||||
reducedKeys,
|
||||
this->RCounts,
|
||||
vtkm::Add{});
|
||||
|
||||
vtkm::cont::DeviceAdapterAlgorithm<Device>::ScanExclusive(this->RCounts, this->ROffsets);
|
||||
|
||||
// compute PrevNode from NextNode
|
||||
this->PrevNode.Allocate(this->NextNode.GetNumberOfValues());
|
||||
invoke(ComputePrevNode{}, this->NextNode, this->PrevNode);
|
||||
|
||||
this->ReverseConnectivityBuilt = true;
|
||||
}
|
||||
template <typename Device>
|
||||
CellSetExtrude::ConnectivityP2C<Device> CellSetExtrude::PrepareForInput(
|
||||
Device,
|
||||
vtkm::TopologyElementTagCell,
|
||||
vtkm::TopologyElementTagPoint,
|
||||
vtkm::cont::Token& token) const
|
||||
{
|
||||
return ConnectivityP2C<Device>(this->Connectivity.PrepareForInput(Device{}, token),
|
||||
this->NextNode.PrepareForInput(Device{}, token),
|
||||
this->NumberOfCellsPerPlane,
|
||||
this->NumberOfPointsPerPlane,
|
||||
this->NumberOfPlanes,
|
||||
this->IsPeriodic);
|
||||
}
|
||||
|
||||
|
||||
template <typename Device>
|
||||
VTKM_CONT CellSetExtrude::ConnectivityC2P<Device> CellSetExtrude::PrepareForInput(
|
||||
Device,
|
||||
vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell,
|
||||
vtkm::cont::Token& token) const
|
||||
{
|
||||
if (!this->ReverseConnectivityBuilt)
|
||||
{
|
||||
const_cast<CellSetExtrude*>(this)->BuildReverseConnectivity(Device{});
|
||||
}
|
||||
return ConnectivityC2P<Device>(this->RConnectivity.PrepareForInput(Device{}, token),
|
||||
this->ROffsets.PrepareForInput(Device{}, token),
|
||||
this->RCounts.PrepareForInput(Device{}, token),
|
||||
this->PrevNode.PrepareForInput(Device{}, token),
|
||||
this->NumberOfCellsPerPlane,
|
||||
this->NumberOfPointsPerPlane,
|
||||
this->NumberOfPlanes);
|
||||
}
|
||||
}
|
||||
} // vtkm::cont
|
||||
#endif
|
@ -17,6 +17,8 @@
|
||||
#include <vtkm/cont/Invoker.h>
|
||||
#include <vtkm/cont/RuntimeDeviceTracker.h>
|
||||
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
#include <vtkm/cont/testing/Testing.h>
|
||||
|
||||
#include <vtkm/exec/FunctorBase.h>
|
||||
|
@ -23,7 +23,6 @@ namespace vtkm
|
||||
namespace exec
|
||||
{
|
||||
|
||||
template <typename Device>
|
||||
class VTKM_ALWAYS_EXPORT ConnectivityExtrude
|
||||
{
|
||||
private:
|
||||
@ -93,7 +92,6 @@ private:
|
||||
};
|
||||
|
||||
|
||||
template <typename Device>
|
||||
class ReverseConnectivityExtrude
|
||||
{
|
||||
private:
|
||||
@ -176,13 +174,12 @@ public:
|
||||
};
|
||||
|
||||
|
||||
template <typename Device>
|
||||
ConnectivityExtrude<Device>::ConnectivityExtrude(const ConnectivityPortalType& conn,
|
||||
const ConnectivityPortalType& nextNode,
|
||||
vtkm::Int32 cellsPerPlane,
|
||||
vtkm::Int32 pointsPerPlane,
|
||||
vtkm::Int32 numPlanes,
|
||||
bool periodic)
|
||||
inline ConnectivityExtrude::ConnectivityExtrude(const ConnectivityPortalType& conn,
|
||||
const ConnectivityPortalType& nextNode,
|
||||
vtkm::Int32 cellsPerPlane,
|
||||
vtkm::Int32 pointsPerPlane,
|
||||
vtkm::Int32 numPlanes,
|
||||
bool periodic)
|
||||
: Connectivity(conn)
|
||||
, NextNode(nextNode)
|
||||
, NumberOfCellsPerPlane(cellsPerPlane)
|
||||
@ -193,8 +190,7 @@ ConnectivityExtrude<Device>::ConnectivityExtrude(const ConnectivityPortalType& c
|
||||
: (static_cast<vtkm::Id>(cellsPerPlane) * (numPlanes - 1));
|
||||
}
|
||||
|
||||
template <typename Device>
|
||||
VTKM_EXEC typename ConnectivityExtrude<Device>::IndicesType ConnectivityExtrude<Device>::GetIndices(
|
||||
VTKM_EXEC inline ConnectivityExtrude::IndicesType ConnectivityExtrude::GetIndices(
|
||||
const vtkm::Id2& index) const
|
||||
{
|
||||
vtkm::Id tr = index[0];
|
||||
@ -216,8 +212,7 @@ VTKM_EXEC typename ConnectivityExtrude<Device>::IndicesType ConnectivityExtrude<
|
||||
}
|
||||
|
||||
|
||||
template <typename Device>
|
||||
VTKM_EXEC ReverseConnectivityExtrude<Device>::ReverseConnectivityExtrude(
|
||||
VTKM_EXEC inline ReverseConnectivityExtrude::ReverseConnectivityExtrude(
|
||||
const ConnectivityPortalType& conn,
|
||||
const OffsetsPortalType& offsets,
|
||||
const CountsPortalType& counts,
|
||||
@ -235,9 +230,8 @@ VTKM_EXEC ReverseConnectivityExtrude<Device>::ReverseConnectivityExtrude(
|
||||
{
|
||||
}
|
||||
|
||||
template <typename Device>
|
||||
VTKM_EXEC typename ReverseConnectivityExtrude<Device>::IndicesType
|
||||
ReverseConnectivityExtrude<Device>::GetIndices(const vtkm::Id2& index) const
|
||||
VTKM_EXEC inline ReverseConnectivityExtrude::IndicesType ReverseConnectivityExtrude::GetIndices(
|
||||
const vtkm::Id2& index) const
|
||||
{
|
||||
auto ptCur = index[0];
|
||||
auto ptPre = this->PrevNode.Get(ptCur);
|
||||
|
@ -30,9 +30,9 @@ template <typename FetchType, typename ExecObjectType>
|
||||
struct Fetch<FetchType, vtkm::exec::arg::AspectTagIncidentElementIndices, ExecObjectType>
|
||||
{
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
template <typename Device, typename ScatterAndMaskMode>
|
||||
template <typename ScatterAndMaskMode>
|
||||
VTKM_EXEC auto Load(
|
||||
const vtkm::exec::arg::ThreadIndicesTopologyMap<vtkm::exec::ConnectivityExtrude<Device>,
|
||||
const vtkm::exec::arg::ThreadIndicesTopologyMap<vtkm::exec::ConnectivityExtrude,
|
||||
ScatterAndMaskMode>& indices,
|
||||
const ExecObjectType&) const -> vtkm::Vec<vtkm::Id, 6>
|
||||
{
|
||||
@ -135,9 +135,9 @@ struct Fetch<vtkm::exec::arg::FetchTagArrayDirectIn,
|
||||
}
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
template <typename Device, typename ScatterAndMaskMode>
|
||||
template <typename ScatterAndMaskMode>
|
||||
VTKM_EXEC auto Load(
|
||||
const vtkm::exec::arg::ThreadIndicesTopologyMap<vtkm::exec::ReverseConnectivityExtrude<Device>,
|
||||
const vtkm::exec::arg::ThreadIndicesTopologyMap<vtkm::exec::ReverseConnectivityExtrude,
|
||||
ScatterAndMaskMode>& indices,
|
||||
const vtkm::exec::ArrayPortalExtrude<T>& points)
|
||||
-> decltype(points.Get(indices.GetIndexLogical()))
|
||||
|
@ -215,9 +215,9 @@ struct Fetch<vtkm::exec::arg::FetchTagArrayTopologyMapIn,
|
||||
|
||||
//Optimized fetch for point arrays when iterating the cells ConnectivityExtrude
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
template <typename Device, typename ScatterAndMaskMode>
|
||||
template <typename ScatterAndMaskMode>
|
||||
VTKM_EXEC auto Load(
|
||||
const vtkm::exec::arg::ThreadIndicesTopologyMap<vtkm::exec::ConnectivityExtrude<Device>,
|
||||
const vtkm::exec::arg::ThreadIndicesTopologyMap<vtkm::exec::ConnectivityExtrude,
|
||||
ScatterAndMaskMode>& indices,
|
||||
const ExecObjectType& portal) -> vtkm::Vec<typename ExecObjectType::ValueType, 6>
|
||||
{
|
||||
|
@ -21,17 +21,17 @@ namespace arg
|
||||
{
|
||||
|
||||
// Specialization for extrude types.
|
||||
template <typename Device, typename ScatterAndMaskMode>
|
||||
class ThreadIndicesTopologyMap<vtkm::exec::ConnectivityExtrude<Device>, ScatterAndMaskMode>
|
||||
template <typename ScatterAndMaskMode>
|
||||
class ThreadIndicesTopologyMap<vtkm::exec::ConnectivityExtrude, ScatterAndMaskMode>
|
||||
{
|
||||
|
||||
using ConnectivityType = vtkm::exec::ConnectivityExtrude<Device>;
|
||||
using ConnectivityType = vtkm::exec::ConnectivityExtrude;
|
||||
|
||||
public:
|
||||
using CellShapeTag = typename ConnectivityType::CellShapeTag;
|
||||
using IndicesIncidentType = typename ConnectivityType::IndicesType;
|
||||
using LogicalIndexType = typename ConnectivityType::SchedulingRangeType;
|
||||
using Connectivity = vtkm::exec::ConnectivityExtrude<Device>;
|
||||
using Connectivity = vtkm::exec::ConnectivityExtrude;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC ThreadIndicesTopologyMap(vtkm::Id threadIndex,
|
||||
@ -184,10 +184,10 @@ private:
|
||||
};
|
||||
|
||||
// Specialization for extrude types.
|
||||
template <typename Device, typename ScatterAndMaskMode>
|
||||
class ThreadIndicesTopologyMap<vtkm::exec::ReverseConnectivityExtrude<Device>, ScatterAndMaskMode>
|
||||
template <typename ScatterAndMaskMode>
|
||||
class ThreadIndicesTopologyMap<vtkm::exec::ReverseConnectivityExtrude, ScatterAndMaskMode>
|
||||
{
|
||||
using ConnectivityType = vtkm::exec::ReverseConnectivityExtrude<Device>;
|
||||
using ConnectivityType = vtkm::exec::ReverseConnectivityExtrude;
|
||||
|
||||
public:
|
||||
using CellShapeTag = typename ConnectivityType::CellShapeTag;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <vtkm/cont/CoordinateSystem.h>
|
||||
#include <vtkm/cont/DynamicCellSet.h>
|
||||
#include <vtkm/cont/UnknownArrayHandle.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
|
||||
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
#include <vtkm/worklet/WorkletPointNeighborhood.h>
|
||||
|
||||
namespace vtkm
|
||||
|
@ -11,8 +11,8 @@
|
||||
#define vtkm_m_worklet_Threshold_h
|
||||
|
||||
#include <vtkm/worklet/CellDeepCopy.h>
|
||||
#include <vtkm/worklet/DispatcherMapField.h>
|
||||
#include <vtkm/worklet/DispatcherMapTopology.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
#include <vtkm/worklet/WorkletMapTopology.h>
|
||||
|
||||
#include <vtkm/cont/Algorithm.h>
|
||||
#include <vtkm/cont/ArrayCopy.h>
|
||||
|
@ -10,6 +10,7 @@
|
||||
#ifndef vtk_m_worklet_colorconversion_ConvertToRGB_h
|
||||
#define vtk_m_worklet_colorconversion_ConvertToRGB_h
|
||||
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
#include <vtkm/worklet/colorconversion/Conversions.h>
|
||||
|
||||
namespace vtkm
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <vtkm/cont/ExecutionObjectBase.h>
|
||||
|
||||
#include <vtkm/Particle.h>
|
||||
#include <vtkm/worklet/DispatcherMapField.h>
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
#include <vtkm/worklet/particleadvection/IntegratorBase.h>
|
||||
#include <vtkm/worklet/particleadvection/Particles.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user