mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Merge topic 'vtkm_prefers_using_over_typedef'
182f4707 vtkm prefers 'using' over typedef. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1092
This commit is contained in:
commit
01c9d6e2a6
@ -64,14 +64,14 @@ VTKM_EXEC_CONT vtkm::Vec<T, 3> Normalize(vtkm::Vec<T, 3> v)
|
|||||||
return one / magnitude * v;
|
return one / magnitude * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter;
|
using DeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG;
|
||||||
|
|
||||||
class TangleField : public vtkm::worklet::WorkletMapField
|
class TangleField : public vtkm::worklet::WorkletMapField
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef void ControlSignature(FieldIn<IdType> vertexId, FieldOut<Scalar> v);
|
typedef void ControlSignature(FieldIn<IdType> vertexId, FieldOut<Scalar> v);
|
||||||
typedef void ExecutionSignature(_1, _2);
|
typedef void ExecutionSignature(_1, _2);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
const vtkm::Id xdim, ydim, zdim;
|
const vtkm::Id xdim, ydim, zdim;
|
||||||
const vtkm::FloatDefault xmin, ymin, zmin, xmax, ymax, zmax;
|
const vtkm::FloatDefault xmin, ymin, zmin, xmax, ymax, zmax;
|
||||||
@ -343,9 +343,9 @@ void RenderRTTest(const vtkm::cont::DataSet& ds, int N)
|
|||||||
if (printProgress && i % 10 == 0)
|
if (printProgress && i % 10 == 0)
|
||||||
std::cout << " " << i << " of " << N << std::endl;
|
std::cout << " " << i << " of " << N << std::endl;
|
||||||
|
|
||||||
typedef vtkm::rendering::MapperRayTracer M;
|
using M = vtkm::rendering::MapperRayTracer;
|
||||||
typedef vtkm::rendering::CanvasRayTracer C;
|
using C = vtkm::rendering::CanvasRayTracer;
|
||||||
typedef vtkm::rendering::View3D V3;
|
using V3 = vtkm::rendering::View3D;
|
||||||
|
|
||||||
//std::cout<<"Render: "<<i<<std::endl;
|
//std::cout<<"Render: "<<i<<std::endl;
|
||||||
vtkm::rendering::ColorTable colorTable("thermal");
|
vtkm::rendering::ColorTable colorTable("thermal");
|
||||||
@ -361,9 +361,9 @@ void RenderVolTest(const vtkm::cont::DataSet& ds, int N)
|
|||||||
if (printProgress && i % 10 == 0)
|
if (printProgress && i % 10 == 0)
|
||||||
std::cout << " " << i << " of " << N << std::endl;
|
std::cout << " " << i << " of " << N << std::endl;
|
||||||
|
|
||||||
typedef vtkm::rendering::MapperVolume M;
|
using M = vtkm::rendering::MapperVolume;
|
||||||
typedef vtkm::rendering::CanvasRayTracer C;
|
using C = vtkm::rendering::CanvasRayTracer;
|
||||||
typedef vtkm::rendering::View3D V3;
|
using V3 = vtkm::rendering::View3D;
|
||||||
|
|
||||||
//std::cout<<"Render: "<<i<<std::endl;
|
//std::cout<<"Render: "<<i<<std::endl;
|
||||||
vtkm::rendering::ColorTable colorTable("thermal");
|
vtkm::rendering::ColorTable colorTable("thermal");
|
||||||
|
@ -66,7 +66,7 @@ struct CellTraits
|
|||||||
/// a convenient way to overload a function based on topological dimensions
|
/// a convenient way to overload a function based on topological dimensions
|
||||||
/// (which is usually more efficient than conditionals).
|
/// (which is usually more efficient than conditionals).
|
||||||
///
|
///
|
||||||
typedef vtkm::CellTopologicalDimensionsTag<TOPOLOGICAL_DIMENSIONS> TopologicalDimensionsTag;
|
using TopologicalDimensionsTag = vtkm::CellTopologicalDimensionsTag<TOPOLOGICAL_DIMENSIONS>;
|
||||||
|
|
||||||
/// \brief A tag specifying whether the number of points is fixed.
|
/// \brief A tag specifying whether the number of points is fixed.
|
||||||
///
|
///
|
||||||
@ -74,7 +74,7 @@ struct CellTraits
|
|||||||
/// \c CellTraitsTagSizeVariable, then the number of points is not known at
|
/// \c CellTraitsTagSizeVariable, then the number of points is not known at
|
||||||
/// compile time.
|
/// compile time.
|
||||||
///
|
///
|
||||||
typedef vtkm::CellTraitsTagSizeFixed IsSizeFixed;
|
using IsSizeFixed = vtkm::CellTraitsTagSizeFixed;
|
||||||
|
|
||||||
/// \brief Number of points in the cell.
|
/// \brief Number of points in the cell.
|
||||||
///
|
///
|
||||||
@ -95,19 +95,19 @@ struct CellTraits
|
|||||||
template <> \
|
template <> \
|
||||||
struct CellTraits<vtkm::CellShapeTag##name> \
|
struct CellTraits<vtkm::CellShapeTag##name> \
|
||||||
{ \
|
{ \
|
||||||
const static vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \
|
static constexpr vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \
|
||||||
typedef vtkm::CellTopologicalDimensionsTag<TOPOLOGICAL_DIMENSIONS> TopologicalDimensionsTag; \
|
using TopologicalDimensionsTag = vtkm::CellTopologicalDimensionsTag<TOPOLOGICAL_DIMENSIONS>; \
|
||||||
typedef vtkm::CellTraitsTagSizeFixed IsSizeFixed; \
|
using IsSizeFixed = vtkm::CellTraitsTagSizeFixed; \
|
||||||
static const vtkm::IdComponent NUM_POINTS = numPoints; \
|
static constexpr vtkm::IdComponent NUM_POINTS = numPoints; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define VTKM_DEFINE_CELL_TRAITS_VARIABLE(name, dimensions) \
|
#define VTKM_DEFINE_CELL_TRAITS_VARIABLE(name, dimensions) \
|
||||||
template <> \
|
template <> \
|
||||||
struct CellTraits<vtkm::CellShapeTag##name> \
|
struct CellTraits<vtkm::CellShapeTag##name> \
|
||||||
{ \
|
{ \
|
||||||
const static vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \
|
static constexpr vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \
|
||||||
typedef vtkm::CellTopologicalDimensionsTag<TOPOLOGICAL_DIMENSIONS> TopologicalDimensionsTag; \
|
using TopologicalDimensionsTag = vtkm::CellTopologicalDimensionsTag<TOPOLOGICAL_DIMENSIONS>; \
|
||||||
typedef vtkm::CellTraitsTagSizeVariable IsSizeFixed; \
|
using IsSizeFixed = vtkm::CellTraitsTagSizeVariable; \
|
||||||
}
|
}
|
||||||
|
|
||||||
VTKM_DEFINE_CELL_TRAITS(Empty, 0, 0);
|
VTKM_DEFINE_CELL_TRAITS(Empty, 0, 0);
|
||||||
|
@ -57,8 +57,8 @@ VTKM_EXEC_CONT NewtonsMethodResult<ScalarType, Size> NewtonsMethod(
|
|||||||
ScalarType convergeDifference = ScalarType(1e-3),
|
ScalarType convergeDifference = ScalarType(1e-3),
|
||||||
vtkm::IdComponent maxIterations = 10)
|
vtkm::IdComponent maxIterations = 10)
|
||||||
{
|
{
|
||||||
typedef vtkm::Vec<ScalarType, Size> VectorType;
|
using VectorType = vtkm::Vec<ScalarType, Size>;
|
||||||
typedef vtkm::Matrix<ScalarType, Size, Size> MatrixType;
|
using MatrixType = vtkm::Matrix<ScalarType, Size, Size>;
|
||||||
|
|
||||||
VectorType x = initialGuess;
|
VectorType x = initialGuess;
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ template <vtkm::IdComponent NumDimensions>
|
|||||||
class VecAxisAlignedPointCoordinates
|
class VecAxisAlignedPointCoordinates
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef vtkm::Vec<vtkm::FloatDefault, 3> ComponentType;
|
using ComponentType = vtkm::Vec<vtkm::FloatDefault, 3>;
|
||||||
|
|
||||||
static const vtkm::IdComponent NUM_COMPONENTS =
|
static const vtkm::IdComponent NUM_COMPONENTS =
|
||||||
detail::VecAxisAlignedPointCoordinatesNumComponents<NumDimensions>::NUM_COMPONENTS;
|
detail::VecAxisAlignedPointCoordinatesNumComponents<NumDimensions>::NUM_COMPONENTS;
|
||||||
@ -132,8 +132,8 @@ private:
|
|||||||
template <vtkm::IdComponent NumDimensions>
|
template <vtkm::IdComponent NumDimensions>
|
||||||
struct TypeTraits<vtkm::VecAxisAlignedPointCoordinates<NumDimensions>>
|
struct TypeTraits<vtkm::VecAxisAlignedPointCoordinates<NumDimensions>>
|
||||||
{
|
{
|
||||||
typedef vtkm::TypeTraitsRealTag NumericTag;
|
using NumericTag = vtkm::TypeTraitsRealTag;
|
||||||
typedef TypeTraitsVectorTag DimensionalityTag;
|
using DimensionalityTag = TypeTraitsVectorTag;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
static vtkm::VecAxisAlignedPointCoordinates<NumDimensions> ZeroInitialization()
|
static vtkm::VecAxisAlignedPointCoordinates<NumDimensions> ZeroInitialization()
|
||||||
@ -146,11 +146,11 @@ struct TypeTraits<vtkm::VecAxisAlignedPointCoordinates<NumDimensions>>
|
|||||||
template <vtkm::IdComponent NumDimensions>
|
template <vtkm::IdComponent NumDimensions>
|
||||||
struct VecTraits<vtkm::VecAxisAlignedPointCoordinates<NumDimensions>>
|
struct VecTraits<vtkm::VecAxisAlignedPointCoordinates<NumDimensions>>
|
||||||
{
|
{
|
||||||
typedef vtkm::VecAxisAlignedPointCoordinates<NumDimensions> VecType;
|
using VecType = vtkm::VecAxisAlignedPointCoordinates<NumDimensions>;
|
||||||
|
|
||||||
typedef vtkm::Vec<vtkm::FloatDefault, 3> ComponentType;
|
using ComponentType = vtkm::Vec<vtkm::FloatDefault, 3>;
|
||||||
typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents;
|
using HasMultipleComponents = vtkm::VecTraitsTagMultipleComponents;
|
||||||
typedef vtkm::VecTraitsTagSizeStatic IsSizeStatic;
|
using IsSizeStatic = vtkm::VecTraitsTagSizeStatic;
|
||||||
|
|
||||||
static const vtkm::IdComponent NUM_COMPONENTS = VecType::NUM_COMPONENTS;
|
static const vtkm::IdComponent NUM_COMPONENTS = VecType::NUM_COMPONENTS;
|
||||||
|
|
||||||
|
@ -89,11 +89,11 @@ template <typename PortalType>
|
|||||||
struct TypeTraits<vtkm::VecFromPortal<PortalType>>
|
struct TypeTraits<vtkm::VecFromPortal<PortalType>>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef typename PortalType::ValueType ComponentType;
|
using ComponentType = typename PortalType::ValueType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename vtkm::TypeTraits<ComponentType>::NumericTag NumericTag;
|
using NumericTag = typename vtkm::TypeTraits<ComponentType>::NumericTag;
|
||||||
typedef TypeTraitsVectorTag DimensionalityTag;
|
using DimensionalityTag = TypeTraitsVectorTag;
|
||||||
|
|
||||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
@ -106,11 +106,11 @@ public:
|
|||||||
template <typename PortalType>
|
template <typename PortalType>
|
||||||
struct VecTraits<vtkm::VecFromPortal<PortalType>>
|
struct VecTraits<vtkm::VecFromPortal<PortalType>>
|
||||||
{
|
{
|
||||||
typedef vtkm::VecFromPortal<PortalType> VecType;
|
using VecType = vtkm::VecFromPortal<PortalType>;
|
||||||
|
|
||||||
typedef typename VecType::ComponentType ComponentType;
|
using ComponentType = typename VecType::ComponentType;
|
||||||
typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents;
|
using HasMultipleComponents = vtkm::VecTraitsTagMultipleComponents;
|
||||||
typedef vtkm::VecTraitsTagSizeVariable IsSizeStatic;
|
using IsSizeStatic = vtkm::VecTraitsTagSizeVariable;
|
||||||
|
|
||||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
|
@ -83,12 +83,12 @@ template <typename IndexVecType, typename PortalType>
|
|||||||
struct TypeTraits<vtkm::VecFromPortalPermute<IndexVecType, PortalType>>
|
struct TypeTraits<vtkm::VecFromPortalPermute<IndexVecType, PortalType>>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef vtkm::VecFromPortalPermute<IndexVecType, PortalType> VecType;
|
using VecType = vtkm::VecFromPortalPermute<IndexVecType, PortalType>;
|
||||||
typedef typename PortalType::ValueType ComponentType;
|
using ComponentType = typename PortalType::ValueType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename vtkm::TypeTraits<ComponentType>::NumericTag NumericTag;
|
using NumericTag = typename vtkm::TypeTraits<ComponentType>::NumericTag;
|
||||||
typedef TypeTraitsVectorTag DimensionalityTag;
|
using DimensionalityTag = TypeTraitsVectorTag;
|
||||||
|
|
||||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
@ -98,11 +98,11 @@ public:
|
|||||||
template <typename IndexVecType, typename PortalType>
|
template <typename IndexVecType, typename PortalType>
|
||||||
struct VecTraits<vtkm::VecFromPortalPermute<IndexVecType, PortalType>>
|
struct VecTraits<vtkm::VecFromPortalPermute<IndexVecType, PortalType>>
|
||||||
{
|
{
|
||||||
typedef vtkm::VecFromPortalPermute<IndexVecType, PortalType> VecType;
|
using VecType = vtkm::VecFromPortalPermute<IndexVecType, PortalType>;
|
||||||
|
|
||||||
typedef typename VecType::ComponentType ComponentType;
|
using ComponentType = typename VecType::ComponentType;
|
||||||
typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents;
|
using HasMultipleComponents = vtkm::VecTraitsTagMultipleComponents;
|
||||||
typedef vtkm::VecTraitsTagSizeVariable IsSizeStatic;
|
using IsSizeStatic = vtkm::VecTraitsTagSizeVariable;
|
||||||
|
|
||||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
|
@ -40,7 +40,7 @@ template <typename T, vtkm::IdComponent MaxSize>
|
|||||||
class VecVariable
|
class VecVariable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef T ComponentType;
|
using ComponentType = T;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
VecVariable()
|
VecVariable()
|
||||||
@ -94,8 +94,8 @@ private:
|
|||||||
template <typename T, vtkm::IdComponent MaxSize>
|
template <typename T, vtkm::IdComponent MaxSize>
|
||||||
struct TypeTraits<vtkm::VecVariable<T, MaxSize>>
|
struct TypeTraits<vtkm::VecVariable<T, MaxSize>>
|
||||||
{
|
{
|
||||||
typedef typename vtkm::TypeTraits<T>::NumericTag NumericTag;
|
using NumericTag = typename vtkm::TypeTraits<T>::NumericTag;
|
||||||
typedef TypeTraitsVectorTag DimensionalityTag;
|
using DimensionalityTag = TypeTraitsVectorTag;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
static vtkm::VecVariable<T, MaxSize> ZeroInitialization()
|
static vtkm::VecVariable<T, MaxSize> ZeroInitialization()
|
||||||
@ -107,11 +107,11 @@ struct TypeTraits<vtkm::VecVariable<T, MaxSize>>
|
|||||||
template <typename T, vtkm::IdComponent MaxSize>
|
template <typename T, vtkm::IdComponent MaxSize>
|
||||||
struct VecTraits<vtkm::VecVariable<T, MaxSize>>
|
struct VecTraits<vtkm::VecVariable<T, MaxSize>>
|
||||||
{
|
{
|
||||||
typedef vtkm::VecVariable<T, MaxSize> VecType;
|
using VecType = vtkm::VecVariable<T, MaxSize>;
|
||||||
|
|
||||||
typedef typename VecType::ComponentType ComponentType;
|
using ComponentType = typename VecType::ComponentType;
|
||||||
typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents;
|
using HasMultipleComponents = vtkm::VecTraitsTagMultipleComponents;
|
||||||
typedef vtkm::VecTraitsTagSizeVariable IsSizeStatic;
|
using IsSizeStatic = vtkm::VecTraitsTagSizeVariable;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
static vtkm::IdComponent GetNumberOfComponents(const VecType& vector)
|
static vtkm::IdComponent GetNumberOfComponents(const VecType& vector)
|
||||||
|
@ -169,13 +169,13 @@ const static std::string DIVIDER(40, '-');
|
|||||||
template <class DeviceAdapterTag>
|
template <class DeviceAdapterTag>
|
||||||
class BenchmarkDeviceAdapter
|
class BenchmarkDeviceAdapter
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::StorageTagBasic StorageTag;
|
using StorageTag = vtkm::cont::StorageTagBasic;
|
||||||
|
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::Id, StorageTag> IdArrayHandle;
|
using IdArrayHandle = vtkm::cont::ArrayHandle<vtkm::Id, StorageTag>;
|
||||||
|
|
||||||
typedef vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapterTag> Algorithm;
|
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapterTag>;
|
||||||
|
|
||||||
typedef vtkm::cont::Timer<DeviceAdapterTag> Timer;
|
using Timer = vtkm::cont::Timer<DeviceAdapterTag>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Various kernels used by the different benchmarks to accelerate
|
// Various kernels used by the different benchmarks to accelerate
|
||||||
@ -183,8 +183,8 @@ public:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct FillTestValueKernel : vtkm::exec::FunctorBase
|
struct FillTestValueKernel : vtkm::exec::FunctorBase
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
typedef typename ValueArrayHandle::template ExecutionTypes<DeviceAdapterTag>::Portal PortalType;
|
using PortalType = typename ValueArrayHandle::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||||
|
|
||||||
PortalType Output;
|
PortalType Output;
|
||||||
|
|
||||||
@ -200,8 +200,8 @@ public:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct FillScaledTestValueKernel : vtkm::exec::FunctorBase
|
struct FillScaledTestValueKernel : vtkm::exec::FunctorBase
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
typedef typename ValueArrayHandle::template ExecutionTypes<DeviceAdapterTag>::Portal PortalType;
|
using PortalType = typename ValueArrayHandle::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||||
|
|
||||||
PortalType Output;
|
PortalType Output;
|
||||||
const vtkm::Id IdScale;
|
const vtkm::Id IdScale;
|
||||||
@ -219,8 +219,8 @@ public:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct FillModuloTestValueKernel : vtkm::exec::FunctorBase
|
struct FillModuloTestValueKernel : vtkm::exec::FunctorBase
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
typedef typename ValueArrayHandle::template ExecutionTypes<DeviceAdapterTag>::Portal PortalType;
|
using PortalType = typename ValueArrayHandle::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||||
|
|
||||||
PortalType Output;
|
PortalType Output;
|
||||||
const vtkm::Id Modulus;
|
const vtkm::Id Modulus;
|
||||||
@ -238,8 +238,8 @@ public:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct FillBinaryTestValueKernel : vtkm::exec::FunctorBase
|
struct FillBinaryTestValueKernel : vtkm::exec::FunctorBase
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
typedef typename ValueArrayHandle::template ExecutionTypes<DeviceAdapterTag>::Portal PortalType;
|
using PortalType = typename ValueArrayHandle::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||||
|
|
||||||
PortalType Output;
|
PortalType Output;
|
||||||
const vtkm::Id Modulus;
|
const vtkm::Id Modulus;
|
||||||
@ -261,7 +261,7 @@ private:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct BenchCopy
|
struct BenchCopy
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
|
|
||||||
ValueArrayHandle ValueHandle_src;
|
ValueArrayHandle ValueHandle_src;
|
||||||
ValueArrayHandle ValueHandle_dst;
|
ValueArrayHandle ValueHandle_dst;
|
||||||
@ -302,7 +302,7 @@ private:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct BenchCopyIf
|
struct BenchCopyIf
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
|
|
||||||
const vtkm::Id PERCENT_VALID;
|
const vtkm::Id PERCENT_VALID;
|
||||||
const vtkm::Id N_VALID;
|
const vtkm::Id N_VALID;
|
||||||
@ -359,7 +359,7 @@ private:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct BenchLowerBounds
|
struct BenchLowerBounds
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
|
|
||||||
const vtkm::Id N_VALS;
|
const vtkm::Id N_VALS;
|
||||||
const vtkm::Id PERCENT_VALUES;
|
const vtkm::Id PERCENT_VALUES;
|
||||||
@ -415,7 +415,7 @@ private:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct BenchReduce
|
struct BenchReduce
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
|
|
||||||
ValueArrayHandle InputHandle;
|
ValueArrayHandle InputHandle;
|
||||||
// We don't actually use this, but we need it to prevent sufficiently
|
// We don't actually use this, but we need it to prevent sufficiently
|
||||||
@ -461,7 +461,7 @@ private:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct BenchReduceByKey
|
struct BenchReduceByKey
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
|
|
||||||
const vtkm::Id N_KEYS;
|
const vtkm::Id N_KEYS;
|
||||||
const vtkm::Id PERCENT_KEYS;
|
const vtkm::Id PERCENT_KEYS;
|
||||||
@ -518,7 +518,7 @@ private:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct BenchScanInclusive
|
struct BenchScanInclusive
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
ValueArrayHandle ValueHandle, OutHandle;
|
ValueArrayHandle ValueHandle, OutHandle;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
@ -553,7 +553,7 @@ private:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct BenchScanExclusive
|
struct BenchScanExclusive
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
|
|
||||||
ValueArrayHandle ValueHandle, OutHandle;
|
ValueArrayHandle ValueHandle, OutHandle;
|
||||||
|
|
||||||
@ -589,7 +589,7 @@ private:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct BenchSort
|
struct BenchSort
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
|
|
||||||
ValueArrayHandle ValueHandle;
|
ValueArrayHandle ValueHandle;
|
||||||
std::mt19937 Rng;
|
std::mt19937 Rng;
|
||||||
@ -631,7 +631,7 @@ private:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct BenchSortByKey
|
struct BenchSortByKey
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
|
|
||||||
std::mt19937 Rng;
|
std::mt19937 Rng;
|
||||||
vtkm::Id N_KEYS;
|
vtkm::Id N_KEYS;
|
||||||
@ -797,7 +797,7 @@ private:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct BenchUnique
|
struct BenchUnique
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
|
|
||||||
const vtkm::Id N_VALID;
|
const vtkm::Id N_VALID;
|
||||||
const vtkm::Id PERCENT_VALID;
|
const vtkm::Id PERCENT_VALID;
|
||||||
@ -853,7 +853,7 @@ private:
|
|||||||
template <typename Value>
|
template <typename Value>
|
||||||
struct BenchUpperBounds
|
struct BenchUpperBounds
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<Value, StorageTag> ValueArrayHandle;
|
using ValueArrayHandle = vtkm::cont::ArrayHandle<Value, StorageTag>;
|
||||||
|
|
||||||
const vtkm::Id N_VALS;
|
const vtkm::Id N_VALS;
|
||||||
const vtkm::Id PERCENT_VALS;
|
const vtkm::Id PERCENT_VALS;
|
||||||
|
@ -205,7 +205,7 @@ class GenerateEdges : public vtkm::worklet::WorkletMapPointToCell
|
|||||||
public:
|
public:
|
||||||
typedef void ControlSignature(CellSetIn cellset, WholeArrayOut<> edgeIds);
|
typedef void ControlSignature(CellSetIn cellset, WholeArrayOut<> edgeIds);
|
||||||
typedef void ExecutionSignature(PointIndices, ThreadIndices, _2);
|
typedef void ExecutionSignature(PointIndices, ThreadIndices, _2);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
template <typename ConnectivityInVec, typename ThreadIndicesType, typename IdPairTableType>
|
template <typename ConnectivityInVec, typename ThreadIndicesType, typename IdPairTableType>
|
||||||
VTKM_EXEC void operator()(const ConnectivityInVec& connectivity,
|
VTKM_EXEC void operator()(const ConnectivityInVec& connectivity,
|
||||||
@ -234,7 +234,7 @@ public:
|
|||||||
WholeArrayIn<> inputField,
|
WholeArrayIn<> inputField,
|
||||||
FieldOut<> output);
|
FieldOut<> output);
|
||||||
typedef void ExecutionSignature(_1, _2, _3, _4);
|
typedef void ExecutionSignature(_1, _2, _3, _4);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
template <typename WeightType, typename T, typename S, typename D>
|
template <typename WeightType, typename T, typename S, typename D>
|
||||||
VTKM_EXEC void operator()(const vtkm::Id2& low_high,
|
VTKM_EXEC void operator()(const vtkm::Id2& low_high,
|
||||||
@ -321,11 +321,11 @@ using StorageListTag = ::vtkm::cont::StorageListTagBasic;
|
|||||||
template <class DeviceAdapterTag>
|
template <class DeviceAdapterTag>
|
||||||
class BenchmarkFieldAlgorithms
|
class BenchmarkFieldAlgorithms
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::StorageTagBasic StorageTag;
|
using StorageTag = vtkm::cont::StorageTagBasic;
|
||||||
|
|
||||||
typedef vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapterTag> Algorithm;
|
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapterTag>;
|
||||||
|
|
||||||
typedef vtkm::cont::Timer<DeviceAdapterTag> Timer;
|
using Timer = vtkm::cont::Timer<DeviceAdapterTag>;
|
||||||
|
|
||||||
using ValueDynamicHandle = vtkm::cont::DynamicArrayHandleBase<ValueTypes, StorageListTag>;
|
using ValueDynamicHandle = vtkm::cont::DynamicArrayHandleBase<ValueTypes, StorageListTag>;
|
||||||
using InterpDynamicHandle = vtkm::cont::DynamicArrayHandleBase<InterpValueTypes, StorageListTag>;
|
using InterpDynamicHandle = vtkm::cont::DynamicArrayHandleBase<InterpValueTypes, StorageListTag>;
|
||||||
|
@ -59,7 +59,7 @@ public:
|
|||||||
CellSetIn cellset,
|
CellSetIn cellset,
|
||||||
FieldOutCell<> outCells);
|
FieldOutCell<> outCells);
|
||||||
typedef void ExecutionSignature(_1, PointCount, _3);
|
typedef void ExecutionSignature(_1, PointCount, _3);
|
||||||
typedef _2 InputDomain;
|
using InputDomain = _2;
|
||||||
|
|
||||||
template <typename PointValueVecType, typename OutType>
|
template <typename PointValueVecType, typename OutType>
|
||||||
VTKM_EXEC void operator()(const PointValueVecType& pointValues,
|
VTKM_EXEC void operator()(const PointValueVecType& pointValues,
|
||||||
@ -81,7 +81,7 @@ class AverageCellToPoint : public vtkm::worklet::WorkletMapCellToPoint
|
|||||||
public:
|
public:
|
||||||
typedef void ControlSignature(FieldInCell<> inCells, CellSetIn topology, FieldOut<> outPoints);
|
typedef void ControlSignature(FieldInCell<> inCells, CellSetIn topology, FieldOut<> outPoints);
|
||||||
typedef void ExecutionSignature(_1, _3, CellCount);
|
typedef void ExecutionSignature(_1, _3, CellCount);
|
||||||
typedef _2 InputDomain;
|
using InputDomain = _2;
|
||||||
|
|
||||||
template <typename CellVecType, typename OutType>
|
template <typename CellVecType, typename OutType>
|
||||||
VTKM_EXEC void operator()(const CellVecType& cellValues,
|
VTKM_EXEC void operator()(const CellVecType& cellValues,
|
||||||
@ -110,7 +110,7 @@ public:
|
|||||||
CellSetIn cellset,
|
CellSetIn cellset,
|
||||||
FieldOutCell<IdComponentType> outCaseId);
|
FieldOutCell<IdComponentType> outCaseId);
|
||||||
typedef void ExecutionSignature(_1, _3);
|
typedef void ExecutionSignature(_1, _3);
|
||||||
typedef _2 InputDomain;
|
using InputDomain = _2;
|
||||||
|
|
||||||
T IsoValue;
|
T IsoValue;
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ public:
|
|||||||
template <typename FieldInType>
|
template <typename FieldInType>
|
||||||
VTKM_EXEC void operator()(const FieldInType& fieldIn, vtkm::IdComponent& caseNumber) const
|
VTKM_EXEC void operator()(const FieldInType& fieldIn, vtkm::IdComponent& caseNumber) const
|
||||||
{
|
{
|
||||||
typedef typename vtkm::VecTraits<FieldInType>::ComponentType FieldType;
|
using FieldType = typename vtkm::VecTraits<FieldInType>::ComponentType;
|
||||||
const FieldType iso = static_cast<FieldType>(this->IsoValue);
|
const FieldType iso = static_cast<FieldType>(this->IsoValue);
|
||||||
|
|
||||||
caseNumber = ((fieldIn[0] > iso) | (fieldIn[1] > iso) << 1 | (fieldIn[2] > iso) << 2 |
|
caseNumber = ((fieldIn[0] > iso) | (fieldIn[1] > iso) << 1 | (fieldIn[2] > iso) << 2 |
|
||||||
@ -143,11 +143,11 @@ using StorageListTag = ::vtkm::cont::StorageListTagBasic;
|
|||||||
template <class DeviceAdapterTag>
|
template <class DeviceAdapterTag>
|
||||||
class BenchmarkTopologyAlgorithms
|
class BenchmarkTopologyAlgorithms
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::StorageTagBasic StorageTag;
|
using StorageTag = vtkm::cont::StorageTagBasic;
|
||||||
|
|
||||||
typedef vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapterTag> Algorithm;
|
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapterTag>;
|
||||||
|
|
||||||
typedef vtkm::cont::Timer<DeviceAdapterTag> Timer;
|
using Timer = vtkm::cont::Timer<DeviceAdapterTag>;
|
||||||
|
|
||||||
using ValueDynamicHandle = vtkm::cont::DynamicArrayHandleBase<ValueTypes, StorageListTag>;
|
using ValueDynamicHandle = vtkm::cont::DynamicArrayHandleBase<ValueTypes, StorageListTag>;
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ public:
|
|||||||
template <typename DeviceAdapter>
|
template <typename DeviceAdapter>
|
||||||
void Build(const vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& coords, DeviceAdapter)
|
void Build(const vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& coords, DeviceAdapter)
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> Algorithm;
|
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
// generate unique id for each input point
|
// generate unique id for each input point
|
||||||
vtkm::cont::ArrayHandleCounting<vtkm::Id> pointCounting(0, 1, coords.GetNumberOfValues());
|
vtkm::cont::ArrayHandleCounting<vtkm::Id> pointCounting(0, 1, coords.GetNumberOfValues());
|
||||||
Algorithm::Copy(pointCounting, PointIds);
|
Algorithm::Copy(pointCounting, PointIds);
|
||||||
|
@ -172,8 +172,8 @@ template <typename PlainType,
|
|||||||
class ParallelRadixSortInternal
|
class ParallelRadixSortInternal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef ParallelRadixCompareInternal<PlainType, UnsignedType, CompareType, ValueManager, Base>
|
using CompareInternal =
|
||||||
CompareInternal;
|
ParallelRadixCompareInternal<PlainType, UnsignedType, CompareType, ValueManager, Base>;
|
||||||
|
|
||||||
ParallelRadixSortInternal();
|
ParallelRadixSortInternal();
|
||||||
~ParallelRadixSortInternal();
|
~ParallelRadixSortInternal();
|
||||||
@ -745,14 +745,13 @@ template <typename PlainType,
|
|||||||
unsigned int Base = 8>
|
unsigned int Base = 8>
|
||||||
class KeySort
|
class KeySort
|
||||||
{
|
{
|
||||||
typedef value_manager::DummyValueManager DummyValueManager;
|
using DummyValueManager = value_manager::DummyValueManager;
|
||||||
typedef internal::ParallelRadixSortInternal<PlainType,
|
using Internal = internal::ParallelRadixSortInternal<PlainType,
|
||||||
CompareType,
|
CompareType,
|
||||||
UnsignedType,
|
UnsignedType,
|
||||||
Encoder,
|
Encoder,
|
||||||
DummyValueManager,
|
DummyValueManager,
|
||||||
Base>
|
Base>;
|
||||||
Internal;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void InitAndSort(PlainType* data, size_t num_elems, const CompareType& comp)
|
void InitAndSort(PlainType* data, size_t num_elems, const CompareType& comp)
|
||||||
@ -772,10 +771,9 @@ template <typename PlainType,
|
|||||||
int Base = 8>
|
int Base = 8>
|
||||||
class PairSort
|
class PairSort
|
||||||
{
|
{
|
||||||
typedef value_manager::PairValueManager<PlainType, ValueType, Base> ValueManager;
|
using ValueManager = value_manager::PairValueManager<PlainType, ValueType, Base>;
|
||||||
typedef internal::
|
using Internal = internal::
|
||||||
ParallelRadixSortInternal<PlainType, CompareType, UnsignedType, Encoder, ValueManager, Base>
|
ParallelRadixSortInternal<PlainType, CompareType, UnsignedType, Encoder, ValueManager, Base>;
|
||||||
Internal;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void InitAndSort(PlainType* keys, ValueType* vals, size_t num_elems, const CompareType& comp)
|
void InitAndSort(PlainType* keys, ValueType* vals, size_t num_elems, const CompareType& comp)
|
||||||
|
@ -79,7 +79,7 @@ template <typename DeviceAdapter>
|
|||||||
class TestingPointLocatorUniformGrid
|
class TestingPointLocatorUniformGrid
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef vtkm::cont::DeviceAdapterAlgorithm<VTKM_DEFAULT_DEVICE_ADAPTER_TAG> Algorithm;
|
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<VTKM_DEFAULT_DEVICE_ADAPTER_TAG>;
|
||||||
void TestTest() const
|
void TestTest() const
|
||||||
{
|
{
|
||||||
vtkm::Int32 nTrainingPoints = 1000;
|
vtkm::Int32 nTrainingPoints = 1000;
|
||||||
|
@ -46,7 +46,7 @@ struct AspectTagOnBoundary
|
|||||||
struct OnBoundary : vtkm::exec::arg::ExecutionSignatureTagBase
|
struct OnBoundary : vtkm::exec::arg::ExecutionSignatureTagBase
|
||||||
{
|
{
|
||||||
static const vtkm::IdComponent INDEX = 1;
|
static const vtkm::IdComponent INDEX = 1;
|
||||||
typedef vtkm::exec::arg::AspectTagOnBoundary AspectTag;
|
using AspectTag = vtkm::exec::arg::AspectTagOnBoundary;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename FetchTag, int NSize, typename ExecObjectType>
|
template <typename FetchTag, int NSize, typename ExecObjectType>
|
||||||
|
@ -31,7 +31,7 @@ static const vtkm::Id3 POINT_DIMS = { 10, 4, 16 };
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
struct TestPortal
|
struct TestPortal
|
||||||
{
|
{
|
||||||
typedef T ValueType;
|
using ValueType = T;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
vtkm::Id GetNumberOfValues() const { return POINT_DIMS[0] * POINT_DIMS[1] * POINT_DIMS[2]; }
|
vtkm::Id GetNumberOfValues() const { return POINT_DIMS[0] * POINT_DIMS[1] * POINT_DIMS[2]; }
|
||||||
@ -47,7 +47,7 @@ struct TestPortal
|
|||||||
|
|
||||||
struct TestIndexPortal
|
struct TestIndexPortal
|
||||||
{
|
{
|
||||||
typedef vtkm::Id ValueType;
|
using ValueType = vtkm::Id;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
ValueType Get(vtkm::Id index) const { return index; }
|
ValueType Get(vtkm::Id index) const { return index; }
|
||||||
|
@ -71,7 +71,7 @@ template <>
|
|||||||
class FilterTraits<ClipWithField>
|
class FilterTraits<ClipWithField>
|
||||||
{ //currently the Clip filter only works on scalar data.
|
{ //currently the Clip filter only works on scalar data.
|
||||||
public:
|
public:
|
||||||
typedef TypeListTagScalarAll InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagScalarAll;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -99,7 +99,7 @@ template <>
|
|||||||
class FilterTraits<ContourTreeMesh2D>
|
class FilterTraits<ContourTreeMesh2D>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef TypeListTagScalarAll InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagScalarAll;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Construct the ContourTree for a 3D Mesh
|
/// \brief Construct the ContourTree for a 3D Mesh
|
||||||
@ -127,7 +127,7 @@ template <>
|
|||||||
class FilterTraits<ContourTreeMesh3D>
|
class FilterTraits<ContourTreeMesh3D>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef TypeListTagScalarAll InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagScalarAll;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -57,7 +57,7 @@ template <>
|
|||||||
class FilterTraits<Entropy>
|
class FilterTraits<Entropy>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef TypeListTagScalarAll InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagScalarAll;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -111,7 +111,7 @@ template <>
|
|||||||
class FilterTraits<ExtractGeometry>
|
class FilterTraits<ExtractGeometry>
|
||||||
{ //currently the ExtractGeometry filter only works on scalar data.
|
{ //currently the ExtractGeometry filter only works on scalar data.
|
||||||
public:
|
public:
|
||||||
typedef TypeListTagScalarAll InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagScalarAll;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -138,10 +138,10 @@ inline VTKM_CONT bool FilterDataSet<Derived>::MapFieldOntoOutput(
|
|||||||
if (result.IsValid())
|
if (result.IsValid())
|
||||||
{
|
{
|
||||||
vtkm::filter::FieldMetadata metaData(field);
|
vtkm::filter::FieldMetadata metaData(field);
|
||||||
typedef internal::ResolveFieldTypeAndMap<Derived, DerivedPolicy> FunctorType;
|
using FunctorType = internal::ResolveFieldTypeAndMap<Derived, DerivedPolicy>;
|
||||||
FunctorType functor(static_cast<Derived*>(this), result, metaData, policy, valid);
|
FunctorType functor(static_cast<Derived*>(this), result, metaData, policy, valid);
|
||||||
|
|
||||||
typedef vtkm::filter::FilterTraits<Derived> Traits;
|
using Traits = vtkm::filter::FilterTraits<Derived>;
|
||||||
vtkm::cont::CastAndCall(
|
vtkm::cont::CastAndCall(
|
||||||
vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker);
|
vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker);
|
||||||
}
|
}
|
||||||
|
@ -161,10 +161,10 @@ inline VTKM_CONT Result FilterDataSetWithField<Derived>::PrepareForExecution(
|
|||||||
vtkm::filter::FieldMetadata metaData(field);
|
vtkm::filter::FieldMetadata metaData(field);
|
||||||
Result result;
|
Result result;
|
||||||
|
|
||||||
typedef internal::ResolveFieldTypeAndExecute<Derived, DerivedPolicy, Result> FunctorType;
|
using FunctorType = internal::ResolveFieldTypeAndExecute<Derived, DerivedPolicy, Result>;
|
||||||
FunctorType functor(static_cast<Derived*>(this), input, metaData, policy, result);
|
FunctorType functor(static_cast<Derived*>(this), input, metaData, policy, result);
|
||||||
|
|
||||||
typedef vtkm::filter::FilterTraits<Derived> Traits;
|
using Traits = vtkm::filter::FilterTraits<Derived>;
|
||||||
vtkm::cont::CastAndCall(
|
vtkm::cont::CastAndCall(
|
||||||
vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker);
|
vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker);
|
||||||
return result;
|
return result;
|
||||||
@ -184,10 +184,10 @@ inline VTKM_CONT Result FilterDataSetWithField<Derived>::PrepareForExecution(
|
|||||||
|
|
||||||
//determine the field type first
|
//determine the field type first
|
||||||
Result result;
|
Result result;
|
||||||
typedef internal::ResolveFieldTypeAndExecute<Derived, DerivedPolicy, Result> FunctorType;
|
using FunctorType = internal::ResolveFieldTypeAndExecute<Derived, DerivedPolicy, Result>;
|
||||||
FunctorType functor(static_cast<Derived*>(this), input, metaData, policy, result);
|
FunctorType functor(static_cast<Derived*>(this), input, metaData, policy, result);
|
||||||
|
|
||||||
typedef vtkm::filter::FilterTraits<Derived> Traits;
|
using Traits = vtkm::filter::FilterTraits<Derived>;
|
||||||
vtkm::cont::CastAndCall(
|
vtkm::cont::CastAndCall(
|
||||||
vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker);
|
vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker);
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ inline VTKM_CONT bool FilterDataSetWithField<Derived>::MapFieldOntoOutput(
|
|||||||
if (result.IsDataSetValid())
|
if (result.IsDataSetValid())
|
||||||
{
|
{
|
||||||
vtkm::filter::FieldMetadata metaData(field);
|
vtkm::filter::FieldMetadata metaData(field);
|
||||||
typedef internal::ResolveFieldTypeAndMap<Derived, DerivedPolicy> FunctorType;
|
using FunctorType = internal::ResolveFieldTypeAndMap<Derived, DerivedPolicy>;
|
||||||
FunctorType functor(static_cast<Derived*>(this), result, metaData, policy, valid);
|
FunctorType functor(static_cast<Derived*>(this), result, metaData, policy, valid);
|
||||||
|
|
||||||
vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(field, policy), functor, this->Tracker);
|
vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(field, policy), functor, this->Tracker);
|
||||||
|
@ -158,10 +158,10 @@ FilterField<Derived>::PrepareForExecution(const vtkm::cont::DataSet& input,
|
|||||||
vtkm::filter::FieldMetadata metaData(field);
|
vtkm::filter::FieldMetadata metaData(field);
|
||||||
Result result;
|
Result result;
|
||||||
|
|
||||||
typedef internal::ResolveFieldTypeAndExecute<Derived, DerivedPolicy, Result> FunctorType;
|
using FunctorType = internal::ResolveFieldTypeAndExecute<Derived, DerivedPolicy, Result>;
|
||||||
FunctorType functor(static_cast<Derived*>(this), input, metaData, policy, result);
|
FunctorType functor(static_cast<Derived*>(this), input, metaData, policy, result);
|
||||||
|
|
||||||
typedef vtkm::filter::FilterTraits<Derived> Traits;
|
using Traits = vtkm::filter::FilterTraits<Derived>;
|
||||||
vtkm::cont::CastAndCall(
|
vtkm::cont::CastAndCall(
|
||||||
vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker);
|
vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker);
|
||||||
return result;
|
return result;
|
||||||
@ -181,7 +181,7 @@ FilterField<Derived>::PrepareForExecution(const vtkm::cont::DataSet& input,
|
|||||||
vtkm::filter::FieldMetadata metaData(field);
|
vtkm::filter::FieldMetadata metaData(field);
|
||||||
Result result;
|
Result result;
|
||||||
|
|
||||||
typedef internal::ResolveFieldTypeAndExecute<Derived, DerivedPolicy, Result> FunctorType;
|
using FunctorType = internal::ResolveFieldTypeAndExecute<Derived, DerivedPolicy, Result>;
|
||||||
FunctorType functor(static_cast<Derived*>(this), input, metaData, policy, result);
|
FunctorType functor(static_cast<Derived*>(this), input, metaData, policy, result);
|
||||||
vtkm::cont::CastAndCall(field, functor, this->Tracker);
|
vtkm::cont::CastAndCall(field, functor, this->Tracker);
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ public:
|
|||||||
// A filter is able to state what subset of types it supports
|
// A filter is able to state what subset of types it supports
|
||||||
// by default. By default we use ListTagUniversal to represent that the
|
// by default. By default we use ListTagUniversal to represent that the
|
||||||
// filter accepts all types specified by the users provided policy
|
// filter accepts all types specified by the users provided policy
|
||||||
typedef vtkm::ListTagUniversal InputFieldTypeList;
|
using InputFieldTypeList = vtkm::ListTagUniversal;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename DerivedPolicy, typename FilterType>
|
template <typename DerivedPolicy, typename FilterType>
|
||||||
|
@ -129,7 +129,7 @@ public:
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef TypeListTagGradientInputs InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagGradientInputs;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -72,7 +72,7 @@ class FilterTraits<Histogram>
|
|||||||
//this mainly has to do with getting the ranges for each bin
|
//this mainly has to do with getting the ranges for each bin
|
||||||
//would require returning a more complex value type
|
//would require returning a more complex value type
|
||||||
public:
|
public:
|
||||||
typedef TypeListTagScalarAll InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagScalarAll;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -138,7 +138,7 @@ public:
|
|||||||
: vtkm::ListTagBase<vtkm::UInt8, vtkm::Int8, vtkm::Float32, vtkm::Float64>
|
: vtkm::ListTagBase<vtkm::UInt8, vtkm::Int8, vtkm::Float32, vtkm::Float64>
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
typedef TypeListTagMCScalars InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagMCScalars;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -141,7 +141,7 @@ inline VTKM_CONT vtkm::filter::Result MarchingCubes::DoExecute(
|
|||||||
const vtkm::cont::CoordinateSystem& coords =
|
const vtkm::cont::CoordinateSystem& coords =
|
||||||
input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex());
|
input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex());
|
||||||
|
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::FloatDefault, 3>> Vec3HandleType;
|
using Vec3HandleType = vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::FloatDefault, 3>>;
|
||||||
Vec3HandleType vertices;
|
Vec3HandleType vertices;
|
||||||
Vec3HandleType normals;
|
Vec3HandleType normals;
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class FilterTraits<PointElevation>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//Point Elevation can only convert Float and Double Vec3 arrays
|
//Point Elevation can only convert Float and Double Vec3 arrays
|
||||||
typedef vtkm::TypeListTagFieldVec3 InputFieldTypeList;
|
using InputFieldTypeList = vtkm::TypeListTagFieldVec3;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -40,15 +40,15 @@ namespace filter
|
|||||||
template <typename Derived>
|
template <typename Derived>
|
||||||
struct PolicyBase
|
struct PolicyBase
|
||||||
{
|
{
|
||||||
typedef VTKM_DEFAULT_TYPE_LIST_TAG FieldTypeList;
|
using FieldTypeList = VTKM_DEFAULT_TYPE_LIST_TAG;
|
||||||
typedef VTKM_DEFAULT_STORAGE_LIST_TAG FieldStorageList;
|
using FieldStorageList = VTKM_DEFAULT_STORAGE_LIST_TAG;
|
||||||
|
|
||||||
typedef vtkm::cont::CellSetListTagStructured StructuredCellSetList;
|
using StructuredCellSetList = vtkm::cont::CellSetListTagStructured;
|
||||||
typedef vtkm::cont::CellSetListTagUnstructured UnstructuredCellSetList;
|
using UnstructuredCellSetList = vtkm::cont::CellSetListTagUnstructured;
|
||||||
typedef VTKM_DEFAULT_CELL_SET_LIST_TAG AllCellSetList;
|
using AllCellSetList = VTKM_DEFAULT_CELL_SET_LIST_TAG;
|
||||||
|
|
||||||
// List of backends to try in sequence (if one fails, the next is attempted).
|
// List of backends to try in sequence (if one fails, the next is attempted).
|
||||||
typedef VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG DeviceAdapterList;
|
using DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG;
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -57,8 +57,8 @@ VTKM_CONT vtkm::cont::DynamicArrayHandleBase<typename DerivedPolicy::FieldTypeLi
|
|||||||
typename DerivedPolicy::FieldStorageList>
|
typename DerivedPolicy::FieldStorageList>
|
||||||
ApplyPolicy(const vtkm::cont::Field& field, const vtkm::filter::PolicyBase<DerivedPolicy>&)
|
ApplyPolicy(const vtkm::cont::Field& field, const vtkm::filter::PolicyBase<DerivedPolicy>&)
|
||||||
{
|
{
|
||||||
typedef typename DerivedPolicy::FieldTypeList TypeList;
|
using TypeList = typename DerivedPolicy::FieldTypeList;
|
||||||
typedef typename DerivedPolicy::FieldStorageList StorageList;
|
using StorageList = typename DerivedPolicy::FieldStorageList;
|
||||||
return field.GetData().ResetTypeAndStorageLists(TypeList(), StorageList());
|
return field.GetData().ResetTypeAndStorageLists(TypeList(), StorageList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,10 +71,10 @@ ApplyPolicy(const vtkm::cont::Field& field,
|
|||||||
const vtkm::filter::PolicyBase<DerivedPolicy>&,
|
const vtkm::filter::PolicyBase<DerivedPolicy>&,
|
||||||
const vtkm::filter::FilterTraits<FilterType>&)
|
const vtkm::filter::FilterTraits<FilterType>&)
|
||||||
{
|
{
|
||||||
typedef
|
using TypeList =
|
||||||
typename vtkm::filter::DeduceFilterFieldTypes<DerivedPolicy, FilterType>::TypeList TypeList;
|
typename vtkm::filter::DeduceFilterFieldTypes<DerivedPolicy, FilterType>::TypeList;
|
||||||
|
|
||||||
typedef typename DerivedPolicy::FieldStorageList StorageList;
|
using StorageList = typename DerivedPolicy::FieldStorageList;
|
||||||
return field.GetData().ResetTypeAndStorageLists(TypeList(), StorageList());
|
return field.GetData().ResetTypeAndStorageLists(TypeList(), StorageList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ VTKM_CONT vtkm::cont::DynamicCellSetBase<typename DerivedPolicy::AllCellSetList>
|
|||||||
const vtkm::cont::DynamicCellSet& cellset,
|
const vtkm::cont::DynamicCellSet& cellset,
|
||||||
const vtkm::filter::PolicyBase<DerivedPolicy>&)
|
const vtkm::filter::PolicyBase<DerivedPolicy>&)
|
||||||
{
|
{
|
||||||
typedef typename DerivedPolicy::AllCellSetList CellSetList;
|
using CellSetList = typename DerivedPolicy::AllCellSetList;
|
||||||
return cellset.ResetCellSetList(CellSetList());
|
return cellset.ResetCellSetList(CellSetList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ VTKM_CONT vtkm::cont::DynamicCellSetBase<typename DerivedPolicy::StructuredCellS
|
|||||||
ApplyPolicyStructured(const vtkm::cont::DynamicCellSet& cellset,
|
ApplyPolicyStructured(const vtkm::cont::DynamicCellSet& cellset,
|
||||||
const vtkm::filter::PolicyBase<DerivedPolicy>&)
|
const vtkm::filter::PolicyBase<DerivedPolicy>&)
|
||||||
{
|
{
|
||||||
typedef typename DerivedPolicy::StructuredCellSetList CellSetList;
|
using CellSetList = typename DerivedPolicy::StructuredCellSetList;
|
||||||
return cellset.ResetCellSetList(CellSetList());
|
return cellset.ResetCellSetList(CellSetList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ VTKM_CONT vtkm::cont::DynamicCellSetBase<typename DerivedPolicy::UnstructuredCel
|
|||||||
ApplyPolicyUnstructured(const vtkm::cont::DynamicCellSet& cellset,
|
ApplyPolicyUnstructured(const vtkm::cont::DynamicCellSet& cellset,
|
||||||
const vtkm::filter::PolicyBase<DerivedPolicy>&)
|
const vtkm::filter::PolicyBase<DerivedPolicy>&)
|
||||||
{
|
{
|
||||||
typedef typename DerivedPolicy::UnstructuredCellSetList CellSetList;
|
using CellSetList = typename DerivedPolicy::UnstructuredCellSetList;
|
||||||
return cellset.ResetCellSetList(CellSetList());
|
return cellset.ResetCellSetList(CellSetList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ public:
|
|||||||
: vtkm::ListTagBase<vtkm::Vec<vtkm::Float32, 3>, vtkm::Vec<vtkm::Float64, 3>>
|
: vtkm::ListTagBase<vtkm::Vec<vtkm::Float32, 3>, vtkm::Vec<vtkm::Float64, 3>>
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
typedef TypeListTagStreamline InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagStreamline;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -79,14 +79,12 @@ inline VTKM_CONT vtkm::filter::Result Streamline::DoExecute(
|
|||||||
return vtkm::filter::Result();
|
return vtkm::filter::Result();
|
||||||
|
|
||||||
//todo: add check for rectilinear.
|
//todo: add check for rectilinear.
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>> FieldHandle;
|
using FieldHandle = vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>;
|
||||||
typedef
|
using FieldPortalConstType =
|
||||||
typename FieldHandle::template ExecutionTypes<DeviceAdapter>::PortalConst FieldPortalConstType;
|
typename FieldHandle::template ExecutionTypes<DeviceAdapter>::PortalConst;
|
||||||
typedef vtkm::worklet::particleadvection::UniformGridEvaluate<FieldPortalConstType,
|
using RGEvalType =
|
||||||
T,
|
vtkm::worklet::particleadvection::UniformGridEvaluate<FieldPortalConstType, T, DeviceAdapter>;
|
||||||
DeviceAdapter>
|
using RK4RGType = vtkm::worklet::particleadvection::RK4Integrator<RGEvalType, T>;
|
||||||
RGEvalType;
|
|
||||||
typedef vtkm::worklet::particleadvection::RK4Integrator<RGEvalType, T> RK4RGType;
|
|
||||||
|
|
||||||
//RGEvalType eval(input.GetCoordinateSystem(), input.GetCellSet(0), field);
|
//RGEvalType eval(input.GetCoordinateSystem(), input.GetCellSet(0), field);
|
||||||
RGEvalType eval(coords, cells, field);
|
RGEvalType eval(coords, cells, field);
|
||||||
|
@ -80,7 +80,7 @@ template <>
|
|||||||
class FilterTraits<Threshold>
|
class FilterTraits<Threshold>
|
||||||
{ //currently the threshold filter only works on scalar data.
|
{ //currently the threshold filter only works on scalar data.
|
||||||
public:
|
public:
|
||||||
typedef TypeListTagScalarAll InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagScalarAll;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -89,7 +89,7 @@ template <>
|
|||||||
class FilterTraits<ThresholdPoints>
|
class FilterTraits<ThresholdPoints>
|
||||||
{ //currently the threshold filter only works on scalar data.
|
{ //currently the threshold filter only works on scalar data.
|
||||||
public:
|
public:
|
||||||
typedef TypeListTagScalarAll InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagScalarAll;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -50,7 +50,7 @@ template <>
|
|||||||
class FilterTraits<VectorMagnitude>
|
class FilterTraits<VectorMagnitude>
|
||||||
{ //currently the VectorMagnitude filter only works on vector data.
|
{ //currently the VectorMagnitude filter only works on vector data.
|
||||||
public:
|
public:
|
||||||
typedef TypeListTagVecCommon InputFieldTypeList;
|
using InputFieldTypeList = TypeListTagVecCommon;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} // namespace vtkm::filter
|
} // namespace vtkm::filter
|
||||||
|
@ -42,7 +42,7 @@ inline VTKM_CONT vtkm::filter::Result VectorMagnitude::DoExecute(
|
|||||||
const vtkm::filter::PolicyBase<DerivedPolicy>&,
|
const vtkm::filter::PolicyBase<DerivedPolicy>&,
|
||||||
const DeviceAdapter&)
|
const DeviceAdapter&)
|
||||||
{
|
{
|
||||||
typedef typename detail::FloatingPointReturnType<T>::Type ReturnType;
|
using ReturnType = typename detail::FloatingPointReturnType<T>::Type;
|
||||||
vtkm::cont::ArrayHandle<ReturnType> outArray;
|
vtkm::cont::ArrayHandle<ReturnType> outArray;
|
||||||
|
|
||||||
vtkm::worklet::DispatcherMapField<vtkm::worklet::Magnitude, DeviceAdapter> dispatcher(
|
vtkm::worklet::DispatcherMapField<vtkm::worklet::Magnitude, DeviceAdapter> dispatcher(
|
||||||
|
@ -50,7 +50,7 @@ struct ResolveFieldTypeAndExecuteForDevice
|
|||||||
template <typename Derived, typename DerivedPolicy, typename ResultType>
|
template <typename Derived, typename DerivedPolicy, typename ResultType>
|
||||||
struct ResolveFieldTypeAndExecute
|
struct ResolveFieldTypeAndExecute
|
||||||
{
|
{
|
||||||
typedef ResolveFieldTypeAndExecute<Derived, DerivedPolicy, ResultType> Self;
|
using Self = ResolveFieldTypeAndExecute<Derived, DerivedPolicy, ResultType>;
|
||||||
|
|
||||||
Derived* DerivedClass;
|
Derived* DerivedClass;
|
||||||
const vtkm::cont::DataSet& InputData;
|
const vtkm::cont::DataSet& InputData;
|
||||||
|
@ -56,7 +56,7 @@ struct ResolveFieldTypeAndMapForDevice
|
|||||||
template <typename Derived, typename DerivedPolicy>
|
template <typename Derived, typename DerivedPolicy>
|
||||||
struct ResolveFieldTypeAndMap
|
struct ResolveFieldTypeAndMap
|
||||||
{
|
{
|
||||||
typedef ResolveFieldTypeAndMap<Derived, DerivedPolicy> Self;
|
using Self = ResolveFieldTypeAndMap<Derived, DerivedPolicy>;
|
||||||
|
|
||||||
Derived* DerivedClass;
|
Derived* DerivedClass;
|
||||||
vtkm::filter::Result& InputResult;
|
vtkm::filter::Result& InputResult;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef vtkm::Vec<vtkm::FloatDefault, 3> Coord3D;
|
using Coord3D = vtkm::Vec<vtkm::FloatDefault, 3>;
|
||||||
|
|
||||||
vtkm::cont::DataSet MakeTestDatasetExplicit()
|
vtkm::cont::DataSet MakeTestDatasetExplicit()
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef vtkm::Vec<vtkm::FloatDefault, 3> Coord3D;
|
using Coord3D = vtkm::Vec<vtkm::FloatDefault, 3>;
|
||||||
|
|
||||||
vtkm::cont::DataSet MakeTestDatasetStructured()
|
vtkm::cont::DataSet MakeTestDatasetStructured()
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ class TangleField : public vtkm::worklet::WorkletMapField
|
|||||||
public:
|
public:
|
||||||
typedef void ControlSignature(FieldIn<IdType> vertexId, FieldOut<Scalar> v);
|
typedef void ControlSignature(FieldIn<IdType> vertexId, FieldOut<Scalar> v);
|
||||||
typedef void ExecutionSignature(_1, _2);
|
typedef void ExecutionSignature(_1, _2);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
const vtkm::Id xdim, ydim, zdim;
|
const vtkm::Id xdim, ydim, zdim;
|
||||||
const vtkm::Float32 xmin, ymin, zmin, xmax, ymax, zmax;
|
const vtkm::Float32 xmin, ymin, zmin, xmax, ymax, zmax;
|
||||||
|
@ -38,7 +38,7 @@ class TangleField : public vtkm::worklet::WorkletMapField
|
|||||||
public:
|
public:
|
||||||
typedef void ControlSignature(FieldIn<IdType> vertexId, FieldOut<Scalar> v);
|
typedef void ControlSignature(FieldIn<IdType> vertexId, FieldOut<Scalar> v);
|
||||||
typedef void ExecutionSignature(_1, _2);
|
typedef void ExecutionSignature(_1, _2);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
const vtkm::Id xdim, ydim, zdim;
|
const vtkm::Id xdim, ydim, zdim;
|
||||||
const vtkm::FloatDefault xmin, ymin, zmin, xmax, ymax, zmax;
|
const vtkm::FloatDefault xmin, ymin, zmin, xmax, ymax, zmax;
|
||||||
@ -167,8 +167,8 @@ public:
|
|||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
vtkm::Id operator()(vtkm::Id vertex) const
|
vtkm::Id operator()(vtkm::Id vertex) const
|
||||||
{
|
{
|
||||||
typedef vtkm::CellShapeTagHexahedron HexTag;
|
using HexTag = vtkm::CellShapeTagHexahedron;
|
||||||
typedef vtkm::CellTraits<HexTag> HexTraits;
|
using HexTraits = vtkm::CellTraits<HexTag>;
|
||||||
|
|
||||||
vtkm::Id cellId = vertex / HexTraits::NUM_POINTS;
|
vtkm::Id cellId = vertex / HexTraits::NUM_POINTS;
|
||||||
vtkm::Id localId = vertex % HexTraits::NUM_POINTS;
|
vtkm::Id localId = vertex % HexTraits::NUM_POINTS;
|
||||||
@ -208,30 +208,28 @@ private:
|
|||||||
class MakeRadiantDataSet
|
class MakeRadiantDataSet
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef vtkm::cont::ArrayHandleUniformPointCoordinates CoordinateArrayHandle;
|
using CoordinateArrayHandle = vtkm::cont::ArrayHandleUniformPointCoordinates;
|
||||||
typedef vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandleUniformPointCoordinates,
|
using DataArrayHandle =
|
||||||
EuclideanNorm>
|
vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandleUniformPointCoordinates, EuclideanNorm>;
|
||||||
DataArrayHandle;
|
using ConnectivityArrayHandle =
|
||||||
typedef vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandleCounting<vtkm::Id>,
|
|
||||||
CubeGridConnectivity>
|
|
||||||
ConnectivityArrayHandle;
|
|
||||||
|
|
||||||
typedef vtkm::cont::CellSetSingleType<
|
|
||||||
vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandleCounting<vtkm::Id>,
|
vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandleCounting<vtkm::Id>,
|
||||||
CubeGridConnectivity>::StorageTag>
|
CubeGridConnectivity>;
|
||||||
CellSet;
|
|
||||||
|
using CellSet = vtkm::cont::CellSetSingleType<
|
||||||
|
vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandleCounting<vtkm::Id>,
|
||||||
|
CubeGridConnectivity>::StorageTag>;
|
||||||
|
|
||||||
vtkm::cont::DataSet Make3DRadiantDataSet(vtkm::IdComponent dim = 5);
|
vtkm::cont::DataSet Make3DRadiantDataSet(vtkm::IdComponent dim = 5);
|
||||||
};
|
};
|
||||||
|
|
||||||
class PolicyRadiantDataSet : public vtkm::filter::PolicyBase<PolicyRadiantDataSet>
|
class PolicyRadiantDataSet : public vtkm::filter::PolicyBase<PolicyRadiantDataSet>
|
||||||
{
|
{
|
||||||
typedef MakeRadiantDataSet::DataArrayHandle DataHandleType;
|
using DataHandleType = MakeRadiantDataSet::DataArrayHandle;
|
||||||
typedef MakeRadiantDataSet::ConnectivityArrayHandle CountingHandleType;
|
using CountingHandleType = MakeRadiantDataSet::ConnectivityArrayHandle;
|
||||||
|
|
||||||
typedef vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandleCounting<vtkm::Id>,
|
using TransformHandleType =
|
||||||
CubeGridConnectivity>
|
vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandleCounting<vtkm::Id>,
|
||||||
TransformHandleType;
|
CubeGridConnectivity>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
struct TypeListTagRadiantTypes : vtkm::ListTagBase<DataHandleType::StorageTag,
|
struct TypeListTagRadiantTypes : vtkm::ListTagBase<DataHandleType::StorageTag,
|
||||||
@ -240,13 +238,13 @@ public:
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef TypeListTagRadiantTypes FieldStorageList;
|
using FieldStorageList = TypeListTagRadiantTypes;
|
||||||
|
|
||||||
struct TypeListTagRadiantCellSetTypes : vtkm::ListTagBase<MakeRadiantDataSet::CellSet>
|
struct TypeListTagRadiantCellSetTypes : vtkm::ListTagBase<MakeRadiantDataSet::CellSet>
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef TypeListTagRadiantCellSetTypes AllCellSetList;
|
using AllCellSetList = TypeListTagRadiantCellSetTypes;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComponent dim)
|
inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComponent dim)
|
||||||
@ -256,10 +254,10 @@ inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComp
|
|||||||
|
|
||||||
vtkm::cont::DataSet dataSet;
|
vtkm::cont::DataSet dataSet;
|
||||||
|
|
||||||
typedef vtkm::CellShapeTagHexahedron HexTag;
|
using HexTag = vtkm::CellShapeTagHexahedron;
|
||||||
typedef vtkm::CellTraits<HexTag> HexTraits;
|
using HexTraits = vtkm::CellTraits<HexTag>;
|
||||||
|
|
||||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||||
|
|
||||||
const vtkm::IdComponent nCells = dim * dim * dim;
|
const vtkm::IdComponent nCells = dim * dim * dim;
|
||||||
|
|
||||||
@ -327,7 +325,7 @@ void TestMarchingCubesUniformGrid()
|
|||||||
|
|
||||||
vtkm::cont::CoordinateSystem coords = outputData.GetCoordinateSystem();
|
vtkm::cont::CoordinateSystem coords = outputData.GetCoordinateSystem();
|
||||||
vtkm::cont::DynamicCellSet dcells = outputData.GetCellSet();
|
vtkm::cont::DynamicCellSet dcells = outputData.GetCellSet();
|
||||||
typedef vtkm::cont::CellSetSingleType<> CellSetType;
|
using CellSetType = vtkm::cont::CellSetSingleType<>;
|
||||||
const CellSetType& cells = dcells.Cast<CellSetType>();
|
const CellSetType& cells = dcells.Cast<CellSetType>();
|
||||||
|
|
||||||
//verify that the number of points is correct (72)
|
//verify that the number of points is correct (72)
|
||||||
@ -351,7 +349,7 @@ void TestMarchingCubesUniformGrid()
|
|||||||
//verify that the number of cells is correct (160)
|
//verify that the number of cells is correct (160)
|
||||||
vtkm::cont::DynamicCellSet dcells = outputData.GetCellSet();
|
vtkm::cont::DynamicCellSet dcells = outputData.GetCellSet();
|
||||||
|
|
||||||
typedef vtkm::cont::CellSetSingleType<> CellSetType;
|
using CellSetType = vtkm::cont::CellSetSingleType<>;
|
||||||
const CellSetType& cells = dcells.Cast<CellSetType>();
|
const CellSetType& cells = dcells.Cast<CellSetType>();
|
||||||
VTKM_TEST_ASSERT(cells.GetNumberOfCells() == 160, "");
|
VTKM_TEST_ASSERT(cells.GetNumberOfCells() == 160, "");
|
||||||
}
|
}
|
||||||
@ -361,7 +359,7 @@ void TestMarchingCubesCustomPolicy()
|
|||||||
{
|
{
|
||||||
std::cout << "Testing MarchingCubes filter with custom field and cellset" << std::endl;
|
std::cout << "Testing MarchingCubes filter with custom field and cellset" << std::endl;
|
||||||
|
|
||||||
typedef MakeRadiantDataSet DataSetGenerator;
|
using DataSetGenerator = MakeRadiantDataSet;
|
||||||
DataSetGenerator dataSetGenerator;
|
DataSetGenerator dataSetGenerator;
|
||||||
|
|
||||||
const vtkm::IdComponent Dimension = 10;
|
const vtkm::IdComponent Dimension = 10;
|
||||||
|
@ -67,7 +67,7 @@ void TestVertexClustering()
|
|||||||
vtkm::Float32 output_cellvar[] = { 145.f, 134.f, 138.f, 140.f, 149.f, 144.f };
|
vtkm::Float32 output_cellvar[] = { 145.f, 134.f, 138.f, 140.f, 149.f, 144.f };
|
||||||
|
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::CellSetSingleType<> CellSetType;
|
using CellSetType = vtkm::cont::CellSetSingleType<>;
|
||||||
CellSetType cellSet;
|
CellSetType cellSet;
|
||||||
output.GetCellSet(0).CopyTo(cellSet);
|
output.GetCellSet(0).CopyTo(cellSet);
|
||||||
auto cellArray =
|
auto cellArray =
|
||||||
@ -87,7 +87,7 @@ void TestVertexClustering()
|
|||||||
vtkm::cont::printSummary_ArrayHandle(pointvar, std::cerr, true);
|
vtkm::cont::printSummary_ArrayHandle(pointvar, std::cerr, true);
|
||||||
vtkm::cont::printSummary_ArrayHandle(cellvar, std::cerr, true);
|
vtkm::cont::printSummary_ArrayHandle(cellvar, std::cerr, true);
|
||||||
|
|
||||||
typedef vtkm::Vec<vtkm::Float64, 3> PointType;
|
using PointType = vtkm::Vec<vtkm::Float64, 3>;
|
||||||
auto pointArray = output.GetCoordinateSystem(0).GetData();
|
auto pointArray = output.GetCoordinateSystem(0).GetData();
|
||||||
VTKM_TEST_ASSERT(pointArray.GetNumberOfValues() == output_points,
|
VTKM_TEST_ASSERT(pointArray.GetNumberOfValues() == output_points,
|
||||||
"Number of output points mismatch");
|
"Number of output points mismatch");
|
||||||
|
@ -33,7 +33,7 @@ namespace internal
|
|||||||
class VTKM_ALWAYS_EXPORT ArrayPortalUniformPointCoordinates
|
class VTKM_ALWAYS_EXPORT ArrayPortalUniformPointCoordinates
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef vtkm::Vec<vtkm::FloatDefault, 3> ValueType;
|
using ValueType = vtkm::Vec<vtkm::FloatDefault, 3>;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
ArrayPortalUniformPointCoordinates()
|
ArrayPortalUniformPointCoordinates()
|
||||||
|
@ -40,7 +40,7 @@ template <>
|
|||||||
class ConnectivityStructuredInternals<1>
|
class ConnectivityStructuredInternals<1>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef vtkm::Id SchedulingRangeType;
|
using SchedulingRangeType = vtkm::Id;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
void SetPointDimensions(vtkm::Id dimensions) { this->PointDimensions = dimensions; }
|
void SetPointDimensions(vtkm::Id dimensions) { this->PointDimensions = dimensions; }
|
||||||
@ -75,7 +75,7 @@ public:
|
|||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_LINE; }
|
vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_LINE; }
|
||||||
|
|
||||||
typedef vtkm::CellShapeTagLine CellShapeTag;
|
using CellShapeTag = vtkm::CellShapeTagLine;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
vtkm::Vec<vtkm::Id, NUM_POINTS_IN_CELL> GetPointsOfCell(vtkm::Id index) const
|
vtkm::Vec<vtkm::Id, NUM_POINTS_IN_CELL> GetPointsOfCell(vtkm::Id index) const
|
||||||
@ -145,7 +145,7 @@ template <>
|
|||||||
class ConnectivityStructuredInternals<2>
|
class ConnectivityStructuredInternals<2>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef vtkm::Id2 SchedulingRangeType;
|
using SchedulingRangeType = vtkm::Id2;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
void SetPointDimensions(vtkm::Id2 dims) { this->PointDimensions = dims; }
|
void SetPointDimensions(vtkm::Id2 dims) { this->PointDimensions = dims; }
|
||||||
@ -181,7 +181,7 @@ public:
|
|||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_QUAD; }
|
vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_QUAD; }
|
||||||
|
|
||||||
typedef vtkm::CellShapeTagQuad CellShapeTag;
|
using CellShapeTag = vtkm::CellShapeTagQuad;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
vtkm::Vec<vtkm::Id, NUM_POINTS_IN_CELL> GetPointsOfCell(
|
vtkm::Vec<vtkm::Id, NUM_POINTS_IN_CELL> GetPointsOfCell(
|
||||||
@ -303,7 +303,7 @@ template <>
|
|||||||
class ConnectivityStructuredInternals<3>
|
class ConnectivityStructuredInternals<3>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef vtkm::Id3 SchedulingRangeType;
|
using SchedulingRangeType = vtkm::Id3;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
void SetPointDimensions(vtkm::Id3 dims)
|
void SetPointDimensions(vtkm::Id3 dims)
|
||||||
@ -344,7 +344,7 @@ public:
|
|||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_HEXAHEDRON; }
|
vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_HEXAHEDRON; }
|
||||||
|
|
||||||
typedef vtkm::CellShapeTagHexahedron CellShapeTag;
|
using CellShapeTag = vtkm::CellShapeTagHexahedron;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
vtkm::Vec<vtkm::Id, NUM_POINTS_IN_CELL> GetPointsOfCell(const SchedulingRangeType& ijk) const
|
vtkm::Vec<vtkm::Id, NUM_POINTS_IN_CELL> GetPointsOfCell(const SchedulingRangeType& ijk) const
|
||||||
@ -512,12 +512,12 @@ struct ConnectivityStructuredIndexHelper<vtkm::TopologyElementTagPoint,
|
|||||||
vtkm::TopologyElementTagCell,
|
vtkm::TopologyElementTagCell,
|
||||||
Dimension>
|
Dimension>
|
||||||
{
|
{
|
||||||
typedef vtkm::internal::ConnectivityStructuredInternals<Dimension> ConnectivityType;
|
using ConnectivityType = vtkm::internal::ConnectivityStructuredInternals<Dimension>;
|
||||||
typedef typename ConnectivityType::SchedulingRangeType LogicalIndexType;
|
using LogicalIndexType = typename ConnectivityType::SchedulingRangeType;
|
||||||
|
|
||||||
using CellShapeTag = typename ConnectivityType::CellShapeTag;
|
using CellShapeTag = typename ConnectivityType::CellShapeTag;
|
||||||
|
|
||||||
typedef vtkm::Vec<vtkm::Id, ConnectivityType::NUM_POINTS_IN_CELL> IndicesType;
|
using IndicesType = vtkm::Vec<vtkm::Id, ConnectivityType::NUM_POINTS_IN_CELL>;
|
||||||
|
|
||||||
VTKM_EXEC_CONT static vtkm::Id GetNumberOfElements(const ConnectivityType& connectivity)
|
VTKM_EXEC_CONT static vtkm::Id GetNumberOfElements(const ConnectivityType& connectivity)
|
||||||
{
|
{
|
||||||
@ -573,12 +573,12 @@ struct ConnectivityStructuredIndexHelper<vtkm::TopologyElementTagCell,
|
|||||||
vtkm::TopologyElementTagPoint,
|
vtkm::TopologyElementTagPoint,
|
||||||
Dimension>
|
Dimension>
|
||||||
{
|
{
|
||||||
typedef vtkm::internal::ConnectivityStructuredInternals<Dimension> ConnectivityType;
|
using ConnectivityType = vtkm::internal::ConnectivityStructuredInternals<Dimension>;
|
||||||
typedef typename ConnectivityType::SchedulingRangeType LogicalIndexType;
|
using LogicalIndexType = typename ConnectivityType::SchedulingRangeType;
|
||||||
|
|
||||||
using CellShapeTag = vtkm::CellShapeTagVertex;
|
using CellShapeTag = vtkm::CellShapeTagVertex;
|
||||||
|
|
||||||
typedef vtkm::VecVariable<vtkm::Id, ConnectivityType::MAX_CELL_TO_POINT> IndicesType;
|
using IndicesType = vtkm::VecVariable<vtkm::Id, ConnectivityType::MAX_CELL_TO_POINT>;
|
||||||
|
|
||||||
VTKM_EXEC_CONT static vtkm::Id GetNumberOfElements(const ConnectivityType& connectivity)
|
VTKM_EXEC_CONT static vtkm::Id GetNumberOfElements(const ConnectivityType& connectivity)
|
||||||
{
|
{
|
||||||
|
@ -234,7 +234,7 @@ class FunctionInterface
|
|||||||
friend class FunctionInterface;
|
friend class FunctionInterface;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef FunctionSignature Signature;
|
using Signature = FunctionSignature;
|
||||||
|
|
||||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||||
FunctionInterface()
|
FunctionInterface()
|
||||||
@ -251,16 +251,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// the number of parameters as an integral constant
|
// the number of parameters as an integral constant
|
||||||
typedef detail::FunctionSigInfo<FunctionSignature> SigInfo;
|
using SigInfo = detail::FunctionSigInfo<FunctionSignature>;
|
||||||
typedef typename SigInfo::ArityType SignatureArity;
|
using SignatureArity = typename SigInfo::ArityType;
|
||||||
typedef typename SigInfo::ResultType ResultType;
|
using ResultType = typename SigInfo::ResultType;
|
||||||
typedef typename SigInfo::Components ComponentSig;
|
using ComponentSig = typename SigInfo::Components;
|
||||||
typedef typename SigInfo::Parameters ParameterSig;
|
using ParameterSig = typename SigInfo::Parameters;
|
||||||
|
|
||||||
template <vtkm::IdComponent ParameterIndex>
|
template <vtkm::IdComponent ParameterIndex>
|
||||||
struct ParameterType
|
struct ParameterType
|
||||||
{
|
{
|
||||||
typedef typename detail::AtType<ParameterIndex, FunctionSignature>::type type;
|
using type = typename detail::AtType<ParameterIndex, FunctionSignature>::type;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const bool RETURN_VALID = FunctionInterfaceReturnContainer<ResultType>::VALID;
|
static const bool RETURN_VALID = FunctionInterfaceReturnContainer<ResultType>::VALID;
|
||||||
@ -474,7 +474,7 @@ public:
|
|||||||
template <typename NewType>
|
template <typename NewType>
|
||||||
VTKM_CONT typename AppendType<NewType>::type Append(const NewType& newParameter) const
|
VTKM_CONT typename AppendType<NewType>::type Append(const NewType& newParameter) const
|
||||||
{
|
{
|
||||||
typedef typename detail::AppendType<ComponentSig, NewType>::type AppendSignature;
|
using AppendSignature = typename detail::AppendType<ComponentSig, NewType>::type;
|
||||||
|
|
||||||
FunctionInterface<AppendSignature> appendedFuncInterface;
|
FunctionInterface<AppendSignature> appendedFuncInterface;
|
||||||
appendedFuncInterface.Copy(*this);
|
appendedFuncInterface.Copy(*this);
|
||||||
@ -532,8 +532,8 @@ public:
|
|||||||
vtkm::internal::IndexTag<ParameterIndex> = vtkm::internal::IndexTag<ParameterIndex>()) const
|
vtkm::internal::IndexTag<ParameterIndex> = vtkm::internal::IndexTag<ParameterIndex>()) const
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef
|
using ReplaceSigType =
|
||||||
typename detail::ReplaceType<ComponentSig, ParameterIndex, NewType>::type ReplaceSigType;
|
typename detail::ReplaceType<ComponentSig, ParameterIndex, NewType>::type;
|
||||||
FunctionInterface<ReplaceSigType> replacedFuncInterface;
|
FunctionInterface<ReplaceSigType> replacedFuncInterface;
|
||||||
|
|
||||||
detail::FunctionInterfaceMoveParameters<ParameterIndex - 1>::Move(
|
detail::FunctionInterfaceMoveParameters<ParameterIndex - 1>::Move(
|
||||||
@ -549,9 +549,8 @@ public:
|
|||||||
template <typename Transform>
|
template <typename Transform>
|
||||||
struct StaticTransformType
|
struct StaticTransformType
|
||||||
{
|
{
|
||||||
typedef FunctionInterface<
|
using type = FunctionInterface<
|
||||||
typename detail::FunctionInterfaceStaticTransformType<FunctionSignature, Transform>::type>
|
typename detail::FunctionInterfaceStaticTransformType<FunctionSignature, Transform>::type>;
|
||||||
type;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Transforms the \c FunctionInterface based on compile-time
|
/// \brief Transforms the \c FunctionInterface based on compile-time
|
||||||
@ -695,11 +694,11 @@ public:
|
|||||||
VTKM_CONT void DynamicTransformCont(const TransformFunctor& transform,
|
VTKM_CONT void DynamicTransformCont(const TransformFunctor& transform,
|
||||||
const FinishFunctor& finish) const
|
const FinishFunctor& finish) const
|
||||||
{
|
{
|
||||||
typedef detail::FunctionInterfaceDynamicTransformContContinue<FunctionSignature,
|
using ContinueFunctorType =
|
||||||
|
detail::FunctionInterfaceDynamicTransformContContinue<FunctionSignature,
|
||||||
ResultType(),
|
ResultType(),
|
||||||
TransformFunctor,
|
TransformFunctor,
|
||||||
FinishFunctor>
|
FinishFunctor>;
|
||||||
ContinueFunctorType;
|
|
||||||
|
|
||||||
FunctionInterface<ResultType()> emptyInterface;
|
FunctionInterface<ResultType()> emptyInterface;
|
||||||
ContinueFunctorType continueFunctor =
|
ContinueFunctorType continueFunctor =
|
||||||
@ -768,7 +767,7 @@ public:
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
VTKM_CONT void operator()(const T& newParameter) const
|
VTKM_CONT void operator()(const T& newParameter) const
|
||||||
{
|
{
|
||||||
typedef typename FunctionInterface<NewFunction>::ComponentSig NewFSigComp;
|
using NewFSigComp = typename FunctionInterface<NewFunction>::ComponentSig;
|
||||||
|
|
||||||
//Determine if we should do the next transform
|
//Determine if we should do the next transform
|
||||||
using appended = brigand::push_back<NewFSigComp, T>;
|
using appended = brigand::push_back<NewFSigComp, T>;
|
||||||
@ -788,11 +787,10 @@ public:
|
|||||||
template <typename NextFunction>
|
template <typename NextFunction>
|
||||||
void DoNextTransform(vtkm::internal::FunctionInterface<NextFunction>& nextInterface) const
|
void DoNextTransform(vtkm::internal::FunctionInterface<NextFunction>& nextInterface) const
|
||||||
{
|
{
|
||||||
typedef FunctionInterfaceDynamicTransformContContinue<OriginalFunction,
|
using NextContinueType = FunctionInterfaceDynamicTransformContContinue<OriginalFunction,
|
||||||
NextFunction,
|
NextFunction,
|
||||||
TransformFunctor,
|
TransformFunctor,
|
||||||
FinishFunctor>
|
FinishFunctor>;
|
||||||
NextContinueType;
|
|
||||||
NextContinueType nextContinue =
|
NextContinueType nextContinue =
|
||||||
NextContinueType(this->OriginalInterface, nextInterface, this->Transform, this->Finish);
|
NextContinueType(this->OriginalInterface, nextInterface, this->Transform, this->Finish);
|
||||||
static const vtkm::IdComponent Index =
|
static const vtkm::IdComponent Index =
|
||||||
@ -806,11 +804,10 @@ private:
|
|||||||
void DoNextTransform(vtkm::internal::FunctionInterface<NextFunction>& nextInterface,
|
void DoNextTransform(vtkm::internal::FunctionInterface<NextFunction>& nextInterface,
|
||||||
std::true_type) const
|
std::true_type) const
|
||||||
{
|
{
|
||||||
typedef FunctionInterfaceDynamicTransformContContinue<OriginalFunction,
|
using NextContinueType = FunctionInterfaceDynamicTransformContContinue<OriginalFunction,
|
||||||
NextFunction,
|
NextFunction,
|
||||||
TransformFunctor,
|
TransformFunctor,
|
||||||
FinishFunctor>
|
FinishFunctor>;
|
||||||
NextContinueType;
|
|
||||||
NextContinueType nextContinue =
|
NextContinueType nextContinue =
|
||||||
NextContinueType(this->OriginalInterface, nextInterface, this->Transform, this->Finish);
|
NextContinueType(this->OriginalInterface, nextInterface, this->Transform, this->Finish);
|
||||||
static const vtkm::IdComponent Index =
|
static const vtkm::IdComponent Index =
|
||||||
|
@ -35,19 +35,19 @@
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef vtkm::Id Type1;
|
using Type1 = vtkm::Id;
|
||||||
const Type1 Arg1 = 1234;
|
const Type1 Arg1 = 1234;
|
||||||
|
|
||||||
typedef vtkm::Float64 Type2;
|
using Type2 = vtkm::Float64;
|
||||||
const Type2 Arg2 = 5678.125;
|
const Type2 Arg2 = 5678.125;
|
||||||
|
|
||||||
typedef std::string Type3;
|
using Type3 = std::string;
|
||||||
const Type3 Arg3("Third argument");
|
const Type3 Arg3("Third argument");
|
||||||
|
|
||||||
typedef vtkm::Vec<vtkm::Float32, 3> Type4;
|
using Type4 = vtkm::Vec<vtkm::Float32, 3>;
|
||||||
const Type4 Arg4(1.2f, 3.4f, 5.6f);
|
const Type4 Arg4(1.2f, 3.4f, 5.6f);
|
||||||
|
|
||||||
typedef vtkm::Id3 Type5;
|
using Type5 = vtkm::Id3;
|
||||||
const Type5 Arg5(4, 5, 6);
|
const Type5 Arg5(4, 5, 6);
|
||||||
|
|
||||||
struct ThreeArgFunctor
|
struct ThreeArgFunctor
|
||||||
@ -79,7 +79,7 @@ struct GetReferenceFunctor
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
struct ReturnType
|
struct ReturnType
|
||||||
{
|
{
|
||||||
typedef const typename std::remove_reference<T>::type* type;
|
using type = const typename std::remove_reference<T>::type*;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@ -94,7 +94,7 @@ struct PointerTransform
|
|||||||
template <typename T, vtkm::IdComponent Index>
|
template <typename T, vtkm::IdComponent Index>
|
||||||
struct ReturnType
|
struct ReturnType
|
||||||
{
|
{
|
||||||
typedef const T* type;
|
using type = const T*;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, typename IndexTag>
|
template <typename T, typename IndexTag>
|
||||||
@ -405,7 +405,7 @@ void TestStaticTransform()
|
|||||||
OriginalType funcInterface = vtkm::internal::make_FunctionInterface<void>(Arg1, Arg2, Arg3);
|
OriginalType funcInterface = vtkm::internal::make_FunctionInterface<void>(Arg1, Arg2, Arg3);
|
||||||
|
|
||||||
std::cout << "Transform with reported type." << std::endl;
|
std::cout << "Transform with reported type." << std::endl;
|
||||||
typedef OriginalType::StaticTransformType<PointerTransform>::type ReportedType;
|
using ReportedType = OriginalType::StaticTransformType<PointerTransform>::type;
|
||||||
ReportedType funcInterfaceTransform1 = funcInterface.StaticTransformCont(PointerTransform());
|
ReportedType funcInterfaceTransform1 = funcInterface.StaticTransformCont(PointerTransform());
|
||||||
funcInterfaceTransform1.InvokeCont(ThreePointerArgFunctor());
|
funcInterfaceTransform1.InvokeCont(ThreePointerArgFunctor());
|
||||||
funcInterfaceTransform1 = funcInterface.StaticTransformExec(PointerTransform());
|
funcInterfaceTransform1 = funcInterface.StaticTransformExec(PointerTransform());
|
||||||
|
@ -131,7 +131,7 @@ private:
|
|||||||
template <typename ValueType>
|
template <typename ValueType>
|
||||||
class TransferToOpenGL<ValueType, vtkm::cont::DeviceAdapterTagCuda>
|
class TransferToOpenGL<ValueType, vtkm::cont::DeviceAdapterTagCuda>
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::DeviceAdapterTagCuda DeviceAdapterTag;
|
using DeviceAdapterTag = vtkm::cont::DeviceAdapterTagCuda;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VTKM_CONT explicit TransferToOpenGL(BufferState& state)
|
VTKM_CONT explicit TransferToOpenGL(BufferState& state)
|
||||||
|
@ -75,7 +75,7 @@ static inline VTKM_CONT GLenum BufferTypePicker(vtkm::UInt64)
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
static inline VTKM_CONT GLenum BufferTypePicker(T)
|
static inline VTKM_CONT GLenum BufferTypePicker(T)
|
||||||
{
|
{
|
||||||
typedef vtkm::TypeTraits<T> Traits;
|
using Traits = vtkm::TypeTraits<T>;
|
||||||
return detail::BufferTypePickerImpl(typename Traits::NumericTag(),
|
return detail::BufferTypePickerImpl(typename Traits::NumericTag(),
|
||||||
typename Traits::DimensionalityTag());
|
typename Traits::DimensionalityTag());
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,8 @@ void TestBufferTypePicker()
|
|||||||
{
|
{
|
||||||
//just verify that certain types match
|
//just verify that certain types match
|
||||||
GLenum type;
|
GLenum type;
|
||||||
typedef unsigned int vtkmUint;
|
using vtkmUint = unsigned int;
|
||||||
typedef vtkm::FloatDefault T;
|
using T = vtkm::FloatDefault;
|
||||||
|
|
||||||
type = vtkm::interop::internal::BufferTypePicker(vtkm::Id());
|
type = vtkm::interop::internal::BufferTypePicker(vtkm::Id());
|
||||||
VTKM_TEST_ASSERT(type == GL_ELEMENT_ARRAY_BUFFER, "Bad OpenGL Buffer Type");
|
VTKM_TEST_ASSERT(type == GL_ELEMENT_ARRAY_BUFFER, "Bad OpenGL Buffer Type");
|
||||||
|
@ -53,7 +53,7 @@ private:
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
static vtkm::cont::ArrayHandle<T, StorageTag> FillArray(std::vector<T>& data, std::size_t length)
|
static vtkm::cont::ArrayHandle<T, StorageTag> FillArray(std::vector<T>& data, std::size_t length)
|
||||||
{
|
{
|
||||||
typedef typename std::vector<T>::iterator iterator;
|
using iterator = typename std::vector<T>::iterator;
|
||||||
//make sure the data array is exactly the right length
|
//make sure the data array is exactly the right length
|
||||||
data.clear();
|
data.clear();
|
||||||
data.resize(length);
|
data.resize(length);
|
||||||
|
@ -332,8 +332,8 @@ struct TryScalarFieldTests
|
|||||||
template <typename VectorType>
|
template <typename VectorType>
|
||||||
struct ScalarVectorFieldTests : public vtkm::exec::FunctorBase
|
struct ScalarVectorFieldTests : public vtkm::exec::FunctorBase
|
||||||
{
|
{
|
||||||
typedef vtkm::VecTraits<VectorType> Traits;
|
using Traits = vtkm::VecTraits<VectorType>;
|
||||||
typedef typename Traits::ComponentType ComponentType;
|
using ComponentType = typename Traits::ComponentType;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
NUM_COMPONENTS = Traits::NUM_COMPONENTS
|
NUM_COMPONENTS = Traits::NUM_COMPONENTS
|
||||||
@ -696,7 +696,7 @@ struct AllTypesTests : public vtkm::exec::FunctorBase
|
|||||||
VTKM_MATH_ASSERT(test_equal(vtkm::Max(low, high), high), "Wrong max.");
|
VTKM_MATH_ASSERT(test_equal(vtkm::Max(low, high), high), "Wrong max.");
|
||||||
VTKM_MATH_ASSERT(test_equal(vtkm::Max(high, low), high), "Wrong max.");
|
VTKM_MATH_ASSERT(test_equal(vtkm::Max(high, low), high), "Wrong max.");
|
||||||
|
|
||||||
typedef vtkm::VecTraits<T> Traits;
|
using Traits = vtkm::VecTraits<T>;
|
||||||
T mixed1 = low;
|
T mixed1 = low;
|
||||||
T mixed2 = high;
|
T mixed2 = high;
|
||||||
Traits::SetComponent(mixed1, 0, Traits::GetComponent(high, 0));
|
Traits::SetComponent(mixed1, 0, Traits::GetComponent(high, 0));
|
||||||
|
@ -27,7 +27,7 @@ namespace
|
|||||||
|
|
||||||
void TestBounds()
|
void TestBounds()
|
||||||
{
|
{
|
||||||
typedef vtkm::Vec<vtkm::Float64, 3> Vec3;
|
using Vec3 = vtkm::Vec<vtkm::Float64, 3>;
|
||||||
|
|
||||||
std::cout << "Empty bounds." << std::endl;
|
std::cout << "Empty bounds." << std::endl;
|
||||||
vtkm::Bounds emptyBounds;
|
vtkm::Bounds emptyBounds;
|
||||||
|
@ -33,7 +33,7 @@ vtkm::Matrix<T, NumRow, NumCol> TestValue(vtkm::Id index, const vtkm::Matrix<T,
|
|||||||
vtkm::Matrix<T, NumRow, NumCol> value;
|
vtkm::Matrix<T, NumRow, NumCol> value;
|
||||||
for (vtkm::IdComponent rowIndex = 0; rowIndex < NumRow; rowIndex++)
|
for (vtkm::IdComponent rowIndex = 0; rowIndex < NumRow; rowIndex++)
|
||||||
{
|
{
|
||||||
typedef vtkm::Vec<T, NumCol> RowType;
|
using RowType = vtkm::Vec<T, NumCol>;
|
||||||
RowType row = TestValue(index, RowType()) +
|
RowType row = TestValue(index, RowType()) +
|
||||||
RowType(static_cast<typename RowType::ComponentType>(10 * rowIndex));
|
RowType(static_cast<typename RowType::ComponentType>(10 * rowIndex));
|
||||||
vtkm::MatrixSetRow(value, rowIndex, row);
|
vtkm::MatrixSetRow(value, rowIndex, row);
|
||||||
@ -53,8 +53,8 @@ struct MatrixTest
|
|||||||
{
|
{
|
||||||
static const vtkm::IdComponent NUM_ROWS = NumRow;
|
static const vtkm::IdComponent NUM_ROWS = NumRow;
|
||||||
static const vtkm::IdComponent NUM_COLS = NumCol;
|
static const vtkm::IdComponent NUM_COLS = NumCol;
|
||||||
typedef vtkm::Matrix<T, NUM_ROWS, NUM_COLS> MatrixType;
|
using MatrixType = vtkm::Matrix<T, NUM_ROWS, NUM_COLS>;
|
||||||
typedef typename MatrixType::ComponentType ComponentType;
|
using ComponentType = typename MatrixType::ComponentType;
|
||||||
|
|
||||||
static void BasicCreation()
|
static void BasicCreation()
|
||||||
{
|
{
|
||||||
@ -94,8 +94,8 @@ struct MatrixTest
|
|||||||
|
|
||||||
static void RowColAccessors()
|
static void RowColAccessors()
|
||||||
{
|
{
|
||||||
typedef vtkm::Vec<T, NUM_ROWS> ColumnType;
|
using ColumnType = vtkm::Vec<T, NUM_ROWS>;
|
||||||
typedef vtkm::Vec<T, NUM_COLS> RowType;
|
using RowType = vtkm::Vec<T, NUM_COLS>;
|
||||||
const MatrixType const_matrix = TestValue(0, MatrixType());
|
const MatrixType const_matrix = TestValue(0, MatrixType());
|
||||||
MatrixType matrix;
|
MatrixType matrix;
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ template <typename T, vtkm::IdComponent Size>
|
|||||||
struct SquareMatrixTest
|
struct SquareMatrixTest
|
||||||
{
|
{
|
||||||
static const vtkm::IdComponent SIZE = Size;
|
static const vtkm::IdComponent SIZE = Size;
|
||||||
typedef vtkm::Matrix<T, Size, Size> MatrixType;
|
using MatrixType = vtkm::Matrix<T, Size, Size>;
|
||||||
|
|
||||||
static void CheckMatrixSize()
|
static void CheckMatrixSize()
|
||||||
{
|
{
|
||||||
@ -582,7 +582,7 @@ struct VectorMultFunctor
|
|||||||
// This is mostly to make sure the compile can convert from Tuples
|
// This is mostly to make sure the compile can convert from Tuples
|
||||||
// to vectors.
|
// to vectors.
|
||||||
const int SIZE = vtkm::VecTraits<VectorType>::NUM_COMPONENTS;
|
const int SIZE = vtkm::VecTraits<VectorType>::NUM_COMPONENTS;
|
||||||
typedef typename vtkm::VecTraits<VectorType>::ComponentType ComponentType;
|
using ComponentType = typename vtkm::VecTraits<VectorType>::ComponentType;
|
||||||
|
|
||||||
vtkm::Matrix<ComponentType, SIZE, SIZE> matrix(0);
|
vtkm::Matrix<ComponentType, SIZE, SIZE> matrix(0);
|
||||||
VectorType inVec;
|
VectorType inVec;
|
||||||
|
@ -36,7 +36,7 @@ namespace
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
struct EvaluateFunctions
|
struct EvaluateFunctions
|
||||||
{
|
{
|
||||||
typedef vtkm::Vec<T, 3> Vector3;
|
using Vector3 = vtkm::Vec<T, 3>;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
Vector3 operator()(Vector3 x) const
|
Vector3 operator()(Vector3 x) const
|
||||||
@ -51,8 +51,8 @@ struct EvaluateFunctions
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
struct EvaluateJacobian
|
struct EvaluateJacobian
|
||||||
{
|
{
|
||||||
typedef vtkm::Vec<T, 3> Vector3;
|
using Vector3 = vtkm::Vec<T, 3>;
|
||||||
typedef vtkm::Matrix<T, 3, 3> Matrix3x3;
|
using Matrix3x3 = vtkm::Matrix<T, 3, 3>;
|
||||||
|
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
Matrix3x3 operator()(Vector3 x) const
|
Matrix3x3 operator()(Vector3 x) const
|
||||||
@ -76,7 +76,7 @@ void TestNewtonsMethodTemplate()
|
|||||||
{
|
{
|
||||||
std::cout << "Testing Newton's Method." << std::endl;
|
std::cout << "Testing Newton's Method." << std::endl;
|
||||||
|
|
||||||
typedef vtkm::Vec<T, 3> Vector3;
|
using Vector3 = vtkm::Vec<T, 3>;
|
||||||
|
|
||||||
Vector3 desiredOutput(1, 1, 1);
|
Vector3 desiredOutput(1, 1, 1);
|
||||||
Vector3 expected1(2.0f / 3.0f, -1.0f / 3.0f, -2.0f / 3.0f);
|
Vector3 expected1(2.0f / 3.0f, -1.0f / 3.0f, -2.0f / 3.0f);
|
||||||
|
@ -43,8 +43,8 @@ struct TransformTests
|
|||||||
|
|
||||||
T RandomNum() { return this->RandomDistribution(g_RandomGenerator); }
|
T RandomNum() { return this->RandomDistribution(g_RandomGenerator); }
|
||||||
|
|
||||||
typedef vtkm::Vec<T, 3> Vec;
|
using Vec = vtkm::Vec<T, 3>;
|
||||||
typedef vtkm::Matrix<T, 4, 4> Transform;
|
using Transform = vtkm::Matrix<T, 4, 4>;
|
||||||
|
|
||||||
Vec RandomVector()
|
Vec RandomVector()
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ namespace
|
|||||||
|
|
||||||
class TypeSet
|
class TypeSet
|
||||||
{
|
{
|
||||||
typedef std::set<std::string> NameSetType;
|
using NameSetType = std::set<std::string>;
|
||||||
NameSetType NameSet;
|
NameSetType NameSet;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -58,7 +58,7 @@ private:
|
|||||||
void TestNumeric(T, vtkm::TypeTraitsIntegerTag) const
|
void TestNumeric(T, vtkm::TypeTraitsIntegerTag) const
|
||||||
{
|
{
|
||||||
std::cout << " integer" << std::endl;
|
std::cout << " integer" << std::endl;
|
||||||
typedef typename vtkm::VecTraits<T>::ComponentType VT;
|
using VT = typename vtkm::VecTraits<T>::ComponentType;
|
||||||
VT value = VT(2.001);
|
VT value = VT(2.001);
|
||||||
VTKM_TEST_ASSERT(value == 2, "Integer does not round to integer.");
|
VTKM_TEST_ASSERT(value == 2, "Integer does not round to integer.");
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ private:
|
|||||||
void TestNumeric(T, vtkm::TypeTraitsRealTag) const
|
void TestNumeric(T, vtkm::TypeTraitsRealTag) const
|
||||||
{
|
{
|
||||||
std::cout << " real" << std::endl;
|
std::cout << " real" << std::endl;
|
||||||
typedef typename vtkm::VecTraits<T>::ComponentType VT;
|
using VT = typename vtkm::VecTraits<T>::ComponentType;
|
||||||
VT value = VT(2.001);
|
VT value = VT(2.001);
|
||||||
VTKM_TEST_ASSERT(test_equal(float(value), float(2.001)),
|
VTKM_TEST_ASSERT(test_equal(float(value), float(2.001)),
|
||||||
"Real does not hold floaing point number.");
|
"Real does not hold floaing point number.");
|
||||||
|
@ -45,7 +45,7 @@ void CheckTypeSizes()
|
|||||||
template <typename ComponentType, vtkm::IdComponent Size>
|
template <typename ComponentType, vtkm::IdComponent Size>
|
||||||
void DoGeneralVecTypeTestNegate(const vtkm::Vec<ComponentType, Size>&)
|
void DoGeneralVecTypeTestNegate(const vtkm::Vec<ComponentType, Size>&)
|
||||||
{
|
{
|
||||||
typedef vtkm::Vec<ComponentType, Size> VectorType;
|
using VectorType = vtkm::Vec<ComponentType, Size>;
|
||||||
for (vtkm::Id valueIndex = 0; valueIndex < 10; valueIndex++)
|
for (vtkm::Id valueIndex = 0; valueIndex < 10; valueIndex++)
|
||||||
{
|
{
|
||||||
VectorType original = TestValue(valueIndex, VectorType());
|
VectorType original = TestValue(valueIndex, VectorType());
|
||||||
@ -321,7 +321,7 @@ void GeneralVecTypeTest(const vtkm::Vec<ComponentType, Size>&)
|
|||||||
{
|
{
|
||||||
std::cout << "Checking general Vec functionality." << std::endl;
|
std::cout << "Checking general Vec functionality." << std::endl;
|
||||||
|
|
||||||
typedef vtkm::Vec<ComponentType, Size> T;
|
using T = vtkm::Vec<ComponentType, Size>;
|
||||||
|
|
||||||
// Vector types should preserve the trivial properties of their components.
|
// Vector types should preserve the trivial properties of their components.
|
||||||
// This insures that algorithms like std::copy will optimize fully.
|
// This insures that algorithms like std::copy will optimize fully.
|
||||||
@ -445,7 +445,7 @@ void TypeTest(const vtkm::Vec<ComponentType, Size>&)
|
|||||||
template <typename Scalar>
|
template <typename Scalar>
|
||||||
void TypeTest(const vtkm::Vec<Scalar, 2>&)
|
void TypeTest(const vtkm::Vec<Scalar, 2>&)
|
||||||
{
|
{
|
||||||
typedef vtkm::Vec<Scalar, 2> Vector;
|
using Vector = vtkm::Vec<Scalar, 2>;
|
||||||
|
|
||||||
GeneralVecTypeTest(Vector());
|
GeneralVecTypeTest(Vector());
|
||||||
|
|
||||||
@ -506,7 +506,7 @@ void TypeTest(const vtkm::Vec<Scalar, 2>&)
|
|||||||
template <typename Scalar>
|
template <typename Scalar>
|
||||||
void TypeTest(const vtkm::Vec<Scalar, 3>&)
|
void TypeTest(const vtkm::Vec<Scalar, 3>&)
|
||||||
{
|
{
|
||||||
typedef vtkm::Vec<Scalar, 3> Vector;
|
using Vector = vtkm::Vec<Scalar, 3>;
|
||||||
|
|
||||||
GeneralVecTypeTest(Vector());
|
GeneralVecTypeTest(Vector());
|
||||||
|
|
||||||
@ -568,7 +568,7 @@ void TypeTest(const vtkm::Vec<Scalar, 3>&)
|
|||||||
template <typename Scalar>
|
template <typename Scalar>
|
||||||
void TypeTest(const vtkm::Vec<Scalar, 4>&)
|
void TypeTest(const vtkm::Vec<Scalar, 4>&)
|
||||||
{
|
{
|
||||||
typedef vtkm::Vec<Scalar, 4> Vector;
|
using Vector = vtkm::Vec<Scalar, 4>;
|
||||||
|
|
||||||
GeneralVecTypeTest(Vector());
|
GeneralVecTypeTest(Vector());
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef vtkm::Vec<vtkm::FloatDefault, 3> Vec3;
|
using Vec3 = vtkm::Vec<vtkm::FloatDefault, 3>;
|
||||||
|
|
||||||
static const Vec3 g_Origin = Vec3(1.0f, 2.0f, 3.0f);
|
static const Vec3 g_Origin = Vec3(1.0f, 2.0f, 3.0f);
|
||||||
static const Vec3 g_Spacing = Vec3(4.0f, 5.0f, 6.0f);
|
static const Vec3 g_Spacing = Vec3(4.0f, 5.0f, 6.0f);
|
||||||
@ -79,9 +79,9 @@ template <vtkm::IdComponent NumDimensions>
|
|||||||
void TryVecAxisAlignedPointCoordinates(
|
void TryVecAxisAlignedPointCoordinates(
|
||||||
const vtkm::VecAxisAlignedPointCoordinates<NumDimensions>& coords)
|
const vtkm::VecAxisAlignedPointCoordinates<NumDimensions>& coords)
|
||||||
{
|
{
|
||||||
typedef vtkm::VecAxisAlignedPointCoordinates<NumDimensions> VecCoordsType;
|
using VecCoordsType = vtkm::VecAxisAlignedPointCoordinates<NumDimensions>;
|
||||||
typedef vtkm::TypeTraits<VecCoordsType> TTraits;
|
using TTraits = vtkm::TypeTraits<VecCoordsType>;
|
||||||
typedef vtkm::VecTraits<VecCoordsType> VTraits;
|
using VTraits = vtkm::VecTraits<VecCoordsType>;
|
||||||
|
|
||||||
std::cout << "Check traits tags." << std::endl;
|
std::cout << "Check traits tags." << std::endl;
|
||||||
CheckNumericTag(typename TTraits::NumericTag());
|
CheckNumericTag(typename TTraits::NumericTag());
|
||||||
|
@ -37,7 +37,7 @@ template <typename T>
|
|||||||
class TestPortal
|
class TestPortal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef T ValueType;
|
using ValueType = T;
|
||||||
|
|
||||||
VTKM_EXEC
|
VTKM_EXEC
|
||||||
vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; }
|
vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; }
|
||||||
@ -51,10 +51,10 @@ struct VecFromPortalTestFunctor
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
void operator()(T) const
|
void operator()(T) const
|
||||||
{
|
{
|
||||||
typedef TestPortal<T> PortalType;
|
using PortalType = TestPortal<T>;
|
||||||
typedef vtkm::VecFromPortal<PortalType> VecType;
|
using VecType = vtkm::VecFromPortal<PortalType>;
|
||||||
typedef vtkm::TypeTraits<VecType> TTraits;
|
using TTraits = vtkm::TypeTraits<VecType>;
|
||||||
typedef vtkm::VecTraits<VecType> VTraits;
|
using VTraits = vtkm::VecTraits<VecType>;
|
||||||
|
|
||||||
std::cout << "Checking VecFromPortal traits" << std::endl;
|
std::cout << "Checking VecFromPortal traits" << std::endl;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ template <typename T>
|
|||||||
class TestPortal
|
class TestPortal
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef T ValueType;
|
using ValueType = T;
|
||||||
|
|
||||||
VTKM_EXEC
|
VTKM_EXEC
|
||||||
vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; }
|
vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; }
|
||||||
@ -53,11 +53,11 @@ struct VecFromPortalPermuteTestFunctor
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
void operator()(T) const
|
void operator()(T) const
|
||||||
{
|
{
|
||||||
typedef TestPortal<T> PortalType;
|
using PortalType = TestPortal<T>;
|
||||||
typedef vtkm::VecVariable<vtkm::Id, ARRAY_SIZE> IndexVecType;
|
using IndexVecType = vtkm::VecVariable<vtkm::Id, ARRAY_SIZE>;
|
||||||
typedef vtkm::VecFromPortalPermute<IndexVecType, PortalType> VecType;
|
using VecType = vtkm::VecFromPortalPermute<IndexVecType, PortalType>;
|
||||||
typedef vtkm::TypeTraits<VecType> TTraits;
|
using TTraits = vtkm::TypeTraits<VecType>;
|
||||||
typedef vtkm::VecTraits<VecType> VTraits;
|
using VTraits = vtkm::VecTraits<VecType>;
|
||||||
|
|
||||||
std::cout << "Checking VecFromPortal traits" << std::endl;
|
std::cout << "Checking VecFromPortal traits" << std::endl;
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ struct TestVecTypeFunctor
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
void operator()(const T&) const
|
void operator()(const T&) const
|
||||||
{
|
{
|
||||||
typedef vtkm::VecTraits<T> Traits;
|
using Traits = vtkm::VecTraits<T>;
|
||||||
typedef typename Traits::ComponentType ComponentType;
|
using ComponentType = typename Traits::ComponentType;
|
||||||
VTKM_TEST_ASSERT(Traits::NUM_COMPONENTS <= MAX_VECTOR_SIZE,
|
VTKM_TEST_ASSERT(Traits::NUM_COMPONENTS <= MAX_VECTOR_SIZE,
|
||||||
"Need to update test for larger vectors.");
|
"Need to update test for larger vectors.");
|
||||||
T inVector;
|
T inVector;
|
||||||
|
@ -63,10 +63,10 @@ struct VecVariableTestFunctor
|
|||||||
void operator()(T) const
|
void operator()(T) const
|
||||||
{
|
{
|
||||||
static const vtkm::IdComponent SIZE = 5;
|
static const vtkm::IdComponent SIZE = 5;
|
||||||
typedef vtkm::Vec<T, SIZE> VecType;
|
using VecType = vtkm::Vec<T, SIZE>;
|
||||||
typedef vtkm::VecVariable<T, SIZE> VecVariableType;
|
using VecVariableType = vtkm::VecVariable<T, SIZE>;
|
||||||
typedef vtkm::TypeTraits<VecVariableType> TTraits;
|
using TTraits = vtkm::TypeTraits<VecVariableType>;
|
||||||
typedef vtkm::VecTraits<VecVariableType> VTraits;
|
using VTraits = vtkm::VecTraits<VecVariableType>;
|
||||||
|
|
||||||
std::cout << "Check NumericTag." << std::endl;
|
std::cout << "Check NumericTag." << std::endl;
|
||||||
this->CheckNumericTag(typename TTraits::NumericTag(),
|
this->CheckNumericTag(typename TTraits::NumericTag(),
|
||||||
|
@ -38,7 +38,7 @@ namespace internal
|
|||||||
template <typename VectorType>
|
template <typename VectorType>
|
||||||
typename vtkm::VecTraits<VectorType>::ComponentType MyMag(const VectorType& vt)
|
typename vtkm::VecTraits<VectorType>::ComponentType MyMag(const VectorType& vt)
|
||||||
{
|
{
|
||||||
typedef vtkm::VecTraits<VectorType> Traits;
|
using Traits = vtkm::VecTraits<VectorType>;
|
||||||
double total = 0.0;
|
double total = 0.0;
|
||||||
for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; ++index)
|
for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; ++index)
|
||||||
{
|
{
|
||||||
@ -50,7 +50,7 @@ typename vtkm::VecTraits<VectorType>::ComponentType MyMag(const VectorType& vt)
|
|||||||
template <typename VectorType>
|
template <typename VectorType>
|
||||||
VectorType MyNormal(const VectorType& vt)
|
VectorType MyNormal(const VectorType& vt)
|
||||||
{
|
{
|
||||||
typedef vtkm::VecTraits<VectorType> Traits;
|
using Traits = vtkm::VecTraits<VectorType>;
|
||||||
typename Traits::ComponentType mag = internal::MyMag(vt);
|
typename Traits::ComponentType mag = internal::MyMag(vt);
|
||||||
VectorType temp = vt;
|
VectorType temp = vt;
|
||||||
for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; ++index)
|
for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; ++index)
|
||||||
@ -70,7 +70,7 @@ T MyLerp(const T& a, const T& b, const W& w)
|
|||||||
template <typename VectorType>
|
template <typename VectorType>
|
||||||
void TestVector(const VectorType& vector)
|
void TestVector(const VectorType& vector)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::VecTraits<VectorType>::ComponentType ComponentType;
|
using ComponentType = typename vtkm::VecTraits<VectorType>::ComponentType;
|
||||||
|
|
||||||
std::cout << "Testing " << vector << std::endl;
|
std::cout << "Testing " << vector << std::endl;
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ void TestCross(const vtkm::Vec<T, 3>& x, const vtkm::Vec<T, 3>& y)
|
|||||||
{
|
{
|
||||||
std::cout << "Testing " << x << " x " << y << std::endl;
|
std::cout << "Testing " << x << " x " << y << std::endl;
|
||||||
|
|
||||||
typedef vtkm::Vec<T, 3> Vec3;
|
using Vec3 = vtkm::Vec<T, 3>;
|
||||||
Vec3 cross = vtkm::Cross(x, y);
|
Vec3 cross = vtkm::Cross(x, y);
|
||||||
|
|
||||||
std::cout << " = " << cross << std::endl;
|
std::cout << " = " << cross << std::endl;
|
||||||
@ -163,9 +163,9 @@ struct TestLinearFunctor
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
void operator()(const T&) const
|
void operator()(const T&) const
|
||||||
{
|
{
|
||||||
typedef vtkm::VecTraits<T> Traits;
|
using Traits = vtkm::VecTraits<T>;
|
||||||
const vtkm::IdComponent NUM_COMPONENTS = Traits::NUM_COMPONENTS;
|
const vtkm::IdComponent NUM_COMPONENTS = Traits::NUM_COMPONENTS;
|
||||||
typedef typename Traits::ComponentType ComponentType;
|
using ComponentType = typename Traits::ComponentType;
|
||||||
|
|
||||||
T zeroVector = T(ComponentType(0));
|
T zeroVector = T(ComponentType(0));
|
||||||
T normalizedVector = T(vtkm::RSqrt(ComponentType(NUM_COMPONENTS)));
|
T normalizedVector = T(vtkm::RSqrt(ComponentType(NUM_COMPONENTS)));
|
||||||
|
@ -109,7 +109,7 @@ struct AverageByKey
|
|||||||
template <class ValueType>
|
template <class ValueType>
|
||||||
VTKM_EXEC void operator()(const ValueType& v, const vtkm::Id& count, ValueType& vout) const
|
VTKM_EXEC void operator()(const ValueType& v, const vtkm::Id& count, ValueType& vout) const
|
||||||
{
|
{
|
||||||
typedef typename VecTraits<ValueType>::ComponentType ComponentType;
|
using ComponentType = typename VecTraits<ValueType>::ComponentType;
|
||||||
vout = v * ComponentType(1. / static_cast<double>(count));
|
vout = v * ComponentType(1. / static_cast<double>(count));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,10 +143,10 @@ struct AverageByKey
|
|||||||
vtkm::cont::ArrayHandle<ValueType, ValueOutStorage>& outputValueArray,
|
vtkm::cont::ArrayHandle<ValueType, ValueOutStorage>& outputValueArray,
|
||||||
DeviceAdapter)
|
DeviceAdapter)
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> Algorithm;
|
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
typedef vtkm::cont::ArrayHandle<ValueType, ValueInStorage> ValueInArray;
|
using ValueInArray = vtkm::cont::ArrayHandle<ValueType, ValueInStorage>;
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::Id> IdArray;
|
using IdArray = vtkm::cont::ArrayHandle<vtkm::Id>;
|
||||||
typedef vtkm::cont::ArrayHandle<ValueType> ValueArray;
|
using ValueArray = vtkm::cont::ArrayHandle<ValueType>;
|
||||||
|
|
||||||
// sort the indexed array
|
// sort the indexed array
|
||||||
vtkm::cont::ArrayHandleIndex indexArray(keyArray.GetNumberOfValues());
|
vtkm::cont::ArrayHandleIndex indexArray(keyArray.GetNumberOfValues());
|
||||||
@ -158,12 +158,12 @@ struct AverageByKey
|
|||||||
Algorithm::SortByKey(keyArraySorted, indexArraySorted, vtkm::SortLess());
|
Algorithm::SortByKey(keyArraySorted, indexArraySorted, vtkm::SortLess());
|
||||||
|
|
||||||
// generate permultation array based on the indexes
|
// generate permultation array based on the indexes
|
||||||
typedef vtkm::cont::ArrayHandlePermutation<IdArray, ValueInArray> PermutatedValueArray;
|
using PermutatedValueArray = vtkm::cont::ArrayHandlePermutation<IdArray, ValueInArray>;
|
||||||
PermutatedValueArray valueArraySorted =
|
PermutatedValueArray valueArraySorted =
|
||||||
vtkm::cont::make_ArrayHandlePermutation(indexArraySorted, valueArray);
|
vtkm::cont::make_ArrayHandlePermutation(indexArraySorted, valueArray);
|
||||||
|
|
||||||
// reduce both sumArray and countArray by key
|
// reduce both sumArray and countArray by key
|
||||||
typedef vtkm::cont::ArrayHandleConstant<vtkm::Id> ConstIdArray;
|
using ConstIdArray = vtkm::cont::ArrayHandleConstant<vtkm::Id>;
|
||||||
ConstIdArray constOneArray(1, valueArray.GetNumberOfValues());
|
ConstIdArray constOneArray(1, valueArray.GetNumberOfValues());
|
||||||
IdArray countArray;
|
IdArray countArray;
|
||||||
ValueArray sumArray;
|
ValueArray sumArray;
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
FieldInPoint<> inPoints,
|
FieldInPoint<> inPoints,
|
||||||
FieldOutCell<> outCells);
|
FieldOutCell<> outCells);
|
||||||
typedef void ExecutionSignature(PointCount, _2, _3);
|
typedef void ExecutionSignature(PointCount, _2, _3);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
template <typename PointValueVecType, typename OutType>
|
template <typename PointValueVecType, typename OutType>
|
||||||
VTKM_EXEC void operator()(const vtkm::IdComponent& numPoints,
|
VTKM_EXEC void operator()(const vtkm::IdComponent& numPoints,
|
||||||
|
@ -70,15 +70,14 @@ template <typename DeviceAdapter>
|
|||||||
class ExecutionConnectivityExplicit : vtkm::exec::ExecutionObjectBase
|
class ExecutionConnectivityExplicit : vtkm::exec::ExecutionObjectBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef
|
using UInt8Portal =
|
||||||
typename vtkm::cont::ArrayHandle<vtkm::UInt8>::template ExecutionTypes<DeviceAdapter>::Portal
|
typename vtkm::cont::ArrayHandle<vtkm::UInt8>::template ExecutionTypes<DeviceAdapter>::Portal;
|
||||||
UInt8Portal;
|
|
||||||
|
|
||||||
typedef typename vtkm::cont::ArrayHandle<vtkm::IdComponent>::template ExecutionTypes<
|
using IdComponentPortal = typename vtkm::cont::ArrayHandle<
|
||||||
DeviceAdapter>::Portal IdComponentPortal;
|
vtkm::IdComponent>::template ExecutionTypes<DeviceAdapter>::Portal;
|
||||||
|
|
||||||
typedef typename vtkm::cont::ArrayHandle<vtkm::Id>::template ExecutionTypes<DeviceAdapter>::Portal
|
using IdPortal =
|
||||||
IdPortal;
|
typename vtkm::cont::ArrayHandle<vtkm::Id>::template ExecutionTypes<DeviceAdapter>::Portal;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
@ -187,7 +186,7 @@ public:
|
|||||||
template <typename DeviceAdapter>
|
template <typename DeviceAdapter>
|
||||||
class ComputeStats : public vtkm::worklet::WorkletMapPointToCell
|
class ComputeStats : public vtkm::worklet::WorkletMapPointToCell
|
||||||
{
|
{
|
||||||
typedef internal::ClipTables::DevicePortal<DeviceAdapter> ClipTablesPortal;
|
using ClipTablesPortal = internal::ClipTables::DevicePortal<DeviceAdapter>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef void ControlSignature(CellSetIn cellset,
|
typedef void ControlSignature(CellSetIn cellset,
|
||||||
@ -250,7 +249,7 @@ public:
|
|||||||
template <typename DeviceAdapter>
|
template <typename DeviceAdapter>
|
||||||
class GenerateCellSet : public vtkm::worklet::WorkletMapPointToCell
|
class GenerateCellSet : public vtkm::worklet::WorkletMapPointToCell
|
||||||
{
|
{
|
||||||
typedef internal::ClipTables::DevicePortal<DeviceAdapter> ClipTablesPortal;
|
using ClipTablesPortal = internal::ClipTables::DevicePortal<DeviceAdapter>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
struct EdgeInterp : vtkm::ListTagBase<EdgeInterpolation>
|
struct EdgeInterp : vtkm::ListTagBase<EdgeInterpolation>
|
||||||
@ -364,13 +363,12 @@ public:
|
|||||||
template <typename DeviceAdapter>
|
template <typename DeviceAdapter>
|
||||||
class AmendConnectivity : public vtkm::exec::FunctorBase
|
class AmendConnectivity : public vtkm::exec::FunctorBase
|
||||||
{
|
{
|
||||||
typedef
|
using IdPortal =
|
||||||
typename vtkm::cont::ArrayHandle<vtkm::Id>::template ExecutionTypes<DeviceAdapter>::Portal
|
typename vtkm::cont::ArrayHandle<vtkm::Id>::template ExecutionTypes<DeviceAdapter>::Portal;
|
||||||
IdPortal;
|
using IdPortalConst = typename vtkm::cont::ArrayHandle<vtkm::Id>::template ExecutionTypes<
|
||||||
typedef typename vtkm::cont::ArrayHandle<vtkm::Id>::template ExecutionTypes<
|
DeviceAdapter>::PortalConst;
|
||||||
DeviceAdapter>::PortalConst IdPortalConst;
|
using EdgeInterpolationPortalConst = typename vtkm::cont::ArrayHandle<
|
||||||
typedef typename vtkm::cont::ArrayHandle<EdgeInterpolation>::template ExecutionTypes<
|
EdgeInterpolation>::template ExecutionTypes<DeviceAdapter>::PortalConst;
|
||||||
DeviceAdapter>::PortalConst EdgeInterpolationPortalConst;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
@ -436,9 +434,9 @@ public:
|
|||||||
vtkm::Float64 value,
|
vtkm::Float64 value,
|
||||||
DeviceAdapter device)
|
DeviceAdapter device)
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> Algorithm;
|
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
typedef internal::ClipTables::DevicePortal<DeviceAdapter> ClipTablesPortal;
|
using ClipTablesPortal = internal::ClipTables::DevicePortal<DeviceAdapter>;
|
||||||
ClipTablesPortal clipTablesDevicePortal = this->ClipTablesInstance.GetDevicePortal(device);
|
ClipTablesPortal clipTablesDevicePortal = this->ClipTablesInstance.GetDevicePortal(device);
|
||||||
|
|
||||||
// Step 1. compute counts for the elements of the cell set data structure
|
// Step 1. compute counts for the elements of the cell set data structure
|
||||||
@ -575,11 +573,11 @@ public:
|
|||||||
class Kernel : public vtkm::exec::FunctorBase
|
class Kernel : public vtkm::exec::FunctorBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename vtkm::cont::ArrayHandle<T>::template ExecutionTypes<DeviceAdapter>::Portal
|
using FieldPortal =
|
||||||
FieldPortal;
|
typename vtkm::cont::ArrayHandle<T>::template ExecutionTypes<DeviceAdapter>::Portal;
|
||||||
|
|
||||||
typedef typename vtkm::cont::ArrayHandle<EdgeInterpolation>::template ExecutionTypes<
|
using EdgeInterpolationPortalConst = typename vtkm::cont::ArrayHandle<
|
||||||
DeviceAdapter>::PortalConst EdgeInterpolationPortalConst;
|
EdgeInterpolation>::template ExecutionTypes<DeviceAdapter>::PortalConst;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
Kernel(EdgeInterpolationPortalConst interpolation,
|
Kernel(EdgeInterpolationPortalConst interpolation,
|
||||||
@ -620,7 +618,7 @@ public:
|
|||||||
template <typename Storage>
|
template <typename Storage>
|
||||||
VTKM_CONT void operator()(const vtkm::cont::ArrayHandle<ValueType, Storage>& field) const
|
VTKM_CONT void operator()(const vtkm::cont::ArrayHandle<ValueType, Storage>& field) const
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> Algorithm;
|
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
vtkm::Id count = this->InterpolationArray.GetNumberOfValues();
|
vtkm::Id count = this->InterpolationArray.GetNumberOfValues();
|
||||||
|
|
||||||
|
@ -37,10 +37,10 @@ class DispatcherMapField
|
|||||||
WorkletType,
|
WorkletType,
|
||||||
vtkm::worklet::WorkletMapField>
|
vtkm::worklet::WorkletMapField>
|
||||||
{
|
{
|
||||||
typedef vtkm::worklet::internal::DispatcherBase<DispatcherMapField<WorkletType, Device>,
|
using Superclass =
|
||||||
|
vtkm::worklet::internal::DispatcherBase<DispatcherMapField<WorkletType, Device>,
|
||||||
WorkletType,
|
WorkletType,
|
||||||
vtkm::worklet::WorkletMapField>
|
vtkm::worklet::WorkletMapField>;
|
||||||
Superclass;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
@ -53,7 +53,7 @@ public:
|
|||||||
VTKM_CONT void DoInvoke(const Invocation& invocation) const
|
VTKM_CONT void DoInvoke(const Invocation& invocation) const
|
||||||
{
|
{
|
||||||
// This is the type for the input domain
|
// This is the type for the input domain
|
||||||
typedef typename Invocation::InputDomainType InputDomainType;
|
using InputDomainType = typename Invocation::InputDomainType;
|
||||||
|
|
||||||
// We can pull the input domain parameter (the data specifying the input
|
// We can pull the input domain parameter (the data specifying the input
|
||||||
// domain) from the invocation object.
|
// domain) from the invocation object.
|
||||||
|
@ -38,10 +38,10 @@ class DispatcherMapTopology
|
|||||||
WorkletType,
|
WorkletType,
|
||||||
vtkm::worklet::detail::WorkletMapTopologyBase>
|
vtkm::worklet::detail::WorkletMapTopologyBase>
|
||||||
{
|
{
|
||||||
typedef vtkm::worklet::internal::DispatcherBase<DispatcherMapTopology<WorkletType, Device>,
|
using Superclass =
|
||||||
|
vtkm::worklet::internal::DispatcherBase<DispatcherMapTopology<WorkletType, Device>,
|
||||||
WorkletType,
|
WorkletType,
|
||||||
vtkm::worklet::detail::WorkletMapTopologyBase>
|
vtkm::worklet::detail::WorkletMapTopologyBase>;
|
||||||
Superclass;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
@ -54,7 +54,7 @@ public:
|
|||||||
VTKM_CONT void DoInvoke(const Invocation& invocation) const
|
VTKM_CONT void DoInvoke(const Invocation& invocation) const
|
||||||
{
|
{
|
||||||
// This is the type for the input domain
|
// This is the type for the input domain
|
||||||
typedef typename Invocation::InputDomainType InputDomainType;
|
using InputDomainType = typename Invocation::InputDomainType;
|
||||||
|
|
||||||
// If you get a compile error on this line, then you have tried to use
|
// If you get a compile error on this line, then you have tried to use
|
||||||
// something that is not a vtkm::cont::CellSet as the input domain to a
|
// something that is not a vtkm::cont::CellSet as the input domain to a
|
||||||
|
@ -59,21 +59,21 @@ struct DispatcherStreamingMapFieldTransformFunctor
|
|||||||
template <typename ArrayHandleType>
|
template <typename ArrayHandleType>
|
||||||
struct DetermineReturnType<ArrayHandleType, true>
|
struct DetermineReturnType<ArrayHandleType, true>
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandleStreaming<ArrayHandleType> type;
|
using type = vtkm::cont::ArrayHandleStreaming<ArrayHandleType>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename NotArrayHandleType>
|
template <typename NotArrayHandleType>
|
||||||
struct DetermineReturnType<NotArrayHandleType, false>
|
struct DetermineReturnType<NotArrayHandleType, false>
|
||||||
{
|
{
|
||||||
typedef NotArrayHandleType type;
|
using type = NotArrayHandleType;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename ParameterType, vtkm::IdComponent Index>
|
template <typename ParameterType, vtkm::IdComponent Index>
|
||||||
struct ReturnType
|
struct ReturnType
|
||||||
{
|
{
|
||||||
typedef typename DetermineReturnType<
|
using type = typename DetermineReturnType<
|
||||||
ParameterType,
|
ParameterType,
|
||||||
vtkm::cont::internal::ArrayHandleCheck<ParameterType>::type::value>::type type;
|
vtkm::cont::internal::ArrayHandleCheck<ParameterType>::type::value>::type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename ParameterType, bool IsArrayHandle>
|
template <typename ParameterType, bool IsArrayHandle>
|
||||||
@ -125,7 +125,7 @@ struct DispatcherStreamingMapFieldTransferFunctor
|
|||||||
template <typename ParameterType, vtkm::IdComponent Index>
|
template <typename ParameterType, vtkm::IdComponent Index>
|
||||||
struct ReturnType
|
struct ReturnType
|
||||||
{
|
{
|
||||||
typedef ParameterType type;
|
using type = ParameterType;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename ParameterType, bool IsArrayHandle>
|
template <typename ParameterType, bool IsArrayHandle>
|
||||||
@ -169,10 +169,10 @@ class DispatcherStreamingMapField
|
|||||||
WorkletType,
|
WorkletType,
|
||||||
vtkm::worklet::WorkletMapField>
|
vtkm::worklet::WorkletMapField>
|
||||||
{
|
{
|
||||||
typedef vtkm::worklet::internal::DispatcherBase<DispatcherStreamingMapField<WorkletType, Device>,
|
using Superclass =
|
||||||
|
vtkm::worklet::internal::DispatcherBase<DispatcherStreamingMapField<WorkletType, Device>,
|
||||||
WorkletType,
|
WorkletType,
|
||||||
vtkm::worklet::WorkletMapField>
|
vtkm::worklet::WorkletMapField>;
|
||||||
Superclass;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
@ -202,7 +202,7 @@ public:
|
|||||||
VTKM_CONT void DoInvoke(const Invocation& invocation) const
|
VTKM_CONT void DoInvoke(const Invocation& invocation) const
|
||||||
{
|
{
|
||||||
// This is the type for the input domain
|
// This is the type for the input domain
|
||||||
typedef typename Invocation::InputDomainType InputDomainType;
|
using InputDomainType = typename Invocation::InputDomainType;
|
||||||
|
|
||||||
// We can pull the input domain parameter (the data specifying the input
|
// We can pull the input domain parameter (the data specifying the input
|
||||||
// domain) from the invocation object.
|
// domain) from the invocation object.
|
||||||
@ -217,12 +217,12 @@ public:
|
|||||||
if (fullSize % NumberOfBlocks != 0)
|
if (fullSize % NumberOfBlocks != 0)
|
||||||
blockSize += 1;
|
blockSize += 1;
|
||||||
|
|
||||||
typedef detail::
|
using TransformFunctorType =
|
||||||
DispatcherStreamingMapFieldTransformFunctor<typename Invocation::ControlInterface, Device>
|
detail::DispatcherStreamingMapFieldTransformFunctor<typename Invocation::ControlInterface,
|
||||||
TransformFunctorType;
|
Device>;
|
||||||
typedef detail::
|
using TransferFunctorType =
|
||||||
DispatcherStreamingMapFieldTransferFunctor<typename Invocation::ControlInterface, Device>
|
detail::DispatcherStreamingMapFieldTransferFunctor<typename Invocation::ControlInterface,
|
||||||
TransferFunctorType;
|
Device>;
|
||||||
|
|
||||||
for (vtkm::Id block = 0; block < NumberOfBlocks; block++)
|
for (vtkm::Id block = 0; block < NumberOfBlocks; block++)
|
||||||
{
|
{
|
||||||
@ -232,20 +232,19 @@ public:
|
|||||||
numberOfInstances = fullSize - blockSize * block;
|
numberOfInstances = fullSize - blockSize * block;
|
||||||
vtkm::Id globalIndexOffset = blockSize * block;
|
vtkm::Id globalIndexOffset = blockSize * block;
|
||||||
|
|
||||||
typedef typename Invocation::ParameterInterface ParameterInterfaceType;
|
using ParameterInterfaceType = typename Invocation::ParameterInterface;
|
||||||
typedef
|
using ReportedType =
|
||||||
typename ParameterInterfaceType::template StaticTransformType<TransformFunctorType>::type
|
typename ParameterInterfaceType::template StaticTransformType<TransformFunctorType>::type;
|
||||||
ReportedType;
|
|
||||||
ReportedType newParams = invocation.Parameters.StaticTransformCont(
|
ReportedType newParams = invocation.Parameters.StaticTransformCont(
|
||||||
TransformFunctorType(block, blockSize, numberOfInstances, fullSize));
|
TransformFunctorType(block, blockSize, numberOfInstances, fullSize));
|
||||||
|
|
||||||
typedef typename Invocation::template ChangeParametersType<ReportedType>::type ChangedType;
|
using ChangedType = typename Invocation::template ChangeParametersType<ReportedType>::type;
|
||||||
ChangedType changedParams = invocation.ChangeParameters(newParams);
|
ChangedType changedParams = invocation.ChangeParameters(newParams);
|
||||||
|
|
||||||
this->BasicInvoke(changedParams, numberOfInstances, globalIndexOffset, Device());
|
this->BasicInvoke(changedParams, numberOfInstances, globalIndexOffset, Device());
|
||||||
|
|
||||||
// Loop over parameters again to sync results for this block into control array
|
// Loop over parameters again to sync results for this block into control array
|
||||||
typedef typename ChangedType::ParameterInterface ParameterInterfaceType2;
|
using ParameterInterfaceType2 = typename ChangedType::ParameterInterface;
|
||||||
const ParameterInterfaceType2& parameters2 = changedParams.Parameters;
|
const ParameterInterfaceType2& parameters2 = changedParams.Parameters;
|
||||||
parameters2.StaticTransformCont(TransferFunctorType());
|
parameters2.StaticTransformCont(TransferFunctorType());
|
||||||
}
|
}
|
||||||
@ -262,17 +261,15 @@ private:
|
|||||||
const OutputRangeType& outputRange,
|
const OutputRangeType& outputRange,
|
||||||
DeviceAdapter device) const
|
DeviceAdapter device) const
|
||||||
{
|
{
|
||||||
typedef typename Invocation::ParameterInterface ParameterInterfaceType;
|
using ParameterInterfaceType = typename Invocation::ParameterInterface;
|
||||||
const ParameterInterfaceType& parameters = invocation.Parameters;
|
const ParameterInterfaceType& parameters = invocation.Parameters;
|
||||||
|
|
||||||
typedef vtkm::worklet::internal::detail::DispatcherBaseTransportFunctor<
|
using TransportFunctorType = vtkm::worklet::internal::detail::DispatcherBaseTransportFunctor<
|
||||||
typename Invocation::ControlInterface,
|
typename Invocation::ControlInterface,
|
||||||
typename Invocation::InputDomainType,
|
typename Invocation::InputDomainType,
|
||||||
DeviceAdapter>
|
DeviceAdapter>;
|
||||||
TransportFunctorType;
|
using ExecObjectParameters =
|
||||||
typedef
|
typename ParameterInterfaceType::template StaticTransformType<TransportFunctorType>::type;
|
||||||
typename ParameterInterfaceType::template StaticTransformType<TransportFunctorType>::type
|
|
||||||
ExecObjectParameters;
|
|
||||||
|
|
||||||
ExecObjectParameters execObjectParameters = parameters.StaticTransformCont(
|
ExecObjectParameters execObjectParameters = parameters.StaticTransformCont(
|
||||||
TransportFunctorType(invocation.GetInputDomain(), inputRange, outputRange));
|
TransportFunctorType(invocation.GetInputDomain(), inputRange, outputRange));
|
||||||
|
@ -62,7 +62,7 @@ struct ExternalFaces
|
|||||||
FieldOut<> numFacesInCell,
|
FieldOut<> numFacesInCell,
|
||||||
FieldInPoint<Vec3> pointCoordinates);
|
FieldInPoint<Vec3> pointCoordinates);
|
||||||
typedef _2 ExecutionSignature(CellShape, _3);
|
typedef _2 ExecutionSignature(CellShape, _3);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
NumExternalFacesPerStructuredCell(const vtkm::Vec<vtkm::Float64, 3>& min_point,
|
NumExternalFacesPerStructuredCell(const vtkm::Vec<vtkm::Float64, 3>& min_point,
|
||||||
@ -137,7 +137,7 @@ struct ExternalFaces
|
|||||||
FieldOut<> faceConnectivity,
|
FieldOut<> faceConnectivity,
|
||||||
FieldInPoint<Vec3> pointCoordinates);
|
FieldInPoint<Vec3> pointCoordinates);
|
||||||
typedef void ExecutionSignature(CellShape, VisitIndex, InputIndex, _2, _3, _4, _5, _6);
|
typedef void ExecutionSignature(CellShape, VisitIndex, InputIndex, _2, _3, _4, _5, _6);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
using ScatterType = vtkm::worklet::ScatterCounting;
|
using ScatterType = vtkm::worklet::ScatterCounting;
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ struct ExternalFaces
|
|||||||
public:
|
public:
|
||||||
typedef void ControlSignature(CellSetIn inCellSet, FieldOut<> numFacesInCell);
|
typedef void ControlSignature(CellSetIn inCellSet, FieldOut<> numFacesInCell);
|
||||||
typedef _2 ExecutionSignature(CellShape);
|
typedef _2 ExecutionSignature(CellShape);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
template <typename CellShapeTag>
|
template <typename CellShapeTag>
|
||||||
VTKM_EXEC vtkm::IdComponent operator()(CellShapeTag shape) const
|
VTKM_EXEC vtkm::IdComponent operator()(CellShapeTag shape) const
|
||||||
@ -352,7 +352,7 @@ struct ExternalFaces
|
|||||||
FieldOut<> originCells,
|
FieldOut<> originCells,
|
||||||
FieldOut<> originFaces);
|
FieldOut<> originFaces);
|
||||||
typedef void ExecutionSignature(_2, _3, _4, CellShape, FromIndices, InputIndex, VisitIndex);
|
typedef void ExecutionSignature(_2, _3, _4, CellShape, FromIndices, InputIndex, VisitIndex);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
using ScatterType = vtkm::worklet::ScatterCounting;
|
using ScatterType = vtkm::worklet::ScatterCounting;
|
||||||
|
|
||||||
@ -631,7 +631,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
typedef void ControlSignature(CellSetIn inCellSet, FieldOut<> isPolyDataCell);
|
typedef void ControlSignature(CellSetIn inCellSet, FieldOut<> isPolyDataCell);
|
||||||
typedef _2 ExecutionSignature(CellShape);
|
typedef _2 ExecutionSignature(CellShape);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
template <typename CellShapeTag>
|
template <typename CellShapeTag>
|
||||||
VTKM_EXEC vtkm::IdComponent operator()(CellShapeTag shape) const
|
VTKM_EXEC vtkm::IdComponent operator()(CellShapeTag shape) const
|
||||||
@ -663,7 +663,7 @@ public:
|
|||||||
|
|
||||||
typedef void ControlSignature(CellSetIn inCellSet, FieldOut<> numPoints);
|
typedef void ControlSignature(CellSetIn inCellSet, FieldOut<> numPoints);
|
||||||
typedef _2 ExecutionSignature(PointCount);
|
typedef _2 ExecutionSignature(PointCount);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
VTKM_EXEC vtkm::Id operator()(vtkm::Id count) const { return count; }
|
VTKM_EXEC vtkm::Id operator()(vtkm::Id count) const { return count; }
|
||||||
private:
|
private:
|
||||||
@ -792,9 +792,9 @@ public:
|
|||||||
|
|
||||||
vtkm::Id3 PointDimensions = inCellSet.GetPointDimensions();
|
vtkm::Id3 PointDimensions = inCellSet.GetPointDimensions();
|
||||||
|
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::FloatDefault> DefaultHandle;
|
using DefaultHandle = vtkm::cont::ArrayHandle<vtkm::FloatDefault>;
|
||||||
typedef vtkm::cont::ArrayHandleCartesianProduct<DefaultHandle, DefaultHandle, DefaultHandle>
|
using CartesianArrayHandle =
|
||||||
CartesianArrayHandle;
|
vtkm::cont::ArrayHandleCartesianProduct<DefaultHandle, DefaultHandle, DefaultHandle>;
|
||||||
|
|
||||||
auto coordData = coord.GetData();
|
auto coordData = coord.GetData();
|
||||||
if (coordData.IsType<CartesianArrayHandle>())
|
if (coordData.IsType<CartesianArrayHandle>())
|
||||||
@ -837,7 +837,7 @@ public:
|
|||||||
|
|
||||||
numExternalFacesDispatcher.Invoke(inCellSet, numExternalFaces, coordData);
|
numExternalFacesDispatcher.Invoke(inCellSet, numExternalFaces, coordData);
|
||||||
|
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithms;
|
using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
vtkm::Id numberOfExternalFaces = DeviceAlgorithms::Reduce(numExternalFaces, 0, vtkm::Sum());
|
vtkm::Id numberOfExternalFaces = DeviceAlgorithms::Reduce(numExternalFaces, 0, vtkm::Sum());
|
||||||
|
|
||||||
vtkm::worklet::ScatterCounting scatterCellToExternalFace(numExternalFaces, DeviceAdapter());
|
vtkm::worklet::ScatterCounting scatterCellToExternalFace(numExternalFaces, DeviceAdapter());
|
||||||
@ -1017,7 +1017,7 @@ public:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Join poly data to face data output
|
// Join poly data to face data output
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithm;
|
using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
vtkm::cont::ArrayHandleConcatenate<ShapeArrayType, ShapeArrayType> faceShapesArray(
|
vtkm::cont::ArrayHandleConcatenate<ShapeArrayType, ShapeArrayType> faceShapesArray(
|
||||||
faceShapes, polyDataShapes);
|
faceShapes, polyDataShapes);
|
||||||
@ -1035,8 +1035,8 @@ public:
|
|||||||
DeviceAlgorithm::Copy(connectivityArray, joinedConnectivity);
|
DeviceAlgorithm::Copy(connectivityArray, joinedConnectivity);
|
||||||
|
|
||||||
// Adjust poly data offsets array with face connectivity size before join
|
// Adjust poly data offsets array with face connectivity size before join
|
||||||
typedef vtkm::cont::ArrayHandleTransform<OffsetsArrayType, BiasFunctor<vtkm::Id>>
|
using TransformBiasArrayType =
|
||||||
TransformBiasArrayType;
|
vtkm::cont::ArrayHandleTransform<OffsetsArrayType, BiasFunctor<vtkm::Id>>;
|
||||||
TransformBiasArrayType adjustedPolyDataOffsets =
|
TransformBiasArrayType adjustedPolyDataOffsets =
|
||||||
vtkm::cont::make_ArrayHandleTransform<OffsetsArrayType>(
|
vtkm::cont::make_ArrayHandleTransform<OffsetsArrayType>(
|
||||||
polyDataOffsets, BiasFunctor<vtkm::Id>(faceConnectivity.GetNumberOfValues()));
|
polyDataOffsets, BiasFunctor<vtkm::Id>(faceConnectivity.GetNumberOfValues()));
|
||||||
|
@ -142,8 +142,8 @@ public:
|
|||||||
const vtkm::cont::ArrayHandle<vtkm::Id>& cellIds,
|
const vtkm::cont::ArrayHandle<vtkm::Id>& cellIds,
|
||||||
DeviceAdapter)
|
DeviceAdapter)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithm;
|
using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
typedef vtkm::cont::CellSetPermutation<CellSetType> OutputType;
|
using OutputType = vtkm::cont::CellSetPermutation<CellSetType>;
|
||||||
|
|
||||||
DeviceAlgorithm::Copy(cellIds, this->ValidCellIds);
|
DeviceAlgorithm::Copy(cellIds, this->ValidCellIds);
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ public:
|
|||||||
const vtkm::cont::ArrayHandle<vtkm::Id>& pointIds,
|
const vtkm::cont::ArrayHandle<vtkm::Id>& pointIds,
|
||||||
DeviceAdapter)
|
DeviceAdapter)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithm;
|
using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
DeviceAlgorithm::Copy(pointIds, this->ValidPointIds);
|
DeviceAlgorithm::Copy(pointIds, this->ValidPointIds);
|
||||||
|
|
||||||
// Make CellSetSingleType with VERTEX at each point id
|
// Make CellSetSingleType with VERTEX at each point id
|
||||||
@ -101,7 +101,7 @@ public:
|
|||||||
bool extractInside,
|
bool extractInside,
|
||||||
DeviceAdapter device)
|
DeviceAdapter device)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithm;
|
using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
// Worklet output will be a boolean passFlag array
|
// Worklet output will be a boolean passFlag array
|
||||||
vtkm::cont::ArrayHandle<bool> passFlags;
|
vtkm::cont::ArrayHandle<bool> passFlags;
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
vtkm::Id numberOfBins,
|
vtkm::Id numberOfBins,
|
||||||
DeviceAdapter device)
|
DeviceAdapter device)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithms;
|
using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
///// calculate histogram using FieldHistogram worklet /////
|
///// calculate histogram using FieldHistogram worklet /////
|
||||||
vtkm::Range range;
|
vtkm::Range range;
|
||||||
|
@ -44,7 +44,7 @@ namespace
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
T compute_delta(T fieldMinValue, T fieldMaxValue, vtkm::Id num)
|
T compute_delta(T fieldMinValue, T fieldMaxValue, vtkm::Id num)
|
||||||
{
|
{
|
||||||
typedef vtkm::VecTraits<T> VecType;
|
using VecType = vtkm::VecTraits<T>;
|
||||||
const T fieldRange = fieldMaxValue - fieldMinValue;
|
const T fieldRange = fieldMaxValue - fieldMinValue;
|
||||||
return fieldRange / static_cast<typename VecType::ComponentType>(num);
|
return fieldRange / static_cast<typename VecType::ComponentType>(num);
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
typedef void ControlSignature(FieldIn<> value, FieldOut<> binIndex);
|
typedef void ControlSignature(FieldIn<> value, FieldOut<> binIndex);
|
||||||
typedef void ExecutionSignature(_1, _2);
|
typedef void ExecutionSignature(_1, _2);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
vtkm::Id numberOfBins;
|
vtkm::Id numberOfBins;
|
||||||
FieldType minValue;
|
FieldType minValue;
|
||||||
@ -102,7 +102,7 @@ public:
|
|||||||
WholeArrayIn<IdType> counts,
|
WholeArrayIn<IdType> counts,
|
||||||
FieldOut<IdType> outputCount);
|
FieldOut<IdType> outputCount);
|
||||||
typedef void ExecutionSignature(_1, _2, _3);
|
typedef void ExecutionSignature(_1, _2, _3);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
template <typename WholeArrayType>
|
template <typename WholeArrayType>
|
||||||
VTKM_EXEC void operator()(const vtkm::Id& index,
|
VTKM_EXEC void operator()(const vtkm::Id& index,
|
||||||
@ -129,7 +129,7 @@ public:
|
|||||||
vtkm::cont::ArrayHandle<vtkm::Id>& binArray,
|
vtkm::cont::ArrayHandle<vtkm::Id>& binArray,
|
||||||
DeviceAdapter vtkmNotUsed(device))
|
DeviceAdapter vtkmNotUsed(device))
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithms;
|
using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
//todo: need to have a signature that can use an input range so we can
|
//todo: need to have a signature that can use an input range so we can
|
||||||
//leverage fields that have already computed there range
|
//leverage fields that have already computed there range
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
FieldOut<> pow3Array,
|
FieldOut<> pow3Array,
|
||||||
FieldOut<> pow4Array);
|
FieldOut<> pow4Array);
|
||||||
typedef void ExecutionSignature(_1, _2, _3, _4, _5);
|
typedef void ExecutionSignature(_1, _2, _3, _4, _5);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
vtkm::Id numPowers;
|
vtkm::Id numPowers;
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
typedef void ControlSignature(FieldIn<> value, FieldOut<> diff);
|
typedef void ControlSignature(FieldIn<> value, FieldOut<> diff);
|
||||||
typedef _2 ExecutionSignature(_1);
|
typedef _2 ExecutionSignature(_1);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
FieldType constant;
|
FieldType constant;
|
||||||
|
|
||||||
@ -117,8 +117,8 @@ public:
|
|||||||
template <typename Storage>
|
template <typename Storage>
|
||||||
void Run(vtkm::cont::ArrayHandle<FieldType, Storage> fieldArray, StatInfo& statinfo)
|
void Run(vtkm::cont::ArrayHandle<FieldType, Storage> fieldArray, StatInfo& statinfo)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithms;
|
using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
typedef typename vtkm::cont::ArrayHandle<FieldType, Storage>::PortalConstControl FieldPortal;
|
using FieldPortal = typename vtkm::cont::ArrayHandle<FieldType, Storage>::PortalConstControl;
|
||||||
|
|
||||||
// Copy original data to array for sorting
|
// Copy original data to array for sorting
|
||||||
vtkm::cont::ArrayHandle<FieldType> tempArray;
|
vtkm::cont::ArrayHandle<FieldType> tempArray;
|
||||||
|
@ -73,9 +73,9 @@ namespace debug
|
|||||||
template <typename T, typename S = VTKM_DEFAULT_STORAGE_TAG>
|
template <typename T, typename S = VTKM_DEFAULT_STORAGE_TAG>
|
||||||
void OutputArrayDebug(const vtkm::cont::ArrayHandle<T, S>& outputArray, const std::string& name)
|
void OutputArrayDebug(const vtkm::cont::ArrayHandle<T, S>& outputArray, const std::string& name)
|
||||||
{
|
{
|
||||||
typedef T ValueType;
|
using ValueType = T;
|
||||||
typedef vtkm::cont::internal::Storage<T, S> StorageType;
|
using StorageType = vtkm::cont::internal::Storage<T, S>;
|
||||||
typedef typename StorageType::PortalConstType PortalConstType;
|
using PortalConstType = typename StorageType::PortalConstType;
|
||||||
PortalConstType readPortal = outputArray.GetPortalConstControl();
|
PortalConstType readPortal = outputArray.GetPortalConstControl();
|
||||||
vtkm::cont::ArrayPortalToIterators<PortalConstType> iterators(readPortal);
|
vtkm::cont::ArrayPortalToIterators<PortalConstType> iterators(readPortal);
|
||||||
std::vector<ValueType> result(readPortal.GetNumberOfValues());
|
std::vector<ValueType> result(readPortal.GetNumberOfValues());
|
||||||
@ -90,8 +90,8 @@ template <typename T, int S>
|
|||||||
void OutputArrayDebug(const vtkm::cont::ArrayHandle<vtkm::Vec<T, S>>& outputArray,
|
void OutputArrayDebug(const vtkm::cont::ArrayHandle<vtkm::Vec<T, S>>& outputArray,
|
||||||
const std::string& name)
|
const std::string& name)
|
||||||
{
|
{
|
||||||
typedef T ValueType;
|
using ValueType = T;
|
||||||
typedef typename vtkm::cont::ArrayHandle<vtkm::Vec<T, S>>::PortalConstControl PortalConstType;
|
using PortalConstType = typename vtkm::cont::ArrayHandle<vtkm::Vec<T, S>>::PortalConstControl;
|
||||||
PortalConstType readPortal = outputArray.GetPortalConstControl();
|
PortalConstType readPortal = outputArray.GetPortalConstControl();
|
||||||
vtkm::cont::ArrayPortalToIterators<PortalConstType> iterators(readPortal);
|
vtkm::cont::ArrayPortalToIterators<PortalConstType> iterators(readPortal);
|
||||||
std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n";
|
std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n";
|
||||||
@ -108,8 +108,8 @@ void OutputArrayDebug(
|
|||||||
outputArray,
|
outputArray,
|
||||||
const std::string& name)
|
const std::string& name)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::ArrayHandlePermutation<I, vtkm::cont::ArrayHandle<vtkm::Vec<T, S>>>::
|
using PortalConstType = typename vtkm::cont::
|
||||||
PortalConstControl PortalConstType;
|
ArrayHandlePermutation<I, vtkm::cont::ArrayHandle<vtkm::Vec<T, S>>>::PortalConstControl;
|
||||||
PortalConstType readPortal = outputArray.GetPortalConstControl();
|
PortalConstType readPortal = outputArray.GetPortalConstControl();
|
||||||
vtkm::cont::ArrayPortalToIterators<PortalConstType> iterators(readPortal);
|
vtkm::cont::ArrayPortalToIterators<PortalConstType> iterators(readPortal);
|
||||||
std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n";
|
std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n";
|
||||||
@ -146,21 +146,21 @@ void OutputArrayDebug(
|
|||||||
template <typename Kernel, typename DeviceAdapter>
|
template <typename Kernel, typename DeviceAdapter>
|
||||||
struct KernelSplatterFilterUniformGrid
|
struct KernelSplatterFilterUniformGrid
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::Float64> DoubleHandleType;
|
using DoubleHandleType = vtkm::cont::ArrayHandle<vtkm::Float64>;
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::Float32> FloatHandleType;
|
using FloatHandleType = vtkm::cont::ArrayHandle<vtkm::Float32>;
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::Id3> VecHandleType;
|
using VecHandleType = vtkm::cont::ArrayHandle<vtkm::Id3>;
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::Id> IdHandleType;
|
using IdHandleType = vtkm::cont::ArrayHandle<vtkm::Id>;
|
||||||
//
|
//
|
||||||
typedef vtkm::Vec<vtkm::Float32, 3> FloatVec;
|
using FloatVec = vtkm::Vec<vtkm::Float32, 3>;
|
||||||
typedef vtkm::Vec<vtkm::Float64, 3> PointType;
|
using PointType = vtkm::Vec<vtkm::Float64, 3>;
|
||||||
typedef vtkm::cont::ArrayHandle<PointType> PointHandleType;
|
using PointHandleType = vtkm::cont::ArrayHandle<PointType>;
|
||||||
//
|
//
|
||||||
typedef vtkm::cont::ArrayHandlePermutation<IdHandleType, VecHandleType> VecPermType;
|
using VecPermType = vtkm::cont::ArrayHandlePermutation<IdHandleType, VecHandleType>;
|
||||||
typedef vtkm::cont::ArrayHandlePermutation<IdHandleType, PointHandleType> PointVecPermType;
|
using PointVecPermType = vtkm::cont::ArrayHandlePermutation<IdHandleType, PointHandleType>;
|
||||||
typedef vtkm::cont::ArrayHandlePermutation<IdHandleType, IdHandleType> IdPermType;
|
using IdPermType = vtkm::cont::ArrayHandlePermutation<IdHandleType, IdHandleType>;
|
||||||
typedef vtkm::cont::ArrayHandlePermutation<IdHandleType, FloatHandleType> FloatPermType;
|
using FloatPermType = vtkm::cont::ArrayHandlePermutation<IdHandleType, FloatHandleType>;
|
||||||
//
|
//
|
||||||
typedef vtkm::cont::ArrayHandleCounting<vtkm::Id> IdCountingType;
|
using IdCountingType = vtkm::cont::ArrayHandleCounting<vtkm::Id>;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
// zero an array,
|
// zero an array,
|
||||||
|
@ -122,7 +122,7 @@ public:
|
|||||||
FieldOutCell<IdComponentType> outNumTriangles,
|
FieldOutCell<IdComponentType> outNumTriangles,
|
||||||
WholeArrayIn<IdComponentType> numTrianglesTable);
|
WholeArrayIn<IdComponentType> numTrianglesTable);
|
||||||
typedef void ExecutionSignature(CellShape, _1, _2, _4, _5);
|
typedef void ExecutionSignature(CellShape, _1, _2, _4, _5);
|
||||||
typedef _3 InputDomain;
|
using InputDomain = _3;
|
||||||
|
|
||||||
template <typename IsoValuesType, typename FieldInType, typename NumTrianglesTablePortalType>
|
template <typename IsoValuesType, typename FieldInType, typename NumTrianglesTablePortalType>
|
||||||
VTKM_EXEC void operator()(vtkm::CellShapeTagGeneric shape,
|
VTKM_EXEC void operator()(vtkm::CellShapeTagGeneric shape,
|
||||||
@ -182,11 +182,11 @@ class EdgeWeightGenerateMetaData
|
|||||||
template <typename FieldType>
|
template <typename FieldType>
|
||||||
struct PortalTypes
|
struct PortalTypes
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandle<FieldType> HandleType;
|
using HandleType = vtkm::cont::ArrayHandle<FieldType>;
|
||||||
typedef typename HandleType::template ExecutionTypes<DeviceAdapter> ExecutionTypes;
|
using ExecutionTypes = typename HandleType::template ExecutionTypes<DeviceAdapter>;
|
||||||
|
|
||||||
typedef typename ExecutionTypes::Portal Portal;
|
using Portal = typename ExecutionTypes::Portal;
|
||||||
typedef typename ExecutionTypes::PortalConst PortalConst;
|
using PortalConst = typename ExecutionTypes::PortalConst;
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -233,7 +233,7 @@ public:
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef vtkm::worklet::ScatterCounting ScatterType;
|
using ScatterType = vtkm::worklet::ScatterCounting;
|
||||||
|
|
||||||
typedef void ControlSignature(
|
typedef void ControlSignature(
|
||||||
CellSetIn cellset, // Cell set
|
CellSetIn cellset, // Cell set
|
||||||
@ -243,7 +243,7 @@ public:
|
|||||||
typedef void
|
typedef void
|
||||||
ExecutionSignature(CellShape, _2, _3, InputIndex, WorkIndex, VisitIndex, FromIndices);
|
ExecutionSignature(CellShape, _2, _3, InputIndex, WorkIndex, VisitIndex, FromIndices);
|
||||||
|
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
EdgeWeightGenerate(const EdgeWeightGenerateMetaData<DeviceAdapter>& meta)
|
EdgeWeightGenerate(const EdgeWeightGenerateMetaData<DeviceAdapter>& meta)
|
||||||
@ -300,7 +300,7 @@ public:
|
|||||||
const IndicesVecType& indices) const
|
const IndicesVecType& indices) const
|
||||||
{ //covers when we have hexs coming from 3d structured data
|
{ //covers when we have hexs coming from 3d structured data
|
||||||
const vtkm::Id outputPointId = 3 * outputCellId;
|
const vtkm::Id outputPointId = 3 * outputCellId;
|
||||||
typedef typename vtkm::VecTraits<FieldInType>::ComponentType FieldType;
|
using FieldType = typename vtkm::VecTraits<FieldInType>::ComponentType;
|
||||||
|
|
||||||
vtkm::IdComponent sum = 0, caseNumber = 0;
|
vtkm::IdComponent sum = 0, caseNumber = 0;
|
||||||
vtkm::IdComponent i = 0, size = static_cast<vtkm::IdComponent>(isovalues.GetNumberOfValues());
|
vtkm::IdComponent i = 0, size = static_cast<vtkm::IdComponent>(isovalues.GetNumberOfValues());
|
||||||
@ -367,7 +367,7 @@ public:
|
|||||||
WholeArrayIn<> inputField,
|
WholeArrayIn<> inputField,
|
||||||
FieldOut<> output);
|
FieldOut<> output);
|
||||||
typedef void ExecutionSignature(_1, _2, _3, _4);
|
typedef void ExecutionSignature(_1, _2, _3, _4);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
MapPointField() {}
|
MapPointField() {}
|
||||||
@ -417,7 +417,7 @@ struct MergeDuplicateValues : vtkm::worklet::WorkletReduceByKey
|
|||||||
ReducedValuesOut<> valueOut1,
|
ReducedValuesOut<> valueOut1,
|
||||||
ReducedValuesOut<> valueOut2);
|
ReducedValuesOut<> valueOut2);
|
||||||
typedef void ExecutionSignature(_1, _2, _3, _4, _5);
|
typedef void ExecutionSignature(_1, _2, _3, _4, _5);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
template <typename T,
|
template <typename T,
|
||||||
typename ValuesInType,
|
typename ValuesInType,
|
||||||
@ -440,7 +440,7 @@ struct CopyEdgeIds : vtkm::worklet::WorkletMapField
|
|||||||
{
|
{
|
||||||
typedef void ControlSignature(FieldIn<>, FieldOut<>);
|
typedef void ControlSignature(FieldIn<>, FieldOut<>);
|
||||||
typedef void ExecutionSignature(_1, _2);
|
typedef void ExecutionSignature(_1, _2);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
VTKM_EXEC
|
VTKM_EXEC
|
||||||
void operator()(const vtkm::Id2& input, vtkm::Id2& output) const { output = input; }
|
void operator()(const vtkm::Id2& input, vtkm::Id2& output) const { output = input; }
|
||||||
|
@ -48,8 +48,8 @@ public:
|
|||||||
const vtkm::Id stride,
|
const vtkm::Id stride,
|
||||||
DeviceAdapter)
|
DeviceAdapter)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithm;
|
using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
typedef vtkm::cont::CellSetPermutation<CellSetType> OutputType;
|
using OutputType = vtkm::cont::CellSetPermutation<CellSetType>;
|
||||||
|
|
||||||
vtkm::Id numberOfInputCells = cellSet.GetNumberOfCells();
|
vtkm::Id numberOfInputCells = cellSet.GetNumberOfCells();
|
||||||
vtkm::Id numberOfSampledCells = numberOfInputCells / stride;
|
vtkm::Id numberOfSampledCells = numberOfInputCells / stride;
|
||||||
|
@ -39,7 +39,7 @@ public:
|
|||||||
const vtkm::Id stride,
|
const vtkm::Id stride,
|
||||||
DeviceAdapter)
|
DeviceAdapter)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithm;
|
using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
vtkm::Id numberOfInputPoints = cellSet.GetNumberOfPoints();
|
vtkm::Id numberOfInputPoints = cellSet.GetNumberOfPoints();
|
||||||
vtkm::Id numberOfSampledPoints = numberOfInputPoints / stride;
|
vtkm::Id numberOfSampledPoints = numberOfInputPoints / stride;
|
||||||
|
@ -66,7 +66,7 @@ public:
|
|||||||
template <typename DeviceAdapter>
|
template <typename DeviceAdapter>
|
||||||
vtkm::Float64 Run(DeviceAdapter device)
|
vtkm::Float64 Run(DeviceAdapter device)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithms;
|
using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
std::vector<vtkm::cont::ArrayHandle<vtkm::Id>> binIds;
|
std::vector<vtkm::cont::ArrayHandle<vtkm::Id>> binIds;
|
||||||
vtkm::cont::ArrayHandle<vtkm::Id> freqs;
|
vtkm::cont::ArrayHandle<vtkm::Id> freqs;
|
||||||
|
@ -73,7 +73,7 @@ public:
|
|||||||
vtkm::cont::ArrayHandle<vtkm::Id>& marginalFreqs,
|
vtkm::cont::ArrayHandle<vtkm::Id>& marginalFreqs,
|
||||||
DeviceAdapter vtkmNotUsed(device))
|
DeviceAdapter vtkmNotUsed(device))
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithms;
|
using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
//total variables
|
//total variables
|
||||||
vtkm::Id numOfVariable = static_cast<vtkm::Id>(binId.size());
|
vtkm::Id numOfVariable = static_cast<vtkm::Id>(binId.size());
|
||||||
@ -160,7 +160,7 @@ public:
|
|||||||
vtkm::cont::ArrayHandle<vtkm::Id>& marginalFreqs,
|
vtkm::cont::ArrayHandle<vtkm::Id>& marginalFreqs,
|
||||||
DeviceAdapter vtkmNotUsed(device))
|
DeviceAdapter vtkmNotUsed(device))
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithms;
|
using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
//total variables
|
//total variables
|
||||||
vtkm::Id numOfVariable = static_cast<vtkm::Id>(binId.size());
|
vtkm::Id numOfVariable = static_cast<vtkm::Id>(binId.size());
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
template <typename DeviceAdapter>
|
template <typename DeviceAdapter>
|
||||||
void SetNumOfDataPoints(vtkm::Id _numDataPoints, DeviceAdapter vtkmNotUsed(device))
|
void SetNumOfDataPoints(vtkm::Id _numDataPoints, DeviceAdapter vtkmNotUsed(device))
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithms;
|
using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
NumDataPoints = _numDataPoints;
|
NumDataPoints = _numDataPoints;
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ public:
|
|||||||
vtkm::cont::ArrayHandle<vtkm::Id>& freqs,
|
vtkm::cont::ArrayHandle<vtkm::Id>& freqs,
|
||||||
DeviceAdapter vtkmNotUsed(device))
|
DeviceAdapter vtkmNotUsed(device))
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithms;
|
using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
binId.resize(NumberOfBins.size());
|
binId.resize(NumberOfBins.size());
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ public:
|
|||||||
const vtkm::Id& nSteps,
|
const vtkm::Id& nSteps,
|
||||||
const DeviceAdapter&)
|
const DeviceAdapter&)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithm;
|
using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
vtkm::worklet::particleadvection::StreamlineWorklet<IntegratorType, FieldType, DeviceAdapter>
|
vtkm::worklet::particleadvection::StreamlineWorklet<IntegratorType, FieldType, DeviceAdapter>
|
||||||
worklet;
|
worklet;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ public:
|
|||||||
FieldInCell<> inCellField,
|
FieldInCell<> inCellField,
|
||||||
FieldOutPoint<> outPointField);
|
FieldOutPoint<> outPointField);
|
||||||
typedef void ExecutionSignature(CellCount, _2, _3);
|
typedef void ExecutionSignature(CellCount, _2, _3);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
template <typename CellValueVecType, typename OutType>
|
template <typename CellValueVecType, typename OutType>
|
||||||
VTKM_EXEC void operator()(const vtkm::IdComponent& numCells,
|
VTKM_EXEC void operator()(const vtkm::IdComponent& numCells,
|
||||||
|
@ -185,7 +185,7 @@ struct ScatterCounting
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::Id> OutputToInputMapType;
|
using OutputToInputMapType = vtkm::cont::ArrayHandle<vtkm::Id>;
|
||||||
|
|
||||||
template <typename RangeType>
|
template <typename RangeType>
|
||||||
VTKM_CONT OutputToInputMapType GetOutputToInputMap(RangeType) const
|
VTKM_CONT OutputToInputMapType GetOutputToInputMap(RangeType) const
|
||||||
@ -193,7 +193,7 @@ struct ScatterCounting
|
|||||||
return this->OutputToInputMap;
|
return this->OutputToInputMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::IdComponent> VisitArrayType;
|
using VisitArrayType = vtkm::cont::ArrayHandle<vtkm::IdComponent>;
|
||||||
template <typename RangeType>
|
template <typename RangeType>
|
||||||
VTKM_CONT VisitArrayType GetVisitArray(RangeType) const
|
VTKM_CONT VisitArrayType GetVisitArray(RangeType) const
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ namespace worklet
|
|||||||
///
|
///
|
||||||
struct ScatterIdentity
|
struct ScatterIdentity
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::ArrayHandleIndex OutputToInputMapType;
|
using OutputToInputMapType = vtkm::cont::ArrayHandleIndex;
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
OutputToInputMapType GetOutputToInputMap(vtkm::Id inputRange) const
|
OutputToInputMapType GetOutputToInputMap(vtkm::Id inputRange) const
|
||||||
{
|
{
|
||||||
@ -52,7 +52,7 @@ struct ScatterIdentity
|
|||||||
return this->GetOutputToInputMap(inputRange[0] * inputRange[1] * inputRange[2]);
|
return this->GetOutputToInputMap(inputRange[0] * inputRange[1] * inputRange[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef vtkm::cont::ArrayHandleConstant<vtkm::IdComponent> VisitArrayType;
|
using VisitArrayType = vtkm::cont::ArrayHandleConstant<vtkm::IdComponent>;
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
VisitArrayType GetVisitArray(vtkm::Id inputRange) const { return VisitArrayType(0, inputRange); }
|
VisitArrayType GetVisitArray(vtkm::Id inputRange) const { return VisitArrayType(0, inputRange); }
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
|
@ -93,7 +93,7 @@ struct ScatterUniform
|
|||||||
return this->GetOutputRange(inputRange[0] * inputRange[1] * inputRange[2]);
|
return this->GetOutputRange(inputRange[0] * inputRange[1] * inputRange[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef vtkm::cont::ArrayHandleImplicit<detail::FunctorDiv> OutputToInputMapType;
|
using OutputToInputMapType = vtkm::cont::ArrayHandleImplicit<detail::FunctorDiv>;
|
||||||
template <typename RangeType>
|
template <typename RangeType>
|
||||||
VTKM_CONT OutputToInputMapType GetOutputToInputMap(RangeType inputRange) const
|
VTKM_CONT OutputToInputMapType GetOutputToInputMap(RangeType inputRange) const
|
||||||
{
|
{
|
||||||
@ -101,7 +101,7 @@ struct ScatterUniform
|
|||||||
this->GetOutputRange(inputRange));
|
this->GetOutputRange(inputRange));
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef vtkm::cont::ArrayHandleImplicit<detail::FunctorModulus> VisitArrayType;
|
using VisitArrayType = vtkm::cont::ArrayHandleImplicit<detail::FunctorModulus>;
|
||||||
template <typename RangeType>
|
template <typename RangeType>
|
||||||
VTKM_CONT VisitArrayType GetVisitArray(RangeType inputRange) const
|
VTKM_CONT VisitArrayType GetVisitArray(RangeType inputRange) const
|
||||||
{
|
{
|
||||||
|
@ -155,9 +155,9 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef vtkm::cont::ArrayHandle<vtkm::Vec<FieldType, 3>> FieldHandle;
|
using FieldHandle = vtkm::cont::ArrayHandle<vtkm::Vec<FieldType, 3>>;
|
||||||
typedef
|
using FieldPortalConstType =
|
||||||
typename FieldHandle::template ExecutionTypes<DeviceAdapter>::PortalConst FieldPortalConstType;
|
typename FieldHandle::template ExecutionTypes<DeviceAdapter>::PortalConst;
|
||||||
|
|
||||||
class MakeStreamLines : public vtkm::worklet::WorkletMapField
|
class MakeStreamLines : public vtkm::worklet::WorkletMapField
|
||||||
{
|
{
|
||||||
@ -168,9 +168,9 @@ public:
|
|||||||
WholeArrayOut<IdComponentType> validPoint,
|
WholeArrayOut<IdComponentType> validPoint,
|
||||||
WholeArrayOut<Vec3> streamLines);
|
WholeArrayOut<Vec3> streamLines);
|
||||||
typedef void ExecutionSignature(_1, _2, _3, _4, _5, VisitIndex);
|
typedef void ExecutionSignature(_1, _2, _3, _4, _5, VisitIndex);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
typedef vtkm::worklet::ScatterUniform ScatterType;
|
using ScatterType = vtkm::worklet::ScatterUniform;
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ScatterType GetScatter() const { return ScatterType(2); }
|
ScatterType GetScatter() const { return ScatterType(2); }
|
||||||
|
|
||||||
@ -346,7 +346,7 @@ public:
|
|||||||
vtkm::Id maxSteps,
|
vtkm::Id maxSteps,
|
||||||
FieldType timeStep)
|
FieldType timeStep)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithm;
|
using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
// Get information from input dataset
|
// Get information from input dataset
|
||||||
vtkm::cont::CellSetStructured<3> inCellSet;
|
vtkm::cont::CellSetStructured<3> inCellSet;
|
||||||
@ -398,7 +398,7 @@ public:
|
|||||||
// Worklet to make the streamlines
|
// Worklet to make the streamlines
|
||||||
MakeStreamLines makeStreamLines(
|
MakeStreamLines makeStreamLines(
|
||||||
timeStep, streamMode, maxSteps, vdims, fieldArray.PrepareForInput(DeviceAdapter()));
|
timeStep, streamMode, maxSteps, vdims, fieldArray.PrepareForInput(DeviceAdapter()));
|
||||||
typedef typename vtkm::worklet::DispatcherMapField<MakeStreamLines> MakeStreamLinesDispatcher;
|
using MakeStreamLinesDispatcher = typename vtkm::worklet::DispatcherMapField<MakeStreamLines>;
|
||||||
MakeStreamLinesDispatcher makeStreamLinesDispatcher(makeStreamLines);
|
MakeStreamLinesDispatcher makeStreamLinesDispatcher(makeStreamLines);
|
||||||
makeStreamLinesDispatcher.Invoke(
|
makeStreamLinesDispatcher.Invoke(
|
||||||
seedIdArray, seedPosArray, numIndices, validPoint, streamArray);
|
seedIdArray, seedPosArray, numIndices, validPoint, streamArray);
|
||||||
|
@ -39,7 +39,7 @@ public:
|
|||||||
typedef void ControlSignature(FieldIn<> inIndices, FieldOut<> outIndices);
|
typedef void ControlSignature(FieldIn<> inIndices, FieldOut<> outIndices);
|
||||||
typedef void ExecutionSignature(_1, _2);
|
typedef void ExecutionSignature(_1, _2);
|
||||||
|
|
||||||
typedef vtkm::worklet::ScatterCounting ScatterType;
|
using ScatterType = vtkm::worklet::ScatterCounting;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ScatterType GetScatter() const { return this->Scatter; }
|
ScatterType GetScatter() const { return this->Scatter; }
|
||||||
|
@ -138,7 +138,7 @@ public:
|
|||||||
{
|
{
|
||||||
case vtkm::cont::Field::ASSOC_POINTS:
|
case vtkm::cont::Field::ASSOC_POINTS:
|
||||||
{
|
{
|
||||||
typedef ThresholdByPointField<UnaryPredicate> ThresholdWorklet;
|
using ThresholdWorklet = ThresholdByPointField<UnaryPredicate>;
|
||||||
|
|
||||||
ThresholdWorklet worklet(predicate);
|
ThresholdWorklet worklet(predicate);
|
||||||
DispatcherMapTopology<ThresholdWorklet, DeviceAdapter> dispatcher(worklet);
|
DispatcherMapTopology<ThresholdWorklet, DeviceAdapter> dispatcher(worklet);
|
||||||
@ -147,7 +147,7 @@ public:
|
|||||||
}
|
}
|
||||||
case vtkm::cont::Field::ASSOC_CELL_SET:
|
case vtkm::cont::Field::ASSOC_CELL_SET:
|
||||||
{
|
{
|
||||||
typedef ThresholdByCellField<UnaryPredicate> ThresholdWorklet;
|
using ThresholdWorklet = ThresholdByCellField<UnaryPredicate>;
|
||||||
|
|
||||||
ThresholdWorklet worklet(predicate);
|
ThresholdWorklet worklet(predicate);
|
||||||
DispatcherMapTopology<ThresholdWorklet, DeviceAdapter> dispatcher(worklet);
|
DispatcherMapTopology<ThresholdWorklet, DeviceAdapter> dispatcher(worklet);
|
||||||
|
@ -79,11 +79,11 @@ public:
|
|||||||
const UnaryPredicate& predicate,
|
const UnaryPredicate& predicate,
|
||||||
DeviceAdapter)
|
DeviceAdapter)
|
||||||
{
|
{
|
||||||
typedef typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter> DeviceAlgorithm;
|
using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
|
||||||
|
|
||||||
vtkm::cont::ArrayHandle<bool> passFlags;
|
vtkm::cont::ArrayHandle<bool> passFlags;
|
||||||
|
|
||||||
typedef ThresholdPointField<UnaryPredicate> ThresholdWorklet;
|
using ThresholdWorklet = ThresholdPointField<UnaryPredicate>;
|
||||||
|
|
||||||
ThresholdWorklet worklet(predicate);
|
ThresholdWorklet worklet(predicate);
|
||||||
DispatcherMapTopology<ThresholdWorklet, DeviceAdapter> dispatcher(worklet);
|
DispatcherMapTopology<ThresholdWorklet, DeviceAdapter> dispatcher(worklet);
|
||||||
|
@ -39,7 +39,7 @@ public:
|
|||||||
typedef void ControlSignature(FieldIn<> inIndices, FieldOut<> outIndices);
|
typedef void ControlSignature(FieldIn<> inIndices, FieldOut<> outIndices);
|
||||||
typedef void ExecutionSignature(_1, _2);
|
typedef void ExecutionSignature(_1, _2);
|
||||||
|
|
||||||
typedef vtkm::worklet::ScatterCounting ScatterType;
|
using ScatterType = vtkm::worklet::ScatterCounting;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ScatterType GetScatter() const { return this->Scatter; }
|
ScatterType GetScatter() const { return this->Scatter; }
|
||||||
|
@ -167,7 +167,7 @@ struct VertexClustering
|
|||||||
template <typename PointType>
|
template <typename PointType>
|
||||||
VTKM_EXEC vtkm::Id GetClusterId(const PointType& p) const
|
VTKM_EXEC vtkm::Id GetClusterId(const PointType& p) const
|
||||||
{
|
{
|
||||||
typedef typename PointType::ComponentType ComponentType;
|
using ComponentType = typename PointType::ComponentType;
|
||||||
PointType gridOrigin(static_cast<ComponentType>(this->Grid.origin[0]),
|
PointType gridOrigin(static_cast<ComponentType>(this->Grid.origin[0]),
|
||||||
static_cast<ComponentType>(this->Grid.origin[1]),
|
static_cast<ComponentType>(this->Grid.origin[1]),
|
||||||
static_cast<ComponentType>(this->Grid.origin[2]));
|
static_cast<ComponentType>(this->Grid.origin[2]));
|
||||||
|
@ -70,12 +70,12 @@ public:
|
|||||||
std::vector<vtkm::Id> L1d(3, 0);
|
std::vector<vtkm::Id> L1d(3, 0);
|
||||||
|
|
||||||
// Use an intermediate array
|
// Use an intermediate array
|
||||||
typedef typename CoeffArrayType::ValueType OutputValueType;
|
using OutputValueType = typename CoeffArrayType::ValueType;
|
||||||
typedef vtkm::cont::ArrayHandle<OutputValueType> InterArrayType;
|
using InterArrayType = vtkm::cont::ArrayHandle<OutputValueType>;
|
||||||
|
|
||||||
// Define a few more types
|
// Define a few more types
|
||||||
typedef vtkm::cont::ArrayHandleCounting<vtkm::Id> IdArrayType;
|
using IdArrayType = vtkm::cont::ArrayHandleCounting<vtkm::Id>;
|
||||||
typedef vtkm::cont::ArrayHandlePermutation<IdArrayType, CoeffArrayType> PermutArrayType;
|
using PermutArrayType = vtkm::cont::ArrayHandlePermutation<IdArrayType, CoeffArrayType>;
|
||||||
|
|
||||||
vtkm::cont::ArrayCopy(sigIn, coeffOut, DeviceTag());
|
vtkm::cont::ArrayCopy(sigIn, coeffOut, DeviceTag());
|
||||||
|
|
||||||
@ -120,10 +120,10 @@ public:
|
|||||||
L1d[0] = L[0];
|
L1d[0] = L[0];
|
||||||
L1d[1] = L[1];
|
L1d[1] = L[1];
|
||||||
|
|
||||||
typedef typename SignalArrayType::ValueType OutValueType;
|
using OutValueType = typename SignalArrayType::ValueType;
|
||||||
typedef vtkm::cont::ArrayHandle<OutValueType> OutArrayBasic;
|
using OutArrayBasic = vtkm::cont::ArrayHandle<OutValueType>;
|
||||||
typedef vtkm::cont::ArrayHandleCounting<vtkm::Id> IdArrayType;
|
using IdArrayType = vtkm::cont::ArrayHandleCounting<vtkm::Id>;
|
||||||
typedef vtkm::cont::ArrayHandlePermutation<IdArrayType, SignalArrayType> PermutArrayType;
|
using PermutArrayType = vtkm::cont::ArrayHandlePermutation<IdArrayType, SignalArrayType>;
|
||||||
|
|
||||||
vtkm::cont::ArrayCopy(coeffIn, sigOut, DeviceTag());
|
vtkm::cont::ArrayCopy(coeffIn, sigOut, DeviceTag());
|
||||||
|
|
||||||
@ -181,8 +181,8 @@ public:
|
|||||||
vtkm::Id currentLenZ = inZ;
|
vtkm::Id currentLenZ = inZ;
|
||||||
std::vector<vtkm::Id> L3d(27, 0);
|
std::vector<vtkm::Id> L3d(27, 0);
|
||||||
|
|
||||||
typedef typename OutArrayType::ValueType OutValueType;
|
using OutValueType = typename OutArrayType::ValueType;
|
||||||
typedef vtkm::cont::ArrayHandle<OutValueType> OutBasicArray;
|
using OutBasicArray = vtkm::cont::ArrayHandle<OutValueType>;
|
||||||
|
|
||||||
// First level transform writes to the output array
|
// First level transform writes to the output array
|
||||||
vtkm::Float64 computationTime = WaveletDWT::DWT3D(sigIn,
|
vtkm::Float64 computationTime = WaveletDWT::DWT3D(sigIn,
|
||||||
@ -260,8 +260,8 @@ public:
|
|||||||
{
|
{
|
||||||
throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! ");
|
throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! ");
|
||||||
}
|
}
|
||||||
typedef typename OutArrayType::ValueType OutValueType;
|
using OutValueType = typename OutArrayType::ValueType;
|
||||||
typedef vtkm::cont::ArrayHandle<OutValueType> OutBasicArray;
|
using OutBasicArray = vtkm::cont::ArrayHandle<OutValueType>;
|
||||||
vtkm::Float64 computationTime = 0.0;
|
vtkm::Float64 computationTime = 0.0;
|
||||||
|
|
||||||
OutBasicArray outBuffer;
|
OutBasicArray outBuffer;
|
||||||
@ -356,8 +356,8 @@ public:
|
|||||||
std::vector<vtkm::Id> L2d(10, 0);
|
std::vector<vtkm::Id> L2d(10, 0);
|
||||||
vtkm::Float64 computationTime = 0.0;
|
vtkm::Float64 computationTime = 0.0;
|
||||||
|
|
||||||
typedef typename OutArrayType::ValueType OutValueType;
|
using OutValueType = typename OutArrayType::ValueType;
|
||||||
typedef vtkm::cont::ArrayHandle<OutValueType> OutBasicArray;
|
using OutBasicArray = vtkm::cont::ArrayHandle<OutValueType>;
|
||||||
|
|
||||||
// First level transform operates writes to the output array
|
// First level transform operates writes to the output array
|
||||||
computationTime += WaveletDWT::DWT2D(
|
computationTime += WaveletDWT::DWT2D(
|
||||||
@ -403,8 +403,8 @@ public:
|
|||||||
{
|
{
|
||||||
throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! ");
|
throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! ");
|
||||||
}
|
}
|
||||||
typedef typename OutArrayType::ValueType OutValueType;
|
using OutValueType = typename OutArrayType::ValueType;
|
||||||
typedef vtkm::cont::ArrayHandle<OutValueType> OutBasicArray;
|
using OutBasicArray = vtkm::cont::ArrayHandle<OutValueType>;
|
||||||
vtkm::Float64 computationTime = 0.0;
|
vtkm::Float64 computationTime = 0.0;
|
||||||
|
|
||||||
OutBasicArray outBuffer;
|
OutBasicArray outBuffer;
|
||||||
@ -472,8 +472,8 @@ public:
|
|||||||
if (ratio > 1.0)
|
if (ratio > 1.0)
|
||||||
{
|
{
|
||||||
vtkm::Id coeffLen = coeffIn.GetNumberOfValues();
|
vtkm::Id coeffLen = coeffIn.GetNumberOfValues();
|
||||||
typedef typename CoeffArrayType::ValueType ValueType;
|
using ValueType = typename CoeffArrayType::ValueType;
|
||||||
typedef vtkm::cont::ArrayHandle<ValueType> CoeffArrayBasic;
|
using CoeffArrayBasic = vtkm::cont::ArrayHandle<ValueType>;
|
||||||
CoeffArrayBasic sortedArray;
|
CoeffArrayBasic sortedArray;
|
||||||
vtkm::cont::ArrayCopy(coeffIn, sortedArray, DeviceTag());
|
vtkm::cont::ArrayCopy(coeffIn, sortedArray, DeviceTag());
|
||||||
|
|
||||||
@ -486,7 +486,7 @@ public:
|
|||||||
nthVal *= -1.0;
|
nthVal *= -1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef vtkm::worklet::wavelets::ThresholdWorklet ThresholdType;
|
using ThresholdType = vtkm::worklet::wavelets::ThresholdWorklet;
|
||||||
ThresholdType thresholdWorklet(nthVal);
|
ThresholdType thresholdWorklet(nthVal);
|
||||||
vtkm::worklet::DispatcherMapField<ThresholdType, DeviceTag> dispatcher(thresholdWorklet);
|
vtkm::worklet::DispatcherMapField<ThresholdType, DeviceTag> dispatcher(thresholdWorklet);
|
||||||
dispatcher.Invoke(coeffIn);
|
dispatcher.Invoke(coeffIn);
|
||||||
@ -505,17 +505,17 @@ public:
|
|||||||
#define MAKEVAL(a) (static_cast<VAL>(a))
|
#define MAKEVAL(a) (static_cast<VAL>(a))
|
||||||
VAL VarOrig = WaveletBase::DeviceCalculateVariance(original, DeviceTag());
|
VAL VarOrig = WaveletBase::DeviceCalculateVariance(original, DeviceTag());
|
||||||
|
|
||||||
typedef typename ArrayType::ValueType ValueType;
|
using ValueType = typename ArrayType::ValueType;
|
||||||
typedef vtkm::cont::ArrayHandle<ValueType> ArrayBasic;
|
using ArrayBasic = vtkm::cont::ArrayHandle<ValueType>;
|
||||||
ArrayBasic errorArray, errorSquare;
|
ArrayBasic errorArray, errorSquare;
|
||||||
|
|
||||||
// Use a worklet to calculate point-wise error, and its square
|
// Use a worklet to calculate point-wise error, and its square
|
||||||
typedef vtkm::worklet::wavelets::Differencer DifferencerWorklet;
|
using DifferencerWorklet = vtkm::worklet::wavelets::Differencer;
|
||||||
DifferencerWorklet dw;
|
DifferencerWorklet dw;
|
||||||
vtkm::worklet::DispatcherMapField<DifferencerWorklet> dwDispatcher(dw);
|
vtkm::worklet::DispatcherMapField<DifferencerWorklet> dwDispatcher(dw);
|
||||||
dwDispatcher.Invoke(original, reconstruct, errorArray);
|
dwDispatcher.Invoke(original, reconstruct, errorArray);
|
||||||
|
|
||||||
typedef vtkm::worklet::wavelets::SquareWorklet SquareWorklet;
|
using SquareWorklet = vtkm::worklet::wavelets::SquareWorklet;
|
||||||
SquareWorklet sw;
|
SquareWorklet sw;
|
||||||
vtkm::worklet::DispatcherMapField<SquareWorklet> swDispatcher(sw);
|
vtkm::worklet::DispatcherMapField<SquareWorklet> swDispatcher(sw);
|
||||||
swDispatcher.Invoke(errorArray, errorSquare);
|
swDispatcher.Invoke(errorArray, errorSquare);
|
||||||
|
@ -54,9 +54,9 @@ public:
|
|||||||
template <typename TypeList = AllTypes>
|
template <typename TypeList = AllTypes>
|
||||||
struct FieldIn : vtkm::cont::arg::ControlSignatureTagBase
|
struct FieldIn : vtkm::cont::arg::ControlSignatureTagBase
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::arg::TypeCheckTagArray<TypeList> TypeCheckTag;
|
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray<TypeList>;
|
||||||
typedef vtkm::cont::arg::TransportTagArrayIn TransportTag;
|
using TransportTag = vtkm::cont::arg::TransportTagArrayIn;
|
||||||
typedef vtkm::exec::arg::FetchTagArrayDirectIn FetchTag;
|
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief A control signature tag for output fields.
|
/// \brief A control signature tag for output fields.
|
||||||
@ -67,9 +67,9 @@ public:
|
|||||||
template <typename TypeList = AllTypes>
|
template <typename TypeList = AllTypes>
|
||||||
struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase
|
struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::arg::TypeCheckTagArray<TypeList> TypeCheckTag;
|
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray<TypeList>;
|
||||||
typedef vtkm::cont::arg::TransportTagArrayOut TransportTag;
|
using TransportTag = vtkm::cont::arg::TransportTagArrayOut;
|
||||||
typedef vtkm::exec::arg::FetchTagArrayDirectOut FetchTag;
|
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectOut;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief A control signature tag for input-output (in-place) fields.
|
/// \brief A control signature tag for input-output (in-place) fields.
|
||||||
@ -80,9 +80,9 @@ public:
|
|||||||
template <typename TypeList = AllTypes>
|
template <typename TypeList = AllTypes>
|
||||||
struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase
|
struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase
|
||||||
{
|
{
|
||||||
typedef vtkm::cont::arg::TypeCheckTagArray<TypeList> TypeCheckTag;
|
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray<TypeList>;
|
||||||
typedef vtkm::cont::arg::TransportTagArrayInOut TransportTag;
|
using TransportTag = vtkm::cont::arg::TransportTagArrayInOut;
|
||||||
typedef vtkm::exec::arg::FetchTagArrayDirectInOut FetchTag;
|
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectInOut;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// All worklets must define their scatter operation.
|
/// All worklets must define their scatter operation.
|
||||||
typedef vtkm::worklet::ScatterIdentity ScatterType;
|
using ScatterType = vtkm::worklet::ScatterIdentity;
|
||||||
|
|
||||||
/// In addition to defining the scatter type, the worklet must produce the
|
/// In addition to defining the scatter type, the worklet must produce the
|
||||||
/// scatter. The default vtkm::worklet::ScatterIdentity has no state,
|
/// scatter. The default vtkm::worklet::ScatterIdentity has no state,
|
||||||
@ -104,7 +104,7 @@ public:
|
|||||||
|
|
||||||
/// All neighborhood worklets must define their boundary type operation.
|
/// All neighborhood worklets must define their boundary type operation.
|
||||||
/// The boundary type determines how loading on boundaries will work.
|
/// The boundary type determines how loading on boundaries will work.
|
||||||
typedef vtkm::worklet::BoundaryClamp BoundaryType;
|
using BoundaryType = vtkm::worklet::BoundaryClamp;
|
||||||
|
|
||||||
/// In addition to defining the boundary type, the worklet must produce the
|
/// In addition to defining the boundary type, the worklet must produce the
|
||||||
/// boundary condition. The default BoundaryClamp has no state, so just return an
|
/// boundary condition. The default BoundaryClamp has no state, so just return an
|
||||||
|
@ -36,7 +36,7 @@ public:
|
|||||||
WholeArrayInOut<IdType> comp);
|
WholeArrayInOut<IdType> comp);
|
||||||
|
|
||||||
typedef void ExecutionSignature(_1, _2, _3, _4, _5);
|
typedef void ExecutionSignature(_1, _2, _3, _4, _5);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
// TODO: Use Scatter?
|
// TODO: Use Scatter?
|
||||||
template <typename InPortalType, typename InOutPortalType>
|
template <typename InPortalType, typename InOutPortalType>
|
||||||
@ -62,7 +62,7 @@ class PointerJumping : public vtkm::worklet::WorkletMapField
|
|||||||
public:
|
public:
|
||||||
typedef void ControlSignature(FieldIn<IdType> index, WholeArrayInOut<IdType> comp);
|
typedef void ControlSignature(FieldIn<IdType> index, WholeArrayInOut<IdType> comp);
|
||||||
typedef void ExecutionSignature(_1, _2);
|
typedef void ExecutionSignature(_1, _2);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
template <typename InOutPortalType>
|
template <typename InOutPortalType>
|
||||||
VTKM_EXEC void operator()(vtkm::Id index, InOutPortalType& comp) const
|
VTKM_EXEC void operator()(vtkm::Id index, InOutPortalType& comp) const
|
||||||
@ -80,7 +80,7 @@ class IsStar : public vtkm::worklet::WorkletMapField
|
|||||||
public:
|
public:
|
||||||
typedef void ControlSignature(FieldIn<IdType> index, WholeArrayIn<IdType> comp, FieldOut<>);
|
typedef void ControlSignature(FieldIn<IdType> index, WholeArrayIn<IdType> comp, FieldOut<>);
|
||||||
typedef _3 ExecutionSignature(_1, _2);
|
typedef _3 ExecutionSignature(_1, _2);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
template <typename InOutPortalType>
|
template <typename InOutPortalType>
|
||||||
VTKM_EXEC bool operator()(vtkm::Id index, InOutPortalType& comp) const
|
VTKM_EXEC bool operator()(vtkm::Id index, InOutPortalType& comp) const
|
||||||
|
@ -108,12 +108,11 @@ public:
|
|||||||
WholeArrayInOut<IdType> edgeFar, // (i/o) high end of each edge
|
WholeArrayInOut<IdType> edgeFar, // (i/o) high end of each edge
|
||||||
WholeArrayOut<IdType> newActiveEdges); // (output) new active edge list
|
WholeArrayOut<IdType> newActiveEdges); // (output) new active edge list
|
||||||
typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8);
|
typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
// Passed in constructor because of argument limit on operator
|
// Passed in constructor because of argument limit on operator
|
||||||
typedef
|
using IdPortalType =
|
||||||
typename vtkm::cont::ArrayHandle<vtkm::Id>::template ExecutionTypes<DeviceAdapter>::PortalConst
|
typename vtkm::cont::ArrayHandle<vtkm::Id>::template ExecutionTypes<DeviceAdapter>::PortalConst;
|
||||||
IdPortalType;
|
|
||||||
|
|
||||||
IdPortalType activeEdges; // (input) active edges
|
IdPortalType activeEdges; // (input) active edges
|
||||||
IdPortalType prunesTo; // (input) where a vertex prunes to
|
IdPortalType prunesTo; // (input) where a vertex prunes to
|
||||||
|
@ -103,7 +103,7 @@ class ChainDoubler : public vtkm::worklet::WorkletMapField
|
|||||||
public:
|
public:
|
||||||
typedef void ControlSignature(FieldIn<IdType> vertexID, WholeArrayInOut<IdType> chains);
|
typedef void ControlSignature(FieldIn<IdType> vertexID, WholeArrayInOut<IdType> chains);
|
||||||
typedef void ExecutionSignature(_1, _2);
|
typedef void ExecutionSignature(_1, _2);
|
||||||
typedef _1 InputDomain;
|
using InputDomain = _1;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
VTKM_EXEC_CONT
|
VTKM_EXEC_CONT
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user