Convert VTK-m over to use 'using' instead of 'typedef'
This commit is contained in:
parent
1a09338e0c
commit
b85cdd9080
@ -87,7 +87,7 @@ struct CellShapeIdToTag
|
||||
// probably means you are using an ID that does not have a defined cell
|
||||
// shape.
|
||||
|
||||
typedef std::false_type valid;
|
||||
using valid = std::false_type;
|
||||
};
|
||||
|
||||
// Define a tag for each cell shape as well as the support structs to go
|
||||
@ -112,8 +112,8 @@ struct CellShapeIdToTag
|
||||
template <> \
|
||||
struct CellShapeIdToTag<vtkm::idname> \
|
||||
{ \
|
||||
typedef std::true_type valid; \
|
||||
typedef vtkm::CellShapeTag##name Tag; \
|
||||
using valid = std::true_type; \
|
||||
using Tag = vtkm::CellShapeTag##name; \
|
||||
}
|
||||
|
||||
VTKM_DEFINE_CELL_TAG(Empty, CELL_SHAPE_EMPTY);
|
||||
@ -153,7 +153,7 @@ struct CellShapeTagGeneric
|
||||
#define vtkmGenericCellShapeMacroCase(cellShapeId, call) \
|
||||
case vtkm::cellShapeId: \
|
||||
{ \
|
||||
typedef vtkm::CellShapeIdToTag<vtkm::cellShapeId>::Tag CellShapeTag; \
|
||||
using CellShapeTag = vtkm::CellShapeIdToTag<vtkm::cellShapeId>::Tag; \
|
||||
call; \
|
||||
} \
|
||||
break
|
||||
|
16
vtkm/Math.h
16
vtkm/Math.h
@ -100,13 +100,13 @@ struct FloatingPointReturnCondition
|
||||
template <typename T, typename = void>
|
||||
struct FloatingPointReturnType
|
||||
{
|
||||
typedef vtkm::Float64 Type;
|
||||
using Type = vtkm::Float64;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct FloatingPointReturnType<T, typename FloatingPointReturnCondition<T>::type>
|
||||
{
|
||||
typedef vtkm::Float32 Type;
|
||||
using Type = vtkm::Float32;
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
@ -1731,7 +1731,7 @@ static inline VTKM_EXEC_CONT T Max(T x, T y, vtkm::TypeTraitsScalarTag)
|
||||
template <typename T>
|
||||
static inline VTKM_EXEC_CONT T Max(const T& x, const T& y, vtkm::TypeTraitsVectorTag)
|
||||
{
|
||||
typedef vtkm::VecTraits<T> Traits;
|
||||
using Traits = vtkm::VecTraits<T>;
|
||||
T result;
|
||||
for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; index++)
|
||||
{
|
||||
@ -1750,7 +1750,7 @@ static inline VTKM_EXEC_CONT T Min(T x, T y, vtkm::TypeTraitsScalarTag)
|
||||
template <typename T>
|
||||
static inline VTKM_EXEC_CONT T Min(const T& x, const T& y, vtkm::TypeTraitsVectorTag)
|
||||
{
|
||||
typedef vtkm::VecTraits<T> Traits;
|
||||
using Traits = vtkm::VecTraits<T>;
|
||||
T result;
|
||||
for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; index++)
|
||||
{
|
||||
@ -1813,7 +1813,7 @@ struct FloatLimits;
|
||||
template <>
|
||||
struct FloatLimits<vtkm::Float32>
|
||||
{
|
||||
typedef vtkm::detail::IEEE754Bits32 BitsType;
|
||||
using BitsType = vtkm::detail::IEEE754Bits32;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::Float32 Nan()
|
||||
@ -1843,7 +1843,7 @@ struct FloatLimits<vtkm::Float32>
|
||||
template <int N>
|
||||
struct FloatLimits<vtkm::Vec<vtkm::Float32, N>>
|
||||
{
|
||||
typedef vtkm::detail::IEEE754Bits32 BitsType;
|
||||
using BitsType = vtkm::detail::IEEE754Bits32;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::Vec<vtkm::Float32, N> Nan()
|
||||
@ -1876,7 +1876,7 @@ struct FloatLimits<vtkm::Vec<vtkm::Float32, N>>
|
||||
template <>
|
||||
struct FloatLimits<vtkm::Float64>
|
||||
{
|
||||
typedef vtkm::detail::IEEE754Bits64 BitsType;
|
||||
using BitsType = vtkm::detail::IEEE754Bits64;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::Float64 Nan()
|
||||
@ -1906,7 +1906,7 @@ struct FloatLimits<vtkm::Float64>
|
||||
template <int N>
|
||||
struct FloatLimits<vtkm::Vec<vtkm::Float64, N>>
|
||||
{
|
||||
typedef vtkm::detail::IEEE754Bits64 BitsType;
|
||||
using BitsType = vtkm::detail::IEEE754Bits64;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::Vec<vtkm::Float64, N> Nan()
|
||||
|
@ -247,13 +247,13 @@ struct FloatingPointReturnCondition
|
||||
template <typename T, typename = void>
|
||||
struct FloatingPointReturnType
|
||||
{
|
||||
typedef vtkm::Float64 Type;
|
||||
using Type = vtkm::Float64;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct FloatingPointReturnType<T, typename FloatingPointReturnCondition<T>::type>
|
||||
{
|
||||
typedef vtkm::Float32 Type;
|
||||
using Type = vtkm::Float32;
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
@ -513,7 +513,7 @@ static inline VTKM_EXEC_CONT T Max(T x, T y, vtkm::TypeTraitsScalarTag)
|
||||
template <typename T>
|
||||
static inline VTKM_EXEC_CONT T Max(const T& x, const T& y, vtkm::TypeTraitsVectorTag)
|
||||
{
|
||||
typedef vtkm::VecTraits<T> Traits;
|
||||
using Traits = vtkm::VecTraits<T>;
|
||||
T result;
|
||||
for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; index++)
|
||||
{
|
||||
@ -532,7 +532,7 @@ static inline VTKM_EXEC_CONT T Min(T x, T y, vtkm::TypeTraitsScalarTag)
|
||||
template <typename T>
|
||||
static inline VTKM_EXEC_CONT T Min(const T& x, const T& y, vtkm::TypeTraitsVectorTag)
|
||||
{
|
||||
typedef vtkm::VecTraits<T> Traits;
|
||||
using Traits = vtkm::VecTraits<T>;
|
||||
T result;
|
||||
for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; index++)
|
||||
{
|
||||
@ -595,7 +595,7 @@ struct FloatLimits;
|
||||
template <>
|
||||
struct FloatLimits<vtkm::Float32>
|
||||
{
|
||||
typedef vtkm::detail::IEEE754Bits32 BitsType;
|
||||
using BitsType = vtkm::detail::IEEE754Bits32;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::Float32 Nan()
|
||||
@ -625,7 +625,7 @@ struct FloatLimits<vtkm::Float32>
|
||||
template <int N>
|
||||
struct FloatLimits<vtkm::Vec<vtkm::Float32, N>>
|
||||
{
|
||||
typedef vtkm::detail::IEEE754Bits32 BitsType;
|
||||
using BitsType = vtkm::detail::IEEE754Bits32;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::Vec<vtkm::Float32, N> Nan()
|
||||
@ -658,7 +658,7 @@ struct FloatLimits<vtkm::Vec<vtkm::Float32, N>>
|
||||
template <>
|
||||
struct FloatLimits<vtkm::Float64>
|
||||
{
|
||||
typedef vtkm::detail::IEEE754Bits64 BitsType;
|
||||
using BitsType = vtkm::detail::IEEE754Bits64;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::Float64 Nan()
|
||||
@ -688,7 +688,7 @@ struct FloatLimits<vtkm::Float64>
|
||||
template <int N>
|
||||
struct FloatLimits<vtkm::Vec<vtkm::Float64, N>>
|
||||
{
|
||||
typedef vtkm::detail::IEEE754Bits64 BitsType;
|
||||
using BitsType = vtkm::detail::IEEE754Bits64;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::Vec<vtkm::Float64, N> Nan()
|
||||
|
@ -45,7 +45,7 @@ template <typename T, vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
|
||||
class Matrix
|
||||
{
|
||||
public:
|
||||
typedef T ComponentType;
|
||||
using ComponentType = T;
|
||||
static const vtkm::IdComponent NUM_ROWS = NumRow;
|
||||
static const vtkm::IdComponent NUM_COLUMNS = NumCol;
|
||||
|
||||
@ -533,8 +533,8 @@ struct TypeTraitsMatrixTag
|
||||
template <typename T, vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
|
||||
struct TypeTraits<vtkm::Matrix<T, NumRow, NumCol>>
|
||||
{
|
||||
typedef typename TypeTraits<T>::NumericTag NumericTag;
|
||||
typedef TypeTraitsMatrixTag DimensionalityTag;
|
||||
using NumericTag = typename TypeTraits<T>::NumericTag;
|
||||
using DimensionalityTag = vtkm::TypeTraitsMatrixTag;
|
||||
};
|
||||
|
||||
/// A matrix has vector traits to implement component-wise operations.
|
||||
@ -543,13 +543,13 @@ template <typename T, vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
|
||||
struct VecTraits<vtkm::Matrix<T, NumRow, NumCol>>
|
||||
{
|
||||
private:
|
||||
typedef vtkm::Matrix<T, NumRow, NumCol> MatrixType;
|
||||
using MatrixType = vtkm::Matrix<T, NumRow, NumCol>;
|
||||
|
||||
public:
|
||||
typedef T ComponentType;
|
||||
using ComponentType = T;
|
||||
static const vtkm::IdComponent NUM_COMPONENTS = NumRow * NumCol;
|
||||
typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents;
|
||||
typedef vtkm::VecTraitsTagSizeStatic IsSizeStatic;
|
||||
using HasMultipleComponents = vtkm::VecTraitsTagMultipleComponents;
|
||||
using IsSizeStatic = vtkm::VecTraitsTagSizeStatic;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::IdComponent GetNumberOfComponents(const MatrixType&) { return NUM_COMPONENTS; }
|
||||
|
@ -40,19 +40,19 @@ struct Pair
|
||||
{
|
||||
/// The type of the first object.
|
||||
///
|
||||
typedef T1 FirstType;
|
||||
using FirstType = T1;
|
||||
|
||||
/// The type of the second object.
|
||||
///
|
||||
typedef T2 SecondType;
|
||||
using SecondType = T2;
|
||||
|
||||
/// The same as FirstType, but follows the naming convention of std::pair.
|
||||
///
|
||||
typedef FirstType first_type;
|
||||
using first_type = FirstType;
|
||||
|
||||
/// The same as SecondType, but follows the naming convention of std::pair.
|
||||
///
|
||||
typedef SecondType second_type;
|
||||
using second_type = SecondType;
|
||||
|
||||
/// The pair's first object. Note that this field breaks VTK-m's naming
|
||||
/// conventions to make vtkm::Pair more compatible with std::pair.
|
||||
|
@ -74,13 +74,13 @@ public:
|
||||
/// \brief A tag to determing whether the type is integer or real.
|
||||
///
|
||||
/// This tag is either TypeTraitsRealTag or TypeTraitsIntegerTag.
|
||||
typedef TypeTraitsUnknownTag NumericTag;
|
||||
using NumericTag = vtkm::TypeTraitsUnknownTag;
|
||||
|
||||
/// \brief A tag to determine whether the type has multiple components.
|
||||
///
|
||||
/// This tag is either TypeTraitsScalarTag or TypeTraitsVectorTag. Scalars can
|
||||
/// also be treated as vectors.
|
||||
typedef TypeTraitsUnknownTag DimensionalityTag;
|
||||
using DimensionalityTag = vtkm::TypeTraitsUnknownTag;
|
||||
|
||||
VTKM_EXEC_CONT static T ZeroInitialization() { return T(); }
|
||||
};
|
||||
@ -96,8 +96,8 @@ struct TypeTraits<const T> : TypeTraits<T>
|
||||
template <> \
|
||||
struct TypeTraits<T> \
|
||||
{ \
|
||||
typedef TypeTraitsRealTag NumericTag; \
|
||||
typedef TypeTraitsScalarTag DimensionalityTag; \
|
||||
using NumericTag = TypeTraitsRealTag; \
|
||||
using DimensionalityTag = TypeTraitsScalarTag; \
|
||||
VTKM_EXEC_CONT static T ZeroInitialization() { return T(); } \
|
||||
};
|
||||
|
||||
@ -105,11 +105,11 @@ struct TypeTraits<const T> : TypeTraits<T>
|
||||
template <> \
|
||||
struct TypeTraits<T> \
|
||||
{ \
|
||||
typedef TypeTraitsIntegerTag NumericTag; \
|
||||
typedef TypeTraitsScalarTag DimensionalityTag; \
|
||||
using NumericTag = TypeTraitsIntegerTag; \
|
||||
using DimensionalityTag = TypeTraitsScalarTag; \
|
||||
VTKM_EXEC_CONT static T ZeroInitialization() \
|
||||
{ \
|
||||
typedef T ReturnType; \
|
||||
using ReturnType = T; \
|
||||
return ReturnType(); \
|
||||
} \
|
||||
};
|
||||
@ -140,8 +140,8 @@ VTKM_BASIC_INTEGER_TYPE(unsigned long long)
|
||||
template <typename T, vtkm::IdComponent Size>
|
||||
struct TypeTraits<vtkm::Vec<T, Size>>
|
||||
{
|
||||
typedef typename vtkm::TypeTraits<T>::NumericTag NumericTag;
|
||||
typedef TypeTraitsVectorTag DimensionalityTag;
|
||||
using NumericTag = typename vtkm::TypeTraits<T>::NumericTag;
|
||||
using DimensionalityTag = vtkm::TypeTraitsVectorTag;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::Vec<T, Size> ZeroInitialization()
|
||||
@ -179,8 +179,8 @@ struct TypeTraits<vtkm::VecC<T>>
|
||||
template <typename T, typename U>
|
||||
struct TypeTraits<vtkm::Pair<T, U>>
|
||||
{
|
||||
typedef TypeTraitsUnknownTag NumericTag;
|
||||
typedef TypeTraitsScalarTag DimensionalityTag;
|
||||
using NumericTag = vtkm::TypeTraitsUnknownTag;
|
||||
using DimensionalityTag = vtkm::TypeTraitsScalarTag;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::Pair<T, U> ZeroInitialization()
|
||||
|
60
vtkm/Types.h
60
vtkm/Types.h
@ -145,45 +145,45 @@ namespace vtkm
|
||||
//*****************************************************************************
|
||||
|
||||
#if VTKM_SIZE_FLOAT == 4
|
||||
typedef float Float32;
|
||||
using Float32 = float;
|
||||
#else
|
||||
#error Could not find a 32-bit float.
|
||||
#endif
|
||||
|
||||
#if VTKM_SIZE_DOUBLE == 8
|
||||
typedef double Float64;
|
||||
using Float64 = double;
|
||||
#else
|
||||
#error Could not find a 64-bit float.
|
||||
#endif
|
||||
|
||||
#if VTKM_SIZE_CHAR == 1
|
||||
typedef signed char Int8;
|
||||
typedef unsigned char UInt8;
|
||||
using Int8 = signed char;
|
||||
using UInt8 = unsigned char;
|
||||
#else
|
||||
#error Could not find an 8-bit integer.
|
||||
#endif
|
||||
|
||||
#if VTKM_SIZE_SHORT == 2
|
||||
typedef signed short Int16;
|
||||
typedef unsigned short UInt16;
|
||||
using Int16 = short;
|
||||
using UInt16 = unsigned short;
|
||||
#else
|
||||
#error Could not find a 16-bit integer.
|
||||
#endif
|
||||
|
||||
#if VTKM_SIZE_INT == 4
|
||||
typedef signed int Int32;
|
||||
typedef unsigned int UInt32;
|
||||
using Int32 = int;
|
||||
using UInt32 = unsigned int;
|
||||
#else
|
||||
#error Could not find a 32-bit integer.
|
||||
#endif
|
||||
|
||||
//In this order so that we exactly match the logic that exists in VTK
|
||||
#if VTKM_SIZE_LONG_LONG == 8
|
||||
typedef signed long long Int64;
|
||||
typedef unsigned long long UInt64;
|
||||
using Int64 = long long;
|
||||
using UInt64 = unsigned long long;
|
||||
#elif VTKM_SIZE_LONG == 8
|
||||
typedef signed long Int64;
|
||||
typedef unsigned long UInt64;
|
||||
using Int64 = signed long;
|
||||
using UInt64 = unsigned long;
|
||||
#else
|
||||
#error Could not find a 64-bit integer.
|
||||
#endif
|
||||
@ -193,12 +193,12 @@ typedef unsigned long UInt64;
|
||||
#if VTKM_SIZE_ID == 4
|
||||
|
||||
/// Represents an ID (index into arrays).
|
||||
typedef vtkm::Int32 Id;
|
||||
using Id = vtkm::Int32;
|
||||
|
||||
#elif VTKM_SIZE_ID == 8
|
||||
|
||||
/// Represents an ID.
|
||||
typedef vtkm::Int64 Id;
|
||||
using Id = vtkm::Int64;
|
||||
|
||||
#else
|
||||
#error Unknown Id Size
|
||||
@ -209,17 +209,17 @@ typedef vtkm::Int64 Id;
|
||||
/// to be quite small. However, we are currently using a 32-bit width
|
||||
/// integer because modern processors tend to access them more efficiently
|
||||
/// than smaller widths.
|
||||
typedef vtkm::Int32 IdComponent;
|
||||
using IdComponent = vtkm::Int32;
|
||||
|
||||
#ifdef VTKM_USE_DOUBLE_PRECISION
|
||||
|
||||
/// The floating point type to use when no other precision is specified.
|
||||
typedef vtkm::Float64 FloatDefault;
|
||||
using FloatDefault = vtkm::Float64;
|
||||
|
||||
#else //VTKM_USE_DOUBLE_PRECISION
|
||||
|
||||
/// The floating point type to use when no other precision is specified.
|
||||
typedef vtkm::Float32 FloatDefault;
|
||||
using FloatDefault = vtkm::Float32;
|
||||
|
||||
#endif //VTKM_USE_DOUBLE_PRECISION
|
||||
|
||||
@ -434,7 +434,7 @@ template <typename T, typename DerivedClass>
|
||||
class VTKM_ALWAYS_EXPORT VecBaseCommon
|
||||
{
|
||||
public:
|
||||
typedef T ComponentType;
|
||||
using ComponentType = T;
|
||||
|
||||
protected:
|
||||
VTKM_EXEC_CONT
|
||||
@ -661,7 +661,7 @@ template <typename T, vtkm::IdComponent Size, typename DerivedClass>
|
||||
class VTKM_ALWAYS_EXPORT VecBase : public vtkm::detail::VecBaseCommon<T, DerivedClass>
|
||||
{
|
||||
public:
|
||||
typedef T ComponentType;
|
||||
using ComponentType = T;
|
||||
static const vtkm::IdComponent NUM_COMPONENTS = Size;
|
||||
|
||||
protected:
|
||||
@ -814,11 +814,11 @@ protected:
|
||||
template <typename T, vtkm::IdComponent Size>
|
||||
class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase<T, Size, Vec<T, Size>>
|
||||
{
|
||||
typedef detail::VecBase<T, Size, Vec<T, Size>> Superclass;
|
||||
using Superclass = detail::VecBase<T, Size, Vec<T, Size>>;
|
||||
|
||||
public:
|
||||
#ifdef VTKM_DOXYGEN_ONLY
|
||||
typedef T ComponentType;
|
||||
using ComponentType = T;
|
||||
static const vtkm::IdComponent NUM_COMPONENTS = Size;
|
||||
#endif
|
||||
|
||||
@ -846,7 +846,7 @@ template <typename T>
|
||||
class VTKM_ALWAYS_EXPORT Vec<T, 0>
|
||||
{
|
||||
public:
|
||||
typedef T ComponentType;
|
||||
using ComponentType = T;
|
||||
static const vtkm::IdComponent NUM_COMPONENTS = 0;
|
||||
|
||||
VTKM_EXEC_CONT Vec() {}
|
||||
@ -877,7 +877,7 @@ public:
|
||||
template <typename T>
|
||||
class VTKM_ALWAYS_EXPORT Vec<T, 1> : public detail::VecBase<T, 1, Vec<T, 1>>
|
||||
{
|
||||
typedef detail::VecBase<T, 1, Vec<T, 1>> Superclass;
|
||||
using Superclass = detail::VecBase<T, 1, Vec<T, 1>>;
|
||||
|
||||
public:
|
||||
VTKM_EXEC_CONT Vec() {}
|
||||
@ -907,7 +907,7 @@ public:
|
||||
template <typename T>
|
||||
class VTKM_ALWAYS_EXPORT Vec<T, 2> : public detail::VecBase<T, 2, Vec<T, 2>>
|
||||
{
|
||||
typedef detail::VecBase<T, 2, Vec<T, 2>> Superclass;
|
||||
using Superclass = detail::VecBase<T, 2, Vec<T, 2>>;
|
||||
|
||||
public:
|
||||
VTKM_EXEC_CONT Vec() {}
|
||||
@ -931,12 +931,12 @@ public:
|
||||
};
|
||||
|
||||
/// Id2 corresponds to a 2-dimensional index
|
||||
typedef vtkm::Vec<vtkm::Id, 2> Id2;
|
||||
using Id2 = vtkm::Vec<vtkm::Id, 2>;
|
||||
|
||||
template <typename T>
|
||||
class VTKM_ALWAYS_EXPORT Vec<T, 3> : public detail::VecBase<T, 3, Vec<T, 3>>
|
||||
{
|
||||
typedef detail::VecBase<T, 3, Vec<T, 3>> Superclass;
|
||||
using Superclass = detail::VecBase<T, 3, Vec<T, 3>>;
|
||||
|
||||
public:
|
||||
VTKM_EXEC_CONT Vec() {}
|
||||
@ -962,12 +962,12 @@ public:
|
||||
|
||||
/// Id3 corresponds to a 3-dimensional index for 3d arrays. Note that
|
||||
/// the precision of each index may be less than vtkm::Id.
|
||||
typedef vtkm::Vec<vtkm::Id, 3> Id3;
|
||||
using Id3 = vtkm::Vec<vtkm::Id, 3>;
|
||||
|
||||
template <typename T>
|
||||
class VTKM_ALWAYS_EXPORT Vec<T, 4> : public detail::VecBase<T, 4, Vec<T, 4>>
|
||||
{
|
||||
typedef detail::VecBase<T, 4, Vec<T, 4>> Superclass;
|
||||
using Superclass = detail::VecBase<T, 4, Vec<T, 4>>;
|
||||
|
||||
public:
|
||||
VTKM_EXEC_CONT Vec() {}
|
||||
@ -999,12 +999,12 @@ public:
|
||||
template <typename ComponentType, vtkm::IdComponent NumComponents>
|
||||
struct VecOrScalar
|
||||
{
|
||||
typedef vtkm::Vec<ComponentType, NumComponents> Type;
|
||||
using Type = vtkm::Vec<ComponentType, NumComponents>;
|
||||
};
|
||||
template <typename ComponentType>
|
||||
struct VecOrScalar<ComponentType, 1>
|
||||
{
|
||||
typedef ComponentType Type;
|
||||
using Type = ComponentType;
|
||||
};
|
||||
|
||||
/// Initializes and returns a Vec of length 2.
|
||||
|
@ -58,13 +58,13 @@ namespace internal
|
||||
template <vtkm::IdComponent numComponents>
|
||||
struct VecTraitsMultipleComponentChooser
|
||||
{
|
||||
typedef VecTraitsTagMultipleComponents Type;
|
||||
using Type = vtkm::VecTraitsTagMultipleComponents;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct VecTraitsMultipleComponentChooser<1>
|
||||
{
|
||||
typedef VecTraitsTagSingleComponent Type;
|
||||
using Type = vtkm::VecTraitsTagSingleComponent;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
@ -78,7 +78,7 @@ struct VecTraits
|
||||
{
|
||||
/// Type of the components in the vector.
|
||||
///
|
||||
typedef typename VecType::ComponentType ComponentType;
|
||||
using ComponentType = typename VecType::ComponentType;
|
||||
|
||||
/// \brief Number of components in the vector.
|
||||
///
|
||||
@ -95,8 +95,8 @@ struct VecTraits
|
||||
/// This tag can be useful for creating specialized functions when a vector
|
||||
/// is really just a scalar.
|
||||
///
|
||||
typedef typename internal::VecTraitsMultipleComponentChooser<NUM_COMPONENTS>::Type
|
||||
HasMultipleComponents;
|
||||
using HasMultipleComponents =
|
||||
typename internal::VecTraitsMultipleComponentChooser<NUM_COMPONENTS>::Type;
|
||||
|
||||
/// \brief A tag specifying whether the size of this vector is known at compile time.
|
||||
///
|
||||
@ -104,7 +104,7 @@ struct VecTraits
|
||||
/// set to \c VecTraitsTagSizeVariable, then the number of components is not
|
||||
/// known at compile time and must be queried with \c GetNumberOfComponents.
|
||||
///
|
||||
typedef vtkm::VecTraitsTagSizeStatic IsSizeStatic;
|
||||
using IsSizeStatic = vtkm::VecTraitsTagSizeStatic;
|
||||
|
||||
/// Returns the value in a given component of the vector.
|
||||
///
|
||||
@ -141,11 +141,11 @@ struct VecTraits<const T> : VecTraits<T>
|
||||
template <typename T, vtkm::IdComponent Size>
|
||||
struct VecTraits<vtkm::Vec<T, Size>>
|
||||
{
|
||||
typedef vtkm::Vec<T, Size> VecType;
|
||||
using VecType = vtkm::Vec<T, Size>;
|
||||
|
||||
/// Type of the components in the vector.
|
||||
///
|
||||
typedef typename VecType::ComponentType ComponentType;
|
||||
using ComponentType = typename VecType::ComponentType;
|
||||
|
||||
/// Number of components in the vector.
|
||||
///
|
||||
@ -160,8 +160,8 @@ struct VecTraits<vtkm::Vec<T, Size>>
|
||||
/// "real" vector). This tag can be useful for creating specialized functions
|
||||
/// when a vector is really just a scalar.
|
||||
///
|
||||
typedef typename internal::VecTraitsMultipleComponentChooser<NUM_COMPONENTS>::Type
|
||||
HasMultipleComponents;
|
||||
using HasMultipleComponents =
|
||||
typename internal::VecTraitsMultipleComponentChooser<NUM_COMPONENTS>::Type;
|
||||
|
||||
/// A tag specifying whether the size of this vector is known at compile
|
||||
/// time. If set to \c VecTraitsTagSizeStatic, then \c NUM_COMPONENTS is set.
|
||||
@ -169,7 +169,7 @@ struct VecTraits<vtkm::Vec<T, Size>>
|
||||
/// not known at compile time and must be queried with \c
|
||||
/// GetNumberOfComponents.
|
||||
///
|
||||
typedef vtkm::VecTraitsTagSizeStatic IsSizeStatic;
|
||||
using IsSizeStatic = vtkm::VecTraitsTagSizeStatic;
|
||||
|
||||
/// Returns the value in a given component of the vector.
|
||||
///
|
||||
@ -334,10 +334,10 @@ namespace internal
|
||||
template <typename ScalarType>
|
||||
struct VecTraitsBasic
|
||||
{
|
||||
typedef ScalarType ComponentType;
|
||||
using ComponentType = ScalarType;
|
||||
static const vtkm::IdComponent NUM_COMPONENTS = 1;
|
||||
typedef VecTraitsTagSingleComponent HasMultipleComponents;
|
||||
typedef vtkm::VecTraitsTagSizeStatic IsSizeStatic;
|
||||
using HasMultipleComponents = vtkm::VecTraitsTagSingleComponent;
|
||||
using IsSizeStatic = vtkm::VecTraitsTagSizeStatic;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
static vtkm::IdComponent GetNumberOfComponents(const ScalarType&) { return 1; }
|
||||
|
@ -128,15 +128,15 @@ struct GetTypeInParentheses;
|
||||
template <typename T>
|
||||
struct GetTypeInParentheses<void(T)>
|
||||
{
|
||||
typedef T type;
|
||||
using type = T;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
// Implementation for VTKM_ARRAY_HANDLE_SUBCLASS macros
|
||||
#define VTK_M_ARRAY_HANDLE_SUBCLASS_IMPL(classname, fullclasstype, superclass, typename__) \
|
||||
typedef typename__ vtkm::cont::detail::GetTypeInParentheses<void fullclasstype>::type Thisclass; \
|
||||
typedef typename__ vtkm::cont::detail::GetTypeInParentheses<void superclass>::type Superclass; \
|
||||
using Thisclass = typename__ vtkm::cont::detail::GetTypeInParentheses<void fullclasstype>::type; \
|
||||
using Superclass = typename__ vtkm::cont::detail::GetTypeInParentheses<void superclass>::type; \
|
||||
\
|
||||
VTKM_IS_ARRAY_HANDLE(Superclass); \
|
||||
\
|
||||
@ -166,8 +166,8 @@ struct GetTypeInParentheses<void(T)>
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
typedef typename__ Superclass::ValueType ValueType; \
|
||||
typedef typename__ Superclass::StorageTag StorageTag
|
||||
using ValueType = typename__ Superclass::ValueType; \
|
||||
using StorageTag = typename__ Superclass::StorageTag
|
||||
|
||||
/// \brief Macro to make default methods in ArrayHandle subclasses.
|
||||
///
|
||||
@ -250,17 +250,17 @@ private:
|
||||
vtkm::cont::internal::ArrayHandleExecutionManagerBase<T, StorageTag_>;
|
||||
|
||||
public:
|
||||
typedef vtkm::cont::internal::Storage<T, StorageTag_> StorageType;
|
||||
typedef T ValueType;
|
||||
typedef StorageTag_ StorageTag;
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
using StorageType = vtkm::cont::internal::Storage<T, StorageTag_>;
|
||||
using ValueType = T;
|
||||
using StorageTag = StorageTag_;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
template <typename DeviceAdapterTag>
|
||||
struct ExecutionTypes
|
||||
{
|
||||
typedef typename ExecutionManagerType::template ExecutionTypes<DeviceAdapterTag>::Portal Portal;
|
||||
typedef typename ExecutionManagerType::template ExecutionTypes<DeviceAdapterTag>::PortalConst
|
||||
PortalConst;
|
||||
using Portal = typename ExecutionManagerType::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||
using PortalConst =
|
||||
typename ExecutionManagerType::template ExecutionTypes<DeviceAdapterTag>::PortalConst;
|
||||
};
|
||||
|
||||
/// Constructs an empty ArrayHandle. Typically used for output or
|
||||
@ -488,8 +488,8 @@ template <typename T>
|
||||
VTKM_CONT vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic> make_ArrayHandle(const T* array,
|
||||
vtkm::Id length)
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic> ArrayHandleType;
|
||||
typedef vtkm::cont::internal::Storage<T, vtkm::cont::StorageTagBasic> StorageType;
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic>;
|
||||
using StorageType = vtkm::cont::internal::Storage<T, vtkm::cont::StorageTagBasic>;
|
||||
return ArrayHandleType(StorageType(array, length));
|
||||
}
|
||||
|
||||
|
@ -175,8 +175,8 @@ void ArrayHandle<T, S>::CopyInto(IteratorType dest, DeviceAdapterTag) const
|
||||
/// class and call CopyInto. The dynamic conversion will be sucessful
|
||||
/// becuase the check to ensure the ExecutionArray is of the type
|
||||
/// DeviceAdapterTag has already passed
|
||||
typedef vtkm::cont::internal::ArrayHandleExecutionManager<T, StorageTag, DeviceAdapterTag>
|
||||
ConcreteType;
|
||||
using ConcreteType =
|
||||
vtkm::cont::internal::ArrayHandleExecutionManager<T, StorageTag, DeviceAdapterTag>;
|
||||
ConcreteType* ConcreteExecutionArray =
|
||||
dynamic_cast<ConcreteType*>(this->Internals->ExecutionArray.get());
|
||||
|
||||
|
@ -41,11 +41,11 @@ template <typename ValueType_,
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalCartesianProduct
|
||||
{
|
||||
public:
|
||||
typedef ValueType_ ValueType;
|
||||
typedef ValueType_ IteratorType;
|
||||
typedef PortalTypeFirst_ PortalTypeFirst;
|
||||
typedef PortalTypeSecond_ PortalTypeSecond;
|
||||
typedef PortalTypeThird_ PortalTypeThird;
|
||||
using ValueType = ValueType_;
|
||||
using IteratorType = ValueType_;
|
||||
using PortalTypeFirst = PortalTypeFirst_;
|
||||
using PortalTypeSecond = PortalTypeSecond_;
|
||||
using PortalTypeThird = PortalTypeThird_;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC_CONT
|
||||
@ -189,7 +189,7 @@ class Storage<T, StorageTagCartesianProduct<FirstHandleType, SecondHandleType, T
|
||||
VTKM_IS_ARRAY_HANDLE(ThirdHandleType);
|
||||
|
||||
public:
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalCartesianProduct<
|
||||
ValueType,
|
||||
@ -292,10 +292,10 @@ class ArrayTransfer<T,
|
||||
typedef vtkm::cont::internal::Storage<T, StorageTag> StorageType;
|
||||
|
||||
public:
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalCartesianProduct<
|
||||
ValueType,
|
||||
|
@ -46,7 +46,7 @@ template <typename ValueType>
|
||||
struct VTKM_ALWAYS_EXPORT CompositeVectorSwizzleFunctor
|
||||
{
|
||||
static const vtkm::IdComponent NUM_COMPONENTS = vtkm::VecTraits<ValueType>::NUM_COMPONENTS;
|
||||
typedef vtkm::Vec<vtkm::IdComponent, NUM_COMPONENTS> ComponentMapType;
|
||||
using ComponentMapType = vtkm::Vec<vtkm::IdComponent, NUM_COMPONENTS>;
|
||||
|
||||
// Caution! This is a reference.
|
||||
const ComponentMapType& SourceComponents;
|
||||
@ -118,7 +118,7 @@ struct CompositeVectorArrayToPortalCont
|
||||
template <typename ArrayHandleType, vtkm::IdComponent Index>
|
||||
struct ReturnType
|
||||
{
|
||||
typedef typename ArrayHandleType::PortalConstControl type;
|
||||
using type = typename ArrayHandleType::PortalConstControl;
|
||||
};
|
||||
|
||||
template <typename ArrayHandleType, vtkm::IdComponent Index>
|
||||
@ -136,7 +136,7 @@ struct CompositeVectorArrayToPortalExec
|
||||
template <typename ArrayHandleType, vtkm::IdComponent Index>
|
||||
struct ReturnType
|
||||
{
|
||||
typedef typename ArrayHandleType::template ExecutionTypes<DeviceAdapterTag>::PortalConst type;
|
||||
using type = typename ArrayHandleType::template ExecutionTypes<DeviceAdapterTag>::PortalConst;
|
||||
};
|
||||
|
||||
template <typename ArrayHandleType, vtkm::IdComponent Index>
|
||||
@ -179,14 +179,14 @@ struct CheckArraySizeFunctor
|
||||
template <typename SignatureWithPortals>
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalCompositeVector
|
||||
{
|
||||
typedef vtkm::internal::FunctionInterface<SignatureWithPortals> PortalTypes;
|
||||
using PortalTypes = vtkm::internal::FunctionInterface<SignatureWithPortals>;
|
||||
|
||||
public:
|
||||
typedef typename PortalTypes::ResultType ValueType;
|
||||
using ValueType = typename PortalTypes::ResultType;
|
||||
static const vtkm::IdComponent NUM_COMPONENTS = vtkm::VecTraits<ValueType>::NUM_COMPONENTS;
|
||||
|
||||
// Used internally.
|
||||
typedef vtkm::Vec<vtkm::IdComponent, NUM_COMPONENTS> ComponentMapType;
|
||||
using ComponentMapType = vtkm::Vec<vtkm::IdComponent, NUM_COMPONENTS>;
|
||||
|
||||
VTKM_STATIC_ASSERT(NUM_COMPONENTS == PortalTypes::ARITY);
|
||||
|
||||
@ -248,10 +248,10 @@ struct VTKM_ALWAYS_EXPORT StorageTagCompositeVector
|
||||
template <typename SignatureWithArrays>
|
||||
struct ArrayHandleCompositeVectorTraits
|
||||
{
|
||||
typedef vtkm::cont::internal::StorageTagCompositeVector<SignatureWithArrays> Tag;
|
||||
typedef typename vtkm::internal::FunctionInterface<SignatureWithArrays>::ResultType ValueType;
|
||||
typedef vtkm::cont::internal::Storage<ValueType, Tag> StorageType;
|
||||
typedef vtkm::cont::ArrayHandle<ValueType, Tag> Superclass;
|
||||
using Tag = vtkm::cont::internal::StorageTagCompositeVector<SignatureWithArrays>;
|
||||
using ValueType = typename vtkm::internal::FunctionInterface<SignatureWithArrays>::ResultType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, Tag>;
|
||||
using Superclass = vtkm::cont::ArrayHandle<ValueType, Tag>;
|
||||
};
|
||||
|
||||
// It may seem weird that this specialization throws an exception for
|
||||
@ -261,18 +261,19 @@ template <typename SignatureWithArrays>
|
||||
class Storage<typename ArrayHandleCompositeVectorTraits<SignatureWithArrays>::ValueType,
|
||||
vtkm::cont::internal::StorageTagCompositeVector<SignatureWithArrays>>
|
||||
{
|
||||
typedef vtkm::internal::FunctionInterface<SignatureWithArrays> FunctionInterfaceWithArrays;
|
||||
using FunctionInterfaceWithArrays = vtkm::internal::FunctionInterface<SignatureWithArrays>;
|
||||
static const vtkm::IdComponent NUM_COMPONENTS = FunctionInterfaceWithArrays::ARITY;
|
||||
typedef vtkm::Vec<vtkm::IdComponent, NUM_COMPONENTS> ComponentMapType;
|
||||
using ComponentMapType = vtkm::Vec<vtkm::IdComponent, NUM_COMPONENTS>;
|
||||
|
||||
typedef typename FunctionInterfaceWithArrays::template StaticTransformType<
|
||||
detail::CompositeVectorArrayToPortalCont>::type FunctionInterfaceWithPortals;
|
||||
typedef typename FunctionInterfaceWithPortals::Signature SignatureWithPortals;
|
||||
using FunctionInterfaceWithPortals =
|
||||
typename FunctionInterfaceWithArrays::template StaticTransformType<
|
||||
detail::CompositeVectorArrayToPortalCont>::type;
|
||||
using SignatureWithPortals = typename FunctionInterfaceWithPortals::Signature;
|
||||
|
||||
public:
|
||||
typedef ArrayPortalCompositeVector<SignatureWithPortals> PortalType;
|
||||
typedef PortalType PortalConstType;
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using PortalType = ArrayPortalCompositeVector<SignatureWithPortals>;
|
||||
using PortalConstType = PortalType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
|
||||
VTKM_CONT
|
||||
Storage()
|
||||
@ -373,22 +374,22 @@ class ArrayTransfer<typename ArrayHandleCompositeVectorTraits<SignatureWithArray
|
||||
{
|
||||
VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag);
|
||||
|
||||
typedef typename ArrayHandleCompositeVectorTraits<SignatureWithArrays>::StorageType StorageType;
|
||||
using StorageType = typename ArrayHandleCompositeVectorTraits<SignatureWithArrays>::StorageType;
|
||||
|
||||
typedef vtkm::internal::FunctionInterface<SignatureWithArrays> FunctionWithArrays;
|
||||
typedef typename FunctionWithArrays::template StaticTransformType<
|
||||
detail::CompositeVectorArrayToPortalExec<DeviceAdapterTag>>::type FunctionWithPortals;
|
||||
typedef typename FunctionWithPortals::Signature SignatureWithPortals;
|
||||
using FunctionWithArrays = vtkm::internal::FunctionInterface<SignatureWithArrays>;
|
||||
using FunctionWithPortals = typename FunctionWithArrays::template StaticTransformType<
|
||||
detail::CompositeVectorArrayToPortalExec<DeviceAdapterTag>>::type;
|
||||
using SignatureWithPortals = typename FunctionWithPortals::Signature;
|
||||
|
||||
public:
|
||||
typedef typename ArrayHandleCompositeVectorTraits<SignatureWithArrays>::ValueType ValueType;
|
||||
using ValueType = typename ArrayHandleCompositeVectorTraits<SignatureWithArrays>::ValueType;
|
||||
|
||||
// These are not currently fully implemented.
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
typedef ArrayPortalCompositeVector<SignatureWithPortals> PortalExecution;
|
||||
typedef ArrayPortalCompositeVector<SignatureWithPortals> PortalConstExecution;
|
||||
using PortalExecution = ArrayPortalCompositeVector<SignatureWithPortals>;
|
||||
using PortalConstExecution = ArrayPortalCompositeVector<SignatureWithPortals>;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer(StorageType* storage)
|
||||
@ -460,9 +461,9 @@ template <typename Signature>
|
||||
class ArrayHandleCompositeVector
|
||||
: public internal::ArrayHandleCompositeVectorTraits<Signature>::Superclass
|
||||
{
|
||||
typedef typename internal::ArrayHandleCompositeVectorTraits<Signature>::StorageType StorageType;
|
||||
typedef
|
||||
typename internal::ArrayPortalCompositeVector<Signature>::ComponentMapType ComponentMapType;
|
||||
using StorageType = typename internal::ArrayHandleCompositeVectorTraits<Signature>::StorageType;
|
||||
using ComponentMapType =
|
||||
typename internal::ArrayPortalCompositeVector<Signature>::ComponentMapType;
|
||||
|
||||
public:
|
||||
VTKM_ARRAY_HANDLE_SUBCLASS(
|
||||
@ -553,15 +554,15 @@ struct ArrayHandleCompositeVectorType
|
||||
VTKM_IS_ARRAY_HANDLE(ArrayHandleType4);
|
||||
|
||||
private:
|
||||
typedef
|
||||
typename vtkm::VecTraits<typename ArrayHandleType1::ValueType>::ComponentType ComponentType;
|
||||
using ComponentType =
|
||||
typename vtkm::VecTraits<typename ArrayHandleType1::ValueType>::ComponentType;
|
||||
typedef vtkm::Vec<ComponentType, 4> Signature(ArrayHandleType1,
|
||||
ArrayHandleType2,
|
||||
ArrayHandleType3,
|
||||
ArrayHandleType4);
|
||||
|
||||
public:
|
||||
typedef vtkm::cont::ArrayHandleCompositeVector<Signature> type;
|
||||
using type = vtkm::cont::ArrayHandleCompositeVector<Signature>;
|
||||
};
|
||||
|
||||
template <typename ArrayHandleType1, typename ArrayHandleType2, typename ArrayHandleType3>
|
||||
@ -572,14 +573,14 @@ struct ArrayHandleCompositeVectorType<ArrayHandleType1, ArrayHandleType2, ArrayH
|
||||
VTKM_IS_ARRAY_HANDLE(ArrayHandleType3);
|
||||
|
||||
private:
|
||||
typedef
|
||||
typename vtkm::VecTraits<typename ArrayHandleType1::ValueType>::ComponentType ComponentType;
|
||||
using ComponentType =
|
||||
typename vtkm::VecTraits<typename ArrayHandleType1::ValueType>::ComponentType;
|
||||
typedef vtkm::Vec<ComponentType, 3> Signature(ArrayHandleType1,
|
||||
ArrayHandleType2,
|
||||
ArrayHandleType3);
|
||||
|
||||
public:
|
||||
typedef vtkm::cont::ArrayHandleCompositeVector<Signature> type;
|
||||
using type = vtkm::cont::ArrayHandleCompositeVector<Signature>;
|
||||
};
|
||||
|
||||
template <typename ArrayHandleType1, typename ArrayHandleType2>
|
||||
@ -589,12 +590,12 @@ struct ArrayHandleCompositeVectorType<ArrayHandleType1, ArrayHandleType2>
|
||||
VTKM_IS_ARRAY_HANDLE(ArrayHandleType2);
|
||||
|
||||
private:
|
||||
typedef
|
||||
typename vtkm::VecTraits<typename ArrayHandleType1::ValueType>::ComponentType ComponentType;
|
||||
using ComponentType =
|
||||
typename vtkm::VecTraits<typename ArrayHandleType1::ValueType>::ComponentType;
|
||||
typedef vtkm::Vec<ComponentType, 2> Signature(ArrayHandleType1, ArrayHandleType2);
|
||||
|
||||
public:
|
||||
typedef vtkm::cont::ArrayHandleCompositeVector<Signature> type;
|
||||
using type = vtkm::cont::ArrayHandleCompositeVector<Signature>;
|
||||
};
|
||||
|
||||
template <typename ArrayHandleType1>
|
||||
@ -603,12 +604,12 @@ struct ArrayHandleCompositeVectorType<ArrayHandleType1>
|
||||
VTKM_IS_ARRAY_HANDLE(ArrayHandleType1);
|
||||
|
||||
private:
|
||||
typedef
|
||||
typename vtkm::VecTraits<typename ArrayHandleType1::ValueType>::ComponentType ComponentType;
|
||||
using ComponentType =
|
||||
typename vtkm::VecTraits<typename ArrayHandleType1::ValueType>::ComponentType;
|
||||
typedef ComponentType Signature(ArrayHandleType1);
|
||||
|
||||
public:
|
||||
typedef vtkm::cont::ArrayHandleCompositeVector<Signature> type;
|
||||
using type = vtkm::cont::ArrayHandleCompositeVector<Signature>;
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
|
@ -37,10 +37,10 @@ namespace internal
|
||||
template <class CountingValueType>
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalCounting
|
||||
{
|
||||
typedef typename vtkm::VecTraits<CountingValueType>::ComponentType ComponentType;
|
||||
using ComponentType = typename vtkm::VecTraits<CountingValueType>::ComponentType;
|
||||
|
||||
public:
|
||||
typedef CountingValueType ValueType;
|
||||
using ValueType = CountingValueType;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
ArrayPortalCounting()
|
||||
@ -102,9 +102,8 @@ private:
|
||||
template <typename ConstantValueType>
|
||||
struct ArrayHandleCountingTraits
|
||||
{
|
||||
typedef vtkm::cont::StorageTagImplicit<
|
||||
vtkm::cont::internal::ArrayPortalCounting<ConstantValueType>>
|
||||
Tag;
|
||||
using Tag =
|
||||
vtkm::cont::StorageTagImplicit<vtkm::cont::internal::ArrayPortalCounting<ConstantValueType>>;
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -91,8 +91,8 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
typedef vtkm::cont::internal::IteratorFromArrayPortal<ArrayPortalImplicit<FunctorType>>
|
||||
IteratorType;
|
||||
using IteratorType =
|
||||
vtkm::cont::internal::IteratorFromArrayPortal<ArrayPortalImplicit<FunctorType>>;
|
||||
|
||||
VTKM_CONT
|
||||
IteratorType GetIteratorBegin() const { return IteratorType(*this); }
|
||||
@ -115,7 +115,7 @@ template <class FunctorType>
|
||||
class ArrayHandleImplicit : public detail::ArrayHandleImplicitTraits<FunctorType>::Superclass
|
||||
{
|
||||
private:
|
||||
typedef typename detail::ArrayHandleImplicitTraits<FunctorType> ArrayTraits;
|
||||
using ArrayTraits = typename detail::ArrayHandleImplicitTraits<FunctorType>;
|
||||
|
||||
public:
|
||||
VTKM_ARRAY_HANDLE_SUBCLASS(ArrayHandleImplicit,
|
||||
|
@ -37,7 +37,7 @@ template <typename IndexPortalType, typename ValuePortalType>
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalPermutation
|
||||
{
|
||||
public:
|
||||
typedef typename ValuePortalType::ValueType ValueType;
|
||||
using ValueType = typename ValuePortalType::ValueType;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC_CONT
|
||||
@ -125,7 +125,7 @@ class Storage<typename ValueArrayType::ValueType,
|
||||
VTKM_IS_ARRAY_HANDLE(ValueArrayType);
|
||||
|
||||
public:
|
||||
typedef typename ValueArrayType::ValueType ValueType;
|
||||
using ValueType = typename ValueArrayType::ValueType;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalPermutation<typename IndexArrayType::PortalConstControl,
|
||||
typename ValueArrayType::PortalControl>
|
||||
@ -209,15 +209,15 @@ class ArrayTransfer<typename ValueArrayType::ValueType,
|
||||
Device>
|
||||
{
|
||||
public:
|
||||
typedef typename ValueArrayType::ValueType ValueType;
|
||||
using ValueType = typename ValueArrayType::ValueType;
|
||||
|
||||
private:
|
||||
typedef StorageTagPermutation<IndexArrayType, ValueArrayType> StorageTag;
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
|
||||
public:
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalPermutation<
|
||||
typename IndexArrayType::template ExecutionTypes<Device>::PortalConst,
|
||||
|
@ -39,7 +39,7 @@ template <typename PortalType>
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalReverse
|
||||
{
|
||||
public:
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
ArrayPortalReverse()
|
||||
|
@ -34,8 +34,8 @@ template <typename P>
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalStreaming
|
||||
{
|
||||
public:
|
||||
typedef P PortalType;
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using PortalType = P;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayPortalStreaming()
|
||||
@ -124,13 +124,12 @@ template <typename ArrayHandleInputType>
|
||||
class Storage<typename ArrayHandleInputType::ValueType, StorageTagStreaming<ArrayHandleInputType>>
|
||||
{
|
||||
public:
|
||||
typedef typename ArrayHandleInputType::ValueType ValueType;
|
||||
using ValueType = typename ArrayHandleInputType::ValueType;
|
||||
|
||||
typedef vtkm::cont::internal::ArrayPortalStreaming<typename ArrayHandleInputType::PortalControl>
|
||||
PortalType;
|
||||
typedef vtkm::cont::internal::ArrayPortalStreaming<
|
||||
typename ArrayHandleInputType::PortalConstControl>
|
||||
PortalConstType;
|
||||
using PortalType =
|
||||
vtkm::cont::internal::ArrayPortalStreaming<typename ArrayHandleInputType::PortalControl>;
|
||||
using PortalConstType =
|
||||
vtkm::cont::internal::ArrayPortalStreaming<typename ArrayHandleInputType::PortalConstControl>;
|
||||
|
||||
VTKM_CONT
|
||||
Storage()
|
||||
|
@ -36,10 +36,10 @@ template <typename ValueType_, typename PortalTypeFirst_, typename PortalTypeSec
|
||||
class ArrayPortalZip
|
||||
{
|
||||
public:
|
||||
typedef ValueType_ ValueType;
|
||||
typedef ValueType_ IteratorType;
|
||||
typedef PortalTypeFirst_ PortalTypeFirst;
|
||||
typedef PortalTypeSecond_ PortalTypeSecond;
|
||||
using ValueType = ValueType_;
|
||||
using IteratorType = ValueType_;
|
||||
using PortalTypeFirst = PortalTypeFirst_;
|
||||
using PortalTypeSecond = PortalTypeSecond_;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC_CONT
|
||||
@ -137,7 +137,7 @@ class Storage<T, StorageTagZip<FirstHandleType, SecondHandleType>>
|
||||
VTKM_IS_ARRAY_HANDLE(SecondHandleType);
|
||||
|
||||
public:
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalZip<ValueType,
|
||||
typename FirstHandleType::PortalControl,
|
||||
@ -221,10 +221,10 @@ class ArrayTransfer<T, StorageTagZip<FirstHandleType, SecondHandleType>, Device>
|
||||
typedef vtkm::cont::internal::Storage<T, StorageTag> StorageType;
|
||||
|
||||
public:
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalZip<
|
||||
ValueType,
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
|
||||
/// The type of the iterator.
|
||||
///
|
||||
typedef vtkm::cont::internal::IteratorFromArrayPortal<PortalType> IteratorType;
|
||||
using IteratorType = vtkm::cont::internal::IteratorFromArrayPortal<PortalType>;
|
||||
|
||||
/// Returns an iterator pointing to the beginning of the ArrayPortal.
|
||||
///
|
||||
|
@ -583,7 +583,7 @@ public:
|
||||
///
|
||||
VTKM_CONT bool Exists() const
|
||||
{
|
||||
typedef vtkm::cont::DeviceAdapterTraits<DeviceAdapterTag> DeviceAdapterTraits;
|
||||
using DeviceAdapterTraits = vtkm::cont::DeviceAdapterTraits<DeviceAdapterTag>;
|
||||
return DeviceAdapterTraits::Valid;
|
||||
}
|
||||
};
|
||||
|
@ -238,8 +238,8 @@ public:
|
||||
VTKM_CONT bool IsType()
|
||||
{
|
||||
VTKM_IS_ARRAY_HANDLE(ArrayHandleType);
|
||||
typedef typename ArrayHandleType::ValueType ValueType;
|
||||
typedef typename ArrayHandleType::StorageTag StorageTag;
|
||||
using ValueType = typename ArrayHandleType::ValueType;
|
||||
using StorageTag = typename ArrayHandleType::StorageTag;
|
||||
return this->IsTypeAndStorage<ValueType, StorageTag>();
|
||||
}
|
||||
|
||||
@ -281,8 +281,8 @@ public:
|
||||
VTKM_CONT ArrayHandleType Cast() const
|
||||
{
|
||||
VTKM_IS_ARRAY_HANDLE(ArrayHandleType);
|
||||
typedef typename ArrayHandleType::ValueType ValueType;
|
||||
typedef typename ArrayHandleType::StorageTag StorageTag;
|
||||
using ValueType = typename ArrayHandleType::ValueType;
|
||||
using StorageTag = typename ArrayHandleType::StorageTag;
|
||||
// Technically, this method returns a copy of the \c ArrayHandle. But
|
||||
// because \c ArrayHandle acts like a shared pointer, it is valid to
|
||||
// do the copy.
|
||||
@ -545,7 +545,7 @@ namespace internal
|
||||
template <typename TypeList, typename StorageList>
|
||||
struct DynamicTransformTraits<vtkm::cont::DynamicArrayHandleBase<TypeList, StorageList>>
|
||||
{
|
||||
typedef vtkm::cont::internal::DynamicTransformTagCastAndCall DynamicTag;
|
||||
using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall;
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -412,7 +412,7 @@ namespace internal
|
||||
template <>
|
||||
struct DynamicTransformTraits<vtkm::cont::Field>
|
||||
{
|
||||
typedef vtkm::cont::internal::DynamicTransformTagCastAndCall DynamicTag;
|
||||
using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall;
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -98,8 +98,8 @@ class Storage
|
||||
: public vtkm::cont::internal::UndefinedStorage
|
||||
{
|
||||
public:
|
||||
typedef vtkm::cont::internal::detail::UndefinedArrayPortal<T> PortalType;
|
||||
typedef vtkm::cont::internal::detail::UndefinedArrayPortal<T> PortalConstType;
|
||||
using PortalType = vtkm::cont::internal::detail::UndefinedArrayPortal<T>;
|
||||
using PortalConstType = vtkm::cont::internal::detail::UndefinedArrayPortal<T>;
|
||||
};
|
||||
#else //VTKM_DOXYGEN_ONLY
|
||||
{
|
||||
|
@ -59,15 +59,15 @@ void free_aligned(void* mem);
|
||||
template <typename T, size_t Alignment>
|
||||
struct AlignedAllocator
|
||||
{
|
||||
typedef T value_type;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef T* pointer;
|
||||
typedef const T* const_pointer;
|
||||
typedef void* void_pointer;
|
||||
typedef const void* const_void_pointer;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::size_t size_type;
|
||||
using value_type = T;
|
||||
using reference = T&;
|
||||
using const_reference = const T&;
|
||||
using pointer = T*;
|
||||
using const_pointer = const T*;
|
||||
using void_pointer = void*;
|
||||
using const_void_pointer = const void*;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using size_type = std::size_t;
|
||||
|
||||
template <typename U>
|
||||
struct rebind
|
||||
@ -172,9 +172,9 @@ template <typename ValueT>
|
||||
class VTKM_ALWAYS_EXPORT Storage<ValueT, vtkm::cont::StorageTagBasic> : public StorageBasicBase
|
||||
{
|
||||
public:
|
||||
typedef ValueT ValueType;
|
||||
typedef vtkm::cont::internal::ArrayPortalFromIterators<ValueType*> PortalType;
|
||||
typedef vtkm::cont::internal::ArrayPortalFromIterators<const ValueType*> PortalConstType;
|
||||
using ValueType = ValueT;
|
||||
using PortalType = vtkm::cont::internal::ArrayPortalFromIterators<ValueType*>;
|
||||
using PortalConstType = vtkm::cont::internal::ArrayPortalFromIterators<const ValueType*>;
|
||||
|
||||
/// The original design of this class provided an allocator as a template
|
||||
/// parameters. That messed things up, though, because other templated
|
||||
|
@ -46,7 +46,7 @@ namespace cont
|
||||
template <class ArrayPortalType>
|
||||
struct VTKM_ALWAYS_EXPORT StorageTagImplicit
|
||||
{
|
||||
typedef ArrayPortalType PortalType;
|
||||
using PortalType = ArrayPortalType;
|
||||
};
|
||||
|
||||
namespace internal
|
||||
@ -56,15 +56,15 @@ template <class ArrayPortalType>
|
||||
class Storage<typename ArrayPortalType::ValueType, StorageTagImplicit<ArrayPortalType>>
|
||||
{
|
||||
public:
|
||||
typedef typename ArrayPortalType::ValueType ValueType;
|
||||
typedef ArrayPortalType PortalConstType;
|
||||
using ValueType = typename ArrayPortalType::ValueType;
|
||||
using PortalConstType = ArrayPortalType;
|
||||
|
||||
// This is meant to be invalid. Because implicit arrays are read only, you
|
||||
// should only be able to use the const version.
|
||||
struct PortalType
|
||||
{
|
||||
typedef void* ValueType;
|
||||
typedef void* IteratorType;
|
||||
using ValueType = void*;
|
||||
using IteratorType = void*;
|
||||
};
|
||||
|
||||
VTKM_CONT
|
||||
@ -101,16 +101,16 @@ template <typename T, class ArrayPortalType, class DeviceAdapterTag>
|
||||
class ArrayTransfer<T, StorageTagImplicit<ArrayPortalType>, DeviceAdapterTag>
|
||||
{
|
||||
private:
|
||||
typedef StorageTagImplicit<ArrayPortalType> StorageTag;
|
||||
using StorageTag = StorageTagImplicit<ArrayPortalType>;
|
||||
typedef vtkm::cont::internal::Storage<T, StorageTag> StorageType;
|
||||
|
||||
public:
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
typedef PortalControl PortalExecution;
|
||||
typedef PortalConstControl PortalConstExecution;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
using PortalExecution = PortalControl;
|
||||
using PortalConstExecution = PortalConstControl;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer(StorageType* storage)
|
||||
@ -147,7 +147,7 @@ public:
|
||||
template <class IteratorTypeControl>
|
||||
VTKM_CONT void CopyInto(IteratorTypeControl dest) const
|
||||
{
|
||||
typedef typename StorageType::PortalConstType PortalType;
|
||||
using PortalType = typename StorageType::PortalConstType;
|
||||
PortalType portal = this->Storage->GetPortalConst();
|
||||
|
||||
std::copy(vtkm::cont::ArrayPortalToIteratorBegin(portal),
|
||||
|
@ -55,8 +55,8 @@ struct Transport
|
||||
/// For example, for an \c ArrayHandle, the \c ExecObjectType is the portal
|
||||
/// used in the execution environment.
|
||||
///
|
||||
typedef
|
||||
typename ContObjectType::template ExecutionTypes<DeviceAdapterTag>::PortalConst ExecObjectType;
|
||||
using ExecObjectType =
|
||||
typename ContObjectType::template ExecutionTypes<DeviceAdapterTag>::PortalConst;
|
||||
|
||||
/// \brief Send data to the execution environment.
|
||||
///
|
||||
|
@ -47,7 +47,7 @@ struct Transport<vtkm::cont::arg::TransportTagArrayIn, ContObjectType, Device>
|
||||
{
|
||||
VTKM_IS_ARRAY_HANDLE(ContObjectType);
|
||||
|
||||
typedef typename ContObjectType::template ExecutionTypes<Device>::PortalConst ExecObjectType;
|
||||
using ExecObjectType = typename ContObjectType::template ExecutionTypes<Device>::PortalConst;
|
||||
|
||||
template <typename InputDomainType>
|
||||
VTKM_CONT ExecObjectType operator()(const ContObjectType& object,
|
||||
|
@ -50,7 +50,7 @@ struct Transport<vtkm::cont::arg::TransportTagArrayInOut, ContObjectType, Device
|
||||
// is not an array handle as an argument that is expected to be one.
|
||||
VTKM_IS_ARRAY_HANDLE(ContObjectType);
|
||||
|
||||
typedef typename ContObjectType::template ExecutionTypes<Device>::Portal ExecObjectType;
|
||||
using ExecObjectType = typename ContObjectType::template ExecutionTypes<Device>::Portal;
|
||||
|
||||
template <typename InputDomainType>
|
||||
VTKM_CONT ExecObjectType operator()(ContObjectType object,
|
||||
|
@ -49,7 +49,7 @@ struct Transport<vtkm::cont::arg::TransportTagArrayOut, ContObjectType, Device>
|
||||
// is not an array handle as an argument that is expected to be one.
|
||||
VTKM_IS_ARRAY_HANDLE(ContObjectType);
|
||||
|
||||
typedef typename ContObjectType::template ExecutionTypes<Device>::Portal ExecObjectType;
|
||||
using ExecObjectType = typename ContObjectType::template ExecutionTypes<Device>::Portal;
|
||||
|
||||
template <typename InputDomainType>
|
||||
VTKM_CONT ExecObjectType operator()(ContObjectType object,
|
||||
|
@ -53,7 +53,7 @@ struct Transport<vtkm::cont::arg::TransportTagAtomicArray,
|
||||
vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic>,
|
||||
Device>
|
||||
{
|
||||
typedef vtkm::exec::AtomicArray<T, Device> ExecObjectType;
|
||||
using ExecObjectType = vtkm::exec::AtomicArray<T, Device>;
|
||||
|
||||
template <typename InputDomainType>
|
||||
VTKM_CONT ExecObjectType operator()(vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic> array,
|
||||
|
@ -50,10 +50,10 @@ struct Transport<vtkm::cont::arg::TransportTagCellSetIn<FromTopology, ToTopology
|
||||
{
|
||||
VTKM_IS_CELL_SET(ContObjectType);
|
||||
|
||||
typedef
|
||||
using ExecObjectType =
|
||||
typename ContObjectType::template ExecutionTypes<Device,
|
||||
FromTopology,
|
||||
ToTopology>::ExecObjectType ExecObjectType;
|
||||
ToTopology>::ExecObjectType;
|
||||
|
||||
template <typename InputDomainType>
|
||||
VTKM_CONT ExecObjectType
|
||||
|
@ -53,7 +53,7 @@ struct Transport<vtkm::cont::arg::TransportTagExecObject, ContObjectType, Device
|
||||
(std::is_base_of<vtkm::exec::ExecutionObjectBase, ContObjectType>::value),
|
||||
"All execution objects are expected to inherit from vtkm::exec::ExecutionObjectBase");
|
||||
|
||||
typedef ContObjectType ExecObjectType;
|
||||
using ExecObjectType = ContObjectType;
|
||||
|
||||
template <typename InputDomainType>
|
||||
VTKM_CONT ExecObjectType
|
||||
|
@ -87,7 +87,7 @@ struct Transport<vtkm::cont::arg::TransportTagTopologyFieldIn<TopologyElementTag
|
||||
{
|
||||
VTKM_IS_ARRAY_HANDLE(ContObjectType);
|
||||
|
||||
typedef typename ContObjectType::template ExecutionTypes<Device>::PortalConst ExecObjectType;
|
||||
using ExecObjectType = typename ContObjectType::template ExecutionTypes<Device>::PortalConst;
|
||||
|
||||
VTKM_CONT
|
||||
ExecObjectType operator()(const ContObjectType& object,
|
||||
|
@ -54,10 +54,10 @@ struct Transport<vtkm::cont::arg::TransportTagWholeArrayIn, ContObjectType, Devi
|
||||
// is not an array handle as an argument that is expected to be one.
|
||||
VTKM_IS_ARRAY_HANDLE(ContObjectType);
|
||||
|
||||
typedef typename ContObjectType::ValueType ValueType;
|
||||
typedef typename ContObjectType::StorageTag StorageTag;
|
||||
using ValueType = typename ContObjectType::ValueType;
|
||||
using StorageTag = typename ContObjectType::StorageTag;
|
||||
|
||||
typedef vtkm::exec::ExecutionWholeArrayConst<ValueType, StorageTag, Device> ExecObjectType;
|
||||
using ExecObjectType = vtkm::exec::ExecutionWholeArrayConst<ValueType, StorageTag, Device>;
|
||||
|
||||
template <typename InputDomainType>
|
||||
VTKM_CONT ExecObjectType
|
||||
|
@ -56,10 +56,10 @@ struct Transport<vtkm::cont::arg::TransportTagWholeArrayInOut, ContObjectType, D
|
||||
// is not an array handle as an argument that is expected to be one.
|
||||
VTKM_IS_ARRAY_HANDLE(ContObjectType);
|
||||
|
||||
typedef typename ContObjectType::ValueType ValueType;
|
||||
typedef typename ContObjectType::StorageTag StorageTag;
|
||||
using ValueType = typename ContObjectType::ValueType;
|
||||
using StorageTag = typename ContObjectType::StorageTag;
|
||||
|
||||
typedef vtkm::exec::ExecutionWholeArray<ValueType, StorageTag, Device> ExecObjectType;
|
||||
using ExecObjectType = vtkm::exec::ExecutionWholeArray<ValueType, StorageTag, Device>;
|
||||
|
||||
template <typename InputDomainType>
|
||||
VTKM_CONT ExecObjectType
|
||||
|
@ -56,10 +56,10 @@ struct Transport<vtkm::cont::arg::TransportTagWholeArrayOut, ContObjectType, Dev
|
||||
// is not an array handle as an argument that is expected to be one.
|
||||
VTKM_IS_ARRAY_HANDLE(ContObjectType);
|
||||
|
||||
typedef typename ContObjectType::ValueType ValueType;
|
||||
typedef typename ContObjectType::StorageTag StorageTag;
|
||||
using ValueType = typename ContObjectType::ValueType;
|
||||
using StorageTag = typename ContObjectType::StorageTag;
|
||||
|
||||
typedef vtkm::exec::ExecutionWholeArray<ValueType, StorageTag, Device> ExecObjectType;
|
||||
using ExecObjectType = vtkm::exec::ExecutionWholeArray<ValueType, StorageTag, Device>;
|
||||
|
||||
template <typename InputDomainType>
|
||||
VTKM_CONT ExecObjectType
|
||||
|
@ -40,7 +40,7 @@ struct TestKernelIn : public vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
if (!test_equal(this->Portal.Get(index), TestValue(index, ValueType())))
|
||||
{
|
||||
this->RaiseError("Got bad execution object.");
|
||||
@ -60,10 +60,10 @@ struct TryArrayInType
|
||||
array[index] = TestValue(index, T());
|
||||
}
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<T> ArrayHandleType;
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandle<T>;
|
||||
ArrayHandleType handle = vtkm::cont::make_ArrayHandle(array, ARRAY_SIZE);
|
||||
|
||||
typedef typename ArrayHandleType::template ExecutionTypes<Device>::PortalConst PortalType;
|
||||
using PortalType = typename ArrayHandleType::template ExecutionTypes<Device>::PortalConst;
|
||||
|
||||
vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagArrayIn, ArrayHandleType, Device>
|
||||
transport;
|
||||
|
@ -40,7 +40,7 @@ struct TestKernelInOut : public vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
ValueType inValue = this->Portal.Get(index);
|
||||
this->Portal.Set(index, inValue + inValue);
|
||||
}
|
||||
@ -58,10 +58,10 @@ struct TryArrayInOutType
|
||||
array[index] = TestValue(index, T());
|
||||
}
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<T> ArrayHandleType;
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandle<T>;
|
||||
ArrayHandleType handle = vtkm::cont::make_ArrayHandle(array, ARRAY_SIZE);
|
||||
|
||||
typedef typename ArrayHandleType::template ExecutionTypes<Device>::Portal PortalType;
|
||||
using PortalType = typename ArrayHandleType::template ExecutionTypes<Device>::Portal;
|
||||
|
||||
vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagArrayInOut, ArrayHandleType, Device>
|
||||
transport;
|
||||
|
@ -41,7 +41,7 @@ struct TestKernelOut : public vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
this->Portal.Set(index, TestValue(index, ValueType()));
|
||||
}
|
||||
};
|
||||
@ -52,10 +52,10 @@ struct TryArrayOutType
|
||||
template <typename T>
|
||||
void operator()(T) const
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandle<T> ArrayHandleType;
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandle<T>;
|
||||
ArrayHandleType handle;
|
||||
|
||||
typedef typename ArrayHandleType::template ExecutionTypes<Device>::Portal PortalType;
|
||||
using PortalType = typename ArrayHandleType::template ExecutionTypes<Device>::Portal;
|
||||
|
||||
vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagArrayOut, ArrayHandleType, Device>
|
||||
transport;
|
||||
|
@ -50,7 +50,7 @@ struct TestOutKernel : public vtkm::exec::FunctorBase
|
||||
{
|
||||
this->RaiseError("Out whole array has wrong size.");
|
||||
}
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
this->Portal.Set(index, TestValue(index, ValueType()));
|
||||
}
|
||||
};
|
||||
@ -67,7 +67,7 @@ struct TestInKernel : public vtkm::exec::FunctorBase
|
||||
{
|
||||
this->RaiseError("In whole array has wrong size.");
|
||||
}
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
if (!test_equal(this->Portal.Get(index), TestValue(index, ValueType())))
|
||||
{
|
||||
this->RaiseError("Got bad execution object.");
|
||||
@ -87,7 +87,7 @@ struct TestInOutKernel : public vtkm::exec::FunctorBase
|
||||
{
|
||||
this->RaiseError("In/Out whole array has wrong size.");
|
||||
}
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
this->Portal.Set(index, this->Portal.Get(index) + ValueType(OFFSET));
|
||||
}
|
||||
};
|
||||
@ -106,7 +106,7 @@ struct TestAtomicKernel : public vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename AtomicType::ValueType ValueType;
|
||||
using ValueType = typename AtomicType::ValueType;
|
||||
this->AtomicArray.Add(0, static_cast<ValueType>(index));
|
||||
}
|
||||
};
|
||||
|
@ -49,18 +49,18 @@ public:
|
||||
typedef vtkm::cont::internal::ArrayTransfer<T, Storage, DeviceAdapter> ArrayTransferType;
|
||||
|
||||
public:
|
||||
typedef typename ArrayTransferType::PortalExecution Portal;
|
||||
typedef typename ArrayTransferType::PortalConstExecution PortalConst;
|
||||
using Portal = typename ArrayTransferType::PortalExecution;
|
||||
using PortalConst = typename ArrayTransferType::PortalConstExecution;
|
||||
};
|
||||
|
||||
/// The type of value held in the array (vtkm::FloatDefault, vtkm::Vec, etc.)
|
||||
///
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
/// An array portal that can be used in the control environment.
|
||||
///
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
VTKM_CONT
|
||||
virtual ~ArrayHandleExecutionManagerBase() {}
|
||||
@ -200,11 +200,11 @@ class ArrayHandleExecutionManager : public ArrayHandleExecutionManagerBase<T, St
|
||||
typedef vtkm::cont::internal::Storage<T, Storage> StorageType;
|
||||
|
||||
public:
|
||||
typedef typename ArrayTransferType::PortalControl PortalControl;
|
||||
typedef typename ArrayTransferType::PortalConstControl PortalConstControl;
|
||||
using PortalControl = typename ArrayTransferType::PortalControl;
|
||||
using PortalConstControl = typename ArrayTransferType::PortalConstControl;
|
||||
|
||||
typedef typename ArrayTransferType::PortalExecution PortalExecution;
|
||||
typedef typename ArrayTransferType::PortalConstExecution PortalConstExecution;
|
||||
using PortalExecution = typename ArrayTransferType::PortalExecution;
|
||||
using PortalConstExecution = typename ArrayTransferType::PortalConstExecution;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayHandleExecutionManager(StorageType* storage)
|
||||
|
@ -44,10 +44,10 @@ template <typename T, class StorageTag>
|
||||
class ArrayManagerExecutionShareWithControl
|
||||
{
|
||||
public:
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
typedef typename StorageType::PortalType PortalType;
|
||||
typedef typename StorageType::PortalConstType PortalConstType;
|
||||
using PortalType = typename StorageType::PortalType;
|
||||
using PortalConstType = typename StorageType::PortalConstType;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayManagerExecutionShareWithControl(StorageType* storage)
|
||||
@ -99,7 +99,7 @@ public:
|
||||
template <class IteratorTypeControl>
|
||||
VTKM_CONT void CopyInto(IteratorTypeControl dest) const
|
||||
{
|
||||
typedef typename StorageType::PortalConstType::IteratorType IteratorType;
|
||||
using IteratorType = typename StorageType::PortalConstType::IteratorType;
|
||||
IteratorType beginIterator = this->Storage->GetPortalConst().GetIteratorBegin();
|
||||
|
||||
std::copy(beginIterator, beginIterator + this->Storage->GetNumberOfValues(), dest);
|
||||
|
@ -50,8 +50,8 @@ class ArrayPortalFromIterators<IteratorT,
|
||||
typename std::remove_pointer<IteratorT>::type>::value>::type>
|
||||
{
|
||||
public:
|
||||
typedef typename std::iterator_traits<IteratorT>::value_type ValueType;
|
||||
typedef IteratorT IteratorType;
|
||||
using ValueType = typename std::iterator_traits<IteratorT>::value_type;
|
||||
using IteratorType = IteratorT;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_CONT
|
||||
@ -124,8 +124,8 @@ class ArrayPortalFromIterators<IteratorT,
|
||||
typename std::remove_pointer<IteratorT>::type>::value>::type>
|
||||
{
|
||||
public:
|
||||
typedef typename std::iterator_traits<IteratorT>::value_type ValueType;
|
||||
typedef IteratorT IteratorType;
|
||||
using ValueType = typename std::iterator_traits<IteratorT>::value_type;
|
||||
using IteratorType = IteratorT;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_CONT
|
||||
@ -216,11 +216,11 @@ namespace cont
|
||||
template <typename _IteratorType>
|
||||
class ArrayPortalToIterators<vtkm::cont::internal::ArrayPortalFromIterators<_IteratorType>>
|
||||
{
|
||||
typedef vtkm::cont::internal::ArrayPortalFromIterators<_IteratorType> PortalType;
|
||||
using PortalType = vtkm::cont::internal::ArrayPortalFromIterators<_IteratorType>;
|
||||
|
||||
public:
|
||||
#if !defined(VTKM_MSVC) || (defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL == 0)
|
||||
typedef _IteratorType IteratorType;
|
||||
using IteratorType = _IteratorType;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC_CONT
|
||||
@ -255,7 +255,7 @@ public:
|
||||
IteratorType GetEnd() const
|
||||
{
|
||||
IteratorType iterator = this->Iterator;
|
||||
typedef typename std::iterator_traits<IteratorType>::difference_type difference_type;
|
||||
using difference_type = typename std::iterator_traits<IteratorType>::difference_type;
|
||||
|
||||
#if !defined(VTKM_MSVC) || (defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL == 0)
|
||||
std::advance(iterator, static_cast<difference_type>(this->NumberOfValues));
|
||||
|
@ -57,17 +57,17 @@ private:
|
||||
public:
|
||||
/// The type of value held in the array (vtkm::FloatDefault, vtkm::Vec, etc.)
|
||||
///
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
/// An array portal that can be used in the control environment.
|
||||
///
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
/// An array portal that can be used in the execution environment.
|
||||
///
|
||||
typedef typename ArrayManagerType::PortalType PortalExecution;
|
||||
typedef typename ArrayManagerType::PortalConstType PortalConstExecution;
|
||||
using PortalExecution = typename ArrayManagerType::PortalType;
|
||||
using PortalConstExecution = typename ArrayManagerType::PortalConstType;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer(StorageType* storage)
|
||||
|
@ -155,8 +155,8 @@ public:
|
||||
DeviceAdapterTag>::PortalConst StencilPortalType;
|
||||
StencilPortalType stencilPortal = stencil.PrepareForInput(DeviceAdapterTag());
|
||||
|
||||
typedef
|
||||
typename IndexArrayType::template ExecutionTypes<DeviceAdapterTag>::Portal IndexPortalType;
|
||||
using IndexPortalType =
|
||||
typename IndexArrayType::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||
IndexPortalType indexPortal = indices.PrepareForOutput(arrayLength, DeviceAdapterTag());
|
||||
|
||||
StencilToIndexFlagKernel<StencilPortalType, IndexPortalType, UnaryPredicate> indexKernel(
|
||||
@ -328,7 +328,7 @@ public:
|
||||
|
||||
typedef ReduceKernel<InputPortalType, U, BinaryFunctor> ReduceKernelType;
|
||||
|
||||
typedef vtkm::cont::ArrayHandleImplicit<ReduceKernelType> ReduceHandleType;
|
||||
using ReduceHandleType = vtkm::cont::ArrayHandleImplicit<ReduceKernelType>;
|
||||
typedef vtkm::cont::ArrayHandle<U, vtkm::cont::StorageTagBasic> TempArrayType;
|
||||
|
||||
ReduceKernelType kernel(
|
||||
@ -418,8 +418,8 @@ public:
|
||||
typedef typename vtkm::cont::ArrayHandle<T, KIn>::template ExecutionTypes<
|
||||
DeviceAdapterTag>::PortalConst InputPortalType;
|
||||
|
||||
typedef typename vtkm::cont::ArrayHandle<ReduceKeySeriesStates>::template ExecutionTypes<
|
||||
DeviceAdapterTag>::Portal KeyStatePortalType;
|
||||
using KeyStatePortalType = typename vtkm::cont::ArrayHandle<
|
||||
ReduceKeySeriesStates>::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||
|
||||
InputPortalType inputPortal = keys.PrepareForInput(DeviceAdapterTag());
|
||||
KeyStatePortalType keyStatePortal =
|
||||
@ -438,7 +438,7 @@ public:
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandle<U, VIn> ValueInHandleType;
|
||||
typedef vtkm::cont::ArrayHandle<U, VOut> ValueOutHandleType;
|
||||
typedef vtkm::cont::ArrayHandle<ReduceKeySeriesStates> StencilHandleType;
|
||||
using StencilHandleType = vtkm::cont::ArrayHandle<ReduceKeySeriesStates>;
|
||||
typedef vtkm::cont::ArrayHandleZip<ValueInHandleType, StencilHandleType> ZipInHandleType;
|
||||
typedef vtkm::cont::ArrayHandleZip<ValueOutHandleType, StencilHandleType> ZipOutHandleType;
|
||||
|
||||
@ -477,10 +477,10 @@ public:
|
||||
typedef vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic> TempArrayType;
|
||||
typedef vtkm::cont::ArrayHandle<T, COut> OutputArrayType;
|
||||
|
||||
typedef
|
||||
typename TempArrayType::template ExecutionTypes<DeviceAdapterTag>::PortalConst SrcPortalType;
|
||||
typedef
|
||||
typename OutputArrayType::template ExecutionTypes<DeviceAdapterTag>::Portal DestPortalType;
|
||||
using SrcPortalType =
|
||||
typename TempArrayType::template ExecutionTypes<DeviceAdapterTag>::PortalConst;
|
||||
using DestPortalType =
|
||||
typename OutputArrayType::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||
|
||||
vtkm::Id numValues = input.GetNumberOfValues();
|
||||
if (numValues <= 0)
|
||||
@ -545,8 +545,8 @@ public:
|
||||
typedef typename vtkm::cont::ArrayHandle<T, KIn>::template ExecutionTypes<
|
||||
DeviceAdapterTag>::PortalConst InputPortalType;
|
||||
|
||||
typedef typename vtkm::cont::ArrayHandle<ReduceKeySeriesStates>::template ExecutionTypes<
|
||||
DeviceAdapterTag>::Portal KeyStatePortalType;
|
||||
using KeyStatePortalType = typename vtkm::cont::ArrayHandle<
|
||||
ReduceKeySeriesStates>::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||
|
||||
InputPortalType inputPortal = keys.PrepareForInput(DeviceAdapterTag());
|
||||
KeyStatePortalType keyStatePortal =
|
||||
@ -566,8 +566,8 @@ public:
|
||||
typedef typename vtkm::cont::ArrayHandle<T, KIn>::template ExecutionTypes<
|
||||
DeviceAdapterTag>::PortalConst InputPortalType;
|
||||
|
||||
typedef typename vtkm::cont::ArrayHandle<ReduceKeySeriesStates>::template ExecutionTypes<
|
||||
DeviceAdapterTag>::PortalConst KeyStatePortalType;
|
||||
using KeyStatePortalType = typename vtkm::cont::ArrayHandle<
|
||||
ReduceKeySeriesStates>::template ExecutionTypes<DeviceAdapterTag>::PortalConst;
|
||||
|
||||
InputPortalType inputPortal = values.PrepareForInput(DeviceAdapterTag());
|
||||
KeyStatePortalType keyStatePortal = keystate.PrepareForInput(DeviceAdapterTag());
|
||||
@ -724,8 +724,8 @@ public:
|
||||
typedef typename vtkm::cont::ArrayHandle<T, KIn>::template ExecutionTypes<
|
||||
DeviceAdapterTag>::PortalConst InputPortalType;
|
||||
|
||||
typedef typename vtkm::cont::ArrayHandle<ReduceKeySeriesStates>::template ExecutionTypes<
|
||||
DeviceAdapterTag>::Portal KeyStatePortalType;
|
||||
using KeyStatePortalType = typename vtkm::cont::ArrayHandle<
|
||||
ReduceKeySeriesStates>::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||
|
||||
InputPortalType inputPortal = keys.PrepareForInput(DeviceAdapterTag());
|
||||
KeyStatePortalType keyStatePortal =
|
||||
@ -744,7 +744,7 @@ public:
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandle<U, VIn> ValueInHandleType;
|
||||
typedef vtkm::cont::ArrayHandle<U, VOut> ValueOutHandleType;
|
||||
typedef vtkm::cont::ArrayHandle<ReduceKeySeriesStates> StencilHandleType;
|
||||
using StencilHandleType = vtkm::cont::ArrayHandle<ReduceKeySeriesStates>;
|
||||
typedef vtkm::cont::ArrayHandleZip<ValueInHandleType, StencilHandleType> ZipInHandleType;
|
||||
typedef vtkm::cont::ArrayHandleZip<ValueOutHandleType, StencilHandleType> ZipOutHandleType;
|
||||
|
||||
@ -770,8 +770,8 @@ public:
|
||||
VTKM_CONT static void Sort(vtkm::cont::ArrayHandle<T, Storage>& values,
|
||||
BinaryCompare binary_compare)
|
||||
{
|
||||
typedef typename vtkm::cont::ArrayHandle<T, Storage> ArrayType;
|
||||
typedef typename ArrayType::template ExecutionTypes<DeviceAdapterTag>::Portal PortalType;
|
||||
using ArrayType = typename vtkm::cont::ArrayHandle<T, Storage>;
|
||||
using PortalType = typename ArrayType::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||
|
||||
vtkm::Id numValues = values.GetNumberOfValues();
|
||||
if (numValues < 2)
|
||||
@ -818,8 +818,9 @@ public:
|
||||
//combine the keys and values into a ZipArrayHandle
|
||||
//we than need to specify a custom compare function wrapper
|
||||
//that only checks for key side of the pair, using a custom compare functor.
|
||||
typedef vtkm::cont::ArrayHandle<T, StorageT> KeyType;
|
||||
typedef vtkm::cont::ArrayHandle<U, StorageU> ValueType;
|
||||
using KeyType = vtkm::cont::ArrayHandle<T, StorageT>;
|
||||
;
|
||||
using ValueType = vtkm::cont::ArrayHandle<U, StorageU>;
|
||||
typedef vtkm::cont::ArrayHandleZip<KeyType, ValueType> ZipHandleType;
|
||||
|
||||
ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys, values);
|
||||
@ -835,8 +836,9 @@ public:
|
||||
//we than need to specify a custom compare function wrapper
|
||||
//that only checks for key side of the pair, using the custom compare
|
||||
//functor that the user passed in
|
||||
typedef vtkm::cont::ArrayHandle<T, StorageT> KeyType;
|
||||
typedef vtkm::cont::ArrayHandle<U, StorageU> ValueType;
|
||||
using KeyType = vtkm::cont::ArrayHandle<T, StorageT>;
|
||||
;
|
||||
using ValueType = vtkm::cont::ArrayHandle<U, StorageU>;
|
||||
typedef vtkm::cont::ArrayHandleZip<KeyType, ValueType> ZipHandleType;
|
||||
|
||||
ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys, values);
|
||||
@ -997,7 +999,7 @@ public:
|
||||
private:
|
||||
typedef typename vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic>::template ExecutionTypes<
|
||||
DeviceTag>::Portal PortalType;
|
||||
typedef vtkm::cont::ArrayPortalToIterators<PortalType> IteratorsType;
|
||||
using IteratorsType = vtkm::cont::ArrayPortalToIterators<PortalType>;
|
||||
IteratorsType Iterators;
|
||||
|
||||
#if defined(VTKM_MSVC) //MSVC atomics
|
||||
|
@ -38,8 +38,8 @@ namespace vtkm
|
||||
namespace cont
|
||||
{
|
||||
|
||||
typedef vtkm::Int8 DeviceAdapterId;
|
||||
typedef std::string DeviceAdapterNameType;
|
||||
using DeviceAdapterId = vtkm::Int8;
|
||||
using DeviceAdapterNameType = std::string;
|
||||
|
||||
template <typename DeviceAdapter>
|
||||
struct DeviceAdapterTraits;
|
||||
|
@ -129,7 +129,7 @@ struct DynamicTransformTraits
|
||||
/// should specialize this class redefine it to \c
|
||||
/// DynamicTransformTagCastAndCall.
|
||||
///
|
||||
typedef vtkm::cont::internal::DynamicTransformTagStatic DynamicTag;
|
||||
using DynamicTag = vtkm::cont::internal::DynamicTransformTagStatic;
|
||||
};
|
||||
|
||||
/// This functor can be used as the transform in the \c DynamicTransformCont
|
||||
|
@ -211,8 +211,8 @@ struct ReduceStencilGeneration : vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id centerIndex) const
|
||||
{
|
||||
typedef typename InputPortalType::ValueType ValueType;
|
||||
typedef typename KeyStatePortalType::ValueType KeyStateType;
|
||||
using ValueType = typename InputPortalType::ValueType;
|
||||
using KeyStateType = typename KeyStatePortalType::ValueType;
|
||||
|
||||
const vtkm::Id leftIndex = centerIndex - 1;
|
||||
const vtkm::Id rightIndex = centerIndex + 1;
|
||||
@ -356,7 +356,7 @@ struct CopyKernel
|
||||
VTKM_EXEC_CONT
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename OutputPortalType::ValueType ValueType;
|
||||
using ValueType = typename OutputPortalType::ValueType;
|
||||
this->OutputPortal.Set(
|
||||
index + this->OutputOffset,
|
||||
static_cast<ValueType>(this->InputPortal.Get(index + this->InputOffset)));
|
||||
@ -394,7 +394,7 @@ struct LowerBoundsKernel
|
||||
// necessarily true, but it is true for the current uses of this general
|
||||
// function and I don't want to compete with STL if I don't have to.
|
||||
|
||||
typedef vtkm::cont::ArrayPortalToIterators<InputPortalType> InputIteratorsType;
|
||||
using InputIteratorsType = vtkm::cont::ArrayPortalToIterators<InputPortalType>;
|
||||
InputIteratorsType inputIterators(this->InputPortal);
|
||||
typename InputIteratorsType::IteratorType resultPos = std::lower_bound(
|
||||
inputIterators.GetBegin(), inputIterators.GetEnd(), this->ValuesPortal.Get(index));
|
||||
@ -442,7 +442,7 @@ struct LowerBoundsComparisonKernel
|
||||
// necessarily true, but it is true for the current uses of this general
|
||||
// function and I don't want to compete with STL if I don't have to.
|
||||
|
||||
typedef vtkm::cont::ArrayPortalToIterators<InputPortalType> InputIteratorsType;
|
||||
using InputIteratorsType = vtkm::cont::ArrayPortalToIterators<InputPortalType>;
|
||||
InputIteratorsType inputIterators(this->InputPortal);
|
||||
typename InputIteratorsType::IteratorType resultPos =
|
||||
std::lower_bound(inputIterators.GetBegin(),
|
||||
@ -462,7 +462,7 @@ struct LowerBoundsComparisonKernel
|
||||
template <typename PortalType>
|
||||
struct SetConstantKernel
|
||||
{
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
PortalType Portal;
|
||||
ValueType Value;
|
||||
|
||||
@ -500,7 +500,7 @@ struct BitonicSortMergeKernel : vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
|
||||
vtkm::Id groupIndex = index % this->GroupSize;
|
||||
vtkm::Id blockSize = 2 * this->GroupSize;
|
||||
@ -543,7 +543,7 @@ struct BitonicSortCrossoverKernel : vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
|
||||
vtkm::Id groupIndex = index % this->GroupSize;
|
||||
vtkm::Id blockSize = 2 * this->GroupSize;
|
||||
@ -568,7 +568,7 @@ struct BitonicSortCrossoverKernel : vtkm::exec::FunctorBase
|
||||
template <class StencilPortalType, class OutputPortalType, class UnaryPredicate>
|
||||
struct StencilToIndexFlagKernel
|
||||
{
|
||||
typedef typename StencilPortalType::ValueType StencilValueType;
|
||||
using StencilValueType = typename StencilPortalType::ValueType;
|
||||
StencilPortalType StencilPortal;
|
||||
OutputPortalType OutputPortal;
|
||||
UnaryPredicate Predicate;
|
||||
@ -626,13 +626,13 @@ struct CopyIfKernel
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename StencilPortalType::ValueType StencilValueType;
|
||||
using StencilValueType = typename StencilPortalType::ValueType;
|
||||
StencilValueType stencilValue = this->StencilPortal.Get(index);
|
||||
if (Predicate(stencilValue))
|
||||
{
|
||||
vtkm::Id outputIndex = this->IndexPortal.Get(index);
|
||||
|
||||
typedef typename OutputPortalType::ValueType OutputValueType;
|
||||
using OutputValueType = typename OutputPortalType::ValueType;
|
||||
OutputValueType value = this->InputPortal.Get(index);
|
||||
|
||||
this->OutputPortal.Set(outputIndex, value);
|
||||
@ -660,7 +660,7 @@ struct ClassifyUniqueKernel
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename StencilPortalType::ValueType ValueType;
|
||||
using ValueType = typename StencilPortalType::ValueType;
|
||||
if (index == 0)
|
||||
{
|
||||
// Always copy first value.
|
||||
@ -698,7 +698,7 @@ struct ClassifyUniqueComparisonKernel
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename StencilPortalType::ValueType ValueType;
|
||||
using ValueType = typename StencilPortalType::ValueType;
|
||||
if (index == 0)
|
||||
{
|
||||
// Always copy first value.
|
||||
@ -746,7 +746,7 @@ struct UpperBoundsKernel
|
||||
// necessarily true, but it is true for the current uses of this general
|
||||
// function and I don't want to compete with STL if I don't have to.
|
||||
|
||||
typedef vtkm::cont::ArrayPortalToIterators<InputPortalType> InputIteratorsType;
|
||||
using InputIteratorsType = vtkm::cont::ArrayPortalToIterators<InputPortalType>;
|
||||
InputIteratorsType inputIterators(this->InputPortal);
|
||||
typename InputIteratorsType::IteratorType resultPos = std::upper_bound(
|
||||
inputIterators.GetBegin(), inputIterators.GetEnd(), this->ValuesPortal.Get(index));
|
||||
@ -794,7 +794,7 @@ struct UpperBoundsKernelComparisonKernel
|
||||
// necessarily true, but it is true for the current uses of this general
|
||||
// function and I don't want to compete with STL if I don't have to.
|
||||
|
||||
typedef vtkm::cont::ArrayPortalToIterators<InputPortalType> InputIteratorsType;
|
||||
using InputIteratorsType = vtkm::cont::ArrayPortalToIterators<InputPortalType>;
|
||||
InputIteratorsType inputIterators(this->InputPortal);
|
||||
typename InputIteratorsType::IteratorType resultPos =
|
||||
std::upper_bound(inputIterators.GetBegin(),
|
||||
@ -814,7 +814,7 @@ struct UpperBoundsKernelComparisonKernel
|
||||
template <typename InPortalType, typename OutPortalType, typename BinaryFunctor>
|
||||
struct InclusiveToExclusiveKernel : vtkm::exec::FunctorBase
|
||||
{
|
||||
typedef typename InPortalType::ValueType ValueType;
|
||||
using ValueType = typename InPortalType::ValueType;
|
||||
|
||||
InPortalType InPortal;
|
||||
OutPortalType OutPortal;
|
||||
@ -870,7 +870,7 @@ struct ScanKernel : vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
|
||||
vtkm::Id leftIndex = this->Offset + index * this->Stride;
|
||||
vtkm::Id rightIndex = leftIndex + this->Distance;
|
||||
|
@ -38,9 +38,9 @@ class ArrayManagerExecution<T, StorageTag, vtkm::cont::DeviceAdapterTagSerial>
|
||||
{
|
||||
public:
|
||||
typedef vtkm::cont::internal::ArrayManagerExecutionShareWithControl<T, StorageTag> Superclass;
|
||||
typedef typename Superclass::ValueType ValueType;
|
||||
typedef typename Superclass::PortalType PortalType;
|
||||
typedef typename Superclass::PortalConstType PortalConstType;
|
||||
using ValueType = typename Superclass::ValueType;
|
||||
using PortalType = typename Superclass::PortalType;
|
||||
using PortalConstType = typename Superclass::PortalConstType;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayManagerExecution(typename Superclass::StorageType* storage)
|
||||
|
@ -47,7 +47,7 @@ struct DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagSerial>
|
||||
vtkm::cont::DeviceAdapterTagSerial>
|
||||
{
|
||||
private:
|
||||
typedef vtkm::cont::DeviceAdapterTagSerial Device;
|
||||
using Device = vtkm::cont::DeviceAdapterTagSerial;
|
||||
|
||||
public:
|
||||
template <typename T, typename U, class CIn>
|
||||
@ -310,8 +310,9 @@ private:
|
||||
//we than need to specify a custom compare function wrapper
|
||||
//that only checks for key side of the pair, using the custom compare
|
||||
//functor that the user passed in
|
||||
typedef vtkm::cont::ArrayHandle<T, StorageT> KeyType;
|
||||
typedef vtkm::cont::ArrayHandle<U, StorageU> ValueType;
|
||||
using KeyType = vtkm::cont::ArrayHandle<T, StorageT>;
|
||||
;
|
||||
using ValueType = vtkm::cont::ArrayHandle<U, StorageU>;
|
||||
typedef vtkm::cont::ArrayHandleZip<KeyType, ValueType> ZipHandleType;
|
||||
|
||||
ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys, values);
|
||||
@ -336,8 +337,8 @@ public:
|
||||
{
|
||||
/// More efficient sort:
|
||||
/// Move value indexes when sorting and reorder the value array at last
|
||||
typedef vtkm::cont::ArrayHandle<U, StorageU> ValueType;
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Id> IndexType;
|
||||
using ValueType = vtkm::cont::ArrayHandle<U, StorageU>;
|
||||
using IndexType = vtkm::cont::ArrayHandle<vtkm::Id>;
|
||||
|
||||
IndexType indexArray;
|
||||
ValueType valuesScattered;
|
||||
|
@ -42,10 +42,10 @@ class ArrayManagerExecution<T, StorageTag, vtkm::cont::DeviceAdapterTagTBB>
|
||||
{
|
||||
public:
|
||||
typedef vtkm::cont::internal::ArrayManagerExecutionShareWithControl<T, StorageTag> Superclass;
|
||||
typedef typename Superclass::ValueType ValueType;
|
||||
typedef typename Superclass::PortalType PortalType;
|
||||
typedef typename Superclass::PortalConstType PortalConstType;
|
||||
typedef typename Superclass::StorageType StorageType;
|
||||
using ValueType = typename Superclass::ValueType;
|
||||
using PortalType = typename Superclass::PortalType;
|
||||
using PortalConstType = typename Superclass::PortalConstType;
|
||||
using StorageType = typename Superclass::StorageType;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayManagerExecution(StorageType* storage)
|
||||
|
@ -140,7 +140,7 @@ public:
|
||||
vtkm::cont::DeviceAdapterTagTBB>::Portal PortalType;
|
||||
PortalType arrayPortal = values.PrepareForInPlace(vtkm::cont::DeviceAdapterTagTBB());
|
||||
|
||||
typedef vtkm::cont::ArrayPortalToIterators<PortalType> IteratorsType;
|
||||
using IteratorsType = vtkm::cont::ArrayPortalToIterators<PortalType>;
|
||||
IteratorsType iterators(arrayPortal);
|
||||
|
||||
internal::WrappedBinaryOperator<bool, BinaryCompare> wrappedCompare(binary_compare);
|
||||
@ -159,14 +159,15 @@ public:
|
||||
vtkm::cont::ArrayHandle<U, StorageU>& values,
|
||||
Compare comp)
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandle<T, StorageT> KeyType;
|
||||
using KeyType = vtkm::cont::ArrayHandle<T, StorageT>;
|
||||
;
|
||||
if (sizeof(U) > sizeof(vtkm::Id))
|
||||
{
|
||||
/// More efficient sort:
|
||||
/// Move value indexes when sorting and reorder the value array at last
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<U, StorageU> ValueType;
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Id> IndexType;
|
||||
using ValueType = vtkm::cont::ArrayHandle<U, StorageU>;
|
||||
using IndexType = vtkm::cont::ArrayHandle<vtkm::Id>;
|
||||
typedef vtkm::cont::ArrayHandleZip<KeyType, IndexType> ZipHandleType;
|
||||
|
||||
IndexType indexArray;
|
||||
@ -186,7 +187,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandle<U, StorageU> ValueType;
|
||||
using ValueType = vtkm::cont::ArrayHandle<U, StorageU>;
|
||||
typedef vtkm::cont::ArrayHandleZip<KeyType, ValueType> ZipHandleType;
|
||||
|
||||
ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys, values);
|
||||
|
@ -120,7 +120,7 @@ struct ReduceBody
|
||||
VTKM_EXEC
|
||||
void operator()(const ::tbb::blocked_range<vtkm::Id>& range)
|
||||
{
|
||||
typedef vtkm::cont::ArrayPortalToIterators<InputPortalType> InputIteratorsType;
|
||||
using InputIteratorsType = vtkm::cont::ArrayPortalToIterators<InputPortalType>;
|
||||
InputIteratorsType inputIterators(this->InputPortal);
|
||||
|
||||
//use temp, and iterators instead of member variable to reduce false sharing
|
||||
@ -231,7 +231,7 @@ struct ScanInclusiveBody
|
||||
VTKM_EXEC
|
||||
void operator()(const ::tbb::blocked_range<vtkm::Id>& range, ::tbb::pre_scan_tag)
|
||||
{
|
||||
typedef vtkm::cont::ArrayPortalToIterators<InputPortalType> InputIteratorsType;
|
||||
using InputIteratorsType = vtkm::cont::ArrayPortalToIterators<InputPortalType>;
|
||||
InputIteratorsType inputIterators(this->InputPortal);
|
||||
|
||||
//use temp, and iterators instead of member variable to reduce false sharing
|
||||
@ -250,8 +250,8 @@ struct ScanInclusiveBody
|
||||
VTKM_EXEC
|
||||
void operator()(const ::tbb::blocked_range<vtkm::Id>& range, ::tbb::final_scan_tag)
|
||||
{
|
||||
typedef vtkm::cont::ArrayPortalToIterators<InputPortalType> InputIteratorsType;
|
||||
typedef vtkm::cont::ArrayPortalToIterators<OutputPortalType> OutputIteratorsType;
|
||||
using InputIteratorsType = vtkm::cont::ArrayPortalToIterators<InputPortalType>;
|
||||
using OutputIteratorsType = vtkm::cont::ArrayPortalToIterators<OutputPortalType>;
|
||||
|
||||
InputIteratorsType inputIterators(this->InputPortal);
|
||||
OutputIteratorsType outputIterators(this->OutputPortal);
|
||||
@ -321,7 +321,7 @@ struct ScanExclusiveBody
|
||||
VTKM_EXEC
|
||||
void operator()(const ::tbb::blocked_range<vtkm::Id>& range, ::tbb::pre_scan_tag)
|
||||
{
|
||||
typedef vtkm::cont::ArrayPortalToIterators<InputPortalType> InputIteratorsType;
|
||||
using InputIteratorsType = vtkm::cont::ArrayPortalToIterators<InputPortalType>;
|
||||
InputIteratorsType inputIterators(this->InputPortal);
|
||||
|
||||
//move the iterator to the first item
|
||||
@ -346,8 +346,8 @@ struct ScanExclusiveBody
|
||||
VTKM_EXEC
|
||||
void operator()(const ::tbb::blocked_range<vtkm::Id>& range, ::tbb::final_scan_tag)
|
||||
{
|
||||
typedef vtkm::cont::ArrayPortalToIterators<InputPortalType> InputIteratorsType;
|
||||
typedef vtkm::cont::ArrayPortalToIterators<OutputPortalType> OutputIteratorsType;
|
||||
using InputIteratorsType = vtkm::cont::ArrayPortalToIterators<InputPortalType>;
|
||||
using OutputIteratorsType = vtkm::cont::ArrayPortalToIterators<OutputPortalType>;
|
||||
|
||||
InputIteratorsType inputIterators(this->InputPortal);
|
||||
OutputIteratorsType outputIterators(this->OutputPortal);
|
||||
|
@ -121,7 +121,7 @@ struct TestingArrayHandles
|
||||
private:
|
||||
static const vtkm::Id ARRAY_SIZE = 100;
|
||||
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapterTag> Algorithm;
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapterTag>;
|
||||
|
||||
typedef vtkm::worklet::DispatcherMapField<PassThrough, DeviceAdapterTag> DispatcherPassThrough;
|
||||
struct VerifyEmptyArrays
|
||||
@ -274,9 +274,8 @@ private:
|
||||
VTKM_TEST_ASSERT(arrayHandle.GetNumberOfValues() == 0,
|
||||
"ArrayHandle has wrong number of entries.");
|
||||
{
|
||||
typedef
|
||||
typename vtkm::cont::ArrayHandle<T>::template ExecutionTypes<DeviceAdapterTag>::Portal
|
||||
ExecutionPortalType;
|
||||
using ExecutionPortalType =
|
||||
typename vtkm::cont::ArrayHandle<T>::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||
ExecutionPortalType executionPortal =
|
||||
arrayHandle.PrepareForOutput(ARRAY_SIZE * 2, DeviceAdapterTag());
|
||||
|
||||
@ -304,9 +303,8 @@ private:
|
||||
|
||||
std::cout << "Try in place operation." << std::endl;
|
||||
{
|
||||
typedef
|
||||
typename vtkm::cont::ArrayHandle<T>::template ExecutionTypes<DeviceAdapterTag>::Portal
|
||||
ExecutionPortalType;
|
||||
using ExecutionPortalType =
|
||||
typename vtkm::cont::ArrayHandle<T>::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||
ExecutionPortalType executionPortal = arrayHandle.PrepareForInPlace(DeviceAdapterTag());
|
||||
|
||||
//in place can't be done through the dispatcher
|
||||
|
@ -70,7 +70,7 @@ template <class DeviceAdapterTag>
|
||||
struct TestingDeviceAdapter
|
||||
{
|
||||
private:
|
||||
typedef vtkm::cont::StorageTagBasic StorageTag;
|
||||
using StorageTag = vtkm::cont::StorageTagBasic;
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Id, StorageTag> IdArrayHandle;
|
||||
|
||||
@ -81,11 +81,11 @@ private:
|
||||
|
||||
typedef vtkm::cont::internal::Storage<vtkm::Id, StorageTag> IdStorage;
|
||||
|
||||
typedef typename IdArrayHandle::template ExecutionTypes<DeviceAdapterTag>::Portal IdPortalType;
|
||||
typedef typename IdArrayHandle::template ExecutionTypes<DeviceAdapterTag>::PortalConst
|
||||
IdPortalConstType;
|
||||
using IdPortalType = typename IdArrayHandle::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||
using IdPortalConstType =
|
||||
typename IdArrayHandle::template ExecutionTypes<DeviceAdapterTag>::PortalConst;
|
||||
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapterTag> Algorithm;
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapterTag>;
|
||||
|
||||
public:
|
||||
// Cuda kernels have to be public (in Cuda 4.0).
|
||||
@ -362,8 +362,8 @@ private:
|
||||
std::cout << "-------------------------------------------" << std::endl;
|
||||
std::cout << "Testing device adapter tag" << std::endl;
|
||||
|
||||
typedef vtkm::cont::DeviceAdapterTraits<DeviceAdapterTag> Traits;
|
||||
typedef vtkm::cont::DeviceAdapterTraits<vtkm::cont::DeviceAdapterTagError> ErrorTraits;
|
||||
using Traits = vtkm::cont::DeviceAdapterTraits<DeviceAdapterTag>;
|
||||
using ErrorTraits = vtkm::cont::DeviceAdapterTraits<vtkm::cont::DeviceAdapterTagError>;
|
||||
|
||||
VTKM_TEST_ASSERT(Traits::GetId() == Traits::GetId(),
|
||||
"Device adapter Id does not equal itself.");
|
||||
@ -1150,7 +1150,7 @@ private:
|
||||
//and a custom reduce binary functor
|
||||
const vtkm::Id indexLength = 30;
|
||||
const vtkm::Id valuesLength = 10;
|
||||
typedef vtkm::Float32 ValueType;
|
||||
using ValueType = vtkm::Float32;
|
||||
|
||||
vtkm::Id indexs[indexLength] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4,
|
||||
5, 5, 5, 1, 4, 9, 7, 7, 7, 8, 8, 8, 0, 1, 2 };
|
||||
@ -1256,7 +1256,7 @@ private:
|
||||
//and a custom reduce binary functor
|
||||
const vtkm::Id inputLength = 30;
|
||||
const vtkm::Id expectedLength = 10;
|
||||
typedef vtkm::Float32 ValueType;
|
||||
using ValueType = vtkm::Float32;
|
||||
vtkm::Id inputKeys[inputLength] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4,
|
||||
5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9 }; // input keys
|
||||
ValueType inputValues1[inputLength] = {
|
||||
@ -1274,7 +1274,7 @@ private:
|
||||
IdArrayHandle keys = vtkm::cont::make_ArrayHandle(inputKeys, inputLength);
|
||||
typedef vtkm::cont::ArrayHandle<ValueType, StorageTag> ValueArrayType;
|
||||
ValueArrayType values1 = vtkm::cont::make_ArrayHandle(inputValues1, inputLength);
|
||||
typedef vtkm::cont::ArrayHandleConstant<ValueType> ConstValueArrayType;
|
||||
using ConstValueArrayType = vtkm::cont::ArrayHandleConstant<ValueType>;
|
||||
ConstValueArrayType constOneArray(1.f, inputLength);
|
||||
|
||||
vtkm::cont::ArrayHandleZip<ValueArrayType, ConstValueArrayType> valuesZip;
|
||||
|
@ -32,7 +32,7 @@
|
||||
namespace ArrayHandleCartesianProductNamespace
|
||||
{
|
||||
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<VTKM_DEFAULT_DEVICE_ADAPTER_TAG> DFA;
|
||||
using DFA = vtkm::cont::DeviceAdapterAlgorithm<VTKM_DEFAULT_DEVICE_ADAPTER_TAG>;
|
||||
|
||||
template <typename T>
|
||||
void ArrayHandleCPBasic(vtkm::cont::ArrayHandle<T> x,
|
||||
|
@ -41,7 +41,7 @@ namespace
|
||||
|
||||
const vtkm::Id ARRAY_SIZE = 10;
|
||||
|
||||
typedef vtkm::cont::StorageTagBasic StorageTag;
|
||||
using StorageTag = vtkm::cont::StorageTagBasic;
|
||||
|
||||
vtkm::FloatDefault TestValue3Ids(vtkm::Id index, vtkm::IdComponent inComponentIndex, int inArrayId)
|
||||
{
|
||||
@ -52,7 +52,7 @@ vtkm::FloatDefault TestValue3Ids(vtkm::Id index, vtkm::IdComponent inComponentIn
|
||||
template <typename ValueType>
|
||||
vtkm::cont::ArrayHandle<ValueType, StorageTag> MakeInputArray(int arrayId)
|
||||
{
|
||||
typedef vtkm::VecTraits<ValueType> VTraits;
|
||||
using VTraits = vtkm::VecTraits<ValueType>;
|
||||
|
||||
// Create a buffer with valid test values.
|
||||
ValueType buffer[ARRAY_SIZE];
|
||||
@ -92,7 +92,7 @@ void CheckArray(const vtkm::cont::ArrayHandle<ValueType, C>& outArray,
|
||||
vtkm::cont::DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagSerial>::Copy(outArray, arrayCopy);
|
||||
|
||||
typename ArrayHandleType::PortalConstControl portal = arrayCopy.GetPortalConstControl();
|
||||
typedef vtkm::VecTraits<ValueType> VTraits;
|
||||
using VTraits = vtkm::VecTraits<ValueType>;
|
||||
for (vtkm::Id index = 0; index < ARRAY_SIZE; index++)
|
||||
{
|
||||
ValueType retreivedValue = portal.Get(index);
|
||||
@ -118,7 +118,7 @@ void TryScalarArray()
|
||||
int inArrayId = 0;
|
||||
InArrayType inArray = MakeInputArray<InValueType>(inArrayId);
|
||||
|
||||
typedef typename vtkm::cont::ArrayHandleCompositeVectorType<InArrayType>::type OutArrayType;
|
||||
using OutArrayType = typename vtkm::cont::ArrayHandleCompositeVectorType<InArrayType>::type;
|
||||
for (vtkm::IdComponent inComponentIndex = 0; inComponentIndex < inComponents; inComponentIndex++)
|
||||
{
|
||||
OutArrayType outArray = vtkm::cont::make_ArrayHandleCompositeVector(inArray, inComponentIndex);
|
||||
@ -253,10 +253,10 @@ void TrySpecialArrays()
|
||||
{
|
||||
std::cout << "Trying special arrays." << std::endl;
|
||||
|
||||
typedef vtkm::cont::ArrayHandleIndex ArrayType1;
|
||||
using ArrayType1 = vtkm::cont::ArrayHandleIndex;
|
||||
ArrayType1 array1(ARRAY_SIZE);
|
||||
|
||||
typedef vtkm::cont::ArrayHandleConstant<vtkm::Id> ArrayType2;
|
||||
using ArrayType2 = vtkm::cont::ArrayHandleConstant<vtkm::Id>;
|
||||
ArrayType2 array2(295, ARRAY_SIZE);
|
||||
|
||||
typedef vtkm::cont::ArrayHandleCompositeVectorType<ArrayType1, ArrayType2>::type
|
||||
|
@ -58,8 +58,8 @@ void TestConcatenateEmptyArray()
|
||||
for (vtkm::Id i = 0; i < ARRAY_SIZE; i++)
|
||||
vec.push_back(vtkm::Float64(i) * 1.5);
|
||||
|
||||
typedef vtkm::Float64 CoeffValueType;
|
||||
typedef vtkm::cont::ArrayHandle<CoeffValueType> CoeffArrayTypeTmp;
|
||||
using CoeffValueType = vtkm::Float64;
|
||||
using CoeffArrayTypeTmp = vtkm::cont::ArrayHandle<CoeffValueType>;
|
||||
typedef vtkm::cont::ArrayHandleConcatenate<CoeffArrayTypeTmp, CoeffArrayTypeTmp> ArrayConcat;
|
||||
typedef vtkm::cont::ArrayHandleConcatenate<ArrayConcat, CoeffArrayTypeTmp> ArrayConcat2;
|
||||
|
||||
|
@ -88,13 +88,13 @@ namespace UnitTestArrayHandleCountingNamespace
|
||||
template <typename ValueType>
|
||||
struct TemplatedTests
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandleCounting<ValueType> ArrayHandleType;
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandleCounting<ValueType>;
|
||||
|
||||
typedef vtkm::cont::
|
||||
ArrayHandle<ValueType, typename vtkm::cont::internal::ArrayHandleCountingTraits<ValueType>::Tag>
|
||||
ArrayHandleType2;
|
||||
|
||||
typedef typename ArrayHandleType::PortalConstControl PortalType;
|
||||
using PortalType = typename ArrayHandleType::PortalConstControl;
|
||||
|
||||
void operator()(const ValueType& startingValue, const ValueType& step)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ struct IndexSquared
|
||||
VTKM_EXEC_CONT
|
||||
ValueType operator()(vtkm::Id i) const
|
||||
{
|
||||
typedef typename vtkm::VecTraits<ValueType>::ComponentType ComponentType;
|
||||
using ComponentType = typename vtkm::VecTraits<ValueType>::ComponentType;
|
||||
return ValueType(static_cast<ComponentType>(i * i));
|
||||
}
|
||||
};
|
||||
@ -49,10 +49,10 @@ struct ImplicitTests
|
||||
template <typename ValueType>
|
||||
void operator()(const ValueType) const
|
||||
{
|
||||
typedef IndexSquared<ValueType> FunctorType;
|
||||
using FunctorType = IndexSquared<ValueType>;
|
||||
FunctorType functor;
|
||||
|
||||
typedef vtkm::cont::ArrayHandleImplicit<FunctorType> ImplicitHandle;
|
||||
using ImplicitHandle = vtkm::cont::ArrayHandleImplicit<FunctorType>;
|
||||
|
||||
ImplicitHandle implict = vtkm::cont::make_ArrayHandleImplicit(functor, ARRAY_SIZE);
|
||||
|
||||
@ -65,8 +65,8 @@ struct ImplicitTests
|
||||
}
|
||||
|
||||
//verify that the execution portal works
|
||||
typedef vtkm::cont::DeviceAdapterTagSerial Device;
|
||||
typedef typename ImplicitHandle::template ExecutionTypes<Device>::PortalConst CEPortal;
|
||||
using Device = vtkm::cont::DeviceAdapterTagSerial;
|
||||
using CEPortal = typename ImplicitHandle::template ExecutionTypes<Device>::PortalConst;
|
||||
CEPortal execPortal = implict.PrepareForInput(Device());
|
||||
for (int i = 0; i < ARRAY_SIZE; ++i)
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ struct DoubleIndexFunctor
|
||||
vtkm::Id operator()(vtkm::Id index) const { return 2 * index; }
|
||||
};
|
||||
|
||||
typedef vtkm::cont::ArrayHandleImplicit<DoubleIndexFunctor> DoubleIndexArrayType;
|
||||
using DoubleIndexArrayType = vtkm::cont::ArrayHandleImplicit<DoubleIndexFunctor>;
|
||||
|
||||
template <typename PermutedPortalType>
|
||||
struct CheckPermutationFunctor : vtkm::exec::FunctorBase
|
||||
@ -54,7 +54,7 @@ struct CheckPermutationFunctor : vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename PermutedPortalType::ValueType T;
|
||||
using T = typename PermutedPortalType::ValueType;
|
||||
T value = this->PermutedPortal.Get(index);
|
||||
|
||||
vtkm::Id permutedIndex = 2 * index;
|
||||
@ -72,8 +72,8 @@ VTKM_CONT CheckPermutationFunctor<
|
||||
typename PermutedArrayHandleType::template ExecutionTypes<Device>::PortalConst>
|
||||
make_CheckPermutationFunctor(const PermutedArrayHandleType& permutedArray, Device)
|
||||
{
|
||||
typedef typename PermutedArrayHandleType::template ExecutionTypes<Device>::PortalConst
|
||||
PermutedPortalType;
|
||||
using PermutedPortalType =
|
||||
typename PermutedArrayHandleType::template ExecutionTypes<Device>::PortalConst;
|
||||
CheckPermutationFunctor<PermutedPortalType> functor;
|
||||
functor.PermutedPortal = permutedArray.PrepareForInput(Device());
|
||||
return functor;
|
||||
@ -87,7 +87,7 @@ struct InPlacePermutationFunctor : vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename PermutedPortalType::ValueType T;
|
||||
using T = typename PermutedPortalType::ValueType;
|
||||
T value = this->PermutedPortal.Get(index);
|
||||
|
||||
value = value + T(1000);
|
||||
@ -101,8 +101,8 @@ VTKM_CONT InPlacePermutationFunctor<
|
||||
typename PermutedArrayHandleType::template ExecutionTypes<Device>::Portal>
|
||||
make_InPlacePermutationFunctor(PermutedArrayHandleType& permutedArray, Device)
|
||||
{
|
||||
typedef
|
||||
typename PermutedArrayHandleType::template ExecutionTypes<Device>::Portal PermutedPortalType;
|
||||
using PermutedPortalType =
|
||||
typename PermutedArrayHandleType::template ExecutionTypes<Device>::Portal;
|
||||
InPlacePermutationFunctor<PermutedPortalType> functor;
|
||||
functor.PermutedPortal = permutedArray.PrepareForInPlace(Device());
|
||||
return functor;
|
||||
@ -111,7 +111,7 @@ make_InPlacePermutationFunctor(PermutedArrayHandleType& permutedArray, Device)
|
||||
template <typename PortalType>
|
||||
VTKM_CONT void CheckInPlaceResult(PortalType portal)
|
||||
{
|
||||
typedef typename PortalType::ValueType T;
|
||||
using T = typename PortalType::ValueType;
|
||||
for (vtkm::Id permutedIndex = 0; permutedIndex < 2 * ARRAY_SIZE; permutedIndex++)
|
||||
{
|
||||
if (permutedIndex % 2 == 0)
|
||||
@ -140,7 +140,7 @@ struct OutputPermutationFunctor : vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename PermutedPortalType::ValueType T;
|
||||
using T = typename PermutedPortalType::ValueType;
|
||||
this->PermutedPortal.Set(index, TestValue(static_cast<vtkm::Id>(index), T()));
|
||||
}
|
||||
};
|
||||
@ -150,8 +150,8 @@ VTKM_CONT OutputPermutationFunctor<
|
||||
typename PermutedArrayHandleType::template ExecutionTypes<Device>::Portal>
|
||||
make_OutputPermutationFunctor(PermutedArrayHandleType& permutedArray, Device)
|
||||
{
|
||||
typedef
|
||||
typename PermutedArrayHandleType::template ExecutionTypes<Device>::Portal PermutedPortalType;
|
||||
using PermutedPortalType =
|
||||
typename PermutedArrayHandleType::template ExecutionTypes<Device>::Portal;
|
||||
OutputPermutationFunctor<PermutedPortalType> functor;
|
||||
functor.PermutedPortal = permutedArray.PrepareForOutput(ARRAY_SIZE, Device());
|
||||
return functor;
|
||||
@ -160,7 +160,7 @@ make_OutputPermutationFunctor(PermutedArrayHandleType& permutedArray, Device)
|
||||
template <typename PortalType>
|
||||
VTKM_CONT void CheckOutputResult(PortalType portal)
|
||||
{
|
||||
typedef typename PortalType::ValueType T;
|
||||
using T = typename PortalType::ValueType;
|
||||
for (vtkm::IdComponent permutedIndex = 0; permutedIndex < 2 * ARRAY_SIZE; permutedIndex++)
|
||||
{
|
||||
if (permutedIndex % 2 == 0)
|
||||
@ -185,12 +185,12 @@ VTKM_CONT void CheckOutputResult(PortalType portal)
|
||||
template <typename ValueType>
|
||||
struct PermutationTests
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandleImplicit<DoubleIndexFunctor> IndexArrayType;
|
||||
using IndexArrayType = vtkm::cont::ArrayHandleImplicit<DoubleIndexFunctor>;
|
||||
typedef vtkm::cont::ArrayHandle<ValueType, vtkm::cont::StorageTagBasic> ValueArrayType;
|
||||
typedef vtkm::cont::ArrayHandlePermutation<IndexArrayType, ValueArrayType> PermutationArrayType;
|
||||
|
||||
typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG Device;
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<Device> Algorithm;
|
||||
using Device = VTKM_DEFAULT_DEVICE_ADAPTER_TAG;
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<Device>;
|
||||
|
||||
ValueArrayType MakeValueArray() const
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ void TestArrayHandleReverseScanInclusiveByKey()
|
||||
vtkm::cont::ArrayHandleReverse<vtkm::cont::ArrayHandle<vtkm::Id>> reversed =
|
||||
vtkm::cont::make_ArrayHandleReverse(output);
|
||||
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagSerial> Algorithm;
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagSerial>;
|
||||
Algorithm::ScanInclusiveByKey(keys, values, reversed);
|
||||
|
||||
vtkm::Id expected[] = { 0, 1, 3, 6, 4, 9, 6, 7, 15, 9 };
|
||||
|
@ -56,7 +56,7 @@ struct CheckTransformFunctor : vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename TransformedPortalType::ValueType T;
|
||||
using T = typename TransformedPortalType::ValueType;
|
||||
typename OriginalPortalType::ValueType original = this->OriginalPortal.Get(index);
|
||||
T transformed = this->TransformedPortal.Get(index);
|
||||
if (!test_equal(transformed, MySquare<T>()(original)))
|
||||
@ -74,10 +74,10 @@ make_CheckTransformFunctor(const OriginalArrayHandleType& originalArray,
|
||||
const TransformedArrayHandleType& transformedArray,
|
||||
Device)
|
||||
{
|
||||
typedef typename OriginalArrayHandleType::template ExecutionTypes<Device>::PortalConst
|
||||
OriginalPortalType;
|
||||
typedef typename TransformedArrayHandleType::template ExecutionTypes<Device>::PortalConst
|
||||
TransformedPortalType;
|
||||
using OriginalPortalType =
|
||||
typename OriginalArrayHandleType::template ExecutionTypes<Device>::PortalConst;
|
||||
using TransformedPortalType =
|
||||
typename TransformedArrayHandleType::template ExecutionTypes<Device>::PortalConst;
|
||||
CheckTransformFunctor<OriginalPortalType, TransformedPortalType> functor;
|
||||
functor.OriginalPortal = originalArray.PrepareForInput(Device());
|
||||
functor.TransformedPortal = transformedArray.PrepareForInput(Device());
|
||||
@ -90,8 +90,8 @@ VTKM_CONT void CheckControlPortals(const OriginalArrayHandleType& originalArray,
|
||||
{
|
||||
std::cout << " Verify that the control portal works" << std::endl;
|
||||
|
||||
typedef typename OriginalArrayHandleType::PortalConstControl OriginalPortalType;
|
||||
typedef typename TransformedArrayHandleType::PortalConstControl TransformedPortalType;
|
||||
using OriginalPortalType = typename OriginalArrayHandleType::PortalConstControl;
|
||||
using TransformedPortalType = typename TransformedArrayHandleType::PortalConstControl;
|
||||
|
||||
VTKM_TEST_ASSERT(originalArray.GetNumberOfValues() == transformedArray.GetNumberOfValues(),
|
||||
"Number of values in transformed array incorrect.");
|
||||
@ -104,7 +104,7 @@ VTKM_CONT void CheckControlPortals(const OriginalArrayHandleType& originalArray,
|
||||
|
||||
for (vtkm::Id index = 0; index < originalArray.GetNumberOfValues(); index++)
|
||||
{
|
||||
typedef typename TransformedPortalType::ValueType T;
|
||||
using T = typename TransformedPortalType::ValueType;
|
||||
typename OriginalPortalType::ValueType original = originalPortal.Get(index);
|
||||
T transformed = transformedPortal.Get(index);
|
||||
VTKM_TEST_ASSERT(test_equal(transformed, MySquare<T>()(original)), "Bad transform value.");
|
||||
@ -114,8 +114,8 @@ VTKM_CONT void CheckControlPortals(const OriginalArrayHandleType& originalArray,
|
||||
template <typename InputValueType>
|
||||
struct TransformTests
|
||||
{
|
||||
typedef typename vtkm::VecTraits<InputValueType>::ComponentType OutputValueType;
|
||||
typedef MySquare<OutputValueType> FunctorType;
|
||||
using OutputValueType = typename vtkm::VecTraits<InputValueType>::ComponentType;
|
||||
using FunctorType = MySquare<OutputValueType>;
|
||||
|
||||
typedef vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandle<InputValueType>, FunctorType>
|
||||
TransformHandle;
|
||||
@ -124,8 +124,8 @@ struct TransformTests
|
||||
FunctorType>
|
||||
CountingTransformHandle;
|
||||
|
||||
typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG Device;
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<Device> Algorithm;
|
||||
using Device = VTKM_DEFAULT_DEVICE_ADAPTER_TAG;
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<Device>;
|
||||
|
||||
void operator()() const
|
||||
{
|
||||
@ -149,7 +149,7 @@ struct TransformTests
|
||||
vtkm::cont::ArrayHandle<InputValueType> input;
|
||||
TransformHandle thandle(input, functor);
|
||||
|
||||
typedef typename vtkm::cont::ArrayHandle<InputValueType>::PortalControl Portal;
|
||||
using Portal = typename vtkm::cont::ArrayHandle<InputValueType>::PortalControl;
|
||||
input.Allocate(ARRAY_SIZE);
|
||||
Portal portal = input.GetPortalControl();
|
||||
for (vtkm::Id index = 0; index < ARRAY_SIZE; ++index)
|
||||
|
@ -32,8 +32,8 @@ struct TemplatedTests
|
||||
{
|
||||
static const vtkm::Id ARRAY_SIZE = 10;
|
||||
|
||||
typedef T ValueType;
|
||||
typedef typename vtkm::VecTraits<ValueType>::ComponentType ComponentType;
|
||||
using ValueType = T;
|
||||
using ComponentType = typename vtkm::VecTraits<ValueType>::ComponentType;
|
||||
|
||||
static ValueType ExpectedValue(vtkm::Id index, ComponentType value)
|
||||
{
|
||||
@ -43,7 +43,7 @@ struct TemplatedTests
|
||||
class ReadOnlyArrayPortal
|
||||
{
|
||||
public:
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
VTKM_CONT
|
||||
ReadOnlyArrayPortal(ComponentType value)
|
||||
@ -64,7 +64,7 @@ struct TemplatedTests
|
||||
class WriteOnlyArrayPortal
|
||||
{
|
||||
public:
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
VTKM_CONT
|
||||
WriteOnlyArrayPortal(ComponentType value)
|
||||
@ -122,8 +122,8 @@ struct TemplatedTests
|
||||
|
||||
void TestIteratorRead()
|
||||
{
|
||||
typedef ReadOnlyArrayPortal ArrayPortalType;
|
||||
typedef vtkm::cont::ArrayPortalToIterators<ArrayPortalType> GetIteratorsType;
|
||||
using ArrayPortalType = ReadOnlyArrayPortal;
|
||||
using GetIteratorsType = vtkm::cont::ArrayPortalToIterators<ArrayPortalType>;
|
||||
|
||||
static const ComponentType READ_VALUE = 23;
|
||||
ArrayPortalType portal(READ_VALUE);
|
||||
@ -140,8 +140,8 @@ struct TemplatedTests
|
||||
|
||||
void TestIteratorWrite()
|
||||
{
|
||||
typedef WriteOnlyArrayPortal ArrayPortalType;
|
||||
typedef vtkm::cont::ArrayPortalToIterators<ArrayPortalType> GetIteratorsType;
|
||||
using ArrayPortalType = WriteOnlyArrayPortal;
|
||||
using GetIteratorsType = vtkm::cont::ArrayPortalToIterators<ArrayPortalType>;
|
||||
|
||||
static const ComponentType WRITE_VALUE = 63;
|
||||
ArrayPortalType portal(WRITE_VALUE);
|
||||
|
@ -31,7 +31,7 @@
|
||||
namespace DataSetBuilderExplicitNamespace
|
||||
{
|
||||
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<VTKM_DEFAULT_DEVICE_ADAPTER_TAG> DFA;
|
||||
using DFA = vtkm::cont::DeviceAdapterAlgorithm<VTKM_DEFAULT_DEVICE_ADAPTER_TAG>;
|
||||
|
||||
template <typename T>
|
||||
vtkm::Bounds ComputeBounds(std::size_t numPoints, const T* coords)
|
||||
|
@ -108,7 +108,7 @@ void TestDataSet_Explicit()
|
||||
dataSet.GetCellSet(0).CopyTo(cellSet);
|
||||
|
||||
//verify that we can create a subset of a singlset
|
||||
typedef vtkm::cont::CellSetPermutation<vtkm::cont::CellSetSingleType<>> SubsetType;
|
||||
using SubsetType = vtkm::cont::CellSetPermutation<vtkm::cont::CellSetSingleType<>>;
|
||||
SubsetType subset;
|
||||
subset.Fill(validCellIds, cellSet);
|
||||
|
||||
@ -160,7 +160,7 @@ void TestDataSet_Structured2D()
|
||||
subset.PrintSummary(std::cout);
|
||||
|
||||
//verify that we can call PrepareForInput on CellSetSingleType
|
||||
typedef vtkm::cont::DeviceAdapterTagSerial DeviceAdapterTag;
|
||||
using DeviceAdapterTag = vtkm::cont::DeviceAdapterTagSerial;
|
||||
|
||||
//verify that PrepareForInput exists
|
||||
subset.PrepareForInput(
|
||||
|
@ -48,9 +48,9 @@ struct DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral>
|
||||
vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral>
|
||||
{
|
||||
private:
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagSerial> Algorithm;
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagSerial>;
|
||||
|
||||
typedef vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral DeviceAdapterTagTestAlgorithmGeneral;
|
||||
using DeviceAdapterTagTestAlgorithmGeneral = vtkm::cont::DeviceAdapterTagTestAlgorithmGeneral;
|
||||
|
||||
public:
|
||||
template <class Functor>
|
||||
@ -82,9 +82,9 @@ public:
|
||||
StorageTag,
|
||||
vtkm::cont::DeviceAdapterTagSerial>
|
||||
Superclass;
|
||||
typedef typename Superclass::ValueType ValueType;
|
||||
typedef typename Superclass::PortalType PortalType;
|
||||
typedef typename Superclass::PortalConstType PortalConstType;
|
||||
using ValueType = typename Superclass::ValueType;
|
||||
using PortalType = typename Superclass::PortalType;
|
||||
using PortalConstType = typename Superclass::PortalConstType;
|
||||
|
||||
ArrayManagerExecution(vtkm::cont::internal::Storage<T, StorageTag>* storage)
|
||||
: Superclass(storage)
|
||||
|
@ -71,7 +71,7 @@ struct TypeListTagString : vtkm::ListTagBase<std::string>
|
||||
template <typename T>
|
||||
struct UnusualPortal
|
||||
{
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; }
|
||||
|
@ -36,7 +36,7 @@ struct DoesExist;
|
||||
template <typename DeviceAdapterTag>
|
||||
void detect_if_exists(DeviceAdapterTag tag)
|
||||
{
|
||||
typedef vtkm::cont::DeviceAdapterTraits<DeviceAdapterTag> DeviceAdapterTraits;
|
||||
using DeviceAdapterTraits = vtkm::cont::DeviceAdapterTraits<DeviceAdapterTag>;
|
||||
DoesExist<DeviceAdapterTraits::Valid>::Exist(tag);
|
||||
}
|
||||
|
||||
@ -68,9 +68,9 @@ struct DoesExist<true>
|
||||
|
||||
void Detection()
|
||||
{
|
||||
typedef ::vtkm::cont::DeviceAdapterTagSerial SerialTag;
|
||||
typedef ::vtkm::cont::DeviceAdapterTagTBB TBBTag;
|
||||
typedef ::vtkm::cont::DeviceAdapterTagCuda CudaTag;
|
||||
using SerialTag = ::vtkm::cont::DeviceAdapterTagSerial;
|
||||
using TBBTag = ::vtkm::cont::DeviceAdapterTagTBB;
|
||||
using CudaTag = ::vtkm::cont::DeviceAdapterTagCuda;
|
||||
|
||||
//Verify that for each device adapter we compile code for, that it
|
||||
//has valid runtime support.
|
||||
|
@ -36,7 +36,7 @@ namespace
|
||||
template <typename T>
|
||||
struct TestImplicitStorage
|
||||
{
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
ValueType Temp;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
@ -57,12 +57,12 @@ const vtkm::Id ARRAY_SIZE = 1;
|
||||
template <typename T>
|
||||
struct TemplatedTests
|
||||
{
|
||||
typedef vtkm::cont::StorageTagImplicit<TestImplicitStorage<T>> StorageTagType;
|
||||
using StorageTagType = vtkm::cont::StorageTagImplicit<TestImplicitStorage<T>>;
|
||||
typedef vtkm::cont::internal::Storage<T, StorageTagType> StorageType;
|
||||
|
||||
typedef typename StorageType::ValueType ValueType;
|
||||
typedef typename StorageType::PortalType PortalType;
|
||||
typedef typename PortalType::IteratorType IteratorType;
|
||||
using ValueType = typename StorageType::ValueType;
|
||||
using PortalType = typename StorageType::PortalType;
|
||||
using IteratorType = typename PortalType::IteratorType;
|
||||
|
||||
void BasicAllocation()
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ struct TryExecuteTestFunctor
|
||||
template <typename Device>
|
||||
VTKM_CONT bool operator()(Device)
|
||||
{
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<Device> Algorithm;
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<Device>;
|
||||
Algorithm::Copy(this->InArray, this->OutArray);
|
||||
this->NumCalls++;
|
||||
return true;
|
||||
@ -85,11 +85,11 @@ void TryExecuteWithList(DeviceList, bool expectSuccess)
|
||||
|
||||
static void Run()
|
||||
{
|
||||
typedef vtkm::cont::DeviceAdapterTagSerial ValidDevice;
|
||||
typedef vtkm::cont::DeviceAdapterTagError InvalidDevice;
|
||||
using ValidDevice = vtkm::cont::DeviceAdapterTagSerial;
|
||||
using InvalidDevice = vtkm::cont::DeviceAdapterTagError;
|
||||
|
||||
std::cout << "Try a list with a single entry." << std::endl;
|
||||
typedef vtkm::ListTagBase<ValidDevice> SingleValidList;
|
||||
using SingleValidList = vtkm::ListTagBase<ValidDevice>;
|
||||
TryExecuteWithList(SingleValidList(), true);
|
||||
|
||||
std::cout << "Try a list with two valid devices." << std::endl;
|
||||
@ -97,7 +97,7 @@ static void Run()
|
||||
TryExecuteWithList(DoubleValidList(), true);
|
||||
|
||||
std::cout << "Try a list with only invalid device." << std::endl;
|
||||
typedef vtkm::ListTagBase<InvalidDevice> SingleInvalidList;
|
||||
using SingleInvalidList = vtkm::ListTagBase<InvalidDevice>;
|
||||
TryExecuteWithList(SingleInvalidList(), false);
|
||||
|
||||
std::cout << "Try a list with an invalid and valid device." << std::endl;
|
||||
|
@ -54,7 +54,7 @@ template <typename T, typename DeviceAdapterTag>
|
||||
class AtomicArray : public vtkm::exec::ExecutionObjectBase
|
||||
{
|
||||
public:
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
VTKM_CONT
|
||||
AtomicArray()
|
||||
|
@ -42,7 +42,7 @@ template <vtkm::IdComponent ControlSignatureIndex>
|
||||
struct BasicArg : vtkm::exec::arg::ExecutionSignatureTagBase
|
||||
{
|
||||
static const vtkm::IdComponent INDEX = ControlSignatureIndex;
|
||||
typedef vtkm::exec::arg::AspectTagDefault AspectTag;
|
||||
using AspectTag = vtkm::exec::arg::AspectTagDefault;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ struct Fetch<vtkm::exec::arg::FetchTagArrayDirectIn,
|
||||
ThreadIndicesType,
|
||||
ExecObjectType>
|
||||
{
|
||||
typedef typename ExecObjectType::ValueType ValueType;
|
||||
using ValueType = typename ExecObjectType::ValueType;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
|
@ -56,7 +56,7 @@ struct Fetch<vtkm::exec::arg::FetchTagArrayDirectInOut,
|
||||
ThreadIndicesType,
|
||||
ExecObjectType>
|
||||
{
|
||||
typedef typename ExecObjectType::ValueType ValueType;
|
||||
using ValueType = typename ExecObjectType::ValueType;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
|
@ -46,7 +46,7 @@ struct Fetch<vtkm::exec::arg::FetchTagArrayDirectOut,
|
||||
ThreadIndicesType,
|
||||
ExecObjectType>
|
||||
{
|
||||
typedef typename ExecObjectType::ValueType ValueType;
|
||||
using ValueType = typename ExecObjectType::ValueType;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
|
@ -59,7 +59,7 @@ struct Fetch<vtkm::exec::arg::FetchTagExecObject,
|
||||
std::is_base_of<vtkm::exec::ExecutionObjectBase, ExecObjectType>::value,
|
||||
"All execution objects are expected to inherit from vtkm::exec::ExecutionObjectBase");
|
||||
|
||||
typedef ExecObjectType ValueType;
|
||||
using ValueType = ExecObjectType;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
|
@ -47,7 +47,7 @@ struct Fetch<vtkm::exec::arg::FetchTagWholeCellSetIn,
|
||||
ThreadIndicesType,
|
||||
ExecObjectType>
|
||||
{
|
||||
typedef ExecObjectType ValueType;
|
||||
using ValueType = ExecObjectType;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
|
@ -57,13 +57,13 @@ struct InputIndex : vtkm::exec::arg::ExecutionSignatureTagBase
|
||||
// whether we use it or not. 1 should be guaranteed to be valid since you
|
||||
// need at least one argument for the input domain.
|
||||
static const vtkm::IdComponent INDEX = 1;
|
||||
typedef vtkm::exec::arg::AspectTagInputIndex AspectTag;
|
||||
using AspectTag = vtkm::exec::arg::AspectTagInputIndex;
|
||||
};
|
||||
|
||||
template <typename FetchTag, typename ThreadIndicesType, typename ExecObjectType>
|
||||
struct Fetch<FetchTag, vtkm::exec::arg::AspectTagInputIndex, ThreadIndicesType, ExecObjectType>
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC
|
||||
vtkm::Id Load(const ThreadIndicesType& indices, const ExecObjectType&) const
|
||||
|
@ -57,13 +57,13 @@ struct OutputIndex : vtkm::exec::arg::ExecutionSignatureTagBase
|
||||
// whether we use it or not. 1 should be guaranteed to be valid since you
|
||||
// need at least one argument for the output domain.
|
||||
static const vtkm::IdComponent INDEX = 1;
|
||||
typedef vtkm::exec::arg::AspectTagOutputIndex AspectTag;
|
||||
using AspectTag = vtkm::exec::arg::AspectTagOutputIndex;
|
||||
};
|
||||
|
||||
template <typename FetchTag, typename ThreadIndicesType, typename ExecObjectType>
|
||||
struct Fetch<FetchTag, vtkm::exec::arg::AspectTagOutputIndex, ThreadIndicesType, ExecObjectType>
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC
|
||||
vtkm::Id Load(const ThreadIndicesType& indices, const ExecObjectType&) const
|
||||
|
@ -56,13 +56,13 @@ struct ThreadIndices : vtkm::exec::arg::ExecutionSignatureTagBase
|
||||
// whether we use it or not. 1 should be guaranteed to be valid since you
|
||||
// need at least one argument for the input domain.
|
||||
static const vtkm::IdComponent INDEX = 1;
|
||||
typedef vtkm::exec::arg::AspectTagThreadIndices AspectTag;
|
||||
using AspectTag = vtkm::exec::arg::AspectTagThreadIndices;
|
||||
};
|
||||
|
||||
template <typename FetchTag, typename ThreadIndicesType, typename ExecObjectType>
|
||||
struct Fetch<FetchTag, vtkm::exec::arg::AspectTagThreadIndices, ThreadIndicesType, ExecObjectType>
|
||||
{
|
||||
typedef const ThreadIndicesType& ValueType;
|
||||
using ValueType = const ThreadIndicesType&;
|
||||
|
||||
VTKM_EXEC
|
||||
const ThreadIndicesType& Load(const ThreadIndicesType& indices, const ExecObjectType&) const
|
||||
|
@ -58,13 +58,13 @@ struct VisitIndex : vtkm::exec::arg::ExecutionSignatureTagBase
|
||||
// whether we use it or not. 1 should be guaranteed to be valid since you
|
||||
// need at least one argument for the input domain.
|
||||
static const vtkm::IdComponent INDEX = 1;
|
||||
typedef vtkm::exec::arg::AspectTagVisitIndex AspectTag;
|
||||
using AspectTag = vtkm::exec::arg::AspectTagVisitIndex;
|
||||
};
|
||||
|
||||
template <typename FetchTag, typename ThreadIndicesType, typename ExecObjectType>
|
||||
struct Fetch<FetchTag, vtkm::exec::arg::AspectTagVisitIndex, ThreadIndicesType, ExecObjectType>
|
||||
{
|
||||
typedef vtkm::IdComponent ValueType;
|
||||
using ValueType = vtkm::IdComponent;
|
||||
|
||||
VTKM_EXEC
|
||||
vtkm::IdComponent Load(const ThreadIndicesType& indices, const ExecObjectType&) const
|
||||
|
@ -54,13 +54,13 @@ struct WorkIndex : vtkm::exec::arg::ExecutionSignatureTagBase
|
||||
// whether we use it or not. 1 should be guaranteed to be valid since you
|
||||
// need at least one argument for the input domain.
|
||||
static const vtkm::IdComponent INDEX = 1;
|
||||
typedef vtkm::exec::arg::AspectTagWorkIndex AspectTag;
|
||||
using AspectTag = vtkm::exec::arg::AspectTagWorkIndex;
|
||||
};
|
||||
|
||||
template <typename FetchTag, typename ThreadIndicesType, typename ExecObjectType>
|
||||
struct Fetch<FetchTag, vtkm::exec::arg::AspectTagWorkIndex, ThreadIndicesType, ExecObjectType>
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC
|
||||
vtkm::Id Load(const ThreadIndicesType& indices, const ExecObjectType&) const
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -121,28 +121,25 @@ template <typename ThreadIndicesType,
|
||||
vtkm::IdComponent ExecutionParameterIndex>
|
||||
struct InvocationToFetch
|
||||
{
|
||||
typedef
|
||||
typename Invocation::ExecutionInterface::template ParameterType<ExecutionParameterIndex>::type
|
||||
ExecutionSignatureTag;
|
||||
using ExecutionSignatureTag =
|
||||
typename Invocation::ExecutionInterface::template ParameterType<ExecutionParameterIndex>::type;
|
||||
|
||||
// Expected fields from ExecutionSignatureTag. If these do not exist in
|
||||
// ExecutionSignatureTag, then something that is not really an execution
|
||||
// signature tag was used in an ExecutionSignature.
|
||||
static const vtkm::IdComponent ControlParameterIndex = ExecutionSignatureTag::INDEX;
|
||||
typedef typename ExecutionSignatureTag::AspectTag AspectTag;
|
||||
using AspectTag = typename ExecutionSignatureTag::AspectTag;
|
||||
|
||||
// Find the fetch tag from the control signature tag pointed to by
|
||||
// ParameterIndex.
|
||||
typedef typename Invocation::ControlInterface ControlInterface;
|
||||
typedef typename ControlInterface::template ParameterType<ControlParameterIndex>::type
|
||||
ControlSignatureTag;
|
||||
typedef typename ControlSignatureTag::FetchTag FetchTag;
|
||||
using ControlInterface = typename Invocation::ControlInterface;
|
||||
using ControlSignatureTag = typename ControlInterface::template ParameterType<ControlParameterIndex>::type;
|
||||
using FetchTag = typename ControlSignatureTag::FetchTag;
|
||||
|
||||
typedef
|
||||
typename Invocation::ParameterInterface::template ParameterType<ControlParameterIndex>::type
|
||||
ExecObjectType;
|
||||
using ExecObjectType =
|
||||
typename Invocation::ParameterInterface::template ParameterType<ControlParameterIndex>::type;
|
||||
|
||||
typedef vtkm::exec::arg::Fetch<FetchTag, AspectTag, ThreadIndicesType, ExecObjectType> type;
|
||||
using type = vtkm::exec::arg::Fetch<FetchTag, AspectTag, ThreadIndicesType, ExecObjectType>;
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
@ -166,26 +163,24 @@ VTKM_EXEC void DoWorkletInvokeFunctor(
|
||||
VisitArrayType>& invocation,
|
||||
const ThreadIndicesType& threadIndices)
|
||||
{
|
||||
typedef vtkm::internal::Invocation<ParameterInterface,
|
||||
ControlInterface,
|
||||
vtkm::internal::FunctionInterface<$signature(num_params)>,
|
||||
InputDomainIndex,
|
||||
OutputToInputMapType,
|
||||
VisitArrayType>
|
||||
Invocation;
|
||||
using Invocation = vtkm::internal::Invocation<ParameterInterface,
|
||||
ControlInterface,
|
||||
vtkm::internal::FunctionInterface<$signature(num_params)>,
|
||||
InputDomainIndex,
|
||||
OutputToInputMapType,
|
||||
VisitArrayType>;
|
||||
$for(param_index in range(1, num_params+1))\
|
||||
|
||||
typedef InvocationToFetch<ThreadIndicesType, Invocation, $(param_index)> FetchInfo$(param_index);
|
||||
typedef typename FetchInfo$(param_index)::type FetchType$(param_index);
|
||||
using FetchInfo$(param_index) = InvocationToFetch<ThreadIndicesType, Invocation, $(param_index)>;
|
||||
using FetchType$(param_index) = typename FetchInfo$(param_index)::type;
|
||||
FetchType$(param_index) fetch$(param_index);
|
||||
typename FetchType$(param_index)::ValueType $pname(param_index) =
|
||||
fetch$(param_index).Load(threadIndices,
|
||||
invocation.Parameters.template GetParameter<FetchInfo$(param_index)::ControlParameterIndex>());
|
||||
$endfor\
|
||||
|
||||
typedef InvocationToFetch<ThreadIndicesType, Invocation, 0> FetchInfo0;
|
||||
typedef typename FetchInfo0::type ReturnFetchType;
|
||||
typedef typename ReturnFetchType::ValueType ReturnValueType;
|
||||
using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
|
||||
using ReturnFetchType = typename FetchInfo0::type;
|
||||
ReturnFetchType returnFetch;
|
||||
// If you got a compile error on the following line, it probably means that
|
||||
// the operator() of a worklet does not match the definition expected. One
|
||||
@ -196,7 +191,7 @@ $endfor\
|
||||
// that the types of the worklet operator() parameters match those in the
|
||||
// ExecutionSignature. The compiler error might help you narrow down which
|
||||
// parameter is wrong and the types that did not match.
|
||||
ReturnValueType $pname(0) = ReturnValueType(worklet($arg_list(num_params)));
|
||||
auto $pname(0) = typename ReturnFetchType::ValueType(worklet($arg_list(num_params)));
|
||||
|
||||
returnFetch.Store(
|
||||
threadIndices,
|
||||
@ -237,8 +232,8 @@ VTKM_EXEC void DoWorkletInvokeFunctor(
|
||||
Invocation;
|
||||
$for(param_index in range(1, num_params+1))\
|
||||
|
||||
typedef InvocationToFetch<ThreadIndicesType, Invocation, $(param_index)> FetchInfo$(param_index);
|
||||
typedef typename FetchInfo$(param_index)::type FetchType$(param_index);
|
||||
using FetchInfo$(param_index) = InvocationToFetch<ThreadIndicesType, Invocation, $(param_index)>;
|
||||
using FetchType$(param_index) = typename FetchInfo$(param_index)::type;
|
||||
FetchType$(param_index) fetch$(param_index);
|
||||
typename FetchType$(param_index)::ValueType $pname(param_index) =
|
||||
fetch$(param_index).Load(threadIndices,
|
||||
|
@ -216,10 +216,10 @@ protected:
|
||||
void* Worklet;
|
||||
void* Invocation;
|
||||
|
||||
typedef void (*ExecuteSignature)(void*, void* const, vtkm::Id, vtkm::Id, vtkm::Id);
|
||||
using ExecuteSignature = void (*)(void*, void* const, vtkm::Id, vtkm::Id, vtkm::Id);
|
||||
ExecuteSignature ExecuteFunction;
|
||||
|
||||
typedef void (*SetErrorBufferSignature)(void*, const vtkm::exec::internal::ErrorMessageBuffer&);
|
||||
using SetErrorBufferSignature = void (*)(void*, const vtkm::exec::internal::ErrorMessageBuffer&);
|
||||
SetErrorBufferSignature SetErrorBufferFunction;
|
||||
|
||||
const vtkm::Id GlobalIndexOffset;
|
||||
@ -307,11 +307,11 @@ protected:
|
||||
void* Worklet;
|
||||
void* Invocation;
|
||||
|
||||
typedef void (
|
||||
*ExecuteSignature)(void*, void* const, vtkm::Id, vtkm::Id, vtkm::Id, vtkm::Id, vtkm::Id);
|
||||
using ExecuteSignature =
|
||||
void (*)(void*, void* const, vtkm::Id, vtkm::Id, vtkm::Id, vtkm::Id, vtkm::Id);
|
||||
ExecuteSignature ExecuteFunction;
|
||||
|
||||
typedef void (*SetErrorBufferSignature)(void*, const vtkm::exec::internal::ErrorMessageBuffer&);
|
||||
using SetErrorBufferSignature = void (*)(void*, const vtkm::exec::internal::ErrorMessageBuffer&);
|
||||
SetErrorBufferSignature SetErrorBufferFunction;
|
||||
|
||||
const vtkm::Id GlobalIndexOffset;
|
||||
|
@ -46,7 +46,7 @@ struct Invocation
|
||||
/// \c ParameterInterface is (expected to be) a \c FunctionInterface class
|
||||
/// that lists the types of the parameters for the invocation.
|
||||
///
|
||||
typedef _ParameterInterface ParameterInterface;
|
||||
using ParameterInterface = _ParameterInterface;
|
||||
|
||||
/// \brief The tags of the \c ControlSignature.
|
||||
///
|
||||
@ -54,7 +54,7 @@ struct Invocation
|
||||
/// represents the \c ControlSignature of a worklet (although dispatchers
|
||||
/// might modify the control signature to provide auxiliary information).
|
||||
///
|
||||
typedef _ControlInterface ControlInterface;
|
||||
using ControlInterface = _ControlInterface;
|
||||
|
||||
/// \brief The tags of the \c ExecutionSignature.
|
||||
///
|
||||
@ -62,7 +62,7 @@ struct Invocation
|
||||
/// represents the \c ExecutionSignature of a worklet (although dispatchers
|
||||
/// might modify the execution signature to provide auxiliary information).
|
||||
///
|
||||
typedef _ExecutionInterface ExecutionInterface;
|
||||
using ExecutionInterface = _ExecutionInterface;
|
||||
|
||||
/// \brief The index of the input domain.
|
||||
///
|
||||
@ -79,7 +79,7 @@ struct Invocation
|
||||
/// represented with a map where each output points to an input that creates
|
||||
/// it.
|
||||
///
|
||||
typedef _OutputToInputMapType OutputToInputMapType;
|
||||
using OutputToInputMapType = _OutputToInputMapType;
|
||||
|
||||
/// \brief An array containing visit indices.
|
||||
///
|
||||
@ -88,7 +88,7 @@ struct Invocation
|
||||
/// multiple outputs may point to the same input. The visit index uniquely
|
||||
/// identifies which instance each is.
|
||||
///
|
||||
typedef _VisitArrayType VisitArrayType;
|
||||
using VisitArrayType = _VisitArrayType;
|
||||
|
||||
/// \brief Default Invocation constructors that holds the given parameters
|
||||
/// by reference.
|
||||
@ -108,13 +108,12 @@ struct Invocation
|
||||
template <typename NewParameterInterface>
|
||||
struct ChangeParametersType
|
||||
{
|
||||
typedef Invocation<NewParameterInterface,
|
||||
ControlInterface,
|
||||
ExecutionInterface,
|
||||
InputDomainIndex,
|
||||
OutputToInputMapType,
|
||||
VisitArrayType>
|
||||
type;
|
||||
using type = Invocation<NewParameterInterface,
|
||||
ControlInterface,
|
||||
ExecutionInterface,
|
||||
InputDomainIndex,
|
||||
OutputToInputMapType,
|
||||
VisitArrayType>;
|
||||
};
|
||||
|
||||
/// Returns a new \c Invocation that is the same as this one except that the
|
||||
@ -134,11 +133,8 @@ struct Invocation
|
||||
template <typename NewControlInterface>
|
||||
struct ChangeControlInterfaceType
|
||||
{
|
||||
typedef Invocation<ParameterInterface,
|
||||
NewControlInterface,
|
||||
ExecutionInterface,
|
||||
InputDomainIndex>
|
||||
type;
|
||||
using type =
|
||||
Invocation<ParameterInterface, NewControlInterface, ExecutionInterface, InputDomainIndex>;
|
||||
};
|
||||
|
||||
/// Returns a new \c Invocation that is the same as this one except that the
|
||||
@ -158,11 +154,8 @@ struct Invocation
|
||||
template <typename NewExecutionInterface>
|
||||
struct ChangeExecutionInterfaceType
|
||||
{
|
||||
typedef Invocation<ParameterInterface,
|
||||
NewExecutionInterface,
|
||||
ExecutionInterface,
|
||||
InputDomainIndex>
|
||||
type;
|
||||
using type =
|
||||
Invocation<ParameterInterface, NewExecutionInterface, ExecutionInterface, InputDomainIndex>;
|
||||
};
|
||||
|
||||
/// Returns a new \c Invocation that is the same as this one except that the
|
||||
@ -182,11 +175,8 @@ struct Invocation
|
||||
template <vtkm::IdComponent NewInputDomainIndex>
|
||||
struct ChangeInputDomainIndexType
|
||||
{
|
||||
typedef Invocation<ParameterInterface,
|
||||
ControlInterface,
|
||||
ExecutionInterface,
|
||||
NewInputDomainIndex>
|
||||
type;
|
||||
using type =
|
||||
Invocation<ParameterInterface, ControlInterface, ExecutionInterface, NewInputDomainIndex>;
|
||||
};
|
||||
|
||||
/// Returns a new \c Invocation that is the same as this one except that the
|
||||
@ -206,13 +196,12 @@ struct Invocation
|
||||
template <typename NewOutputToInputMapType>
|
||||
struct ChangeOutputToInputMapType
|
||||
{
|
||||
typedef Invocation<ParameterInterface,
|
||||
ControlInterface,
|
||||
ExecutionInterface,
|
||||
InputDomainIndex,
|
||||
NewOutputToInputMapType,
|
||||
VisitArrayType>
|
||||
type;
|
||||
using type = Invocation<ParameterInterface,
|
||||
ControlInterface,
|
||||
ExecutionInterface,
|
||||
InputDomainIndex,
|
||||
NewOutputToInputMapType,
|
||||
VisitArrayType>;
|
||||
};
|
||||
|
||||
/// Returns a new \c Invocation that is the same as this one except that the
|
||||
@ -232,13 +221,12 @@ struct Invocation
|
||||
template <typename NewVisitArrayType>
|
||||
struct ChangeVisitArrayType
|
||||
{
|
||||
typedef Invocation<ParameterInterface,
|
||||
ControlInterface,
|
||||
ExecutionInterface,
|
||||
InputDomainIndex,
|
||||
OutputToInputMapType,
|
||||
NewVisitArrayType>
|
||||
type;
|
||||
using type = Invocation<ParameterInterface,
|
||||
ControlInterface,
|
||||
ExecutionInterface,
|
||||
InputDomainIndex,
|
||||
OutputToInputMapType,
|
||||
NewVisitArrayType>;
|
||||
};
|
||||
|
||||
/// Returns a new \c Invocation that is the same as this one except that the
|
||||
@ -252,12 +240,12 @@ struct Invocation
|
||||
this->Parameters, this->OutputToInputMap, newVisitArray);
|
||||
}
|
||||
|
||||
/// A convenience typedef for the input domain type.
|
||||
/// A convenience alias for the input domain type.
|
||||
///
|
||||
using InputDomainType =
|
||||
typename ParameterInterface::template ParameterType<InputDomainIndex>::type;
|
||||
|
||||
/// A convenience typedef for the control signature tag of the input domain.
|
||||
/// A convenience alias for the control signature tag of the input domain.
|
||||
///
|
||||
using InputDomainTag = typename ControlInterface::template ParameterType<InputDomainIndex>::type;
|
||||
|
||||
|
@ -137,7 +137,7 @@ private:
|
||||
template <typename FunctionType>
|
||||
void PrintAndInvoke(const FunctionType& function, std::true_type) const
|
||||
{
|
||||
typedef typename vtkm::CellShapeIdToTag<cellShapeId>::Tag CellShapeTag;
|
||||
using CellShapeTag = typename vtkm::CellShapeIdToTag<cellShapeId>::Tag;
|
||||
std::cout << "*** " << vtkm::GetCellShapeName(CellShapeTag()) << " ***************"
|
||||
<< std::endl;
|
||||
function(CellShapeTag());
|
||||
@ -562,7 +562,7 @@ static inline VTKM_CONT std::string TestValue(vtkm::Id index, std::string)
|
||||
template <typename PortalType>
|
||||
static inline VTKM_CONT void CheckPortal(const PortalType& portal)
|
||||
{
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
|
||||
for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++)
|
||||
{
|
||||
@ -584,7 +584,7 @@ static inline VTKM_CONT void CheckPortal(const PortalType& portal)
|
||||
template <typename PortalType>
|
||||
static inline VTKM_CONT void SetPortal(const PortalType& portal)
|
||||
{
|
||||
typedef typename PortalType::ValueType ValueType;
|
||||
using ValueType = typename PortalType::ValueType;
|
||||
|
||||
for (vtkm::Id index = 0; index < portal.GetNumberOfValues(); index++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user