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