mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Merge topic 'typedef_to_using_round_4'
f6863594 Convert VTK-m over to use 'using' instead of 'typedef' Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !885
This commit is contained in:
commit
b9e69217ae
@ -170,15 +170,15 @@ struct ArrayHandleCartesianProductTraits
|
||||
{
|
||||
/// The ValueType (a pair containing the value types of the two arrays).
|
||||
///
|
||||
typedef vtkm::Vec<typename FirstHandleType::ValueType, 3> ValueType;
|
||||
using ValueType = vtkm::Vec<typename FirstHandleType::ValueType, 3>;
|
||||
|
||||
/// The appropriately templated tag.
|
||||
///
|
||||
typedef StorageTagCartesianProduct<FirstHandleType, SecondHandleType, ThirdHandleType> Tag;
|
||||
using Tag = StorageTagCartesianProduct<FirstHandleType, SecondHandleType, ThirdHandleType>;
|
||||
|
||||
/// The superclass for ArrayHandleCartesianProduct.
|
||||
///
|
||||
typedef vtkm::cont::ArrayHandle<ValueType, Tag> Superclass;
|
||||
using Superclass = vtkm::cont::ArrayHandle<ValueType, Tag>;
|
||||
};
|
||||
|
||||
template <typename T, typename FirstHandleType, typename SecondHandleType, typename ThirdHandleType>
|
||||
@ -191,18 +191,16 @@ class Storage<T, StorageTagCartesianProduct<FirstHandleType, SecondHandleType, T
|
||||
public:
|
||||
using ValueType = T;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalCartesianProduct<
|
||||
ValueType,
|
||||
typename FirstHandleType::PortalControl,
|
||||
typename SecondHandleType::PortalControl,
|
||||
typename ThirdHandleType::PortalControl>
|
||||
PortalType;
|
||||
typedef vtkm::exec::internal::ArrayPortalCartesianProduct<
|
||||
ValueType,
|
||||
typename FirstHandleType::PortalConstControl,
|
||||
typename SecondHandleType::PortalConstControl,
|
||||
typename ThirdHandleType::PortalConstControl>
|
||||
PortalConstType;
|
||||
using PortalType =
|
||||
vtkm::exec::internal::ArrayPortalCartesianProduct<ValueType,
|
||||
typename FirstHandleType::PortalControl,
|
||||
typename SecondHandleType::PortalControl,
|
||||
typename ThirdHandleType::PortalControl>;
|
||||
using PortalConstType =
|
||||
vtkm::exec::internal::ArrayPortalCartesianProduct<ValueType,
|
||||
typename FirstHandleType::PortalConstControl,
|
||||
typename SecondHandleType::PortalConstControl,
|
||||
typename ThirdHandleType::PortalConstControl>;
|
||||
|
||||
VTKM_CONT
|
||||
Storage()
|
||||
@ -288,8 +286,8 @@ class ArrayTransfer<T,
|
||||
StorageTagCartesianProduct<FirstHandleType, SecondHandleType, ThirdHandleType>,
|
||||
Device>
|
||||
{
|
||||
typedef StorageTagCartesianProduct<FirstHandleType, SecondHandleType, ThirdHandleType> StorageTag;
|
||||
typedef vtkm::cont::internal::Storage<T, StorageTag> StorageType;
|
||||
using StorageTag = StorageTagCartesianProduct<FirstHandleType, SecondHandleType, ThirdHandleType>;
|
||||
using StorageType = vtkm::cont::internal::Storage<T, StorageTag>;
|
||||
|
||||
public:
|
||||
using ValueType = T;
|
||||
@ -297,19 +295,17 @@ public:
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalCartesianProduct<
|
||||
using PortalExecution = vtkm::exec::internal::ArrayPortalCartesianProduct<
|
||||
ValueType,
|
||||
typename FirstHandleType::template ExecutionTypes<Device>::Portal,
|
||||
typename SecondHandleType::template ExecutionTypes<Device>::Portal,
|
||||
typename ThirdHandleType::template ExecutionTypes<Device>::Portal>
|
||||
PortalExecution;
|
||||
typename ThirdHandleType::template ExecutionTypes<Device>::Portal>;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalCartesianProduct<
|
||||
using PortalConstExecution = vtkm::exec::internal::ArrayPortalCartesianProduct<
|
||||
ValueType,
|
||||
typename FirstHandleType::template ExecutionTypes<Device>::PortalConst,
|
||||
typename SecondHandleType::template ExecutionTypes<Device>::PortalConst,
|
||||
typename ThirdHandleType::template ExecutionTypes<Device>::PortalConst>
|
||||
PortalConstExecution;
|
||||
typename ThirdHandleType::template ExecutionTypes<Device>::PortalConst>;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer(StorageType* storage)
|
||||
@ -404,7 +400,7 @@ public:
|
||||
ThirdHandleType>::Superclass));
|
||||
|
||||
private:
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -35,7 +35,7 @@ template <typename PortalType1, typename PortalType2>
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalConcatenate
|
||||
{
|
||||
public:
|
||||
typedef typename PortalType1::ValueType ValueType;
|
||||
using ValueType = typename PortalType1::ValueType;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
ArrayPortalConcatenate()
|
||||
@ -109,13 +109,11 @@ class Storage<typename ArrayHandleType1::ValueType,
|
||||
StorageTagConcatenate<ArrayHandleType1, ArrayHandleType2>>
|
||||
{
|
||||
public:
|
||||
typedef typename ArrayHandleType1::ValueType ValueType;
|
||||
typedef ArrayPortalConcatenate<typename ArrayHandleType1::PortalControl,
|
||||
typename ArrayHandleType2::PortalControl>
|
||||
PortalType;
|
||||
typedef ArrayPortalConcatenate<typename ArrayHandleType1::PortalConstControl,
|
||||
typename ArrayHandleType2::PortalConstControl>
|
||||
PortalConstType;
|
||||
using ValueType = typename ArrayHandleType1::ValueType;
|
||||
using PortalType = ArrayPortalConcatenate<typename ArrayHandleType1::PortalControl,
|
||||
typename ArrayHandleType2::PortalControl>;
|
||||
using PortalConstType = ArrayPortalConcatenate<typename ArrayHandleType1::PortalConstControl,
|
||||
typename ArrayHandleType2::PortalConstControl>;
|
||||
|
||||
VTKM_CONT
|
||||
Storage()
|
||||
@ -204,23 +202,22 @@ class ArrayTransfer<typename ArrayHandleType1::ValueType,
|
||||
Device>
|
||||
{
|
||||
public:
|
||||
typedef typename ArrayHandleType1::ValueType ValueType;
|
||||
using ValueType = typename ArrayHandleType1::ValueType;
|
||||
|
||||
private:
|
||||
typedef StorageTagConcatenate<ArrayHandleType1, ArrayHandleType2> StorageTag;
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageTag = StorageTagConcatenate<ArrayHandleType1, ArrayHandleType2>;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
typedef ArrayPortalConcatenate<typename ArrayHandleType1::template ExecutionTypes<Device>::Portal,
|
||||
typename ArrayHandleType2::template ExecutionTypes<Device>::Portal>
|
||||
PortalExecution;
|
||||
typedef ArrayPortalConcatenate<
|
||||
typename ArrayHandleType1::template ExecutionTypes<Device>::PortalConst,
|
||||
typename ArrayHandleType2::template ExecutionTypes<Device>::PortalConst>
|
||||
PortalConstExecution;
|
||||
using PortalExecution =
|
||||
ArrayPortalConcatenate<typename ArrayHandleType1::template ExecutionTypes<Device>::Portal,
|
||||
typename ArrayHandleType2::template ExecutionTypes<Device>::Portal>;
|
||||
using PortalConstExecution =
|
||||
ArrayPortalConcatenate<typename ArrayHandleType1::template ExecutionTypes<Device>::PortalConst,
|
||||
typename ArrayHandleType2::template ExecutionTypes<Device>::PortalConst>;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer(StorageType* storage)
|
||||
@ -306,7 +303,7 @@ public:
|
||||
StorageTagConcatenate<ArrayHandleType1, ArrayHandleType2>>));
|
||||
|
||||
protected:
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -37,10 +37,10 @@ class VTKM_ALWAYS_EXPORT ArrayPortalGroupVec
|
||||
{
|
||||
public:
|
||||
static const vtkm::IdComponent NUM_COMPONENTS = _NUM_COMPONENTS;
|
||||
typedef _SourcePortalType SourcePortalType;
|
||||
using SourcePortalType = _SourcePortalType;
|
||||
|
||||
typedef typename std::remove_const<typename SourcePortalType::ValueType>::type ComponentType;
|
||||
typedef vtkm::Vec<ComponentType, NUM_COMPONENTS> ValueType;
|
||||
using ComponentType = typename std::remove_const<typename SourcePortalType::ValueType>::type;
|
||||
using ValueType = vtkm::Vec<ComponentType, NUM_COMPONENTS>;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC_CONT
|
||||
@ -128,17 +128,17 @@ template <typename SourceArrayHandleType, vtkm::IdComponent NUM_COMPONENTS>
|
||||
class Storage<vtkm::Vec<typename SourceArrayHandleType::ValueType, NUM_COMPONENTS>,
|
||||
vtkm::cont::internal::StorageTagGroupVec<SourceArrayHandleType, NUM_COMPONENTS>>
|
||||
{
|
||||
typedef typename SourceArrayHandleType::ValueType ComponentType;
|
||||
using ComponentType = typename SourceArrayHandleType::ValueType;
|
||||
|
||||
public:
|
||||
typedef vtkm::Vec<ComponentType, NUM_COMPONENTS> ValueType;
|
||||
using ValueType = vtkm::Vec<ComponentType, NUM_COMPONENTS>;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalGroupVec<typename SourceArrayHandleType::PortalControl,
|
||||
NUM_COMPONENTS>
|
||||
PortalType;
|
||||
typedef vtkm::exec::internal::
|
||||
ArrayPortalGroupVec<typename SourceArrayHandleType::PortalConstControl, NUM_COMPONENTS>
|
||||
PortalConstType;
|
||||
using PortalType =
|
||||
vtkm::exec::internal::ArrayPortalGroupVec<typename SourceArrayHandleType::PortalControl,
|
||||
NUM_COMPONENTS>;
|
||||
using PortalConstType =
|
||||
vtkm::exec::internal::ArrayPortalGroupVec<typename SourceArrayHandleType::PortalConstControl,
|
||||
NUM_COMPONENTS>;
|
||||
|
||||
VTKM_CONT
|
||||
Storage()
|
||||
@ -222,26 +222,24 @@ class ArrayTransfer<vtkm::Vec<typename SourceArrayHandleType::ValueType, NUM_COM
|
||||
Device>
|
||||
{
|
||||
public:
|
||||
typedef typename SourceArrayHandleType::ValueType ComponentType;
|
||||
typedef vtkm::Vec<ComponentType, NUM_COMPONENTS> ValueType;
|
||||
using ComponentType = typename SourceArrayHandleType::ValueType;
|
||||
using ValueType = vtkm::Vec<ComponentType, NUM_COMPONENTS>;
|
||||
|
||||
private:
|
||||
typedef vtkm::cont::internal::StorageTagGroupVec<SourceArrayHandleType, NUM_COMPONENTS>
|
||||
StorageTag;
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageTag =
|
||||
vtkm::cont::internal::StorageTagGroupVec<SourceArrayHandleType, NUM_COMPONENTS>;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
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::ArrayPortalGroupVec<
|
||||
using PortalExecution = vtkm::exec::internal::ArrayPortalGroupVec<
|
||||
typename SourceArrayHandleType::template ExecutionTypes<Device>::Portal,
|
||||
NUM_COMPONENTS>
|
||||
PortalExecution;
|
||||
typedef vtkm::exec::internal::ArrayPortalGroupVec<
|
||||
NUM_COMPONENTS>;
|
||||
using PortalConstExecution = vtkm::exec::internal::ArrayPortalGroupVec<
|
||||
typename SourceArrayHandleType::template ExecutionTypes<Device>::PortalConst,
|
||||
NUM_COMPONENTS>
|
||||
PortalConstExecution;
|
||||
NUM_COMPONENTS>;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer(StorageType* storage)
|
||||
@ -341,10 +339,10 @@ public:
|
||||
vtkm::Vec<typename SourceArrayHandleType::ValueType, NUM_COMPONENTS>,
|
||||
vtkm::cont::internal::StorageTagGroupVec<SourceArrayHandleType, NUM_COMPONENTS>>));
|
||||
|
||||
typedef typename SourceArrayHandleType::ValueType ComponentType;
|
||||
using ComponentType = typename SourceArrayHandleType::ValueType;
|
||||
|
||||
private:
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -127,12 +127,12 @@ class Storage<typename ValueArrayType::ValueType,
|
||||
public:
|
||||
using ValueType = typename ValueArrayType::ValueType;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalPermutation<typename IndexArrayType::PortalConstControl,
|
||||
typename ValueArrayType::PortalControl>
|
||||
PortalType;
|
||||
typedef vtkm::exec::internal::ArrayPortalPermutation<typename IndexArrayType::PortalConstControl,
|
||||
typename ValueArrayType::PortalConstControl>
|
||||
PortalConstType;
|
||||
using PortalType =
|
||||
vtkm::exec::internal::ArrayPortalPermutation<typename IndexArrayType::PortalConstControl,
|
||||
typename ValueArrayType::PortalControl>;
|
||||
using PortalConstType =
|
||||
vtkm::exec::internal::ArrayPortalPermutation<typename IndexArrayType::PortalConstControl,
|
||||
typename ValueArrayType::PortalConstControl>;
|
||||
|
||||
VTKM_CONT
|
||||
Storage()
|
||||
@ -212,21 +212,19 @@ public:
|
||||
using ValueType = typename ValueArrayType::ValueType;
|
||||
|
||||
private:
|
||||
typedef StorageTagPermutation<IndexArrayType, ValueArrayType> StorageTag;
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageTag = StorageTagPermutation<IndexArrayType, ValueArrayType>;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalPermutation<
|
||||
using PortalExecution = vtkm::exec::internal::ArrayPortalPermutation<
|
||||
typename IndexArrayType::template ExecutionTypes<Device>::PortalConst,
|
||||
typename ValueArrayType::template ExecutionTypes<Device>::Portal>
|
||||
PortalExecution;
|
||||
typedef vtkm::exec::internal::ArrayPortalPermutation<
|
||||
typename ValueArrayType::template ExecutionTypes<Device>::Portal>;
|
||||
using PortalConstExecution = vtkm::exec::internal::ArrayPortalPermutation<
|
||||
typename IndexArrayType::template ExecutionTypes<Device>::PortalConst,
|
||||
typename ValueArrayType::template ExecutionTypes<Device>::PortalConst>
|
||||
PortalConstExecution;
|
||||
typename ValueArrayType::template ExecutionTypes<Device>::PortalConst>;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer(StorageType* storage)
|
||||
@ -350,7 +348,7 @@ public:
|
||||
internal::StorageTagPermutation<IndexArrayHandleType, ValueArrayHandleType>>));
|
||||
|
||||
private:
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -91,9 +91,9 @@ template <typename ArrayHandleType>
|
||||
class Storage<typename ArrayHandleType::ValueType, StorageTagReverse<ArrayHandleType>>
|
||||
{
|
||||
public:
|
||||
typedef typename ArrayHandleType::ValueType ValueType;
|
||||
typedef ArrayPortalReverse<typename ArrayHandleType::PortalControl> PortalType;
|
||||
typedef ArrayPortalReverse<typename ArrayHandleType::PortalConstControl> PortalConstType;
|
||||
using ValueType = typename ArrayHandleType::ValueType;
|
||||
using PortalType = ArrayPortalReverse<typename ArrayHandleType::PortalControl>;
|
||||
using PortalConstType = ArrayPortalReverse<typename ArrayHandleType::PortalConstControl>;
|
||||
|
||||
VTKM_CONT
|
||||
Storage()
|
||||
@ -145,20 +145,20 @@ template <typename ArrayHandleType, typename Device>
|
||||
class ArrayTransfer<typename ArrayHandleType::ValueType, StorageTagReverse<ArrayHandleType>, Device>
|
||||
{
|
||||
public:
|
||||
typedef typename ArrayHandleType::ValueType ValueType;
|
||||
using ValueType = typename ArrayHandleType::ValueType;
|
||||
|
||||
private:
|
||||
typedef StorageTagReverse<ArrayHandleType> StorageTag;
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageTag = StorageTagReverse<ArrayHandleType>;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
typedef ArrayPortalReverse<typename ArrayHandleType::template ExecutionTypes<Device>::Portal>
|
||||
PortalExecution;
|
||||
typedef ArrayPortalReverse<typename ArrayHandleType::template ExecutionTypes<Device>::PortalConst>
|
||||
PortalConstExecution;
|
||||
using PortalExecution =
|
||||
ArrayPortalReverse<typename ArrayHandleType::template ExecutionTypes<Device>::Portal>;
|
||||
using PortalConstExecution =
|
||||
ArrayPortalReverse<typename ArrayHandleType::template ExecutionTypes<Device>::PortalConst>;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer(StorageType* storage)
|
||||
@ -223,7 +223,7 @@ public:
|
||||
StorageTagReverse<ArrayHandleType>>));
|
||||
|
||||
protected:
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
ArrayHandleReverse(const ArrayHandleType& handle)
|
||||
|
@ -235,7 +235,7 @@ public:
|
||||
StorageTagStreaming<ArrayHandleInputType>>));
|
||||
|
||||
private:
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -48,7 +48,7 @@ namespace exec
|
||||
namespace internal
|
||||
{
|
||||
|
||||
typedef vtkm::cont::internal::NullFunctorType NullFunctorType;
|
||||
using NullFunctorType = vtkm::cont::internal::NullFunctorType;
|
||||
|
||||
/// \brief An array portal that transforms a value from another portal.
|
||||
///
|
||||
@ -63,9 +63,9 @@ class VTKM_ALWAYS_EXPORT
|
||||
ArrayPortalTransform<ValueType_, PortalType_, FunctorType_, NullFunctorType>
|
||||
{
|
||||
public:
|
||||
typedef PortalType_ PortalType;
|
||||
typedef ValueType_ ValueType;
|
||||
typedef FunctorType_ FunctorType;
|
||||
using PortalType = PortalType_;
|
||||
using ValueType = ValueType_;
|
||||
using FunctorType = FunctorType_;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC_CONT
|
||||
@ -127,11 +127,11 @@ class VTKM_ALWAYS_EXPORT ArrayPortalTransform
|
||||
: public ArrayPortalTransform<ValueType_, PortalType_, FunctorType_, NullFunctorType>
|
||||
{
|
||||
public:
|
||||
typedef ArrayPortalTransform<ValueType_, PortalType_, FunctorType_, NullFunctorType> Superclass;
|
||||
typedef PortalType_ PortalType;
|
||||
typedef ValueType_ ValueType;
|
||||
typedef FunctorType_ FunctorType;
|
||||
typedef InverseFunctorType_ InverseFunctorType;
|
||||
using Superclass = ArrayPortalTransform<ValueType_, PortalType_, FunctorType_, NullFunctorType>;
|
||||
using PortalType = PortalType_;
|
||||
using ValueType = ValueType_;
|
||||
using FunctorType = FunctorType_;
|
||||
using InverseFunctorType = InverseFunctorType_;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC_CONT
|
||||
@ -199,20 +199,20 @@ class Storage<typename StorageTagTransform<ArrayHandleType, FunctorType>::ValueT
|
||||
StorageTagTransform<ArrayHandleType, FunctorType>>
|
||||
{
|
||||
public:
|
||||
typedef typename StorageTagTransform<ArrayHandleType, FunctorType>::ValueType ValueType;
|
||||
using ValueType = typename StorageTagTransform<ArrayHandleType, FunctorType>::ValueType;
|
||||
|
||||
// This is meant to be invalid. Because Transform 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*;
|
||||
};
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalTransform<ValueType,
|
||||
typename ArrayHandleType::PortalConstControl,
|
||||
FunctorType>
|
||||
PortalConstType;
|
||||
using PortalConstType =
|
||||
vtkm::exec::internal::ArrayPortalTransform<ValueType,
|
||||
typename ArrayHandleType::PortalConstControl,
|
||||
FunctorType>;
|
||||
|
||||
VTKM_CONT
|
||||
Storage()
|
||||
@ -291,19 +291,19 @@ class Storage<
|
||||
StorageTagTransform<ArrayHandleType, FunctorType, InverseFunctorType>>
|
||||
{
|
||||
public:
|
||||
typedef typename StorageTagTransform<ArrayHandleType, FunctorType, InverseFunctorType>::ValueType
|
||||
ValueType;
|
||||
using ValueType =
|
||||
typename StorageTagTransform<ArrayHandleType, FunctorType, InverseFunctorType>::ValueType;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalTransform<ValueType,
|
||||
typename ArrayHandleType::PortalControl,
|
||||
FunctorType,
|
||||
InverseFunctorType>
|
||||
PortalType;
|
||||
typedef vtkm::exec::internal::ArrayPortalTransform<ValueType,
|
||||
typename ArrayHandleType::PortalConstControl,
|
||||
FunctorType,
|
||||
InverseFunctorType>
|
||||
PortalConstType;
|
||||
using PortalType =
|
||||
vtkm::exec::internal::ArrayPortalTransform<ValueType,
|
||||
typename ArrayHandleType::PortalControl,
|
||||
FunctorType,
|
||||
InverseFunctorType>;
|
||||
using PortalConstType =
|
||||
vtkm::exec::internal::ArrayPortalTransform<ValueType,
|
||||
typename ArrayHandleType::PortalConstControl,
|
||||
FunctorType,
|
||||
InverseFunctorType>;
|
||||
|
||||
VTKM_CONT
|
||||
Storage()
|
||||
@ -386,22 +386,21 @@ class ArrayTransfer<typename StorageTagTransform<ArrayHandleType, FunctorType>::
|
||||
StorageTagTransform<ArrayHandleType, FunctorType>,
|
||||
Device>
|
||||
{
|
||||
typedef StorageTagTransform<ArrayHandleType, FunctorType> StorageTag;
|
||||
using StorageTag = StorageTagTransform<ArrayHandleType, FunctorType>;
|
||||
|
||||
public:
|
||||
typedef typename StorageTagTransform<ArrayHandleType, FunctorType>::ValueType ValueType;
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using ValueType = typename StorageTagTransform<ArrayHandleType, FunctorType>::ValueType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
//meant to be an invalid writeable execution portal
|
||||
typedef typename StorageType::PortalType PortalExecution;
|
||||
typedef vtkm::exec::internal::ArrayPortalTransform<
|
||||
using PortalExecution = typename StorageType::PortalType;
|
||||
using PortalConstExecution = vtkm::exec::internal::ArrayPortalTransform<
|
||||
ValueType,
|
||||
typename ArrayHandleType::template ExecutionTypes<Device>::PortalConst,
|
||||
FunctorType>
|
||||
PortalConstExecution;
|
||||
FunctorType>;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer(StorageType* storage)
|
||||
@ -464,27 +463,25 @@ class ArrayTransfer<
|
||||
StorageTagTransform<ArrayHandleType, FunctorType, InverseFunctorType>,
|
||||
Device>
|
||||
{
|
||||
typedef StorageTagTransform<ArrayHandleType, FunctorType, InverseFunctorType> StorageTag;
|
||||
using StorageTag = StorageTagTransform<ArrayHandleType, FunctorType, InverseFunctorType>;
|
||||
|
||||
public:
|
||||
typedef typename StorageTagTransform<ArrayHandleType, FunctorType>::ValueType ValueType;
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using ValueType = typename StorageTagTransform<ArrayHandleType, FunctorType>::ValueType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalTransform<
|
||||
using PortalExecution = vtkm::exec::internal::ArrayPortalTransform<
|
||||
ValueType,
|
||||
typename ArrayHandleType::template ExecutionTypes<Device>::Portal,
|
||||
FunctorType,
|
||||
InverseFunctorType>
|
||||
PortalExecution;
|
||||
typedef vtkm::exec::internal::ArrayPortalTransform<
|
||||
InverseFunctorType>;
|
||||
using PortalConstExecution = vtkm::exec::internal::ArrayPortalTransform<
|
||||
ValueType,
|
||||
typename ArrayHandleType::template ExecutionTypes<Device>::PortalConst,
|
||||
FunctorType,
|
||||
InverseFunctorType>
|
||||
PortalConstExecution;
|
||||
InverseFunctorType>;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer(StorageType* storage)
|
||||
@ -574,7 +571,7 @@ public:
|
||||
internal::StorageTagTransform<ArrayHandleType, FunctorType>>));
|
||||
|
||||
private:
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
@ -616,7 +613,7 @@ public:
|
||||
internal::StorageTagTransform<ArrayHandleType, FunctorType, InverseFunctorType>>));
|
||||
|
||||
private:
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
ArrayHandleTransform(const ArrayHandleType& handle,
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
vtkm::cont::StorageTagImplicit<vtkm::internal::ArrayPortalUniformPointCoordinates>>));
|
||||
|
||||
private:
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -118,16 +118,16 @@ struct ArrayHandleZipTraits
|
||||
{
|
||||
/// The ValueType (a pair containing the value types of the two arrays).
|
||||
///
|
||||
typedef vtkm::Pair<typename FirstHandleType::ValueType, typename SecondHandleType::ValueType>
|
||||
ValueType;
|
||||
using ValueType =
|
||||
vtkm::Pair<typename FirstHandleType::ValueType, typename SecondHandleType::ValueType>;
|
||||
|
||||
/// The appropriately templated tag.
|
||||
///
|
||||
typedef StorageTagZip<FirstHandleType, SecondHandleType> Tag;
|
||||
using Tag = StorageTagZip<FirstHandleType, SecondHandleType>;
|
||||
|
||||
/// The superclass for ArrayHandleZip.
|
||||
///
|
||||
typedef vtkm::cont::ArrayHandle<ValueType, Tag> Superclass;
|
||||
using Superclass = vtkm::cont::ArrayHandle<ValueType, Tag>;
|
||||
};
|
||||
|
||||
template <typename T, typename FirstHandleType, typename SecondHandleType>
|
||||
@ -139,14 +139,13 @@ class Storage<T, StorageTagZip<FirstHandleType, SecondHandleType>>
|
||||
public:
|
||||
using ValueType = T;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalZip<ValueType,
|
||||
typename FirstHandleType::PortalControl,
|
||||
typename SecondHandleType::PortalControl>
|
||||
PortalType;
|
||||
typedef vtkm::exec::internal::ArrayPortalZip<ValueType,
|
||||
typename FirstHandleType::PortalConstControl,
|
||||
typename SecondHandleType::PortalConstControl>
|
||||
PortalConstType;
|
||||
using PortalType = vtkm::exec::internal::ArrayPortalZip<ValueType,
|
||||
typename FirstHandleType::PortalControl,
|
||||
typename SecondHandleType::PortalControl>;
|
||||
using PortalConstType =
|
||||
vtkm::exec::internal::ArrayPortalZip<ValueType,
|
||||
typename FirstHandleType::PortalConstControl,
|
||||
typename SecondHandleType::PortalConstControl>;
|
||||
|
||||
VTKM_CONT
|
||||
Storage()
|
||||
@ -217,8 +216,8 @@ private:
|
||||
template <typename T, typename FirstHandleType, typename SecondHandleType, typename Device>
|
||||
class ArrayTransfer<T, StorageTagZip<FirstHandleType, SecondHandleType>, Device>
|
||||
{
|
||||
typedef StorageTagZip<FirstHandleType, SecondHandleType> StorageTag;
|
||||
typedef vtkm::cont::internal::Storage<T, StorageTag> StorageType;
|
||||
using StorageTag = StorageTagZip<FirstHandleType, SecondHandleType>;
|
||||
using StorageType = vtkm::cont::internal::Storage<T, StorageTag>;
|
||||
|
||||
public:
|
||||
using ValueType = T;
|
||||
@ -226,17 +225,15 @@ public:
|
||||
using PortalControl = typename StorageType::PortalType;
|
||||
using PortalConstControl = typename StorageType::PortalConstType;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalZip<
|
||||
using PortalExecution = vtkm::exec::internal::ArrayPortalZip<
|
||||
ValueType,
|
||||
typename FirstHandleType::template ExecutionTypes<Device>::Portal,
|
||||
typename SecondHandleType::template ExecutionTypes<Device>::Portal>
|
||||
PortalExecution;
|
||||
typename SecondHandleType::template ExecutionTypes<Device>::Portal>;
|
||||
|
||||
typedef vtkm::exec::internal::ArrayPortalZip<
|
||||
using PortalConstExecution = vtkm::exec::internal::ArrayPortalZip<
|
||||
ValueType,
|
||||
typename FirstHandleType::template ExecutionTypes<Device>::PortalConst,
|
||||
typename SecondHandleType::template ExecutionTypes<Device>::PortalConst>
|
||||
PortalConstExecution;
|
||||
typename SecondHandleType::template ExecutionTypes<Device>::PortalConst>;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer(StorageType* storage)
|
||||
@ -324,7 +321,7 @@ public:
|
||||
(typename internal::ArrayHandleZipTraits<FirstHandleType, SecondHandleType>::Superclass));
|
||||
|
||||
private:
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -61,7 +61,7 @@ class ArrayPortal
|
||||
public:
|
||||
/// The type of each value in the array.
|
||||
///
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
/// The total number of values in the array. They are index from 0 to
|
||||
/// GetNumberOfValues()-1.
|
||||
|
@ -59,7 +59,7 @@ struct ArrayRangeComputeFunctor
|
||||
using VecTraits = vtkm::VecTraits<ValueType>;
|
||||
const vtkm::IdComponent NumberOfComponents = VecTraits::NUM_COMPONENTS;
|
||||
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<Device> Algorithm;
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<Device>;
|
||||
|
||||
this->RangeArray.Allocate(NumberOfComponents);
|
||||
|
||||
|
@ -41,7 +41,7 @@ namespace detail
|
||||
template <typename CellSetType, typename FromTopology, typename ToTopology>
|
||||
struct CellSetExplicitConnectivityChooser
|
||||
{
|
||||
typedef vtkm::cont::internal::ConnectivityExplicitInternals<> ConnectivityType;
|
||||
using ConnectivityType = vtkm::cont::internal::ConnectivityExplicitInternals<>;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
@ -68,36 +68,36 @@ template <typename ShapeStorageTag = VTKM_DEFAULT_SHAPE_STORAGE_TAG,
|
||||
typename OffsetsStorageTag = VTKM_DEFAULT_OFFSETS_STORAGE_TAG>
|
||||
class VTKM_ALWAYS_EXPORT CellSetExplicit : public CellSet
|
||||
{
|
||||
typedef CellSetExplicit<ShapeStorageTag,
|
||||
NumIndicesStorageTag,
|
||||
ConnectivityStorageTag,
|
||||
OffsetsStorageTag>
|
||||
Thisclass;
|
||||
using Thisclass = CellSetExplicit<ShapeStorageTag,
|
||||
NumIndicesStorageTag,
|
||||
ConnectivityStorageTag,
|
||||
OffsetsStorageTag>;
|
||||
|
||||
template <typename FromTopology, typename ToTopology>
|
||||
struct ConnectivityChooser
|
||||
{
|
||||
typedef
|
||||
typename detail::CellSetExplicitConnectivityChooser<Thisclass, FromTopology, ToTopology>::
|
||||
ConnectivityType ConnectivityType;
|
||||
using ConnectivityType =
|
||||
typename detail::CellSetExplicitConnectivityChooser<Thisclass,
|
||||
FromTopology,
|
||||
ToTopology>::ConnectivityType;
|
||||
|
||||
typedef typename ConnectivityType::ShapeArrayType ShapeArrayType;
|
||||
typedef typename ConnectivityType::NumIndicesArrayType NumIndicesArrayType;
|
||||
typedef typename ConnectivityType::ConnectivityArrayType ConnectivityArrayType;
|
||||
typedef typename ConnectivityType::IndexOffsetArrayType IndexOffsetArrayType;
|
||||
using ShapeArrayType = typename ConnectivityType::ShapeArrayType;
|
||||
using NumIndicesArrayType = typename ConnectivityType::NumIndicesArrayType;
|
||||
using ConnectivityArrayType = typename ConnectivityType::ConnectivityArrayType;
|
||||
using IndexOffsetArrayType = typename ConnectivityType::IndexOffsetArrayType;
|
||||
};
|
||||
|
||||
public:
|
||||
typedef vtkm::Id SchedulingRangeType;
|
||||
using SchedulingRangeType = vtkm::Id;
|
||||
|
||||
//point to cell is used when iterating cells and asking for point properties
|
||||
typedef ConnectivityChooser<vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell>
|
||||
PointToCellConnectivityType;
|
||||
using PointToCellConnectivityType =
|
||||
ConnectivityChooser<vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell>;
|
||||
|
||||
typedef typename PointToCellConnectivityType::ShapeArrayType ShapeArrayType;
|
||||
typedef typename PointToCellConnectivityType::NumIndicesArrayType NumIndicesArrayType;
|
||||
typedef typename PointToCellConnectivityType::ConnectivityArrayType ConnectivityArrayType;
|
||||
typedef typename PointToCellConnectivityType::IndexOffsetArrayType IndexOffsetArrayType;
|
||||
using ShapeArrayType = typename PointToCellConnectivityType::ShapeArrayType;
|
||||
using NumIndicesArrayType = typename PointToCellConnectivityType::NumIndicesArrayType;
|
||||
using ConnectivityArrayType = typename PointToCellConnectivityType::ConnectivityArrayType;
|
||||
using IndexOffsetArrayType = typename PointToCellConnectivityType::IndexOffsetArrayType;
|
||||
|
||||
VTKM_CONT CellSetExplicit(const std::string& name = std::string());
|
||||
VTKM_CONT CellSetExplicit(const Thisclass& src);
|
||||
@ -148,22 +148,24 @@ public:
|
||||
VTKM_IS_TOPOLOGY_ELEMENT_TAG(FromTopology);
|
||||
VTKM_IS_TOPOLOGY_ELEMENT_TAG(ToTopology);
|
||||
|
||||
typedef ConnectivityChooser<FromTopology, ToTopology> ConnectivityTypes;
|
||||
using ConnectivityTypes = ConnectivityChooser<FromTopology, ToTopology>;
|
||||
|
||||
typedef typename ConnectivityTypes::ShapeArrayType::template ExecutionTypes<
|
||||
DeviceAdapter>::PortalConst ShapePortalType;
|
||||
typedef typename ConnectivityTypes::NumIndicesArrayType::template ExecutionTypes<
|
||||
DeviceAdapter>::PortalConst IndicePortalType;
|
||||
typedef typename ConnectivityTypes::ConnectivityArrayType::template ExecutionTypes<
|
||||
DeviceAdapter>::PortalConst ConnectivityPortalType;
|
||||
typedef typename ConnectivityTypes::IndexOffsetArrayType::template ExecutionTypes<
|
||||
DeviceAdapter>::PortalConst IndexOffsetPortalType;
|
||||
using ShapePortalType = typename ConnectivityTypes::ShapeArrayType::template ExecutionTypes<
|
||||
DeviceAdapter>::PortalConst;
|
||||
using IndicePortalType =
|
||||
typename ConnectivityTypes::NumIndicesArrayType::template ExecutionTypes<
|
||||
DeviceAdapter>::PortalConst;
|
||||
using ConnectivityPortalType =
|
||||
typename ConnectivityTypes::ConnectivityArrayType::template ExecutionTypes<
|
||||
DeviceAdapter>::PortalConst;
|
||||
using IndexOffsetPortalType =
|
||||
typename ConnectivityTypes::IndexOffsetArrayType::template ExecutionTypes<
|
||||
DeviceAdapter>::PortalConst;
|
||||
|
||||
typedef vtkm::exec::ConnectivityExplicit<ShapePortalType,
|
||||
IndicePortalType,
|
||||
ConnectivityPortalType,
|
||||
IndexOffsetPortalType>
|
||||
ExecObjectType;
|
||||
using ExecObjectType = vtkm::exec::ConnectivityExplicit<ShapePortalType,
|
||||
IndicePortalType,
|
||||
ConnectivityPortalType,
|
||||
IndexOffsetPortalType>;
|
||||
};
|
||||
|
||||
template <typename Device, typename FromTopology, typename ToTopology>
|
||||
@ -245,9 +247,8 @@ struct CellSetExplicitConnectivityChooser<
|
||||
vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell>
|
||||
{
|
||||
typedef vtkm::cont::internal::
|
||||
ConnectivityExplicitInternals<Storage1, Storage2, Storage3, Storage4>
|
||||
ConnectivityType;
|
||||
using ConnectivityType =
|
||||
vtkm::cont::internal::ConnectivityExplicitInternals<Storage1, Storage2, Storage3, Storage4>;
|
||||
};
|
||||
|
||||
template <typename CellSetType>
|
||||
@ -257,9 +258,8 @@ struct CellSetExplicitConnectivityChooser<CellSetType,
|
||||
{
|
||||
//only specify the shape type as it will be constant as everything
|
||||
//is a vertex. otherwise use the defaults.
|
||||
typedef vtkm::cont::internal::ConnectivityExplicitInternals<
|
||||
typename ArrayHandleConstant<vtkm::UInt8>::StorageTag>
|
||||
ConnectivityType;
|
||||
using ConnectivityType = vtkm::cont::internal::ConnectivityExplicitInternals<
|
||||
typename ArrayHandleConstant<vtkm::UInt8>::StorageTag>;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
@ -355,7 +355,7 @@ auto CellSetExplicit<ShapeStorageTag,
|
||||
const auto& connectivity = this->GetConnectivity(FromTopology(), ToTopology());
|
||||
VTKM_ASSERT(connectivity.ElementsValid);
|
||||
|
||||
typedef typename ExecutionTypes<Device, FromTopology, ToTopology>::ExecObjectType ExecObjType;
|
||||
using ExecObjType = typename ExecutionTypes<Device, FromTopology, ToTopology>::ExecObjectType;
|
||||
return ExecObjType(connectivity.Shapes.PrepareForInput(Device()),
|
||||
connectivity.NumIndices.PrepareForInput(Device()),
|
||||
connectivity.Connectivity.PrepareForInput(Device()),
|
||||
|
@ -50,7 +50,7 @@ struct WriteConnectivity : public vtkm::worklet::WorkletMapPointToCell
|
||||
FieldInCell<IdType> offset,
|
||||
WholeArrayOut<> connectivity);
|
||||
typedef void ExecutionSignature(PointCount, PointIndices, _2, _3);
|
||||
typedef _1 InputDomain;
|
||||
using InputDomain = _1;
|
||||
|
||||
template <typename PointIndicesType, typename OutPortalType>
|
||||
VTKM_EXEC void operator()(vtkm::IdComponent pointcount,
|
||||
|
@ -47,13 +47,12 @@ class VTKM_ALWAYS_EXPORT CellSetSingleType
|
||||
typename vtkm::cont::ArrayHandleCounting<vtkm::Id>::StorageTag //IndexOffsetStorageTag
|
||||
>
|
||||
{
|
||||
typedef vtkm::cont::CellSetSingleType<ConnectivityStorageTag> Thisclass;
|
||||
typedef vtkm::cont::CellSetExplicit<
|
||||
using Thisclass = vtkm::cont::CellSetSingleType<ConnectivityStorageTag>;
|
||||
using Superclass = vtkm::cont::CellSetExplicit<
|
||||
typename vtkm::cont::ArrayHandleConstant<vtkm::UInt8>::StorageTag,
|
||||
typename vtkm::cont::ArrayHandleConstant<vtkm::IdComponent>::StorageTag,
|
||||
ConnectivityStorageTag,
|
||||
typename vtkm::cont::ArrayHandleCounting<vtkm::Id>::StorageTag>
|
||||
Superclass;
|
||||
typename vtkm::cont::ArrayHandleCounting<vtkm::Id>::StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -37,13 +37,13 @@ template <vtkm::IdComponent DIMENSION>
|
||||
class VTKM_ALWAYS_EXPORT CellSetStructured : public CellSet
|
||||
{
|
||||
private:
|
||||
typedef vtkm::cont::CellSetStructured<DIMENSION> Thisclass;
|
||||
typedef vtkm::internal::ConnectivityStructuredInternals<DIMENSION> InternalsType;
|
||||
using Thisclass = vtkm::cont::CellSetStructured<DIMENSION>;
|
||||
using InternalsType = vtkm::internal::ConnectivityStructuredInternals<DIMENSION>;
|
||||
|
||||
public:
|
||||
static const vtkm::IdComponent Dimension = DIMENSION;
|
||||
|
||||
typedef typename InternalsType::SchedulingRangeType SchedulingRangeType;
|
||||
using SchedulingRangeType = typename InternalsType::SchedulingRangeType;
|
||||
|
||||
CellSetStructured(const std::string& name = std::string())
|
||||
: CellSet(name)
|
||||
@ -88,7 +88,7 @@ public:
|
||||
VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapter);
|
||||
VTKM_IS_TOPOLOGY_ELEMENT_TAG(FromTopology);
|
||||
VTKM_IS_TOPOLOGY_ELEMENT_TAG(ToTopology);
|
||||
typedef vtkm::exec::ConnectivityStructured<FromTopology, ToTopology, Dimension> ExecObjectType;
|
||||
using ExecObjectType = vtkm::exec::ConnectivityStructured<FromTopology, ToTopology, Dimension>;
|
||||
};
|
||||
|
||||
template <typename DeviceAdapter, typename FromTopology, typename ToTopology>
|
||||
|
@ -54,8 +54,8 @@ typename CellSetStructured<
|
||||
DIMENSION>::template ExecutionTypes<DeviceAdapter, FromTopology, ToTopology>::ExecObjectType
|
||||
CellSetStructured<DIMENSION>::PrepareForInput(DeviceAdapter, FromTopology, ToTopology) const
|
||||
{
|
||||
typedef typename ExecutionTypes<DeviceAdapter, FromTopology, ToTopology>::ExecObjectType
|
||||
ConnectivityType;
|
||||
using ConnectivityType =
|
||||
typename ExecutionTypes<DeviceAdapter, FromTopology, ToTopology>::ExecObjectType;
|
||||
return ConnectivityType(this->Structure);
|
||||
}
|
||||
|
||||
|
@ -44,15 +44,15 @@ namespace cont
|
||||
namespace detail
|
||||
{
|
||||
|
||||
typedef vtkm::cont::ArrayHandleCompositeVectorType<vtkm::cont::ArrayHandle<vtkm::Float32>,
|
||||
vtkm::cont::ArrayHandle<vtkm::Float32>,
|
||||
vtkm::cont::ArrayHandle<vtkm::Float32>>::type
|
||||
ArrayHandleCompositeVectorFloat32_3Default;
|
||||
using ArrayHandleCompositeVectorFloat32_3Default =
|
||||
vtkm::cont::ArrayHandleCompositeVectorType<vtkm::cont::ArrayHandle<vtkm::Float32>,
|
||||
vtkm::cont::ArrayHandle<vtkm::Float32>,
|
||||
vtkm::cont::ArrayHandle<vtkm::Float32>>::type;
|
||||
|
||||
typedef vtkm::cont::ArrayHandleCompositeVectorType<vtkm::cont::ArrayHandle<vtkm::Float64>,
|
||||
vtkm::cont::ArrayHandle<vtkm::Float64>,
|
||||
vtkm::cont::ArrayHandle<vtkm::Float64>>::type
|
||||
ArrayHandleCompositeVectorFloat64_3Default;
|
||||
using ArrayHandleCompositeVectorFloat64_3Default =
|
||||
vtkm::cont::ArrayHandleCompositeVectorType<vtkm::cont::ArrayHandle<vtkm::Float64>,
|
||||
vtkm::cont::ArrayHandle<vtkm::Float64>,
|
||||
vtkm::cont::ArrayHandle<vtkm::Float64>>::type;
|
||||
|
||||
} // namespace detail
|
||||
|
||||
@ -73,13 +73,13 @@ struct StorageListTagCoordinateSystemDefault
|
||||
{
|
||||
};
|
||||
|
||||
typedef vtkm::cont::DynamicArrayHandleBase<VTKM_DEFAULT_COORDINATE_SYSTEM_TYPE_LIST_TAG,
|
||||
VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG>
|
||||
DynamicArrayHandleCoordinateSystem;
|
||||
using DynamicArrayHandleCoordinateSystem =
|
||||
vtkm::cont::DynamicArrayHandleBase<VTKM_DEFAULT_COORDINATE_SYSTEM_TYPE_LIST_TAG,
|
||||
VTKM_DEFAULT_COORDINATE_SYSTEM_STORAGE_LIST_TAG>;
|
||||
|
||||
class VTKM_CONT_EXPORT CoordinateSystem : public vtkm::cont::Field
|
||||
{
|
||||
typedef vtkm::cont::Field Superclass;
|
||||
using Superclass = vtkm::cont::Field;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
@ -226,7 +226,7 @@ namespace internal
|
||||
template <>
|
||||
struct DynamicTransformTraits<vtkm::cont::CoordinateSystem>
|
||||
{
|
||||
typedef vtkm::cont::internal::DynamicTransformTagCastAndCall DynamicTag;
|
||||
using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall;
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -43,7 +43,7 @@ class DataSetBuilderRectilinear
|
||||
VTKM_CONT static void CopyInto(const vtkm::cont::ArrayHandle<T>& input,
|
||||
vtkm::cont::ArrayHandle<U>& output)
|
||||
{
|
||||
typedef vtkm::cont::DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagSerial> Algorithm;
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagSerial>;
|
||||
Algorithm::Copy(input, output);
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ namespace cont
|
||||
|
||||
class DataSetBuilderUniform
|
||||
{
|
||||
typedef vtkm::Vec<vtkm::FloatDefault, 3> VecType;
|
||||
using VecType = vtkm::Vec<vtkm::FloatDefault, 3>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -74,7 +74,7 @@ template <typename T, typename Storage>
|
||||
struct VTKM_ALWAYS_EXPORT PolymorphicArrayHandleContainer
|
||||
: public PolymorphicArrayHandleContainerBase
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandle<T, Storage> ArrayHandleType;
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandle<T, Storage>;
|
||||
|
||||
ArrayHandleType Array;
|
||||
|
||||
@ -400,9 +400,8 @@ private:
|
||||
friend struct detail::DynamicArrayHandleCopyHelper;
|
||||
};
|
||||
|
||||
typedef vtkm::cont::DynamicArrayHandleBase<VTKM_DEFAULT_TYPE_LIST_TAG,
|
||||
VTKM_DEFAULT_STORAGE_LIST_TAG>
|
||||
DynamicArrayHandle;
|
||||
using DynamicArrayHandle =
|
||||
vtkm::cont::DynamicArrayHandleBase<VTKM_DEFAULT_TYPE_LIST_TAG, VTKM_DEFAULT_STORAGE_LIST_TAG>;
|
||||
|
||||
namespace detail
|
||||
{
|
||||
@ -471,7 +470,7 @@ struct DynamicArrayHandleTryType
|
||||
{
|
||||
return;
|
||||
}
|
||||
typedef DynamicArrayHandleTryStorage<Functor, Type> TryStorageType;
|
||||
using TryStorageType = DynamicArrayHandleTryStorage<Functor, Type>;
|
||||
TryStorageType tryStorage = TryStorageType(*this->Array, this->Function);
|
||||
|
||||
vtkm::ListForEach(tryStorage, StorageList());
|
||||
@ -493,7 +492,7 @@ VTKM_CONT void DynamicArrayHandleBase<TypeList, StorageList>::CastAndCall(const
|
||||
{
|
||||
VTKM_IS_LIST_TAG(TypeList);
|
||||
VTKM_IS_LIST_TAG(StorageList);
|
||||
typedef detail::DynamicArrayHandleTryType<Functor, StorageList> TryTypeType;
|
||||
using TryTypeType = detail::DynamicArrayHandleTryType<Functor, StorageList>;
|
||||
|
||||
// We cast this to a DynamicArrayHandle because at this point we are ignoring
|
||||
// the type/storage lists in it. There is no sense in adding more unnecessary
|
||||
@ -525,7 +524,7 @@ DynamicArrayHandleBase<VTKM_DEFAULT_TYPE_LIST_TAG, VTKM_DEFAULT_STORAGE_LIST_TAG
|
||||
const Functor& f) const
|
||||
{
|
||||
|
||||
typedef detail::DynamicArrayHandleTryType<Functor, VTKM_DEFAULT_STORAGE_LIST_TAG> TryTypeType;
|
||||
using TryTypeType = detail::DynamicArrayHandleTryType<Functor, VTKM_DEFAULT_STORAGE_LIST_TAG>;
|
||||
|
||||
// We can remove the copy, as the current DynamicArrayHandle is already
|
||||
// the default one, and no reason to do an atomic increment and increase
|
||||
|
@ -312,7 +312,7 @@ template <typename CellSetList>
|
||||
template <typename Functor>
|
||||
VTKM_CONT void DynamicCellSetBase<CellSetList>::CastAndCall(const Functor& f) const
|
||||
{
|
||||
typedef detail::DynamicCellSetTryCellSet<Functor> TryCellSetType;
|
||||
using TryCellSetType = detail::DynamicCellSetTryCellSet<Functor>;
|
||||
TryCellSetType tryCellSet = TryCellSetType(this->CellSetContainer.get(), f);
|
||||
|
||||
vtkm::ListForEach(tryCellSet, CellSetList());
|
||||
@ -322,7 +322,7 @@ VTKM_CONT void DynamicCellSetBase<CellSetList>::CastAndCall(const Functor& f) co
|
||||
}
|
||||
}
|
||||
|
||||
typedef DynamicCellSetBase<VTKM_DEFAULT_CELL_SET_LIST_TAG> DynamicCellSet;
|
||||
using DynamicCellSet = DynamicCellSetBase<VTKM_DEFAULT_CELL_SET_LIST_TAG>;
|
||||
|
||||
namespace internal
|
||||
{
|
||||
@ -330,7 +330,7 @@ namespace internal
|
||||
template <typename CellSetList>
|
||||
struct DynamicTransformTraits<vtkm::cont::DynamicCellSetBase<CellSetList>>
|
||||
{
|
||||
typedef vtkm::cont::internal::DynamicTransformTagCastAndCall DynamicTag;
|
||||
using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall;
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -106,21 +106,21 @@ public:
|
||||
public:
|
||||
/// The type of each item in the array.
|
||||
///
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
/// \brief The type of portal objects for the array.
|
||||
///
|
||||
/// The actual portal object can take any form. This is a simple example of a
|
||||
/// portal to a C array.
|
||||
///
|
||||
typedef ::vtkm::cont::internal::ArrayPortalFromIterators<ValueType*> PortalType;
|
||||
using PortalType = ::vtkm::cont::internal::ArrayPortalFromIterators<ValueType*>;
|
||||
|
||||
/// \brief The type of portal objects (const version) for the array.
|
||||
///
|
||||
/// The actual portal object can take any form. This is a simple example of a
|
||||
/// portal to a C array.
|
||||
///
|
||||
typedef ::vtkm::cont::internal::ArrayPortalFromIterators<const ValueType*> PortalConstType;
|
||||
using PortalConstType = ::vtkm::cont::internal::ArrayPortalFromIterators<const ValueType*>;
|
||||
|
||||
/// Returns a portal to the array.
|
||||
///
|
||||
|
@ -72,7 +72,7 @@ struct AlignedAllocator
|
||||
template <typename U>
|
||||
struct rebind
|
||||
{
|
||||
typedef AlignedAllocator<U, Alignment> other;
|
||||
using other = AlignedAllocator<U, Alignment>;
|
||||
};
|
||||
|
||||
AlignedAllocator() {}
|
||||
@ -183,7 +183,7 @@ public:
|
||||
/// whether that would ever be useful. So, instead of jumping through hoops
|
||||
/// implementing them, just fix the allocator for now.
|
||||
///
|
||||
typedef AlignedAllocator<ValueType, VTKM_CACHE_LINE_SIZE> AllocatorType;
|
||||
using AllocatorType = AlignedAllocator<ValueType, VTKM_CACHE_LINE_SIZE>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -102,7 +102,7 @@ class ArrayTransfer<T, StorageTagImplicit<ArrayPortalType>, DeviceAdapterTag>
|
||||
{
|
||||
private:
|
||||
using StorageTag = StorageTagImplicit<ArrayPortalType>;
|
||||
typedef vtkm::cont::internal::Storage<T, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<T, StorageTag>;
|
||||
|
||||
public:
|
||||
using ValueType = T;
|
||||
|
@ -123,7 +123,7 @@ struct TryExecuteImpl
|
||||
{
|
||||
if (!this->Success)
|
||||
{
|
||||
typedef vtkm::cont::DeviceAdapterTraits<Device> DeviceTraits;
|
||||
using DeviceTraits = vtkm::cont::DeviceAdapterTraits<Device>;
|
||||
|
||||
this->Success = detail::TryExecuteRunIfValid<FunctorType, Device, DeviceTraits::Valid>::Run(
|
||||
this->Functor, this->Tracker);
|
||||
|
@ -69,11 +69,13 @@ void TransportWholeCellSetIn(Device)
|
||||
contObject.AddCell(vtkm::CELL_SHAPE_QUAD, 4, vtkm::make_Vec<vtkm::Id>(2, 1, 3, 4));
|
||||
contObject.CompleteAddingCells(nVerts);
|
||||
|
||||
typedef vtkm::TopologyElementTagPoint FromType;
|
||||
typedef vtkm::TopologyElementTagCell ToType;
|
||||
using FromType = vtkm::TopologyElementTagPoint;
|
||||
using ToType = vtkm::TopologyElementTagCell;
|
||||
|
||||
typedef typename vtkm::cont::CellSetExplicit<>::
|
||||
template ExecutionTypes<Device, FromType, ToType>::ExecObjectType ExecObjectType;
|
||||
using ExecObjectType =
|
||||
typename vtkm::cont::CellSetExplicit<>::template ExecutionTypes<Device,
|
||||
FromType,
|
||||
ToType>::ExecObjectType;
|
||||
|
||||
vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagCellSetIn<FromType, ToType>,
|
||||
vtkm::cont::CellSetExplicit<>,
|
||||
|
@ -117,20 +117,18 @@ struct TryWholeArrayType
|
||||
template <typename T>
|
||||
void operator()(T) const
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandle<T> ArrayHandleType;
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandle<T>;
|
||||
|
||||
typedef vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagWholeArrayIn,
|
||||
ArrayHandleType,
|
||||
Device>
|
||||
InTransportType;
|
||||
typedef vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagWholeArrayInOut,
|
||||
ArrayHandleType,
|
||||
Device>
|
||||
InOutTransportType;
|
||||
typedef vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagWholeArrayOut,
|
||||
ArrayHandleType,
|
||||
Device>
|
||||
OutTransportType;
|
||||
using InTransportType = vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagWholeArrayIn,
|
||||
ArrayHandleType,
|
||||
Device>;
|
||||
using InOutTransportType =
|
||||
vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagWholeArrayInOut,
|
||||
ArrayHandleType,
|
||||
Device>;
|
||||
using OutTransportType = vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagWholeArrayOut,
|
||||
ArrayHandleType,
|
||||
Device>;
|
||||
|
||||
ArrayHandleType array;
|
||||
array.Allocate(ARRAY_SIZE);
|
||||
@ -172,12 +170,10 @@ struct TryAtomicArrayType
|
||||
template <typename T>
|
||||
void operator()(T) const
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic> ArrayHandleType;
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic>;
|
||||
|
||||
typedef vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagAtomicArray,
|
||||
ArrayHandleType,
|
||||
Device>
|
||||
TransportType;
|
||||
using TransportType =
|
||||
vtkm::cont::arg::Transport<vtkm::cont::arg::TransportTagAtomicArray, ArrayHandleType, Device>;
|
||||
|
||||
ArrayHandleType array;
|
||||
array.Allocate(1);
|
||||
|
@ -36,23 +36,23 @@ struct TryArraysOfType
|
||||
void operator()(T) const
|
||||
{
|
||||
using vtkm::cont::arg::TypeCheck;
|
||||
typedef vtkm::cont::arg::TypeCheckTagArray<vtkm::TypeListTagAll> TypeCheckTagArray;
|
||||
using TypeCheckTagArray = vtkm::cont::arg::TypeCheckTagArray<vtkm::TypeListTagAll>;
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<T> StandardArray;
|
||||
using StandardArray = vtkm::cont::ArrayHandle<T>;
|
||||
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArray, StandardArray>::value),
|
||||
"Standard array type check failed.");
|
||||
|
||||
typedef vtkm::cont::ArrayHandleCounting<T> CountingArray;
|
||||
using CountingArray = vtkm::cont::ArrayHandleCounting<T>;
|
||||
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArray, CountingArray>::value),
|
||||
"Counting array type check failed.");
|
||||
|
||||
typedef typename vtkm::cont::ArrayHandleCompositeVectorType<StandardArray, CountingArray>::type
|
||||
CompositeArray;
|
||||
using CompositeArray =
|
||||
typename vtkm::cont::ArrayHandleCompositeVectorType<StandardArray, CountingArray>::type;
|
||||
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArray, CompositeArray>::value),
|
||||
"Composite array type check failed.");
|
||||
|
||||
// Just some type that is not a valid array.
|
||||
typedef typename StandardArray::PortalControl NotAnArray;
|
||||
using NotAnArray = typename StandardArray::PortalControl;
|
||||
VTKM_TEST_ASSERT(!(TypeCheck<TypeCheckTagArray, NotAnArray>::value),
|
||||
"Not an array type check failed.");
|
||||
|
||||
@ -67,25 +67,25 @@ void TestCheckAtomicArray()
|
||||
using vtkm::cont::arg::TypeCheck;
|
||||
using vtkm::cont::arg::TypeCheckTagAtomicArray;
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Int32> Int32Array;
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Int64> Int64Array;
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Float32> FloatArray;
|
||||
using Int32Array = vtkm::cont::ArrayHandle<vtkm::Int32>;
|
||||
using Int64Array = vtkm::cont::ArrayHandle<vtkm::Int64>;
|
||||
using FloatArray = vtkm::cont::ArrayHandle<vtkm::Float32>;
|
||||
|
||||
typedef TypeCheckTagAtomicArray<> DefaultTypeCheck;
|
||||
using DefaultTypeCheck = TypeCheckTagAtomicArray<>;
|
||||
VTKM_TEST_ASSERT((TypeCheck<DefaultTypeCheck, Int32Array>::value),
|
||||
"Check for 32-bit int failed.");
|
||||
VTKM_TEST_ASSERT((TypeCheck<DefaultTypeCheck, Int64Array>::value),
|
||||
"Check for 64-bit int failed.");
|
||||
VTKM_TEST_ASSERT(!(TypeCheck<DefaultTypeCheck, FloatArray>::value), "Check for float failed.");
|
||||
|
||||
typedef TypeCheckTagAtomicArray<vtkm::TypeListTagAll> ExpandedTypeCheck;
|
||||
using ExpandedTypeCheck = TypeCheckTagAtomicArray<vtkm::TypeListTagAll>;
|
||||
VTKM_TEST_ASSERT((TypeCheck<ExpandedTypeCheck, Int32Array>::value),
|
||||
"Check for 32-bit int failed.");
|
||||
VTKM_TEST_ASSERT((TypeCheck<ExpandedTypeCheck, Int64Array>::value),
|
||||
"Check for 64-bit int failed.");
|
||||
VTKM_TEST_ASSERT(!(TypeCheck<ExpandedTypeCheck, FloatArray>::value), "Check for float failed.");
|
||||
|
||||
typedef TypeCheckTagAtomicArray<vtkm::ListTagBase<vtkm::Int32>> RestrictedTypeCheck;
|
||||
using RestrictedTypeCheck = TypeCheckTagAtomicArray<vtkm::ListTagBase<vtkm::Int32>>;
|
||||
VTKM_TEST_ASSERT((TypeCheck<RestrictedTypeCheck, Int32Array>::value),
|
||||
"Check for 32-bit int failed.");
|
||||
VTKM_TEST_ASSERT(!(TypeCheck<RestrictedTypeCheck, Int64Array>::value),
|
||||
@ -101,13 +101,13 @@ void TestCheckArray()
|
||||
using vtkm::cont::arg::TypeCheck;
|
||||
using vtkm::cont::arg::TypeCheckTagArray;
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::FloatDefault> ScalarArray;
|
||||
using ScalarArray = vtkm::cont::ArrayHandle<vtkm::FloatDefault>;
|
||||
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArray<vtkm::TypeListTagFieldScalar>, ScalarArray>::value),
|
||||
"Scalar for scalar check failed.");
|
||||
VTKM_TEST_ASSERT(!(TypeCheck<TypeCheckTagArray<vtkm::TypeListTagFieldVec3>, ScalarArray>::value),
|
||||
"Scalar for vector check failed.");
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::FloatDefault, 3>> VecArray;
|
||||
using VecArray = vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::FloatDefault, 3>>;
|
||||
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArray<vtkm::TypeListTagFieldVec3>, VecArray>::value),
|
||||
"Vector for vector check failed.");
|
||||
VTKM_TEST_ASSERT(!(TypeCheck<TypeCheckTagArray<vtkm::TypeListTagFieldScalar>, VecArray>::value),
|
||||
|
@ -41,11 +41,11 @@ class ArrayManagerExecution<T, StorageTag, vtkm::cont::DeviceAdapterTagCuda>
|
||||
: public vtkm::cont::cuda::internal::ArrayManagerExecutionThrustDevice<T, StorageTag>
|
||||
{
|
||||
public:
|
||||
typedef vtkm::cont::cuda::internal::ArrayManagerExecutionThrustDevice<T, StorageTag> Superclass;
|
||||
typedef typename Superclass::ValueType ValueType;
|
||||
typedef typename Superclass::PortalType PortalType;
|
||||
typedef typename Superclass::PortalConstType PortalConstType;
|
||||
typedef typename Superclass::StorageType StorageType;
|
||||
using Superclass = vtkm::cont::cuda::internal::ArrayManagerExecutionThrustDevice<T, StorageTag>;
|
||||
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)
|
||||
|
@ -59,14 +59,14 @@ template <typename T, class StorageTag>
|
||||
class ArrayManagerExecutionThrustDevice
|
||||
{
|
||||
public:
|
||||
typedef T ValueType;
|
||||
typedef typename thrust::system::cuda::pointer<ValueType> PointerType;
|
||||
typedef typename PointerType::difference_type difference_type;
|
||||
using ValueType = T;
|
||||
using PointerType = typename thrust::system::cuda::pointer<ValueType>;
|
||||
using difference_type = typename PointerType::difference_type;
|
||||
|
||||
typedef vtkm::cont::internal::Storage<ValueType, StorageTag> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
typedef vtkm::exec::cuda::internal::ArrayPortalFromThrust<T> PortalType;
|
||||
typedef vtkm::exec::cuda::internal::ConstArrayPortalFromThrust<T> PortalConstType;
|
||||
using PortalType = vtkm::exec::cuda::internal::ArrayPortalFromThrust<T>;
|
||||
using PortalConstType = vtkm::exec::cuda::internal::ConstArrayPortalFromThrust<T>;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayManagerExecutionThrustDevice(StorageType* storage)
|
||||
|
@ -216,8 +216,9 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
typedef typename vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic>::template ExecutionTypes<
|
||||
vtkm::cont::DeviceAdapterTagCuda>::Portal PortalType;
|
||||
using PortalType =
|
||||
typename vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic>::template ExecutionTypes<
|
||||
vtkm::cont::DeviceAdapterTagCuda>::Portal;
|
||||
PortalType Portal;
|
||||
|
||||
inline __device__ vtkm::Int64 vtkmAtomicAdd(vtkm::Int64* address, const vtkm::Int64& value) const
|
||||
|
@ -218,9 +218,10 @@ private:
|
||||
OutputPortal output,
|
||||
UnaryPredicate unary_predicate)
|
||||
{
|
||||
using ValueType = typename StencilPortal::ValueType;
|
||||
using IteratorType = typename detail::IteratorTraits<OutputPortal>::IteratorType;
|
||||
IteratorType outputBegin = IteratorBegin(output);
|
||||
|
||||
auto outputBegin = IteratorBegin(output);
|
||||
using ValueType = typename StencilPortal::ValueType;
|
||||
|
||||
vtkm::exec::cuda::internal::WrappedUnaryPredicate<ValueType, UnaryPredicate> up(
|
||||
unary_predicate);
|
||||
@ -634,7 +635,7 @@ private:
|
||||
template <class KeysPortal, class ValuesPortal>
|
||||
VTKM_CONT static void SortByKeyPortal(const KeysPortal& keys, const ValuesPortal& values)
|
||||
{
|
||||
typedef typename KeysPortal::ValueType ValueType;
|
||||
using ValueType = typename KeysPortal::ValueType;
|
||||
SortByKeyPortal(keys, values, ::thrust::less<ValueType>());
|
||||
}
|
||||
|
||||
@ -718,7 +719,7 @@ private:
|
||||
const OutputPortal& output,
|
||||
BinaryCompare binary_compare)
|
||||
{
|
||||
typedef typename OutputPortal::ValueType ValueType;
|
||||
using ValueType = typename OutputPortal::ValueType;
|
||||
|
||||
vtkm::exec::cuda::internal::WrappedBinaryPredicate<ValueType, BinaryCompare> bop(
|
||||
binary_compare);
|
||||
|
@ -59,17 +59,17 @@ struct ThrustIteratorDevicePtrTag
|
||||
template <typename IteratorType>
|
||||
struct ThrustIteratorTag
|
||||
{
|
||||
typedef ThrustIteratorFromArrayPortalTag Type;
|
||||
using Type = ThrustIteratorFromArrayPortalTag;
|
||||
};
|
||||
template <typename T>
|
||||
struct ThrustIteratorTag<thrust::system::cuda::pointer<T>>
|
||||
{
|
||||
typedef ThrustIteratorDevicePtrTag Type;
|
||||
using Type = ThrustIteratorDevicePtrTag;
|
||||
};
|
||||
template <typename T>
|
||||
struct ThrustIteratorTag<thrust::system::cuda::pointer<const T>>
|
||||
{
|
||||
typedef ThrustIteratorDevicePtrTag Type;
|
||||
using Type = ThrustIteratorDevicePtrTag;
|
||||
};
|
||||
|
||||
template <typename PortalType, typename Tag>
|
||||
@ -77,22 +77,22 @@ struct IteratorChooser;
|
||||
template <typename PortalType>
|
||||
struct IteratorChooser<PortalType, detail::ThrustIteratorFromArrayPortalTag>
|
||||
{
|
||||
typedef vtkm::exec::cuda::internal::IteratorFromArrayPortal<PortalType> Type;
|
||||
using Type = vtkm::exec::cuda::internal::IteratorFromArrayPortal<PortalType>;
|
||||
};
|
||||
template <typename PortalType>
|
||||
struct IteratorChooser<PortalType, detail::ThrustIteratorDevicePtrTag>
|
||||
{
|
||||
typedef vtkm::cont::ArrayPortalToIterators<PortalType> PortalToIteratorType;
|
||||
using PortalToIteratorType = vtkm::cont::ArrayPortalToIterators<PortalType>;
|
||||
|
||||
typedef typename PortalToIteratorType::IteratorType Type;
|
||||
using Type = typename PortalToIteratorType::IteratorType;
|
||||
};
|
||||
|
||||
template <typename PortalType>
|
||||
struct IteratorTraits
|
||||
{
|
||||
typedef vtkm::cont::ArrayPortalToIterators<PortalType> PortalToIteratorType;
|
||||
typedef typename detail::ThrustIteratorTag<typename PortalToIteratorType::IteratorType>::Type Tag;
|
||||
typedef typename IteratorChooser<PortalType, Tag>::Type IteratorType;
|
||||
using PortalToIteratorType = vtkm::cont::ArrayPortalToIterators<PortalType>;
|
||||
using Tag = typename detail::ThrustIteratorTag<typename PortalToIteratorType::IteratorType>::Type;
|
||||
using IteratorType = typename IteratorChooser<PortalType, Tag>::Type;
|
||||
};
|
||||
|
||||
template <typename PortalType>
|
||||
@ -136,14 +136,14 @@ VTKM_CONT typename IteratorTraits<PortalType>::IteratorType MakeIteratorEnd(
|
||||
template <typename PortalType>
|
||||
VTKM_CONT typename detail::IteratorTraits<PortalType>::IteratorType IteratorBegin(PortalType portal)
|
||||
{
|
||||
typedef typename detail::IteratorTraits<PortalType>::Tag IteratorTag;
|
||||
using IteratorTag = typename detail::IteratorTraits<PortalType>::Tag;
|
||||
return detail::MakeIteratorBegin(portal, IteratorTag());
|
||||
}
|
||||
|
||||
template <typename PortalType>
|
||||
VTKM_CONT typename detail::IteratorTraits<PortalType>::IteratorType IteratorEnd(PortalType portal)
|
||||
{
|
||||
typedef typename detail::IteratorTraits<PortalType>::Tag IteratorTag;
|
||||
using IteratorTag = typename detail::IteratorTraits<PortalType>::Tag;
|
||||
return detail::MakeIteratorEnd(portal, IteratorTag());
|
||||
}
|
||||
}
|
||||
|
@ -58,4 +58,4 @@ static inline void throwAsVTKmException()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif //vtk_m_cont_cuda_interal_ThrustExecptionHandler_h
|
||||
|
@ -37,7 +37,7 @@ class ArrayManagerExecution<T, StorageTag, vtkm::cont::DeviceAdapterTagSerial>
|
||||
: public vtkm::cont::internal::ArrayManagerExecutionShareWithControl<T, StorageTag>
|
||||
{
|
||||
public:
|
||||
typedef vtkm::cont::internal::ArrayManagerExecutionShareWithControl<T, StorageTag> Superclass;
|
||||
using Superclass = vtkm::cont::internal::ArrayManagerExecutionShareWithControl<T, StorageTag>;
|
||||
using ValueType = typename Superclass::ValueType;
|
||||
using PortalType = typename Superclass::PortalType;
|
||||
using PortalConstType = typename Superclass::PortalConstType;
|
||||
|
@ -41,7 +41,7 @@ class ArrayManagerExecution<T, StorageTag, vtkm::cont::DeviceAdapterTagTBB>
|
||||
: public vtkm::cont::internal::ArrayManagerExecutionShareWithControl<T, StorageTag>
|
||||
{
|
||||
public:
|
||||
typedef vtkm::cont::internal::ArrayManagerExecutionShareWithControl<T, StorageTag> Superclass;
|
||||
using Superclass = vtkm::cont::internal::ArrayManagerExecutionShareWithControl<T, StorageTag>;
|
||||
using ValueType = typename Superclass::ValueType;
|
||||
using PortalType = typename Superclass::PortalType;
|
||||
using PortalConstType = typename Superclass::PortalConstType;
|
||||
|
@ -136,8 +136,8 @@ public:
|
||||
VTKM_CONT static void Sort(vtkm::cont::ArrayHandle<T, Container>& values,
|
||||
BinaryCompare binary_compare)
|
||||
{
|
||||
typedef typename vtkm::cont::ArrayHandle<T, Container>::template ExecutionTypes<
|
||||
vtkm::cont::DeviceAdapterTagTBB>::Portal PortalType;
|
||||
using PortalType = typename vtkm::cont::ArrayHandle<T, Container>::template ExecutionTypes<
|
||||
vtkm::cont::DeviceAdapterTagTBB>::Portal;
|
||||
PortalType arrayPortal = values.PrepareForInPlace(vtkm::cont::DeviceAdapterTagTBB());
|
||||
|
||||
using IteratorsType = vtkm::cont::ArrayPortalToIterators<PortalType>;
|
||||
@ -167,7 +167,7 @@ public:
|
||||
|
||||
using ValueType = vtkm::cont::ArrayHandle<U, StorageU>;
|
||||
using IndexType = vtkm::cont::ArrayHandle<vtkm::Id>;
|
||||
typedef vtkm::cont::ArrayHandleZip<KeyType, IndexType> ZipHandleType;
|
||||
using ZipHandleType = vtkm::cont::ArrayHandleZip<KeyType, IndexType>;
|
||||
|
||||
IndexType indexArray;
|
||||
ValueType valuesScattered;
|
||||
@ -187,7 +187,7 @@ public:
|
||||
else
|
||||
{
|
||||
using ValueType = vtkm::cont::ArrayHandle<U, StorageU>;
|
||||
typedef vtkm::cont::ArrayHandleZip<KeyType, ValueType> ZipHandleType;
|
||||
using ZipHandleType = vtkm::cont::ArrayHandleZip<KeyType, ValueType>;
|
||||
|
||||
ZipHandleType zipHandle = vtkm::cont::make_ArrayHandleZip(keys, values);
|
||||
Sort(zipHandle, vtkm::cont::internal::KeyCompare<T, U, Compare>(comp));
|
||||
|
@ -171,7 +171,7 @@ VTKM_CONT static T ReducePortals(InputPortalType inputPortal,
|
||||
T initialValue,
|
||||
BinaryOperationType binaryOperation)
|
||||
{
|
||||
typedef internal::WrappedBinaryOperator<T, BinaryOperationType> WrappedBinaryOp;
|
||||
using WrappedBinaryOp = internal::WrappedBinaryOperator<T, BinaryOperationType>;
|
||||
|
||||
WrappedBinaryOp wrappedBinaryOp(binaryOperation);
|
||||
ReduceBody<InputPortalType, T, WrappedBinaryOp> body(inputPortal, initialValue, wrappedBinaryOp);
|
||||
@ -399,7 +399,7 @@ ScanInclusivePortals(InputPortalType inputPortal,
|
||||
{
|
||||
using ValueType = typename std::remove_reference<typename OutputPortalType::ValueType>::type;
|
||||
|
||||
typedef internal::WrappedBinaryOperator<ValueType, BinaryOperationType> WrappedBinaryOp;
|
||||
using WrappedBinaryOp = internal::WrappedBinaryOperator<ValueType, BinaryOperationType>;
|
||||
|
||||
WrappedBinaryOp wrappedBinaryOp(binaryOperation);
|
||||
ScanInclusiveBody<InputPortalType, OutputPortalType, WrappedBinaryOp> body(
|
||||
@ -422,7 +422,7 @@ ScanExclusivePortals(
|
||||
{
|
||||
using ValueType = typename std::remove_reference<typename OutputPortalType::ValueType>::type;
|
||||
|
||||
typedef internal::WrappedBinaryOperator<ValueType, BinaryOperationType> WrappedBinaryOp;
|
||||
using WrappedBinaryOp = internal::WrappedBinaryOperator<ValueType, BinaryOperationType>;
|
||||
|
||||
WrappedBinaryOp wrappedBinaryOp(binaryOperation);
|
||||
ScanExclusiveBody<InputPortalType, OutputPortalType, WrappedBinaryOp> body(
|
||||
|
@ -91,7 +91,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make1DUniformDataSet0()
|
||||
inline vtkm::cont::DataSet MakeTestDataSet::Make1DExplicitDataSet0()
|
||||
{
|
||||
const int nVerts = 5;
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
std::vector<CoordType> coords(nVerts);
|
||||
coords[0] = CoordType(0.0f, 0.f, 0.f);
|
||||
coords[1] = CoordType(1.0f, 0.f, 0.f);
|
||||
@ -349,7 +349,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make2DExplicitDataSet0()
|
||||
// Coordinates
|
||||
const int nVerts = 16;
|
||||
const int nCells = 7;
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
std::vector<CoordType> coords(nVerts);
|
||||
|
||||
coords[0] = CoordType(0, 0, 0);
|
||||
@ -441,7 +441,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet0()
|
||||
vtkm::cont::DataSetBuilderExplicit dsb;
|
||||
|
||||
const int nVerts = 5;
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
std::vector<CoordType> coords(nVerts);
|
||||
coords[0] = CoordType(0, 0, 0);
|
||||
coords[1] = CoordType(1, 0, 0);
|
||||
@ -522,7 +522,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet1()
|
||||
vtkm::cont::DataSetBuilderExplicit dsb;
|
||||
|
||||
const int nVerts = 5;
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
std::vector<CoordType> coords(nVerts);
|
||||
|
||||
coords[0] = CoordType(0, 0, 0);
|
||||
@ -560,7 +560,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet2()
|
||||
vtkm::cont::DataSet dataSet;
|
||||
|
||||
const int nVerts = 8;
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
CoordType coordinates[nVerts] = {
|
||||
CoordType(0, 0, 0), // 0
|
||||
CoordType(1, 0, 0), // 1
|
||||
@ -608,7 +608,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet4()
|
||||
vtkm::cont::DataSet dataSet;
|
||||
|
||||
const int nVerts = 12;
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
CoordType coordinates[nVerts] = {
|
||||
CoordType(0, 0, 0), //0
|
||||
CoordType(1, 0, 0), //1
|
||||
@ -670,7 +670,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet3()
|
||||
vtkm::cont::DataSet dataSet;
|
||||
|
||||
const int nVerts = 4;
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
CoordType coordinates[nVerts] = {
|
||||
CoordType(0, 0, 0), CoordType(1, 0, 0), CoordType(1, 0, 1), CoordType(0, 1, 0)
|
||||
};
|
||||
@ -707,7 +707,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet5()
|
||||
vtkm::cont::DataSet dataSet;
|
||||
|
||||
const int nVerts = 11;
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
CoordType coordinates[nVerts] = {
|
||||
CoordType(0, 0, 0), //0
|
||||
CoordType(1, 0, 0), //1
|
||||
@ -787,7 +787,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet6()
|
||||
// Coordinates
|
||||
const int nVerts = 8;
|
||||
const int nCells = 8;
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
std::vector<CoordType> coords = { { -0.707f, -0.354f, -0.354f }, { 0.000f, -0.854f, 0.146f },
|
||||
{ 0.000f, -0.146f, 0.854f }, { -0.707f, 0.354f, 0.354f },
|
||||
{ 10.0f, 10.0f, 10.0f }, { 5.0f, 5.0f, 5.0f },
|
||||
@ -864,7 +864,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSetPolygonal()
|
||||
// Coordinates
|
||||
const int nVerts = 8;
|
||||
const int nCells = 8;
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
std::vector<CoordType> coords = { { -0.707f, -0.354f, -0.354f }, { 0.000f, -0.854f, 0.146f },
|
||||
{ 0.000f, -0.146f, 0.854f }, { -0.707f, 0.354f, 0.354f },
|
||||
{ 0.000f, 0.146f, -0.854f }, { 0.000f, 0.854f, -0.146f },
|
||||
@ -943,7 +943,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSetCowNose()
|
||||
{
|
||||
// prepare data array
|
||||
const int nVerts = 17;
|
||||
typedef vtkm::Vec<vtkm::Float64, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float64, 3>;
|
||||
CoordType coordinates[nVerts] = {
|
||||
CoordType(0.0480879, 0.151874, 0.107334), CoordType(0.0293568, 0.245532, 0.125337),
|
||||
CoordType(0.0224398, 0.246495, 0.1351), CoordType(0.0180085, 0.20436, 0.145316),
|
||||
|
@ -123,7 +123,7 @@ private:
|
||||
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapterTag>;
|
||||
|
||||
typedef vtkm::worklet::DispatcherMapField<PassThrough, DeviceAdapterTag> DispatcherPassThrough;
|
||||
using DispatcherPassThrough = vtkm::worklet::DispatcherMapField<PassThrough, DeviceAdapterTag>;
|
||||
struct VerifyEmptyArrays
|
||||
{
|
||||
template <typename T>
|
||||
|
@ -68,7 +68,7 @@ private:
|
||||
|
||||
static inline vtkm::cont::DataSet make_SingleTypeDataSet()
|
||||
{
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
std::vector<CoordType> coordinates;
|
||||
coordinates.push_back(CoordType(0, 0, 0));
|
||||
coordinates.push_back(CoordType(1, 0, 0));
|
||||
|
@ -72,14 +72,14 @@ struct TestingDeviceAdapter
|
||||
private:
|
||||
using StorageTag = vtkm::cont::StorageTagBasic;
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Id, StorageTag> IdArrayHandle;
|
||||
using IdArrayHandle = vtkm::cont::ArrayHandle<vtkm::Id, StorageTag>;
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::FloatDefault, StorageTag> ScalarArrayHandle;
|
||||
using ScalarArrayHandle = vtkm::cont::ArrayHandle<vtkm::FloatDefault, StorageTag>;
|
||||
|
||||
typedef vtkm::cont::internal::ArrayManagerExecution<vtkm::Id, StorageTag, DeviceAdapterTag>
|
||||
IdArrayManagerExecution;
|
||||
using IdArrayManagerExecution =
|
||||
vtkm::cont::internal::ArrayManagerExecution<vtkm::Id, StorageTag, DeviceAdapterTag>;
|
||||
|
||||
typedef vtkm::cont::internal::Storage<vtkm::Id, StorageTag> IdStorage;
|
||||
using IdStorage = vtkm::cont::internal::Storage<vtkm::Id, StorageTag>;
|
||||
|
||||
using IdPortalType = typename IdArrayHandle::template ExecutionTypes<DeviceAdapterTag>::Portal;
|
||||
using IdPortalConstType =
|
||||
@ -385,10 +385,10 @@ private:
|
||||
std::cout << "-------------------------------------------" << std::endl;
|
||||
std::cout << "Testing ArrayManagerExecution" << std::endl;
|
||||
|
||||
typedef vtkm::cont::internal::ArrayManagerExecution<vtkm::Id, StorageTagBasic, DeviceAdapterTag>
|
||||
ArrayManagerExecution;
|
||||
using ArrayManagerExecution =
|
||||
vtkm::cont::internal::ArrayManagerExecution<vtkm::Id, StorageTagBasic, DeviceAdapterTag>;
|
||||
|
||||
typedef vtkm::cont::internal::Storage<vtkm::Id, StorageTagBasic> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<vtkm::Id, StorageTagBasic>;
|
||||
|
||||
// Create original input array.
|
||||
StorageType storage;
|
||||
@ -907,8 +907,8 @@ private:
|
||||
std::cout << "-------------------------------------------------" << std::endl;
|
||||
std::cout << "Sort by keys" << std::endl;
|
||||
|
||||
typedef vtkm::Vec<FloatDefault, 3> Vec3;
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::FloatDefault, 3>, StorageTag> Vec3ArrayHandle;
|
||||
using Vec3 = vtkm::Vec<FloatDefault, 3>;
|
||||
using Vec3ArrayHandle = vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::FloatDefault, 3>, StorageTag>;
|
||||
|
||||
std::vector<vtkm::Id> testKeys(ARRAY_SIZE);
|
||||
std::vector<Vec3> testValues(testKeys.size());
|
||||
@ -1134,7 +1134,7 @@ private:
|
||||
vtkm::cont::ArrayHandleZip<IdArrayHandle, IdArrayHandle> zipped(keys, values);
|
||||
|
||||
//the output of reduce and scan inclusive should be the same
|
||||
typedef vtkm::Pair<vtkm::Id, vtkm::Id> ResultType;
|
||||
using ResultType = vtkm::Pair<vtkm::Id, vtkm::Id>;
|
||||
ResultType reduce_sum_with_intial_value =
|
||||
Algorithm::Reduce(zipped, ResultType(ARRAY_SIZE, ARRAY_SIZE));
|
||||
|
||||
@ -1272,7 +1272,7 @@ private:
|
||||
}; // output values 2
|
||||
|
||||
IdArrayHandle keys = vtkm::cont::make_ArrayHandle(inputKeys, inputLength);
|
||||
typedef vtkm::cont::ArrayHandle<ValueType, StorageTag> ValueArrayType;
|
||||
using ValueArrayType = vtkm::cont::ArrayHandle<ValueType, StorageTag>;
|
||||
ValueArrayType values1 = vtkm::cont::make_ArrayHandle(inputValues1, inputLength);
|
||||
using ConstValueArrayType = vtkm::cont::ArrayHandleConstant<ValueType>;
|
||||
ConstValueArrayType constOneArray(1.f, inputLength);
|
||||
@ -1625,8 +1625,8 @@ private:
|
||||
std::cout << "Testing Inclusive Scan with a vtkm::Vec" << std::endl;
|
||||
|
||||
{
|
||||
typedef vtkm::Vec<Float64, 3> Vec3;
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::Float64, 3>, StorageTag> Vec3ArrayHandle;
|
||||
using Vec3 = vtkm::Vec<Float64, 3>;
|
||||
using Vec3ArrayHandle = vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::Float64, 3>, StorageTag>;
|
||||
|
||||
std::vector<Vec3> testValues(ARRAY_SIZE);
|
||||
|
||||
@ -1762,8 +1762,8 @@ private:
|
||||
std::cout << "Testing Exclusive Scan with a vtkm::Vec" << std::endl;
|
||||
|
||||
{
|
||||
typedef vtkm::Vec<Float64, 3> Vec3;
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::Float64, 3>, StorageTag> Vec3ArrayHandle;
|
||||
using Vec3 = vtkm::Vec<Float64, 3>;
|
||||
using Vec3ArrayHandle = vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::Float64, 3>, StorageTag>;
|
||||
|
||||
std::vector<Vec3> testValues(ARRAY_SIZE);
|
||||
|
||||
|
@ -54,7 +54,7 @@ struct IndexSquared
|
||||
VTKM_EXEC_CONT
|
||||
ValueType operator()(vtkm::Id index) const
|
||||
{
|
||||
typedef typename vtkm::VecTraits<ValueType>::ComponentType ComponentType;
|
||||
using ComponentType = typename vtkm::VecTraits<ValueType>::ComponentType;
|
||||
return ValueType(static_cast<ComponentType>(index * index));
|
||||
}
|
||||
};
|
||||
@ -84,8 +84,8 @@ struct ValueScale
|
||||
template <typename ValueType>
|
||||
VTKM_EXEC_CONT ValueType operator()(const ValueType& v) const
|
||||
{
|
||||
typedef vtkm::VecTraits<ValueType> Traits;
|
||||
typedef typename Traits::ComponentType ComponentType;
|
||||
using Traits = vtkm::VecTraits<ValueType>;
|
||||
using ComponentType = typename Traits::ComponentType;
|
||||
|
||||
ValueType result;
|
||||
for (vtkm::IdComponent i = 0; i < Traits::GetNumberOfComponents(v); ++i)
|
||||
@ -156,10 +156,10 @@ private:
|
||||
//hard-coded to make a vtkm::Vec<ValueType,3> composite vector
|
||||
//for each ValueType.
|
||||
|
||||
typedef typename vtkm::cont::ArrayHandleCompositeVectorType<
|
||||
using CompositeHandleType = typename vtkm::cont::ArrayHandleCompositeVectorType<
|
||||
vtkm::cont::ArrayHandle<ValueType>,
|
||||
vtkm::cont::ArrayHandle<ValueType>,
|
||||
vtkm::cont::ArrayHandle<ValueType>>::type CompositeHandleType;
|
||||
vtkm::cont::ArrayHandle<ValueType>>::type;
|
||||
|
||||
const ValueType value = TestValue(13, ValueType());
|
||||
std::vector<ValueType> compositeData(ARRAY_SIZE, value);
|
||||
@ -224,7 +224,7 @@ private:
|
||||
template <typename ValueType>
|
||||
VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const
|
||||
{
|
||||
typedef typename vtkm::VecTraits<ValueType>::ComponentType ComponentType;
|
||||
using ComponentType = typename vtkm::VecTraits<ValueType>::ComponentType;
|
||||
|
||||
const vtkm::Id length = ARRAY_SIZE;
|
||||
|
||||
@ -262,7 +262,7 @@ private:
|
||||
VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const
|
||||
{
|
||||
const vtkm::Id length = ARRAY_SIZE;
|
||||
typedef ::fancy_array_detail::IndexSquared<ValueType> FunctorType;
|
||||
using FunctorType = ::fancy_array_detail::IndexSquared<ValueType>;
|
||||
FunctorType functor;
|
||||
|
||||
vtkm::cont::ArrayHandleImplicit<FunctorType> implicit =
|
||||
@ -295,12 +295,12 @@ private:
|
||||
{
|
||||
const vtkm::Id length = ARRAY_SIZE;
|
||||
|
||||
typedef ::fancy_array_detail::IndexSquared<ValueType> FunctorType;
|
||||
typedef typename vtkm::VecTraits<ValueType>::ComponentType ComponentType;
|
||||
using FunctorType = ::fancy_array_detail::IndexSquared<ValueType>;
|
||||
using ComponentType = typename vtkm::VecTraits<ValueType>::ComponentType;
|
||||
|
||||
typedef vtkm::cont::ArrayHandleImplicit<FunctorType> ValueHandleType;
|
||||
typedef vtkm::cont::ArrayHandle<ValueType> BasicArrayType;
|
||||
typedef vtkm::cont::ArrayHandleConcatenate<ValueHandleType, BasicArrayType> ConcatenateType;
|
||||
using ValueHandleType = vtkm::cont::ArrayHandleImplicit<FunctorType>;
|
||||
using BasicArrayType = vtkm::cont::ArrayHandle<ValueType>;
|
||||
using ConcatenateType = vtkm::cont::ArrayHandleConcatenate<ValueHandleType, BasicArrayType>;
|
||||
|
||||
FunctorType functor;
|
||||
for (vtkm::Id start_pos = 0; start_pos < length; start_pos += length / 4)
|
||||
@ -355,12 +355,12 @@ private:
|
||||
{
|
||||
const vtkm::Id length = ARRAY_SIZE;
|
||||
|
||||
typedef ::fancy_array_detail::IndexSquared<ValueType> FunctorType;
|
||||
using FunctorType = ::fancy_array_detail::IndexSquared<ValueType>;
|
||||
|
||||
typedef vtkm::cont::ArrayHandleCounting<vtkm::Id> KeyHandleType;
|
||||
typedef vtkm::cont::ArrayHandleImplicit<FunctorType> ValueHandleType;
|
||||
typedef vtkm::cont::ArrayHandlePermutation<KeyHandleType, ValueHandleType>
|
||||
PermutationHandleType;
|
||||
using KeyHandleType = vtkm::cont::ArrayHandleCounting<vtkm::Id>;
|
||||
using ValueHandleType = vtkm::cont::ArrayHandleImplicit<FunctorType>;
|
||||
using PermutationHandleType =
|
||||
vtkm::cont::ArrayHandlePermutation<KeyHandleType, ValueHandleType>;
|
||||
|
||||
FunctorType functor;
|
||||
for (vtkm::Id start_pos = 0; start_pos < length; start_pos += length / 4)
|
||||
@ -404,7 +404,7 @@ private:
|
||||
template <typename ValueType>
|
||||
VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const
|
||||
{
|
||||
typedef fancy_array_detail::ValueScale FunctorType;
|
||||
using FunctorType = fancy_array_detail::ValueScale;
|
||||
|
||||
const vtkm::Id length = ARRAY_SIZE;
|
||||
FunctorType functor(2.0);
|
||||
@ -441,9 +441,9 @@ private:
|
||||
template <typename ValueType>
|
||||
VTKM_CONT void operator()(const ValueType vtkmNotUsed(v)) const
|
||||
{
|
||||
typedef typename vtkm::VecTraits<ValueType>::ComponentType ComponentType;
|
||||
typedef ComponentType OutputValueType;
|
||||
typedef fancy_array_detail::ValueSquared<OutputValueType> FunctorType;
|
||||
using ComponentType = typename vtkm::VecTraits<ValueType>::ComponentType;
|
||||
using OutputValueType = ComponentType;
|
||||
using FunctorType = fancy_array_detail::ValueSquared<OutputValueType>;
|
||||
|
||||
vtkm::Id length = ARRAY_SIZE;
|
||||
FunctorType functor;
|
||||
@ -485,7 +485,7 @@ private:
|
||||
template <typename CastToType>
|
||||
VTKM_CONT void operator()(CastToType vtkmNotUsed(type)) const
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandleIndex InputArrayType;
|
||||
using InputArrayType = vtkm::cont::ArrayHandleIndex;
|
||||
|
||||
InputArrayType input(ARRAY_SIZE);
|
||||
vtkm::cont::ArrayHandleCast<CastToType, InputArrayType> castArray =
|
||||
@ -515,7 +515,7 @@ private:
|
||||
template <typename ComponentType>
|
||||
VTKM_CONT void operator()(ComponentType) const
|
||||
{
|
||||
typedef vtkm::Vec<ComponentType, NUM_COMPONENTS> ValueType;
|
||||
using ValueType = vtkm::Vec<ComponentType, NUM_COMPONENTS>;
|
||||
|
||||
ComponentType testValues[ARRAY_SIZE * NUM_COMPONENTS];
|
||||
|
||||
@ -564,7 +564,7 @@ private:
|
||||
template <typename ComponentType>
|
||||
VTKM_CONT void operator()(ComponentType) const
|
||||
{
|
||||
typedef vtkm::Vec<ComponentType, NUM_COMPONENTS> ValueType;
|
||||
using ValueType = vtkm::Vec<ComponentType, NUM_COMPONENTS>;
|
||||
|
||||
vtkm::cont::ArrayHandle<ValueType> baseArray;
|
||||
baseArray.Allocate(ARRAY_SIZE);
|
||||
@ -721,9 +721,9 @@ private:
|
||||
template <typename KeyType, typename ValueType>
|
||||
VTKM_CONT void operator()(vtkm::Pair<KeyType, ValueType> vtkmNotUsed(pair)) const
|
||||
{
|
||||
typedef vtkm::Pair<KeyType, ValueType> PairType;
|
||||
typedef typename vtkm::VecTraits<KeyType>::ComponentType KeyComponentType;
|
||||
typedef typename vtkm::VecTraits<ValueType>::ComponentType ValueComponentType;
|
||||
using PairType = vtkm::Pair<KeyType, ValueType>;
|
||||
using KeyComponentType = typename vtkm::VecTraits<KeyType>::ComponentType;
|
||||
using ValueComponentType = typename vtkm::VecTraits<ValueType>::ComponentType;
|
||||
|
||||
KeyType testKeys[ARRAY_SIZE];
|
||||
ValueType testValues[ARRAY_SIZE];
|
||||
@ -768,7 +768,7 @@ private:
|
||||
using DiscardHandleType = vtkm::cont::ArrayHandleDiscard<ValueType>;
|
||||
using ComponentType = typename vtkm::VecTraits<ValueType>::ComponentType;
|
||||
|
||||
typedef typename vtkm::cont::ArrayHandle<ValueType>::PortalControl Portal;
|
||||
using Portal = typename vtkm::cont::ArrayHandle<ValueType>::PortalControl;
|
||||
|
||||
const vtkm::Id length = ARRAY_SIZE;
|
||||
|
||||
@ -798,14 +798,14 @@ private:
|
||||
{
|
||||
const vtkm::Id length = ARRAY_SIZE;
|
||||
|
||||
typedef vtkm::cont::ArrayHandleCounting<vtkm::Id> KeyHandleType;
|
||||
typedef vtkm::cont::ArrayHandle<ValueType> ValueHandleType;
|
||||
typedef vtkm::cont::ArrayHandlePermutation<KeyHandleType, ValueHandleType>
|
||||
PermutationHandleType;
|
||||
using KeyHandleType = vtkm::cont::ArrayHandleCounting<vtkm::Id>;
|
||||
using ValueHandleType = vtkm::cont::ArrayHandle<ValueType>;
|
||||
using PermutationHandleType =
|
||||
vtkm::cont::ArrayHandlePermutation<KeyHandleType, ValueHandleType>;
|
||||
|
||||
typedef typename vtkm::VecTraits<ValueType>::ComponentType ComponentType;
|
||||
using ComponentType = typename vtkm::VecTraits<ValueType>::ComponentType;
|
||||
vtkm::cont::ArrayHandle<ValueType> input;
|
||||
typedef typename vtkm::cont::ArrayHandle<ValueType>::PortalControl Portal;
|
||||
using Portal = typename vtkm::cont::ArrayHandle<ValueType>::PortalControl;
|
||||
input.Allocate(length);
|
||||
Portal inputPortal = input.GetPortalControl();
|
||||
for (vtkm::Id i = 0; i < length; ++i)
|
||||
@ -841,9 +841,9 @@ private:
|
||||
template <typename KeyType, typename ValueType>
|
||||
VTKM_CONT void operator()(vtkm::Pair<KeyType, ValueType> vtkmNotUsed(pair)) const
|
||||
{
|
||||
typedef vtkm::Pair<KeyType, ValueType> PairType;
|
||||
typedef typename vtkm::VecTraits<KeyType>::ComponentType KeyComponentType;
|
||||
typedef typename vtkm::VecTraits<ValueType>::ComponentType ValueComponentType;
|
||||
using PairType = vtkm::Pair<KeyType, ValueType>;
|
||||
using KeyComponentType = typename vtkm::VecTraits<KeyType>::ComponentType;
|
||||
using ValueComponentType = typename vtkm::VecTraits<ValueType>::ComponentType;
|
||||
|
||||
PairType testKeysAndValues[ARRAY_SIZE];
|
||||
for (vtkm::Id i = 0; i < ARRAY_SIZE; ++i)
|
||||
|
@ -71,7 +71,7 @@ void EvaluateOnCoordinates(vtkm::cont::CoordinateSystem points,
|
||||
vtkm::cont::ArrayHandle<vtkm::FloatDefault>& values,
|
||||
DeviceAdapter device)
|
||||
{
|
||||
typedef vtkm::worklet::DispatcherMapField<EvaluateImplicitFunction, DeviceAdapter> EvalDispatcher;
|
||||
using EvalDispatcher = vtkm::worklet::DispatcherMapField<EvaluateImplicitFunction, DeviceAdapter>;
|
||||
|
||||
EvaluateImplicitFunction eval(function.PrepareForExecution(device));
|
||||
EvalDispatcher(eval).Invoke(points, values);
|
||||
|
@ -67,7 +67,7 @@ vtkm::cont::ArrayHandle<ValueType, StorageTag> MakeInputArray(int arrayId)
|
||||
}
|
||||
|
||||
// Make an array handle that points to this buffer.
|
||||
typedef vtkm::cont::ArrayHandle<ValueType, StorageTag> ArrayHandleType;
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandle<ValueType, StorageTag>;
|
||||
ArrayHandleType bufferHandle = vtkm::cont::make_ArrayHandle(buffer, ARRAY_SIZE);
|
||||
|
||||
// When this function returns, the array is going to go out of scope, which
|
||||
@ -87,7 +87,7 @@ void CheckArray(const vtkm::cont::ArrayHandle<ValueType, C>& outArray,
|
||||
{
|
||||
// ArrayHandleCompositeVector currently does not implement the ability to
|
||||
// get to values on the control side, so copy to an array that is accessible.
|
||||
typedef vtkm::cont::ArrayHandle<ValueType, StorageTag> ArrayHandleType;
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandle<ValueType, StorageTag>;
|
||||
ArrayHandleType arrayCopy;
|
||||
vtkm::cont::DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagSerial>::Copy(outArray, arrayCopy);
|
||||
|
||||
@ -113,8 +113,8 @@ void TryScalarArray()
|
||||
std::cout << "Creating a scalar array from one of " << inComponents << " components."
|
||||
<< std::endl;
|
||||
|
||||
typedef vtkm::Vec<vtkm::FloatDefault, inComponents> InValueType;
|
||||
typedef vtkm::cont::ArrayHandle<InValueType, StorageTag> InArrayType;
|
||||
using InValueType = vtkm::Vec<vtkm::FloatDefault, inComponents>;
|
||||
using InArrayType = vtkm::cont::ArrayHandle<InValueType, StorageTag>;
|
||||
int inArrayId = 0;
|
||||
InArrayType inArray = MakeInputArray<InValueType>(inArrayId);
|
||||
|
||||
@ -259,8 +259,8 @@ void TrySpecialArrays()
|
||||
using ArrayType2 = vtkm::cont::ArrayHandleConstant<vtkm::Id>;
|
||||
ArrayType2 array2(295, ARRAY_SIZE);
|
||||
|
||||
typedef vtkm::cont::ArrayHandleCompositeVectorType<ArrayType1, ArrayType2>::type
|
||||
CompositeArrayType;
|
||||
using CompositeArrayType =
|
||||
vtkm::cont::ArrayHandleCompositeVectorType<ArrayType1, ArrayType2>::type;
|
||||
|
||||
CompositeArrayType compositeArray =
|
||||
vtkm::cont::make_ArrayHandleCompositeVector(array1, 0, array2, 0);
|
||||
@ -281,7 +281,7 @@ void TestBadArrayLengths()
|
||||
{
|
||||
std::cout << "Checking behavior when size of input arrays do not agree." << std::endl;
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::FloatDefault, StorageTag> InArrayType;
|
||||
using InArrayType = vtkm::cont::ArrayHandle<vtkm::FloatDefault, StorageTag>;
|
||||
InArrayType longInArray = MakeInputArray<vtkm::FloatDefault>(0);
|
||||
InArrayType shortInArray = MakeInputArray<vtkm::FloatDefault>(1);
|
||||
shortInArray.Shrink(ARRAY_SIZE / 2);
|
||||
|
@ -60,8 +60,8 @@ void TestConcatenateEmptyArray()
|
||||
|
||||
using CoeffValueType = vtkm::Float64;
|
||||
using CoeffArrayTypeTmp = vtkm::cont::ArrayHandle<CoeffValueType>;
|
||||
typedef vtkm::cont::ArrayHandleConcatenate<CoeffArrayTypeTmp, CoeffArrayTypeTmp> ArrayConcat;
|
||||
typedef vtkm::cont::ArrayHandleConcatenate<ArrayConcat, CoeffArrayTypeTmp> ArrayConcat2;
|
||||
using ArrayConcat = vtkm::cont::ArrayHandleConcatenate<CoeffArrayTypeTmp, CoeffArrayTypeTmp>;
|
||||
using ArrayConcat2 = vtkm::cont::ArrayHandleConcatenate<ArrayConcat, CoeffArrayTypeTmp>;
|
||||
|
||||
CoeffArrayTypeTmp arr1 = vtkm::cont::make_ArrayHandle(vec);
|
||||
CoeffArrayTypeTmp arr2, arr3;
|
||||
|
@ -90,9 +90,9 @@ struct TemplatedTests
|
||||
{
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandleCounting<ValueType>;
|
||||
|
||||
typedef vtkm::cont::
|
||||
ArrayHandle<ValueType, typename vtkm::cont::internal::ArrayHandleCountingTraits<ValueType>::Tag>
|
||||
ArrayHandleType2;
|
||||
using ArrayHandleType2 = vtkm::cont::ArrayHandle<
|
||||
ValueType,
|
||||
typename vtkm::cont::internal::ArrayHandleCountingTraits<ValueType>::Tag>;
|
||||
|
||||
using PortalType = typename ArrayHandleType::PortalConstControl;
|
||||
|
||||
|
@ -186,8 +186,8 @@ template <typename ValueType>
|
||||
struct PermutationTests
|
||||
{
|
||||
using IndexArrayType = vtkm::cont::ArrayHandleImplicit<DoubleIndexFunctor>;
|
||||
typedef vtkm::cont::ArrayHandle<ValueType, vtkm::cont::StorageTagBasic> ValueArrayType;
|
||||
typedef vtkm::cont::ArrayHandlePermutation<IndexArrayType, ValueArrayType> PermutationArrayType;
|
||||
using ValueArrayType = vtkm::cont::ArrayHandle<ValueType, vtkm::cont::StorageTagBasic>;
|
||||
using PermutationArrayType = vtkm::cont::ArrayHandlePermutation<IndexArrayType, ValueArrayType>;
|
||||
|
||||
using Device = VTKM_DEFAULT_DEVICE_ADAPTER_TAG;
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<Device>;
|
||||
|
@ -117,12 +117,11 @@ struct TransformTests
|
||||
using OutputValueType = typename vtkm::VecTraits<InputValueType>::ComponentType;
|
||||
using FunctorType = MySquare<OutputValueType>;
|
||||
|
||||
typedef vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandle<InputValueType>, FunctorType>
|
||||
TransformHandle;
|
||||
using TransformHandle =
|
||||
vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandle<InputValueType>, FunctorType>;
|
||||
|
||||
typedef vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandleCounting<InputValueType>,
|
||||
FunctorType>
|
||||
CountingTransformHandle;
|
||||
using CountingTransformHandle =
|
||||
vtkm::cont::ArrayHandleTransform<vtkm::cont::ArrayHandleCounting<InputValueType>, FunctorType>;
|
||||
|
||||
using Device = VTKM_DEFAULT_DEVICE_ADAPTER_TAG;
|
||||
using Algorithm = vtkm::cont::DeviceAdapterAlgorithm<Device>;
|
||||
|
@ -25,7 +25,7 @@
|
||||
namespace
|
||||
{
|
||||
|
||||
typedef vtkm::Vec<vtkm::FloatDefault, 3> Vector3;
|
||||
using Vector3 = vtkm::Vec<vtkm::FloatDefault, 3>;
|
||||
|
||||
const vtkm::Id3 DIMENSIONS(16, 18, 5);
|
||||
const vtkm::Id NUM_POINTS = 1440;
|
||||
|
@ -56,7 +56,7 @@ bool TestArrayHandle(const vtkm::cont::ArrayHandle<T, Storage>& ah,
|
||||
|
||||
inline vtkm::cont::DataSet make_SingleTypeDataSet()
|
||||
{
|
||||
typedef vtkm::Vec<vtkm::Float32, 3> CoordType;
|
||||
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
|
||||
std::vector<CoordType> coordinates;
|
||||
coordinates.push_back(CoordType(0, 0, 0));
|
||||
coordinates.push_back(CoordType(1, 0, 0));
|
||||
@ -114,9 +114,9 @@ void TestDataSet_Explicit()
|
||||
|
||||
subset.PrintSummary(std::cout);
|
||||
|
||||
typedef SubsetType::ExecutionTypes<vtkm::cont::DeviceAdapterTagSerial,
|
||||
vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell>::ExecObjectType ExecObjectType;
|
||||
using ExecObjectType = SubsetType::ExecutionTypes<vtkm::cont::DeviceAdapterTagSerial,
|
||||
vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell>::ExecObjectType;
|
||||
|
||||
ExecObjectType execConnectivity;
|
||||
execConnectivity = subset.PrepareForInput(vtkm::cont::DeviceAdapterTagSerial(),
|
||||
|
@ -78,10 +78,8 @@ class ArrayManagerExecution<T, StorageTag, vtkm::cont::DeviceAdapterTagTestAlgor
|
||||
vtkm::cont::DeviceAdapterTagSerial>
|
||||
{
|
||||
public:
|
||||
typedef vtkm::cont::internal::ArrayManagerExecution<T,
|
||||
StorageTag,
|
||||
vtkm::cont::DeviceAdapterTagSerial>
|
||||
Superclass;
|
||||
using Superclass =
|
||||
vtkm::cont::internal::ArrayManagerExecution<T, StorageTag, vtkm::cont::DeviceAdapterTagSerial>;
|
||||
using ValueType = typename Superclass::ValueType;
|
||||
using PortalType = typename Superclass::PortalType;
|
||||
using PortalConstType = typename Superclass::PortalConstType;
|
||||
|
@ -84,7 +84,7 @@ template <typename T>
|
||||
class ArrayHandleWithUnusualStorage
|
||||
: public vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagImplicit<UnusualPortal<T>>>
|
||||
{
|
||||
typedef vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagImplicit<UnusualPortal<T>>> Superclass;
|
||||
using Superclass = vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagImplicit<UnusualPortal<T>>>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -44,9 +44,9 @@ const vtkm::Id ARRAY_SIZE = 10;
|
||||
template <typename T>
|
||||
struct TemplatedTests
|
||||
{
|
||||
typedef vtkm::cont::internal::Storage<T, vtkm::cont::StorageTagBasic> StorageType;
|
||||
typedef typename StorageType::ValueType ValueType;
|
||||
typedef typename StorageType::PortalType PortalType;
|
||||
using StorageType = vtkm::cont::internal::Storage<T, vtkm::cont::StorageTagBasic>;
|
||||
using ValueType = typename StorageType::ValueType;
|
||||
using PortalType = typename StorageType::PortalType;
|
||||
|
||||
void SetStorage(StorageType& array, const ValueType& value)
|
||||
{
|
||||
@ -74,7 +74,7 @@ struct TemplatedTests
|
||||
|
||||
void TestAlignedAllocatorSTL()
|
||||
{
|
||||
typedef typename StorageType::AllocatorType Allocator;
|
||||
using Allocator = typename StorageType::AllocatorType;
|
||||
std::vector<ValueType, Allocator> vec(ARRAY_SIZE, ValueType());
|
||||
StorageType store(&vec[0], ARRAY_SIZE);
|
||||
}
|
||||
@ -83,10 +83,9 @@ struct TemplatedTests
|
||||
// STL containers
|
||||
void CompileSTLAllocator()
|
||||
{
|
||||
typedef typename StorageType::AllocatorType Allocator;
|
||||
typedef
|
||||
typename StorageType::AllocatorType::template rebind<std::pair<ValueType, ValueType>>::other
|
||||
PairAllocator;
|
||||
using Allocator = typename StorageType::AllocatorType;
|
||||
using PairAllocator =
|
||||
typename StorageType::AllocatorType::template rebind<std::pair<ValueType, ValueType>>::other;
|
||||
std::vector<ValueType, Allocator> v;
|
||||
v.push_back(ValueType());
|
||||
|
||||
|
@ -58,7 +58,7 @@ template <typename T>
|
||||
struct TemplatedTests
|
||||
{
|
||||
using StorageTagType = vtkm::cont::StorageTagImplicit<TestImplicitStorage<T>>;
|
||||
typedef vtkm::cont::internal::Storage<T, StorageTagType> StorageType;
|
||||
using StorageType = vtkm::cont::internal::Storage<T, StorageTagType>;
|
||||
|
||||
using ValueType = typename StorageType::ValueType;
|
||||
using PortalType = typename StorageType::PortalType;
|
||||
|
@ -93,7 +93,7 @@ static void Run()
|
||||
TryExecuteWithList(SingleValidList(), true);
|
||||
|
||||
std::cout << "Try a list with two valid devices." << std::endl;
|
||||
typedef vtkm::ListTagBase<ValidDevice, ValidDevice> DoubleValidList;
|
||||
using DoubleValidList = vtkm::ListTagBase<ValidDevice, ValidDevice>;
|
||||
TryExecuteWithList(DoubleValidList(), true);
|
||||
|
||||
std::cout << "Try a list with only invalid device." << std::endl;
|
||||
@ -101,7 +101,7 @@ static void Run()
|
||||
TryExecuteWithList(SingleInvalidList(), false);
|
||||
|
||||
std::cout << "Try a list with an invalid and valid device." << std::endl;
|
||||
typedef vtkm::ListTagBase<InvalidDevice, ValidDevice> InvalidAndValidList;
|
||||
using InvalidAndValidList = vtkm::ListTagBase<InvalidDevice, ValidDevice>;
|
||||
TryExecuteWithList(InvalidAndValidList(), true);
|
||||
}
|
||||
|
||||
|
@ -57,8 +57,8 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 3> ParametricDerivativ
|
||||
const vtkm::Vec<ParametricCoordType, 3>& pcoords,
|
||||
vtkm::CellShapeTagHexahedron)
|
||||
{
|
||||
typedef typename FieldVecType::ComponentType FieldType;
|
||||
typedef vtkm::Vec<FieldType, 3> GradientType;
|
||||
using FieldType = typename FieldVecType::ComponentType;
|
||||
using GradientType = vtkm::Vec<FieldType, 3>;
|
||||
|
||||
GradientType pc(pcoords);
|
||||
GradientType rc = GradientType(FieldType(1)) - pc;
|
||||
@ -83,8 +83,8 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 3> ParametricDerivativ
|
||||
{
|
||||
#if 0
|
||||
// This is not working. Just leverage the hexahedron code that is working.
|
||||
typedef typename FieldVecType::ComponentType FieldType;
|
||||
typedef vtkm::Vec<FieldType,3> GradientType;
|
||||
using FieldType = typename FieldVecType::ComponentType;
|
||||
using GradientType = vtkm::Vec<FieldType,3>;
|
||||
|
||||
GradientType pc(pcoords);
|
||||
GradientType rc = GradientType(1) - pc;
|
||||
@ -107,8 +107,8 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 3> ParametricDerivativ
|
||||
{
|
||||
#if 0
|
||||
// This is not working. Just leverage the hexahedron code that is working.
|
||||
typedef typename FieldVecType::ComponentType FieldType;
|
||||
typedef vtkm::Vec<FieldType,3> GradientType;
|
||||
using FieldType = typename FieldVecType::ComponentType;
|
||||
using GradientType = vtkm::Vec<FieldType,3>;
|
||||
|
||||
GradientType pc(pcoords);
|
||||
GradientType rc = GradientType(1) - pc;
|
||||
@ -135,8 +135,8 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 2> ParametricDerivativ
|
||||
const vtkm::Vec<ParametricCoordType, 3>& pcoords,
|
||||
vtkm::CellShapeTagQuad)
|
||||
{
|
||||
typedef typename FieldVecType::ComponentType FieldType;
|
||||
typedef vtkm::Vec<FieldType, 2> GradientType;
|
||||
using FieldType = typename FieldVecType::ComponentType;
|
||||
using GradientType = vtkm::Vec<FieldType, 2>;
|
||||
|
||||
GradientType pc(static_cast<FieldType>(pcoords[0]), static_cast<FieldType>(pcoords[1]));
|
||||
GradientType rc = GradientType(FieldType(1)) - pc;
|
||||
@ -162,8 +162,8 @@ ParametricDerivative(const FieldVecType &field,
|
||||
const vtkm::Vec<ParametricCoordType,3> &pcoords,
|
||||
vtkm::CellShapeTagPolygon)
|
||||
{
|
||||
typedef typename FieldVecType::ComponentType FieldType;
|
||||
typedef vtkm::Vec<FieldType,2> GradientType;
|
||||
using FieldType = typename FieldVecType::ComponentType;
|
||||
using GradientType = vtkm::Vec<FieldType,2>;
|
||||
|
||||
const vtkm::IdComponent numPoints = field.GetNumberOfComponents();
|
||||
FieldType deltaAngle = static_cast<FieldType>(2*vtkm::Pi()/numPoints);
|
||||
@ -213,8 +213,8 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 3> CellDerivativeFor3D
|
||||
const vtkm::Vec<ParametricCoordType, 3>& pcoords,
|
||||
CellShapeTag)
|
||||
{
|
||||
typedef typename FieldVecType::ComponentType FieldType;
|
||||
typedef vtkm::Vec<FieldType, 3> GradientType;
|
||||
using FieldType = typename FieldVecType::ComponentType;
|
||||
using GradientType = vtkm::Vec<FieldType, 3>;
|
||||
|
||||
// For reasons that should become apparent in a moment, we actually want
|
||||
// the transpose of the Jacobian.
|
||||
@ -448,7 +448,7 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 3> CellDerivative(
|
||||
VTKM_ASSERT(field.GetNumberOfComponents() == 1);
|
||||
VTKM_ASSERT(wCoords.GetNumberOfComponents() == 1);
|
||||
|
||||
typedef vtkm::Vec<typename FieldVecType::ComponentType, 3> GradientType;
|
||||
using GradientType = vtkm::Vec<typename FieldVecType::ComponentType, 3>;
|
||||
return vtkm::TypeTraits<GradientType>::ZeroInitialization();
|
||||
}
|
||||
|
||||
@ -538,7 +538,7 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 3> CellDerivative(
|
||||
{
|
||||
VTKM_ASSERT(field.GetNumberOfComponents() == 2);
|
||||
|
||||
typedef typename FieldVecType::ComponentType T;
|
||||
using T = typename FieldVecType::ComponentType;
|
||||
|
||||
return vtkm::Vec<T, 3>((field[1] - field[0]) / wCoords.GetSpacing()[0], T(0), T(0));
|
||||
}
|
||||
@ -740,8 +740,8 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 3> PolygonDerivative(
|
||||
// have a non 1 to 1 mapping between parametric coordinates world coordinates
|
||||
// if the polygon is not planar or convex.
|
||||
|
||||
typedef typename FieldVecType::ComponentType FieldType;
|
||||
typedef typename WorldCoordType::ComponentType WCoordType;
|
||||
using FieldType = typename FieldVecType::ComponentType;
|
||||
using WCoordType = typename WorldCoordType::ComponentType;
|
||||
|
||||
// Find the interpolation for the center point.
|
||||
FieldType fieldCenter = field[0];
|
||||
@ -830,8 +830,8 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 3> CellDerivative(
|
||||
{
|
||||
VTKM_ASSERT(field.GetNumberOfComponents() == 4);
|
||||
|
||||
typedef typename FieldVecType::ComponentType T;
|
||||
typedef vtkm::Vec<T, 2> VecT;
|
||||
using T = typename FieldVecType::ComponentType;
|
||||
using VecT = vtkm::Vec<T, 2>;
|
||||
|
||||
VecT pc(static_cast<T>(pcoords[0]), static_cast<T>(pcoords[1]));
|
||||
VecT rc = VecT(T(1)) - pc;
|
||||
@ -1021,8 +1021,8 @@ VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 3> CellDerivative(
|
||||
{
|
||||
VTKM_ASSERT(field.GetNumberOfComponents() == 8);
|
||||
|
||||
typedef typename FieldVecType::ComponentType T;
|
||||
typedef vtkm::Vec<T, 3> VecT;
|
||||
using T = typename FieldVecType::ComponentType;
|
||||
using VecT = vtkm::Vec<T, 3>;
|
||||
|
||||
VecT pc(static_cast<T>(pcoords[0]), static_cast<T>(pcoords[1]), static_cast<T>(pcoords[2]));
|
||||
VecT rc = VecT(T(1)) - pc;
|
||||
|
@ -104,8 +104,8 @@ VTKM_EXEC typename WorldCoordVector::ComponentType ReverseInterpolateTriangle(
|
||||
// similarly.
|
||||
//
|
||||
|
||||
typedef typename WorldCoordVector::ComponentType Vector3;
|
||||
typedef typename Vector3::ComponentType T;
|
||||
using Vector3 = typename WorldCoordVector::ComponentType;
|
||||
using T = typename Vector3::ComponentType;
|
||||
|
||||
Vector3 pcoords(T(0));
|
||||
Vector3 triangleNormal = vtkm::TriangleNormal(pointWCoords[0], pointWCoords[1], pointWCoords[2]);
|
||||
@ -193,7 +193,7 @@ VTKM_EXEC vtkm::Vec<vtkm::FloatDefault, 3> CellInterpolate(
|
||||
vtkm::CellShapeTagLine,
|
||||
const vtkm::exec::FunctorBase&)
|
||||
{
|
||||
typedef vtkm::Vec<vtkm::FloatDefault, 3> T;
|
||||
using T = vtkm::Vec<vtkm::FloatDefault, 3>;
|
||||
|
||||
const T& origin = field.GetOrigin();
|
||||
const T& spacing = field.GetSpacing();
|
||||
@ -211,7 +211,7 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate(
|
||||
const vtkm::exec::FunctorBase& vtkmNotUsed(worklet))
|
||||
{
|
||||
VTKM_ASSERT(field.GetNumberOfComponents() == 3);
|
||||
typedef typename FieldVecType::ComponentType T;
|
||||
using T = typename FieldVecType::ComponentType;
|
||||
return static_cast<T>((field[0] * (1 - pcoords[0] - pcoords[1])) + (field[1] * pcoords[0]) +
|
||||
(field[2] * pcoords[1]));
|
||||
}
|
||||
@ -248,7 +248,7 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate(
|
||||
// have a non 1 to 1 mapping between parametric coordinates world coordinates
|
||||
// if the polygon is not planar or convex.
|
||||
|
||||
typedef typename FieldVecType::ComponentType FieldType;
|
||||
using FieldType = typename FieldVecType::ComponentType;
|
||||
|
||||
// Find the interpolation for the center point.
|
||||
FieldType fieldCenter = field[0];
|
||||
@ -321,7 +321,7 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate(
|
||||
{
|
||||
VTKM_ASSERT(field.GetNumberOfComponents() == 4);
|
||||
|
||||
typedef typename FieldVecType::ComponentType T;
|
||||
using T = typename FieldVecType::ComponentType;
|
||||
|
||||
T bottomInterp = vtkm::Lerp(field[0], field[1], pcoords[0]);
|
||||
T topInterp = vtkm::Lerp(field[3], field[2], pcoords[0]);
|
||||
@ -336,7 +336,7 @@ VTKM_EXEC vtkm::Vec<vtkm::FloatDefault, 3> CellInterpolate(
|
||||
vtkm::CellShapeTagQuad,
|
||||
const vtkm::exec::FunctorBase&)
|
||||
{
|
||||
typedef vtkm::Vec<vtkm::FloatDefault, 3> T;
|
||||
using T = vtkm::Vec<vtkm::FloatDefault, 3>;
|
||||
|
||||
const T& origin = field.GetOrigin();
|
||||
const T& spacing = field.GetSpacing();
|
||||
@ -355,7 +355,7 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate(
|
||||
const vtkm::exec::FunctorBase& vtkmNotUsed(worklet))
|
||||
{
|
||||
VTKM_ASSERT(field.GetNumberOfComponents() == 4);
|
||||
typedef typename FieldVecType::ComponentType T;
|
||||
using T = typename FieldVecType::ComponentType;
|
||||
return static_cast<T>((field[0] * (1 - pcoords[0] - pcoords[1] - pcoords[2])) +
|
||||
(field[1] * pcoords[0]) + (field[2] * pcoords[1]) +
|
||||
(field[3] * pcoords[2]));
|
||||
@ -371,7 +371,7 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate(
|
||||
{
|
||||
VTKM_ASSERT(field.GetNumberOfComponents() == 8);
|
||||
|
||||
typedef typename FieldVecType::ComponentType T;
|
||||
using T = typename FieldVecType::ComponentType;
|
||||
|
||||
T bottomFrontInterp = vtkm::Lerp(field[0], field[1], pcoords[0]);
|
||||
T bottomBackInterp = vtkm::Lerp(field[3], field[2], pcoords[0]);
|
||||
@ -408,7 +408,7 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate(
|
||||
{
|
||||
VTKM_ASSERT(field.GetNumberOfComponents() == 6);
|
||||
|
||||
typedef typename FieldVecType::ComponentType T;
|
||||
using T = typename FieldVecType::ComponentType;
|
||||
|
||||
T bottomInterp = static_cast<T>((field[0] * (1 - pcoords[0] - pcoords[1])) +
|
||||
(field[1] * pcoords[1]) + (field[2] * pcoords[0]));
|
||||
@ -429,7 +429,7 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate(
|
||||
{
|
||||
VTKM_ASSERT(field.GetNumberOfComponents() == 5);
|
||||
|
||||
typedef typename FieldVecType::ComponentType T;
|
||||
using T = typename FieldVecType::ComponentType;
|
||||
|
||||
T frontInterp = vtkm::Lerp(field[0], field[1], pcoords[0]);
|
||||
T backInterp = vtkm::Lerp(field[3], field[2], pcoords[0]);
|
||||
|
@ -37,7 +37,7 @@ template <typename ShapePortalType,
|
||||
class ConnectivityExplicit
|
||||
{
|
||||
public:
|
||||
typedef typename vtkm::Id SchedulingRangeType;
|
||||
using SchedulingRangeType = vtkm::Id;
|
||||
|
||||
ConnectivityExplicit() {}
|
||||
|
||||
@ -55,7 +55,7 @@ public:
|
||||
VTKM_EXEC
|
||||
SchedulingRangeType GetNumberOfElements() const { return this->Shapes.GetNumberOfValues(); }
|
||||
|
||||
typedef vtkm::CellShapeTagGeneric CellShapeTag;
|
||||
using CellShapeTag = vtkm::CellShapeTagGeneric;
|
||||
|
||||
VTKM_EXEC
|
||||
CellShapeTag GetCellShape(vtkm::Id index) const { return CellShapeTag(this->Shapes.Get(index)); }
|
||||
|
@ -35,7 +35,7 @@ template <typename PermutationPortal, typename OriginalConnectivity>
|
||||
class ConnectivityPermutedPointToCell
|
||||
{
|
||||
public:
|
||||
typedef typename OriginalConnectivity::SchedulingRangeType SchedulingRangeType;
|
||||
using SchedulingRangeType = typename OriginalConnectivity::SchedulingRangeType;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC_CONT
|
||||
@ -62,7 +62,7 @@ public:
|
||||
VTKM_EXEC
|
||||
vtkm::Id GetNumberOfElements() const { return this->Portal.GetNumberOfValues(); }
|
||||
|
||||
typedef typename OriginalConnectivity::CellShapeTag CellShapeTag;
|
||||
using CellShapeTag = typename OriginalConnectivity::CellShapeTag;
|
||||
|
||||
VTKM_EXEC
|
||||
CellShapeTag GetCellShape(vtkm::Id index) const
|
||||
@ -77,7 +77,7 @@ public:
|
||||
return this->Connectivity.GetNumberOfIndices(this->Portal.Get(index));
|
||||
}
|
||||
|
||||
typedef typename OriginalConnectivity::IndicesType IndicesType;
|
||||
using IndicesType = typename OriginalConnectivity::IndicesType;
|
||||
|
||||
template <typename IndexType>
|
||||
VTKM_EXEC IndicesType GetIndices(const IndexType& index) const
|
||||
|
@ -36,13 +36,13 @@ class ConnectivityStructured
|
||||
VTKM_IS_TOPOLOGY_ELEMENT_TAG(FromTopology);
|
||||
VTKM_IS_TOPOLOGY_ELEMENT_TAG(ToTopology);
|
||||
|
||||
typedef vtkm::internal::ConnectivityStructuredInternals<Dimension> InternalsType;
|
||||
using InternalsType = vtkm::internal::ConnectivityStructuredInternals<Dimension>;
|
||||
|
||||
typedef vtkm::internal::ConnectivityStructuredIndexHelper<FromTopology, ToTopology, Dimension>
|
||||
Helper;
|
||||
using Helper =
|
||||
vtkm::internal::ConnectivityStructuredIndexHelper<FromTopology, ToTopology, Dimension>;
|
||||
|
||||
public:
|
||||
typedef typename InternalsType::SchedulingRangeType SchedulingRangeType;
|
||||
using SchedulingRangeType = typename InternalsType::SchedulingRangeType;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
ConnectivityStructured()
|
||||
@ -65,7 +65,7 @@ public:
|
||||
VTKM_EXEC
|
||||
vtkm::Id GetNumberOfElements() const { return Helper::GetNumberOfElements(this->Internals); }
|
||||
|
||||
typedef typename Helper::CellShapeTag CellShapeTag;
|
||||
using CellShapeTag = typename Helper::CellShapeTag;
|
||||
VTKM_EXEC
|
||||
CellShapeTag GetCellShape(vtkm::Id) const { return CellShapeTag(); }
|
||||
|
||||
@ -75,7 +75,7 @@ public:
|
||||
return Helper::GetNumberOfIndices(this->Internals, index);
|
||||
}
|
||||
|
||||
typedef typename Helper::IndicesType IndicesType;
|
||||
using IndicesType = typename Helper::IndicesType;
|
||||
|
||||
template <typename IndexType>
|
||||
VTKM_EXEC IndicesType GetIndices(const IndexType& index) const
|
||||
|
@ -36,8 +36,8 @@ namespace internal
|
||||
template <typename T>
|
||||
struct Space2D
|
||||
{
|
||||
typedef vtkm::Vec<T, 3> Vec3;
|
||||
typedef vtkm::Vec<T, 2> Vec2;
|
||||
using Vec3 = vtkm::Vec<T, 3>;
|
||||
using Vec2 = vtkm::Vec<T, 2>;
|
||||
|
||||
Vec3 Origin;
|
||||
Vec3 Basis0;
|
||||
@ -94,7 +94,7 @@ template <typename FieldVecType>
|
||||
VTKM_EXEC vtkm::Vec<typename FieldVecType::ComponentType, 8> PermutePyramidToHex(
|
||||
const FieldVecType& field)
|
||||
{
|
||||
typedef typename FieldVecType::ComponentType T;
|
||||
using T = typename FieldVecType::ComponentType;
|
||||
|
||||
vtkm::Vec<T, 8> hexField;
|
||||
|
||||
|
@ -593,10 +593,10 @@ namespace detail
|
||||
template <typename WorldCoordVector, typename CellShapeTag>
|
||||
class JacobianFunctorQuad
|
||||
{
|
||||
typedef typename WorldCoordVector::ComponentType::ComponentType T;
|
||||
typedef vtkm::Vec<T, 2> Vector2;
|
||||
typedef vtkm::Matrix<T, 2, 2> Matrix2x2;
|
||||
typedef vtkm::exec::internal::Space2D<T> SpaceType;
|
||||
using T = typename WorldCoordVector::ComponentType::ComponentType;
|
||||
using Vector2 = vtkm::Vec<T, 2>;
|
||||
using Matrix2x2 = vtkm::Matrix<T, 2, 2>;
|
||||
using SpaceType = vtkm::exec::internal::Space2D<T>;
|
||||
|
||||
const WorldCoordVector* PointWCoords;
|
||||
const SpaceType* Space;
|
||||
@ -625,10 +625,10 @@ public:
|
||||
template <typename WorldCoordVector, typename CellShapeTag>
|
||||
class CoordinatesFunctorQuad
|
||||
{
|
||||
typedef typename WorldCoordVector::ComponentType::ComponentType T;
|
||||
typedef vtkm::Vec<T, 2> Vector2;
|
||||
typedef vtkm::Vec<T, 3> Vector3;
|
||||
typedef vtkm::exec::internal::Space2D<T> SpaceType;
|
||||
using T = typename WorldCoordVector::ComponentType::ComponentType;
|
||||
using Vector2 = vtkm::Vec<T, 2>;
|
||||
using Vector3 = vtkm::Vec<T, 3>;
|
||||
using SpaceType = vtkm::exec::internal::Space2D<T>;
|
||||
|
||||
const WorldCoordVector* PointWCoords;
|
||||
const SpaceType* Space;
|
||||
@ -658,9 +658,9 @@ public:
|
||||
template <typename WorldCoordVector, typename CellShapeTag>
|
||||
class JacobianFunctor3DCell
|
||||
{
|
||||
typedef typename WorldCoordVector::ComponentType::ComponentType T;
|
||||
typedef vtkm::Vec<T, 3> Vector3;
|
||||
typedef vtkm::Matrix<T, 3, 3> Matrix3x3;
|
||||
using T = typename WorldCoordVector::ComponentType::ComponentType;
|
||||
using Vector3 = vtkm::Vec<T, 3>;
|
||||
using Matrix3x3 = vtkm::Matrix<T, 3, 3>;
|
||||
|
||||
const WorldCoordVector* PointWCoords;
|
||||
|
||||
@ -683,8 +683,8 @@ public:
|
||||
template <typename WorldCoordVector, typename CellShapeTag>
|
||||
class CoordinatesFunctor3DCell
|
||||
{
|
||||
typedef typename WorldCoordVector::ComponentType::ComponentType T;
|
||||
typedef vtkm::Vec<T, 3> Vector3;
|
||||
using T = typename WorldCoordVector::ComponentType::ComponentType;
|
||||
using Vector3 = vtkm::Vec<T, 3>;
|
||||
|
||||
const WorldCoordVector* PointWCoords;
|
||||
const vtkm::exec::FunctorBase* Worklet;
|
||||
@ -784,8 +784,8 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords,
|
||||
// of this over the length of the segment, which is mag(vec). Thus, the
|
||||
// parametric coordinate is dot(vec,wcoords-pointWCoords[0])/mag(vec)^2.
|
||||
|
||||
typedef typename WorldCoordVector::ComponentType Vector3;
|
||||
typedef typename Vector3::ComponentType T;
|
||||
using Vector3 = typename WorldCoordVector::ComponentType;
|
||||
using T = typename Vector3::ComponentType;
|
||||
|
||||
Vector3 vec = pointWCoords[1] - pointWCoords[0];
|
||||
T numerator = vtkm::dot(vec, wcoords - pointWCoords[0]);
|
||||
@ -848,7 +848,7 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords,
|
||||
// have a non 1 to 1 mapping between parametric coordinates world coordinates
|
||||
// if the polygon is not planar or convex.
|
||||
|
||||
typedef typename WorldCoordVector::ComponentType WCoordType;
|
||||
using WCoordType = typename WorldCoordVector::ComponentType;
|
||||
|
||||
// Find the position of the center point.
|
||||
WCoordType wcoordCenter = pointWCoords[0];
|
||||
@ -944,9 +944,9 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords,
|
||||
{
|
||||
VTKM_ASSERT(pointWCoords.GetNumberOfComponents() == 4);
|
||||
|
||||
typedef typename WorldCoordVector::ComponentType::ComponentType T;
|
||||
typedef vtkm::Vec<T, 2> Vector2;
|
||||
typedef vtkm::Vec<T, 3> Vector3;
|
||||
using T = typename WorldCoordVector::ComponentType::ComponentType;
|
||||
using Vector2 = vtkm::Vec<T, 2>;
|
||||
using Vector3 = vtkm::Vec<T, 3>;
|
||||
|
||||
// We have an underdetermined system in 3D, so create a 2D space in the
|
||||
// plane that the polygon sits.
|
||||
@ -1003,7 +1003,7 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords,
|
||||
// d = dot((wcoords - p0), planeNormal)/dot((p1-p0), planeNormal)
|
||||
//
|
||||
|
||||
typedef typename WorldCoordVector::ComponentType Vector3;
|
||||
using Vector3 = typename WorldCoordVector::ComponentType;
|
||||
|
||||
Vector3 pcoords;
|
||||
|
||||
|
@ -45,7 +45,7 @@ struct AspectTagCellShape
|
||||
struct CellShape : vtkm::exec::arg::ExecutionSignatureTagBase
|
||||
{
|
||||
static const vtkm::IdComponent INDEX = 1;
|
||||
typedef vtkm::exec::arg::AspectTagCellShape AspectTag;
|
||||
using AspectTag = vtkm::exec::arg::AspectTagCellShape;
|
||||
};
|
||||
|
||||
template <typename FetchTag, typename ConnectivityType, typename ExecObjectType>
|
||||
@ -54,9 +54,9 @@ struct Fetch<FetchTag,
|
||||
vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>,
|
||||
ExecObjectType>
|
||||
{
|
||||
typedef vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType> ThreadIndicesType;
|
||||
using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>;
|
||||
|
||||
typedef typename ThreadIndicesType::CellShapeTag ValueType;
|
||||
using ValueType = typename ThreadIndicesType::CellShapeTag;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
|
@ -68,7 +68,7 @@ struct Fetch
|
||||
/// ValueType that is the type of object returned from \c Load and passed to
|
||||
/// \c Store.
|
||||
///
|
||||
typedef typename ExecObjectType::ValueType ValueType;
|
||||
using ValueType = typename ExecObjectType::ValueType;
|
||||
|
||||
/// \brief Load data for a work instance.
|
||||
///
|
||||
|
@ -64,14 +64,14 @@ namespace detail
|
||||
template <typename ConnectivityType, typename FieldExecObjectType>
|
||||
struct FetchArrayTopologyMapInImplementation
|
||||
{
|
||||
typedef vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType> ThreadIndicesType;
|
||||
using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>;
|
||||
|
||||
// ThreadIndicesTopologyMap has special "from" indices that are stored in a
|
||||
// Vec-like object.
|
||||
typedef typename ThreadIndicesType::IndicesFromType IndexVecType;
|
||||
using IndexVecType = typename ThreadIndicesType::IndicesFromType;
|
||||
|
||||
// The FieldExecObjectType is expected to behave like an ArrayPortal.
|
||||
typedef FieldExecObjectType PortalType;
|
||||
using PortalType = FieldExecObjectType;
|
||||
|
||||
using ValueType = vtkm::VecFromPortalPermute<IndexVecType, PortalType>;
|
||||
|
||||
@ -137,13 +137,12 @@ struct FetchArrayTopologyMapInImplementation<
|
||||
vtkm::internal::ArrayPortalUniformPointCoordinates>
|
||||
|
||||
{
|
||||
typedef vtkm::exec::ConnectivityStructured<vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell,
|
||||
NumDimensions>
|
||||
ConnectivityType;
|
||||
typedef vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType> ThreadIndicesType;
|
||||
using ConnectivityType = vtkm::exec::ConnectivityStructured<vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell,
|
||||
NumDimensions>;
|
||||
using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>;
|
||||
|
||||
typedef vtkm::VecAxisAlignedPointCoordinates<NumDimensions> ValueType;
|
||||
using ValueType = vtkm::VecAxisAlignedPointCoordinates<NumDimensions>;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
@ -167,15 +166,14 @@ struct FetchArrayTopologyMapInImplementation<
|
||||
vtkm::internal::ArrayPortalUniformPointCoordinates>
|
||||
|
||||
{
|
||||
typedef vtkm::exec::ConnectivityPermutedPointToCell<
|
||||
using ConnectivityType = vtkm::exec::ConnectivityPermutedPointToCell<
|
||||
PermutationPortal,
|
||||
vtkm::exec::ConnectivityStructured<vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell,
|
||||
NumDimensions>>
|
||||
ConnectivityType;
|
||||
typedef vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType> ThreadIndicesType;
|
||||
NumDimensions>>;
|
||||
using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>;
|
||||
|
||||
typedef vtkm::VecAxisAlignedPointCoordinates<NumDimensions> ValueType;
|
||||
using ValueType = vtkm::VecAxisAlignedPointCoordinates<NumDimensions>;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
@ -200,12 +198,12 @@ struct Fetch<vtkm::exec::arg::FetchTagArrayTopologyMapIn,
|
||||
vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>,
|
||||
ExecObjectType>
|
||||
{
|
||||
typedef vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType> ThreadIndicesType;
|
||||
using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>;
|
||||
|
||||
typedef detail::FetchArrayTopologyMapInImplementation<ConnectivityType, ExecObjectType>
|
||||
Implementation;
|
||||
using Implementation =
|
||||
detail::FetchArrayTopologyMapInImplementation<ConnectivityType, ExecObjectType>;
|
||||
|
||||
typedef typename Implementation::ValueType ValueType;
|
||||
using ValueType = typename Implementation::ValueType;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
|
@ -47,9 +47,9 @@ struct Fetch<vtkm::exec::arg::FetchTagCellSetIn,
|
||||
vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>,
|
||||
ExecObjectType>
|
||||
{
|
||||
typedef vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType> ThreadIndicesType;
|
||||
using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>;
|
||||
|
||||
typedef typename ThreadIndicesType::CellShapeTag ValueType;
|
||||
using ValueType = typename ThreadIndicesType::CellShapeTag;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
|
@ -51,7 +51,7 @@ struct AspectTagFromCount
|
||||
struct FromCount : vtkm::exec::arg::ExecutionSignatureTagBase
|
||||
{
|
||||
static const vtkm::IdComponent INDEX = 1;
|
||||
typedef vtkm::exec::arg::AspectTagFromCount AspectTag;
|
||||
using AspectTag = vtkm::exec::arg::AspectTagFromCount;
|
||||
};
|
||||
|
||||
template <typename FetchTag, typename ConnectivityType, typename ExecObjectType>
|
||||
@ -60,9 +60,9 @@ struct Fetch<FetchTag,
|
||||
vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>,
|
||||
ExecObjectType>
|
||||
{
|
||||
typedef vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType> ThreadIndicesType;
|
||||
using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>;
|
||||
|
||||
typedef vtkm::IdComponent ValueType;
|
||||
using ValueType = vtkm::IdComponent;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
|
@ -51,7 +51,7 @@ struct AspectTagFromIndices
|
||||
struct FromIndices : vtkm::exec::arg::ExecutionSignatureTagBase
|
||||
{
|
||||
static const vtkm::IdComponent INDEX = 1;
|
||||
typedef vtkm::exec::arg::AspectTagFromIndices AspectTag;
|
||||
using AspectTag = vtkm::exec::arg::AspectTagFromIndices;
|
||||
};
|
||||
|
||||
template <typename FetchTag, typename ConnectivityType, typename ExecObjectType>
|
||||
@ -60,9 +60,9 @@ struct Fetch<FetchTag,
|
||||
vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>,
|
||||
ExecObjectType>
|
||||
{
|
||||
typedef vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType> ThreadIndicesType;
|
||||
using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>;
|
||||
|
||||
typedef typename ThreadIndicesType::IndicesFromType ValueType;
|
||||
using ValueType = typename ThreadIndicesType::IndicesFromType;
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC
|
||||
|
@ -71,7 +71,7 @@ struct CellShapeInitializer<vtkm::CellShapeTagGeneric>
|
||||
template <typename ConnectivityType>
|
||||
class ThreadIndicesTopologyMap : public vtkm::exec::arg::ThreadIndicesBasic
|
||||
{
|
||||
typedef vtkm::exec::arg::ThreadIndicesBasic Superclass;
|
||||
using Superclass = vtkm::exec::arg::ThreadIndicesBasic;
|
||||
|
||||
public:
|
||||
using IndicesFromType = typename ConnectivityType::IndicesType;
|
||||
|
@ -50,7 +50,7 @@ struct AspectTagValueCount
|
||||
struct ValueCount : vtkm::exec::arg::ExecutionSignatureTagBase
|
||||
{
|
||||
static const vtkm::IdComponent INDEX = 1;
|
||||
typedef vtkm::exec::arg::AspectTagValueCount AspectTag;
|
||||
using AspectTag = vtkm::exec::arg::AspectTagValueCount;
|
||||
};
|
||||
|
||||
template <typename FetchTag, typename ExecObjectType>
|
||||
|
@ -32,7 +32,7 @@ static const vtkm::Id ARRAY_SIZE = 10;
|
||||
template <typename T>
|
||||
struct TestPortal
|
||||
{
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; }
|
||||
@ -53,11 +53,10 @@ struct FetchArrayDirectInTests
|
||||
{
|
||||
TestPortal<T> execObject;
|
||||
|
||||
typedef vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagArrayDirectIn,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesTesting,
|
||||
TestPortal<T>>
|
||||
FetchType;
|
||||
using FetchType = vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagArrayDirectIn,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesTesting,
|
||||
TestPortal<T>>;
|
||||
|
||||
FetchType fetch;
|
||||
|
||||
|
@ -34,7 +34,7 @@ static vtkm::Id g_NumSets;
|
||||
template <typename T>
|
||||
struct TestPortal
|
||||
{
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; }
|
||||
@ -66,11 +66,10 @@ struct FetchArrayDirectInTests
|
||||
{
|
||||
TestPortal<T> execObject;
|
||||
|
||||
typedef vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagArrayDirectInOut,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesTesting,
|
||||
TestPortal<T>>
|
||||
FetchType;
|
||||
using FetchType = vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagArrayDirectInOut,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesTesting,
|
||||
TestPortal<T>>;
|
||||
|
||||
FetchType fetch;
|
||||
|
||||
|
@ -34,7 +34,7 @@ static vtkm::Id g_NumSets;
|
||||
template <typename T>
|
||||
struct TestPortal
|
||||
{
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; }
|
||||
@ -58,11 +58,10 @@ struct FetchArrayDirectOutTests
|
||||
{
|
||||
TestPortal<T> execObject;
|
||||
|
||||
typedef vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagArrayDirectOut,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesTesting,
|
||||
TestPortal<T>>
|
||||
FetchType;
|
||||
using FetchType = vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagArrayDirectOut,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesTesting,
|
||||
TestPortal<T>>;
|
||||
|
||||
FetchType fetch;
|
||||
|
||||
|
@ -35,7 +35,7 @@ static const vtkm::Id ARRAY_SIZE = 10;
|
||||
template <typename T>
|
||||
struct TestPortal
|
||||
{
|
||||
typedef T ValueType;
|
||||
using ValueType = T;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; }
|
||||
@ -51,7 +51,7 @@ struct TestPortal
|
||||
|
||||
struct TestIndexPortal
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
ValueType Get(vtkm::Id index) const { return index; }
|
||||
@ -59,7 +59,7 @@ struct TestIndexPortal
|
||||
|
||||
struct TestZeroPortal
|
||||
{
|
||||
typedef vtkm::IdComponent ValueType;
|
||||
using ValueType = vtkm::IdComponent;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
ValueType Get(vtkm::Id) const { return 0; }
|
||||
@ -72,14 +72,13 @@ struct FetchArrayTopologyMapInTests
|
||||
template <typename Invocation>
|
||||
void TryInvocation(const Invocation& invocation) const
|
||||
{
|
||||
typedef typename Invocation::InputDomainType ConnectivityType;
|
||||
typedef vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType> ThreadIndicesType;
|
||||
using ConnectivityType = typename Invocation::InputDomainType;
|
||||
using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>;
|
||||
|
||||
typedef vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagArrayTopologyMapIn,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
ThreadIndicesType,
|
||||
TestPortal<T>>
|
||||
FetchType;
|
||||
using FetchType = vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagArrayTopologyMapIn,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
ThreadIndicesType,
|
||||
TestPortal<T>>;
|
||||
|
||||
FetchType fetch;
|
||||
|
||||
@ -147,8 +146,8 @@ struct TryType
|
||||
template <vtkm::IdComponent NumDimensions, vtkm::IdComponent ParamIndex, typename Invocation>
|
||||
void TryStructuredPointCoordinatesInvocation(const Invocation& invocation)
|
||||
{
|
||||
typedef typename Invocation::InputDomainType ConnectivityType;
|
||||
typedef vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType> ThreadIndicesType;
|
||||
using ConnectivityType = typename Invocation::InputDomainType;
|
||||
using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesTopologyMap<ConnectivityType>;
|
||||
|
||||
vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagArrayTopologyMapIn,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
|
@ -48,11 +48,10 @@ void TryInvocation()
|
||||
{
|
||||
TestExecutionObject execObjectStore(EXPECTED_NUMBER);
|
||||
|
||||
typedef vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagExecObject,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesTesting,
|
||||
TestExecutionObject>
|
||||
FetchType;
|
||||
using FetchType = vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagExecObject,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesTesting,
|
||||
TestExecutionObject>;
|
||||
|
||||
FetchType fetch;
|
||||
|
||||
|
@ -33,12 +33,11 @@ void TestWorkIndexFetch()
|
||||
{
|
||||
std::cout << "Trying WorkIndex fetch." << std::endl;
|
||||
|
||||
typedef vtkm::exec::arg::Fetch<
|
||||
vtkm::exec::arg::FetchTagArrayDirectIn, // Not used but probably common.
|
||||
vtkm::exec::arg::AspectTagWorkIndex,
|
||||
vtkm::exec::arg::ThreadIndicesTesting,
|
||||
vtkm::internal::NullType>
|
||||
FetchType;
|
||||
using FetchType =
|
||||
vtkm::exec::arg::Fetch<vtkm::exec::arg::FetchTagArrayDirectIn, // Not used but probably common.
|
||||
vtkm::exec::arg::AspectTagWorkIndex,
|
||||
vtkm::exec::arg::ThreadIndicesTesting,
|
||||
vtkm::internal::NullType>;
|
||||
|
||||
FetchType fetch;
|
||||
|
||||
|
@ -201,7 +201,7 @@ struct load_through_texture<
|
||||
{
|
||||
static const vtkm::IdComponent WillUseTexture = 1;
|
||||
|
||||
typedef typename std::remove_const<T>::type NonConstT;
|
||||
using NonConstT = typename std::remove_const<T>::type;
|
||||
|
||||
__device__ static T get(const thrust::system::cuda::pointer<const T>& data)
|
||||
{
|
||||
@ -217,7 +217,7 @@ struct load_through_texture<
|
||||
{
|
||||
//we need to fetch each component individually
|
||||
const vtkm::IdComponent NUM_COMPONENTS = T::NUM_COMPONENTS;
|
||||
typedef typename T::ComponentType ComponentType;
|
||||
using ComponentType = typename T::ComponentType;
|
||||
const ComponentType* recasted_data = (const ComponentType*)(data.get());
|
||||
NonConstT result;
|
||||
#pragma unroll
|
||||
@ -240,8 +240,8 @@ template <typename T>
|
||||
class ArrayPortalFromThrust : public ArrayPortalFromThrustBase
|
||||
{
|
||||
public:
|
||||
typedef T ValueType;
|
||||
typedef thrust::system::cuda::pointer<T> IteratorType;
|
||||
using ValueType = T;
|
||||
using IteratorType = thrust::system::cuda::pointer<T>;
|
||||
|
||||
VTKM_EXEC_CONT ArrayPortalFromThrust() {}
|
||||
|
||||
@ -274,14 +274,14 @@ public:
|
||||
VTKM_EXEC_CONT
|
||||
ValueType Get(vtkm::Id index) const
|
||||
{
|
||||
typedef typename ::thrust::iterator_traits<IteratorType>::difference_type SizeType;
|
||||
using SizeType = typename ::thrust::iterator_traits<IteratorType>::difference_type;
|
||||
return *(this->BeginIterator + static_cast<SizeType>(index));
|
||||
}
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
void Set(vtkm::Id index, ValueType value) const
|
||||
{
|
||||
typedef typename ::thrust::iterator_traits<IteratorType>::difference_type SizeType;
|
||||
using SizeType = typename ::thrust::iterator_traits<IteratorType>::difference_type;
|
||||
*(this->BeginIterator + static_cast<SizeType>(index)) = value;
|
||||
}
|
||||
|
||||
@ -300,8 +300,8 @@ template <typename T>
|
||||
class ConstArrayPortalFromThrust : public ArrayPortalFromThrustBase
|
||||
{
|
||||
public:
|
||||
typedef T ValueType;
|
||||
typedef thrust::system::cuda::pointer<const T> IteratorType;
|
||||
using ValueType = T;
|
||||
using IteratorType = thrust::system::cuda::pointer<const T>;
|
||||
|
||||
VTKM_EXEC_CONT ConstArrayPortalFromThrust() {}
|
||||
|
||||
@ -385,10 +385,10 @@ namespace cont
|
||||
template <typename T>
|
||||
class ArrayPortalToIterators<vtkm::exec::cuda::internal::ArrayPortalFromThrust<T>>
|
||||
{
|
||||
typedef vtkm::exec::cuda::internal::ArrayPortalFromThrust<T> PortalType;
|
||||
using PortalType = vtkm::exec::cuda::internal::ArrayPortalFromThrust<T>;
|
||||
|
||||
public:
|
||||
typedef typename PortalType::IteratorType IteratorType;
|
||||
using IteratorType = typename PortalType::IteratorType;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayPortalToIterators(const PortalType& portal)
|
||||
@ -416,10 +416,10 @@ private:
|
||||
template <typename T>
|
||||
class ArrayPortalToIterators<vtkm::exec::cuda::internal::ConstArrayPortalFromThrust<T>>
|
||||
{
|
||||
typedef vtkm::exec::cuda::internal::ConstArrayPortalFromThrust<T> PortalType;
|
||||
using PortalType = vtkm::exec::cuda::internal::ConstArrayPortalFromThrust<T>;
|
||||
|
||||
public:
|
||||
typedef typename PortalType::IteratorType IteratorType;
|
||||
using IteratorType = typename PortalType::IteratorType;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayPortalToIterators(const PortalType& portal)
|
||||
|
@ -43,7 +43,7 @@ namespace internal
|
||||
template <class ArrayPortalType>
|
||||
struct PortalValue
|
||||
{
|
||||
typedef typename ArrayPortalType::ValueType ValueType;
|
||||
using ValueType = typename ArrayPortalType::ValueType;
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
PortalValue(const ArrayPortalType& portal, vtkm::Id index)
|
||||
|
@ -70,7 +70,7 @@ destructive_accumulate_n(ConcurrentGroup& g,
|
||||
T init,
|
||||
vtkm::exec::cuda::internal::WrappedBinaryOperator<T, F> binary_op)
|
||||
{
|
||||
typedef typename ConcurrentGroup::size_type size_type;
|
||||
using size_type = typename ConcurrentGroup::size_type;
|
||||
|
||||
size_type tid = g.this_exec.index();
|
||||
|
||||
|
@ -47,11 +47,11 @@ namespace internal
|
||||
template <typename T_, typename Function>
|
||||
struct WrappedUnaryPredicate
|
||||
{
|
||||
typedef typename std::remove_const<T_>::type T;
|
||||
using T = typename std::remove_const<T_>::type;
|
||||
|
||||
//make typedefs that thust expects unary operators to have
|
||||
typedef T first_argument_type;
|
||||
typedef bool result_type;
|
||||
using first_argument_type = T;
|
||||
using result_type = bool;
|
||||
|
||||
Function m_f;
|
||||
|
||||
@ -85,12 +85,12 @@ struct WrappedUnaryPredicate
|
||||
template <typename T_, typename Function>
|
||||
struct WrappedBinaryOperator
|
||||
{
|
||||
typedef typename std::remove_const<T_>::type T;
|
||||
using T = typename std::remove_const<T_>::type;
|
||||
|
||||
//make typedefs that thust expects binary operators to have
|
||||
typedef T first_argument_type;
|
||||
typedef T second_argument_type;
|
||||
typedef T result_type;
|
||||
using first_argument_type = T;
|
||||
using second_argument_type = T;
|
||||
using result_type = T;
|
||||
|
||||
Function m_f;
|
||||
|
||||
@ -151,12 +151,12 @@ struct WrappedBinaryOperator
|
||||
template <typename T_, typename Function>
|
||||
struct WrappedBinaryPredicate
|
||||
{
|
||||
typedef typename std::remove_const<T_>::type T;
|
||||
using T = typename std::remove_const<T_>::type;
|
||||
|
||||
//make typedefs that thust expects binary operators to have
|
||||
typedef T first_argument_type;
|
||||
typedef T second_argument_type;
|
||||
typedef bool result_type;
|
||||
using first_argument_type = T;
|
||||
using second_argument_type = T;
|
||||
using result_type = bool;
|
||||
|
||||
Function m_f;
|
||||
|
||||
|
@ -54,14 +54,14 @@ struct TestExecObject
|
||||
|
||||
struct MyOutputToInputMapPortal
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id Get(vtkm::Id index) const { return index; }
|
||||
};
|
||||
|
||||
struct MyVisitArrayPortal
|
||||
{
|
||||
typedef vtkm::IdComponent ValueType;
|
||||
using ValueType = vtkm::IdComponent;
|
||||
vtkm::IdComponent Get(vtkm::Id) const { return 1; }
|
||||
};
|
||||
|
||||
@ -75,11 +75,11 @@ struct TestFetchTagOutput
|
||||
// Missing TransportTag, but we are not testing that so we can leave it out.
|
||||
struct TestControlSignatureTagInput
|
||||
{
|
||||
typedef TestFetchTagInput FetchTag;
|
||||
using FetchTag = TestFetchTagInput;
|
||||
};
|
||||
struct TestControlSignatureTagOutput
|
||||
{
|
||||
typedef TestFetchTagOutput FetchTag;
|
||||
using FetchTag = TestFetchTagOutput;
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
@ -92,10 +92,12 @@ namespace arg
|
||||
{
|
||||
|
||||
template <>
|
||||
struct Fetch<TestFetchTagInput, vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesBasic, TestExecObject>
|
||||
struct Fetch<TestFetchTagInput,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesBasic,
|
||||
TestExecObject>
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC
|
||||
ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic& indices,
|
||||
@ -112,10 +114,12 @@ struct Fetch<TestFetchTagInput, vtkm::exec::arg::AspectTagDefault,
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Fetch<TestFetchTagOutput, vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesBasic, TestExecObject>
|
||||
struct Fetch<TestFetchTagOutput,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesBasic,
|
||||
TestExecObject>
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC
|
||||
ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic&, const TestExecObject&) const
|
||||
@ -125,7 +129,8 @@ struct Fetch<TestFetchTagOutput, vtkm::exec::arg::AspectTagDefault,
|
||||
}
|
||||
|
||||
VTKM_EXEC
|
||||
void Store(const vtkm::exec::arg::ThreadIndicesBasic& indices, const TestExecObject& execObject,
|
||||
void Store(const vtkm::exec::arg::ThreadIndicesBasic& indices,
|
||||
const TestExecObject& execObject,
|
||||
ValueType value) const
|
||||
{
|
||||
execObject.Portal.Set(indices.GetOutputIndex(), value + 20 * indices.GetOutputIndex());
|
||||
@ -139,26 +144,30 @@ namespace
|
||||
{
|
||||
|
||||
typedef void TestControlSignature(TestControlSignatureTagInput, TestControlSignatureTagOutput);
|
||||
typedef vtkm::internal::FunctionInterface<TestControlSignature> TestControlInterface;
|
||||
using TestControlInterface = vtkm::internal::FunctionInterface<TestControlSignature>;
|
||||
|
||||
typedef void TestExecutionSignature1(vtkm::exec::arg::BasicArg<1>, vtkm::exec::arg::BasicArg<2>);
|
||||
typedef vtkm::internal::FunctionInterface<TestExecutionSignature1> TestExecutionInterface1;
|
||||
using TestExecutionInterface1 = vtkm::internal::FunctionInterface<TestExecutionSignature1>;
|
||||
|
||||
typedef vtkm::exec::arg::BasicArg<2> TestExecutionSignature2(vtkm::exec::arg::BasicArg<1>);
|
||||
typedef vtkm::internal::FunctionInterface<TestExecutionSignature2> TestExecutionInterface2;
|
||||
using TestExecutionInterface2 = vtkm::internal::FunctionInterface<TestExecutionSignature2>;
|
||||
|
||||
typedef vtkm::internal::FunctionInterface<void(TestExecObject, TestExecObject)>
|
||||
ExecutionParameterInterface;
|
||||
|
||||
typedef vtkm::internal::Invocation<ExecutionParameterInterface, TestControlInterface,
|
||||
TestExecutionInterface1, 1, MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>
|
||||
InvocationType1;
|
||||
using InvocationType1 = vtkm::internal::Invocation<ExecutionParameterInterface,
|
||||
TestControlInterface,
|
||||
TestExecutionInterface1,
|
||||
1,
|
||||
MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>;
|
||||
|
||||
typedef vtkm::internal::Invocation<ExecutionParameterInterface, TestControlInterface,
|
||||
TestExecutionInterface2, 1, MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>
|
||||
InvocationType2;
|
||||
using InvocationType2 = vtkm::internal::Invocation<ExecutionParameterInterface,
|
||||
TestControlInterface,
|
||||
TestExecutionInterface2,
|
||||
1,
|
||||
MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>;
|
||||
|
||||
template <typename TaskType>
|
||||
static __global__ void ScheduleTaskSingular(TaskType task, vtkm::Id start, vtkm::Id end)
|
||||
@ -181,14 +190,20 @@ struct TestWorkletProxy : vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
vtkm::Id operator()(vtkm::Id input) const { return input + 200; }
|
||||
|
||||
template <typename T, typename OutToInArrayType, typename VisitArrayType,
|
||||
typename InputDomainType, typename G>
|
||||
template <typename T,
|
||||
typename OutToInArrayType,
|
||||
typename VisitArrayType,
|
||||
typename InputDomainType,
|
||||
typename G>
|
||||
VTKM_EXEC vtkm::exec::arg::ThreadIndicesBasic GetThreadIndices(
|
||||
const T& threadIndex, const OutToInArrayType& outToIn, const VisitArrayType& visit,
|
||||
const InputDomainType&, const G& globalThreadIndexOffset) const
|
||||
const T& threadIndex,
|
||||
const OutToInArrayType& outToIn,
|
||||
const VisitArrayType& visit,
|
||||
const InputDomainType&,
|
||||
const G& globalThreadIndexOffset) const
|
||||
{
|
||||
return vtkm::exec::arg::ThreadIndicesBasic(threadIndex, outToIn.Get(threadIndex),
|
||||
visit.Get(threadIndex), globalThreadIndexOffset);
|
||||
return vtkm::exec::arg::ThreadIndicesBasic(
|
||||
threadIndex, outToIn.Get(threadIndex), visit.Get(threadIndex), globalThreadIndexOffset);
|
||||
}
|
||||
};
|
||||
|
||||
@ -200,39 +215,48 @@ struct TestWorkletErrorProxy : vtkm::exec::FunctorBase
|
||||
VTKM_EXEC
|
||||
void operator()(vtkm::Id, vtkm::Id) const { this->RaiseError(ERROR_MESSAGE); }
|
||||
|
||||
template <typename T, typename OutToInArrayType, typename VisitArrayType,
|
||||
typename InputDomainType, typename G>
|
||||
template <typename T,
|
||||
typename OutToInArrayType,
|
||||
typename VisitArrayType,
|
||||
typename InputDomainType,
|
||||
typename G>
|
||||
VTKM_EXEC vtkm::exec::arg::ThreadIndicesBasic GetThreadIndices(
|
||||
const T& threadIndex, const OutToInArrayType& outToIn, const VisitArrayType& visit,
|
||||
const InputDomainType&, const G& globalThreadIndexOffset) const
|
||||
const T& threadIndex,
|
||||
const OutToInArrayType& outToIn,
|
||||
const VisitArrayType& visit,
|
||||
const InputDomainType&,
|
||||
const G& globalThreadIndexOffset) const
|
||||
{
|
||||
return vtkm::exec::arg::ThreadIndicesBasic(threadIndex, outToIn.Get(threadIndex),
|
||||
visit.Get(threadIndex), globalThreadIndexOffset);
|
||||
return vtkm::exec::arg::ThreadIndicesBasic(
|
||||
threadIndex, outToIn.Get(threadIndex), visit.Get(threadIndex), globalThreadIndexOffset);
|
||||
}
|
||||
};
|
||||
|
||||
// Check behavior of InvocationToFetch helper class.
|
||||
|
||||
VTKM_STATIC_ASSERT(
|
||||
(std::is_same<
|
||||
vtkm::exec::internal::detail::InvocationToFetch<vtkm::exec::arg::ThreadIndicesBasic,
|
||||
InvocationType1, 1>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagInput, vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesBasic, TestExecObject>>::type::value));
|
||||
(std::is_same<vtkm::exec::internal::detail::
|
||||
InvocationToFetch<vtkm::exec::arg::ThreadIndicesBasic, InvocationType1, 1>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagInput,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesBasic,
|
||||
TestExecObject>>::type::value));
|
||||
|
||||
VTKM_STATIC_ASSERT(
|
||||
(std::is_same<
|
||||
vtkm::exec::internal::detail::InvocationToFetch<vtkm::exec::arg::ThreadIndicesBasic,
|
||||
InvocationType1, 2>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagOutput, vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesBasic, TestExecObject>>::type::value));
|
||||
(std::is_same<vtkm::exec::internal::detail::
|
||||
InvocationToFetch<vtkm::exec::arg::ThreadIndicesBasic, InvocationType1, 2>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagOutput,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesBasic,
|
||||
TestExecObject>>::type::value));
|
||||
|
||||
VTKM_STATIC_ASSERT(
|
||||
(std::is_same<
|
||||
vtkm::exec::internal::detail::InvocationToFetch<vtkm::exec::arg::ThreadIndicesBasic,
|
||||
InvocationType2, 0>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagOutput, vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesBasic, TestExecObject>>::type::value));
|
||||
(std::is_same<vtkm::exec::internal::detail::
|
||||
InvocationToFetch<vtkm::exec::arg::ThreadIndicesBasic, InvocationType2, 0>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagOutput,
|
||||
vtkm::exec::arg::AspectTagDefault,
|
||||
vtkm::exec::arg::ThreadIndicesBasic,
|
||||
TestExecObject>>::type::value));
|
||||
|
||||
template <typename DeviceAdapter>
|
||||
void TestNormalFunctorInvoke()
|
||||
@ -253,7 +277,7 @@ void TestNormalFunctorInvoke()
|
||||
TestExecObject(output.PrepareForOutput(3, DeviceAdapter())));
|
||||
|
||||
std::cout << " Try void return." << std::endl;
|
||||
typedef vtkm::exec::internal::TaskSingular<TestWorkletProxy, InvocationType1> TaskSingular1;
|
||||
using TaskSingular1 = vtkm::exec::internal::TaskSingular<TestWorkletProxy, InvocationType1>;
|
||||
TestWorkletProxy worklet;
|
||||
InvocationType1 invocation1(execObjects);
|
||||
|
||||
@ -277,7 +301,7 @@ void TestNormalFunctorInvoke()
|
||||
TestExecObject(input.PrepareForInPlace(DeviceAdapter())),
|
||||
TestExecObject(output.PrepareForOutput(3, DeviceAdapter())));
|
||||
|
||||
typedef vtkm::exec::internal::TaskSingular<TestWorkletProxy, InvocationType2> TaskSingular2;
|
||||
using TaskSingular2 = vtkm::exec::internal::TaskSingular<TestWorkletProxy, InvocationType2>;
|
||||
InvocationType2 invocation2(execObjects);
|
||||
|
||||
using TaskTypes = typename vtkm::cont::DeviceTaskTypes<DeviceAdapter>;
|
||||
@ -311,7 +335,7 @@ void TestErrorFunctorInvoke()
|
||||
TestExecObject(input.PrepareForInPlace(DeviceAdapter())),
|
||||
TestExecObject(output.PrepareForInPlace(DeviceAdapter())));
|
||||
|
||||
typedef vtkm::exec::internal::TaskSingular<TestWorkletErrorProxy, InvocationType1> TaskSingular1;
|
||||
using TaskSingular1 = vtkm::exec::internal::TaskSingular<TestWorkletErrorProxy, InvocationType1>;
|
||||
TestWorkletErrorProxy worklet;
|
||||
InvocationType1 invocation(execObjects);
|
||||
|
||||
|
@ -31,11 +31,11 @@ struct customType
|
||||
void TestScalarTextureLoad()
|
||||
{
|
||||
using namespace vtkm::exec::cuda::internal;
|
||||
typedef load_through_texture<vtkm::Float32> f;
|
||||
typedef load_through_texture<vtkm::Int32> i;
|
||||
typedef load_through_texture<vtkm::UInt8> ui;
|
||||
using f = load_through_texture<vtkm::Float32>;
|
||||
using i = load_through_texture<vtkm::Int32>;
|
||||
using ui = load_through_texture<vtkm::UInt8>;
|
||||
|
||||
typedef load_through_texture<customType> ct;
|
||||
using ct = load_through_texture<customType>;
|
||||
|
||||
VTKM_TEST_ASSERT(f::WillUseTexture == 1, "Float32 can be loaded through texture memory");
|
||||
VTKM_TEST_ASSERT(i::WillUseTexture == 1, "Int32 can be loaded through texture memory");
|
||||
@ -46,18 +46,18 @@ void TestScalarTextureLoad()
|
||||
void TestVecTextureLoad()
|
||||
{
|
||||
using namespace vtkm::exec::cuda::internal;
|
||||
typedef load_through_texture<vtkm::Vec<vtkm::UInt32, 3>> ui32_3;
|
||||
typedef load_through_texture<vtkm::Vec<vtkm::Float32, 3>> f32_3;
|
||||
typedef load_through_texture<vtkm::Vec<vtkm::UInt8, 3>> ui8_3;
|
||||
typedef load_through_texture<vtkm::Vec<vtkm::Float64, 3>> f64_3;
|
||||
using ui32_3 = load_through_texture<vtkm::Vec<vtkm::UInt32, 3>>;
|
||||
using f32_3 = load_through_texture<vtkm::Vec<vtkm::Float32, 3>>;
|
||||
using ui8_3 = load_through_texture<vtkm::Vec<vtkm::UInt8, 3>>;
|
||||
using f64_3 = load_through_texture<vtkm::Vec<vtkm::Float64, 3>>;
|
||||
|
||||
typedef load_through_texture<vtkm::Vec<vtkm::UInt32, 4>> ui32_4;
|
||||
typedef load_through_texture<vtkm::Vec<vtkm::Float32, 4>> f32_4;
|
||||
typedef load_through_texture<vtkm::Vec<vtkm::UInt8, 4>> ui8_4;
|
||||
typedef load_through_texture<vtkm::Vec<vtkm::Float64, 4>> f64_4;
|
||||
using ui32_4 = load_through_texture<vtkm::Vec<vtkm::UInt32, 4>>;
|
||||
using f32_4 = load_through_texture<vtkm::Vec<vtkm::Float32, 4>>;
|
||||
using ui8_4 = load_through_texture<vtkm::Vec<vtkm::UInt8, 4>>;
|
||||
using f64_4 = load_through_texture<vtkm::Vec<vtkm::Float64, 4>>;
|
||||
|
||||
typedef load_through_texture<vtkm::Vec<customType, 3>> ct_3;
|
||||
typedef load_through_texture<vtkm::Vec<customType, 4>> ct_4;
|
||||
using ct_3 = load_through_texture<vtkm::Vec<customType, 3>>;
|
||||
using ct_4 = load_through_texture<vtkm::Vec<customType, 4>>;
|
||||
|
||||
VTKM_TEST_ASSERT(ui32_3::WillUseTexture == 1, "Can be loaded through texture loads");
|
||||
VTKM_TEST_ASSERT(f32_3::WillUseTexture == 1, "Can be loaded through texture loads");
|
||||
|
@ -65,14 +65,14 @@ struct TestExecObject
|
||||
|
||||
struct MyOutputToInputMapPortal
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id Get(vtkm::Id index) const { return index; }
|
||||
};
|
||||
|
||||
struct MyVisitArrayPortal
|
||||
{
|
||||
typedef vtkm::IdComponent ValueType;
|
||||
using ValueType = vtkm::IdComponent;
|
||||
vtkm::IdComponent Get(vtkm::Id) const { return 1; }
|
||||
};
|
||||
|
||||
@ -86,11 +86,11 @@ struct TestFetchTagOutput
|
||||
// Missing TransportTag, but we are not testing that so we can leave it out.
|
||||
struct TestControlSignatureTagInput
|
||||
{
|
||||
typedef TestFetchTagInput FetchTag;
|
||||
using FetchTag = TestFetchTagInput;
|
||||
};
|
||||
struct TestControlSignatureTagOutput
|
||||
{
|
||||
typedef TestFetchTagOutput FetchTag;
|
||||
using FetchTag = TestFetchTagOutput;
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -112,7 +112,7 @@ struct Fetch<TestFetchTagInput,
|
||||
vtkm::exec::arg::ThreadIndicesBasic,
|
||||
TestExecObject>
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC
|
||||
ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic& indices,
|
||||
@ -134,7 +134,7 @@ struct Fetch<TestFetchTagOutput,
|
||||
vtkm::exec::arg::ThreadIndicesBasic,
|
||||
TestExecObject>
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC
|
||||
ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic&, const TestExecObject&) const
|
||||
@ -165,32 +165,30 @@ namespace testing
|
||||
{
|
||||
|
||||
typedef void TestControlSignature(TestControlSignatureTagInput, TestControlSignatureTagOutput);
|
||||
typedef vtkm::internal::FunctionInterface<TestControlSignature> TestControlInterface;
|
||||
using TestControlInterface = vtkm::internal::FunctionInterface<TestControlSignature>;
|
||||
|
||||
typedef void TestExecutionSignature1(vtkm::exec::arg::BasicArg<1>, vtkm::exec::arg::BasicArg<2>);
|
||||
typedef vtkm::internal::FunctionInterface<TestExecutionSignature1> TestExecutionInterface1;
|
||||
using TestExecutionInterface1 = vtkm::internal::FunctionInterface<TestExecutionSignature1>;
|
||||
|
||||
typedef vtkm::exec::arg::BasicArg<2> TestExecutionSignature2(vtkm::exec::arg::BasicArg<1>);
|
||||
typedef vtkm::internal::FunctionInterface<TestExecutionSignature2> TestExecutionInterface2;
|
||||
using TestExecutionInterface2 = vtkm::internal::FunctionInterface<TestExecutionSignature2>;
|
||||
|
||||
typedef vtkm::internal::FunctionInterface<void(TestExecObject, TestExecObject)>
|
||||
ExecutionParameterInterface;
|
||||
|
||||
typedef vtkm::internal::Invocation<ExecutionParameterInterface,
|
||||
TestControlInterface,
|
||||
TestExecutionInterface1,
|
||||
1,
|
||||
MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>
|
||||
InvocationType1;
|
||||
using InvocationType1 = vtkm::internal::Invocation<ExecutionParameterInterface,
|
||||
TestControlInterface,
|
||||
TestExecutionInterface1,
|
||||
1,
|
||||
MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>;
|
||||
|
||||
typedef vtkm::internal::Invocation<ExecutionParameterInterface,
|
||||
TestControlInterface,
|
||||
TestExecutionInterface2,
|
||||
1,
|
||||
MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>
|
||||
InvocationType2;
|
||||
using InvocationType2 = vtkm::internal::Invocation<ExecutionParameterInterface,
|
||||
TestControlInterface,
|
||||
TestExecutionInterface2,
|
||||
1,
|
||||
MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>;
|
||||
|
||||
// Not a full worklet, but provides operators that we expect in a worklet.
|
||||
struct TestWorkletProxy : vtkm::exec::FunctorBase
|
||||
|
@ -53,14 +53,14 @@ struct TestExecObject
|
||||
|
||||
struct MyOutputToInputMapPortal
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id Get(vtkm::Id index) const { return index; }
|
||||
};
|
||||
|
||||
struct MyVisitArrayPortal
|
||||
{
|
||||
typedef vtkm::IdComponent ValueType;
|
||||
using ValueType = vtkm::IdComponent;
|
||||
vtkm::IdComponent Get(vtkm::Id) const { return 1; }
|
||||
};
|
||||
|
||||
@ -74,11 +74,11 @@ struct TestFetchTagOutput
|
||||
// Missing TransportTag, but we are not testing that so we can leave it out.
|
||||
struct TestControlSignatureTagInput
|
||||
{
|
||||
typedef TestFetchTagInput FetchTag;
|
||||
using FetchTag = TestFetchTagInput;
|
||||
};
|
||||
struct TestControlSignatureTagOutput
|
||||
{
|
||||
typedef TestFetchTagOutput FetchTag;
|
||||
using FetchTag = TestFetchTagOutput;
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
@ -96,7 +96,7 @@ struct Fetch<TestFetchTagInput,
|
||||
vtkm::exec::arg::ThreadIndicesBasic,
|
||||
TestExecObject>
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC
|
||||
ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic& indices,
|
||||
@ -118,7 +118,7 @@ struct Fetch<TestFetchTagOutput,
|
||||
vtkm::exec::arg::ThreadIndicesBasic,
|
||||
TestExecObject>
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC
|
||||
ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic&, const TestExecObject&) const
|
||||
@ -143,32 +143,30 @@ namespace
|
||||
{
|
||||
|
||||
typedef void TestControlSignature(TestControlSignatureTagInput, TestControlSignatureTagOutput);
|
||||
typedef vtkm::internal::FunctionInterface<TestControlSignature> TestControlInterface;
|
||||
using TestControlInterface = vtkm::internal::FunctionInterface<TestControlSignature>;
|
||||
|
||||
typedef void TestExecutionSignature1(vtkm::exec::arg::BasicArg<1>, vtkm::exec::arg::BasicArg<2>);
|
||||
typedef vtkm::internal::FunctionInterface<TestExecutionSignature1> TestExecutionInterface1;
|
||||
using TestExecutionInterface1 = vtkm::internal::FunctionInterface<TestExecutionSignature1>;
|
||||
|
||||
typedef vtkm::exec::arg::BasicArg<2> TestExecutionSignature2(vtkm::exec::arg::BasicArg<1>);
|
||||
typedef vtkm::internal::FunctionInterface<TestExecutionSignature2> TestExecutionInterface2;
|
||||
using TestExecutionInterface2 = vtkm::internal::FunctionInterface<TestExecutionSignature2>;
|
||||
|
||||
typedef vtkm::internal::FunctionInterface<void(TestExecObject, TestExecObject)>
|
||||
ExecutionParameterInterface;
|
||||
|
||||
typedef vtkm::internal::Invocation<ExecutionParameterInterface,
|
||||
TestControlInterface,
|
||||
TestExecutionInterface1,
|
||||
1,
|
||||
MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>
|
||||
InvocationType1;
|
||||
using InvocationType1 = vtkm::internal::Invocation<ExecutionParameterInterface,
|
||||
TestControlInterface,
|
||||
TestExecutionInterface1,
|
||||
1,
|
||||
MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>;
|
||||
|
||||
typedef vtkm::internal::Invocation<ExecutionParameterInterface,
|
||||
TestControlInterface,
|
||||
TestExecutionInterface2,
|
||||
1,
|
||||
MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>
|
||||
InvocationType2;
|
||||
using InvocationType2 = vtkm::internal::Invocation<ExecutionParameterInterface,
|
||||
TestControlInterface,
|
||||
TestExecutionInterface2,
|
||||
1,
|
||||
MyOutputToInputMapPortal,
|
||||
MyVisitArrayPortal>;
|
||||
|
||||
// Not a full worklet, but provides operators that we expect in a worklet.
|
||||
struct TestWorkletProxy : vtkm::exec::FunctorBase
|
||||
@ -260,7 +258,7 @@ void TestNormalFunctorInvoke()
|
||||
std::cout << " Try void return." << std::endl;
|
||||
inputTestValue = 5;
|
||||
outputTestValue = static_cast<vtkm::Id>(0xDEADDEAD);
|
||||
typedef vtkm::exec::internal::TaskSingular<TestWorkletProxy, InvocationType1> TaskSingular1;
|
||||
using TaskSingular1 = vtkm::exec::internal::TaskSingular<TestWorkletProxy, InvocationType1>;
|
||||
TestWorkletProxy worklet;
|
||||
InvocationType1 invocation1(execObjects);
|
||||
TaskSingular1 taskInvokeWorklet1(worklet, invocation1);
|
||||
@ -272,7 +270,7 @@ void TestNormalFunctorInvoke()
|
||||
std::cout << " Try return value." << std::endl;
|
||||
inputTestValue = 6;
|
||||
outputTestValue = static_cast<vtkm::Id>(0xDEADDEAD);
|
||||
typedef vtkm::exec::internal::TaskSingular<TestWorkletProxy, InvocationType2> TaskSingular2;
|
||||
using TaskSingular2 = vtkm::exec::internal::TaskSingular<TestWorkletProxy, InvocationType2>;
|
||||
InvocationType2 invocation2(execObjects);
|
||||
TaskSingular2 taskInvokeWorklet2(worklet, invocation2);
|
||||
|
||||
@ -291,7 +289,7 @@ void TestErrorFunctorInvoke()
|
||||
vtkm::internal::make_FunctionInterface<void>(TestExecObject(&inputTestValue),
|
||||
TestExecObject(&outputTestValue));
|
||||
|
||||
typedef vtkm::exec::internal::TaskSingular<TestWorkletErrorProxy, InvocationType1> TaskSingular1;
|
||||
using TaskSingular1 = vtkm::exec::internal::TaskSingular<TestWorkletErrorProxy, InvocationType1>;
|
||||
TestWorkletErrorProxy worklet;
|
||||
InvocationType1 invocation(execObjects);
|
||||
TaskSingular1 taskInvokeWorklet1 = TaskSingular1(worklet, invocation);
|
||||
|
@ -53,14 +53,14 @@ struct TestExecObject
|
||||
|
||||
struct MyOutputToInputMapPortal
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id Get(vtkm::Id index) const { return index; }
|
||||
};
|
||||
|
||||
struct MyVisitArrayPortal
|
||||
{
|
||||
typedef vtkm::IdComponent ValueType;
|
||||
using ValueType = vtkm::IdComponent;
|
||||
vtkm::IdComponent Get(vtkm::Id) const { return 1; }
|
||||
};
|
||||
|
||||
@ -74,11 +74,11 @@ struct TestFetchTagOutput
|
||||
// Missing TransportTag, but we are not testing that so we can leave it out.
|
||||
struct TestControlSignatureTagInput
|
||||
{
|
||||
typedef TestFetchTagInput FetchTag;
|
||||
using FetchTag = TestFetchTagInput;
|
||||
};
|
||||
struct TestControlSignatureTagOutput
|
||||
{
|
||||
typedef TestFetchTagOutput FetchTag;
|
||||
using FetchTag = TestFetchTagOutput;
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
@ -96,7 +96,7 @@ struct Fetch<TestFetchTagInput,
|
||||
vtkm::exec::arg::ThreadIndicesBasic,
|
||||
TestExecObject>
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC
|
||||
ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic& indices,
|
||||
@ -118,7 +118,7 @@ struct Fetch<TestFetchTagOutput,
|
||||
vtkm::exec::arg::ThreadIndicesBasic,
|
||||
TestExecObject>
|
||||
{
|
||||
typedef vtkm::Id ValueType;
|
||||
using ValueType = vtkm::Id;
|
||||
|
||||
VTKM_EXEC
|
||||
ValueType Load(const vtkm::exec::arg::ThreadIndicesBasic&, const TestExecObject&) const
|
||||
@ -143,13 +143,13 @@ namespace
|
||||
{
|
||||
|
||||
typedef void TestControlSignature(TestControlSignatureTagInput, TestControlSignatureTagOutput);
|
||||
typedef vtkm::internal::FunctionInterface<TestControlSignature> TestControlInterface;
|
||||
using TestControlInterface = vtkm::internal::FunctionInterface<TestControlSignature>;
|
||||
|
||||
typedef void TestExecutionSignature1(vtkm::exec::arg::BasicArg<1>, vtkm::exec::arg::BasicArg<2>);
|
||||
typedef vtkm::internal::FunctionInterface<TestExecutionSignature1> TestExecutionInterface1;
|
||||
using TestExecutionInterface1 = vtkm::internal::FunctionInterface<TestExecutionSignature1>;
|
||||
|
||||
typedef vtkm::exec::arg::BasicArg<2> TestExecutionSignature2(vtkm::exec::arg::BasicArg<1>);
|
||||
typedef vtkm::internal::FunctionInterface<TestExecutionSignature2> TestExecutionInterface2;
|
||||
using TestExecutionInterface2 = vtkm::internal::FunctionInterface<TestExecutionSignature2>;
|
||||
|
||||
// Not a full worklet, but provides operators that we expect in a worklet.
|
||||
struct TestWorkletProxy : vtkm::exec::FunctorBase
|
||||
|
@ -60,7 +60,7 @@ void GetMinMaxPoints(CellShapeTag,
|
||||
template <typename FieldType>
|
||||
struct TestInterpolateFunctor
|
||||
{
|
||||
typedef typename vtkm::VecTraits<FieldType>::ComponentType ComponentType;
|
||||
using ComponentType = typename vtkm::VecTraits<FieldType>::ComponentType;
|
||||
|
||||
template <typename CellShapeTag, typename FieldVecType>
|
||||
void DoTestWithField(CellShapeTag shape, const FieldVecType& fieldValues) const
|
||||
|
@ -65,7 +65,7 @@ static void CompareCoordinates(const PointWCoordsType& pointWCoords,
|
||||
vtkm::Vec<T, 3> trueWCoords,
|
||||
CellShapeTag shape)
|
||||
{
|
||||
typedef vtkm::Vec<T, 3> Vector3;
|
||||
using Vector3 = vtkm::Vec<T, 3>;
|
||||
|
||||
// Stuff to fake running in the execution environment.
|
||||
char messageBuffer[256];
|
||||
@ -90,8 +90,8 @@ static void CompareCoordinates(const PointWCoordsType& pointWCoords,
|
||||
template <typename PointWCoordsType, typename CellShapeTag>
|
||||
void TestPCoordsSpecial(const PointWCoordsType& pointWCoords, CellShapeTag shape)
|
||||
{
|
||||
typedef typename PointWCoordsType::ComponentType Vector3;
|
||||
typedef typename Vector3::ComponentType T;
|
||||
using Vector3 = typename PointWCoordsType::ComponentType;
|
||||
using T = typename Vector3::ComponentType;
|
||||
|
||||
// Stuff to fake running in the execution environment.
|
||||
char messageBuffer[256];
|
||||
@ -130,7 +130,7 @@ void TestPCoordsSpecial(const PointWCoordsType& pointWCoords, CellShapeTag shape
|
||||
template <typename PointWCoordsType, typename CellShapeTag>
|
||||
void TestPCoordsSample(const PointWCoordsType& pointWCoords, CellShapeTag shape)
|
||||
{
|
||||
typedef typename PointWCoordsType::ComponentType Vector3;
|
||||
using Vector3 = typename PointWCoordsType::ComponentType;
|
||||
|
||||
// Stuff to fake running in the execution environment.
|
||||
char messageBuffer[256];
|
||||
@ -185,8 +185,8 @@ static void TestPCoords(const PointWCoordsType& pointWCoords, CellShellTag shape
|
||||
template <typename T>
|
||||
struct TestPCoordsFunctor
|
||||
{
|
||||
typedef vtkm::Vec<T, 3> Vector3;
|
||||
typedef vtkm::VecVariable<Vector3, MAX_POINTS> PointWCoordType;
|
||||
using Vector3 = vtkm::Vec<T, 3>;
|
||||
using PointWCoordType = vtkm::VecVariable<Vector3, MAX_POINTS>;
|
||||
|
||||
template <typename CellShapeTag>
|
||||
PointWCoordType MakePointWCoords(CellShapeTag, vtkm::IdComponent numPoints) const
|
||||
|
Loading…
Reference in New Issue
Block a user