mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Merge topic 'StorageType-public'
b0715e14a ArrayHandle::StorageType should be public Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kenneth Moreland <morelandkd@ornl.gov> Merge-request: !3038
This commit is contained in:
commit
fdf2c079fa
@ -200,7 +200,10 @@ struct GetTypeInParentheses<void(T)>
|
||||
} \
|
||||
\
|
||||
using ValueType = typename__ Superclass::ValueType; \
|
||||
using StorageTag = typename__ Superclass::StorageTag
|
||||
using StorageTag = typename__ Superclass::StorageTag; \
|
||||
using StorageType = typename__ Superclass::StorageType; \
|
||||
using ReadPortalType = typename__ Superclass::ReadPortalType; \
|
||||
using WritePortalType = typename__ Superclass::WritePortalType
|
||||
|
||||
/// \brief Macro to make default methods in ArrayHandle subclasses.
|
||||
///
|
||||
|
@ -344,10 +344,6 @@ public:
|
||||
SecondHandleType,
|
||||
ThirdHandleType>::Superclass));
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
ArrayHandleCartesianProduct(const FirstHandleType& firstArray,
|
||||
const SecondHandleType& secondArray,
|
||||
|
@ -188,7 +188,6 @@ struct CompositeVectorTraits
|
||||
|
||||
using ValueType = typename vtkm::internal::compvec::GetValueType<ArrayTs...>::ValueType;
|
||||
using StorageTag = vtkm::cont::StorageTagCompositeVec<typename ArrayTs::StorageTag...>;
|
||||
using StorageType = Storage<ValueType, StorageTag>;
|
||||
using Superclass = ArrayHandle<ValueType, StorageTag>;
|
||||
};
|
||||
|
||||
@ -400,14 +399,10 @@ class ArrayHandleCompositeVector
|
||||
: public ArrayHandle<typename internal::CompositeVectorTraits<ArrayTs...>::ValueType,
|
||||
typename internal::CompositeVectorTraits<ArrayTs...>::StorageTag>
|
||||
{
|
||||
private:
|
||||
using Traits = internal::CompositeVectorTraits<ArrayTs...>;
|
||||
using StorageType = typename Traits::StorageType;
|
||||
|
||||
public:
|
||||
VTKM_ARRAY_HANDLE_SUBCLASS(ArrayHandleCompositeVector,
|
||||
(ArrayHandleCompositeVector<ArrayTs...>),
|
||||
(typename Traits::Superclass));
|
||||
(typename internal::CompositeVectorTraits<ArrayTs...>::Superclass));
|
||||
|
||||
VTKM_CONT
|
||||
ArrayHandleCompositeVector(const ArrayTs&... arrays)
|
||||
|
@ -251,10 +251,6 @@ public:
|
||||
StorageTagConcatenate<typename ArrayHandleType1::StorageTag,
|
||||
typename ArrayHandleType2::StorageTag>>));
|
||||
|
||||
protected:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
ArrayHandleConcatenate(const ArrayHandleType1& array1, const ArrayHandleType2& array2)
|
||||
: Superclass(StorageType::CreateBuffers(array1, array2))
|
||||
|
@ -565,7 +565,6 @@ struct DecoratorHandleTraits
|
||||
using StorageTraits = decor::DecoratorStorageTraits<DecoratorImplT, ArrayTs...>;
|
||||
using ValueType = typename StorageTraits::ValueType;
|
||||
using StorageTag = StorageTagDecorator<DecoratorImplT, ArrayTs...>;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
using Superclass = vtkm::cont::ArrayHandle<ValueType, StorageTag>;
|
||||
};
|
||||
|
||||
@ -651,7 +650,6 @@ class ArrayHandleDecorator
|
||||
private:
|
||||
using Traits = internal::DecoratorHandleTraits<typename std::decay<DecoratorImplT>::type,
|
||||
typename std::decay<ArrayTs>::type...>;
|
||||
using StorageType = typename Traits::StorageType;
|
||||
|
||||
public:
|
||||
VTKM_ARRAY_HANDLE_SUBCLASS(ArrayHandleDecorator,
|
||||
|
@ -94,8 +94,7 @@ class Storage<typename vtkm::VecTraits<typename ArrayHandleType::ValueType>::Com
|
||||
{
|
||||
using SourceValueType = typename ArrayHandleType::ValueType;
|
||||
using ValueType = typename vtkm::VecTraits<SourceValueType>::ComponentType;
|
||||
using SourceStorageTag = typename ArrayHandleType::StorageTag;
|
||||
using SourceStorage = vtkm::cont::internal::Storage<SourceValueType, SourceStorageTag>;
|
||||
using SourceStorage = typename ArrayHandleType::StorageType;
|
||||
|
||||
public:
|
||||
VTKM_CONT static vtkm::IdComponent ComponentIndex(
|
||||
@ -198,10 +197,6 @@ public:
|
||||
typename vtkm::VecTraits<typename ArrayHandleType::ValueType>::ComponentType,
|
||||
StorageTagExtractComponent<ArrayHandleType>>));
|
||||
|
||||
protected:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
ArrayHandleExtractComponent(const ArrayHandleType& array, vtkm::IdComponent component)
|
||||
: Superclass(StorageType::CreateBuffers(component, array))
|
||||
|
@ -285,10 +285,6 @@ public:
|
||||
|
||||
using ComponentType = typename ComponentsArrayHandleType::ValueType;
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
ArrayHandleGroupVecVariable(const ComponentsArrayHandleType& componentsArray,
|
||||
const OffsetsArrayHandleType& offsetsArray)
|
||||
|
@ -158,7 +158,6 @@ struct ArrayHandleImplicitTraits
|
||||
using PortalType = vtkm::internal::ArrayPortalImplicit<FunctorType>;
|
||||
using StorageTag = vtkm::cont::StorageTagImplicit<PortalType>;
|
||||
using Superclass = vtkm::cont::ArrayHandle<ValueType, StorageTag>;
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
@ -408,10 +408,6 @@ public:
|
||||
(ArrayHandleMultiplexer<ArrayHandleTypes...>),
|
||||
(vtkm::cont::ArrayHandle<typename Traits::ValueType, typename Traits::StorageTag>));
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
template <typename RealStorageTag>
|
||||
VTKM_CONT ArrayHandleMultiplexer(const vtkm::cont::ArrayHandle<ValueType, RealStorageTag>& src)
|
||||
: Superclass(StorageType::CreateBuffers(src))
|
||||
|
@ -248,10 +248,6 @@ public:
|
||||
vtkm::cont::StorageTagPermutation<typename IndexArrayHandleType::StorageTag,
|
||||
typename ValueArrayHandleType::StorageTag>>));
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
ArrayHandlePermutation(const IndexArrayHandleType& indexArray,
|
||||
const ValueArrayHandleType& valueArray)
|
||||
|
@ -604,10 +604,6 @@ public:
|
||||
(vtkm::cont::ArrayHandle<internal::detail::RecombinedValueType<ComponentType>,
|
||||
vtkm::cont::internal::StorageTagRecombineVec>));
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
vtkm::IdComponent GetNumberOfComponents() const
|
||||
{
|
||||
return StorageType::GetNumberOfComponents(this->GetBuffers());
|
||||
|
@ -156,7 +156,6 @@ public:
|
||||
(vtkm::cont::ArrayHandle<typename ArrayHandleType::ValueType,
|
||||
StorageTagReverse<typename ArrayHandleType::StorageTag>>));
|
||||
|
||||
public:
|
||||
ArrayHandleReverse(const ArrayHandleType& handle)
|
||||
: Superclass(handle.GetBuffers())
|
||||
{
|
||||
|
@ -327,7 +327,6 @@ public:
|
||||
vtkm::cont::StorageTagRuntimeVec>));
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
using ComponentsArrayType = vtkm::cont::ArrayHandle<ComponentType, StorageTagBasic>;
|
||||
|
||||
public:
|
||||
|
@ -246,8 +246,6 @@ class ArrayHandleSOA : public ArrayHandle<T, vtkm::cont::StorageTagSOA>
|
||||
using ComponentType = typename vtkm::VecTraits<T>::ComponentType;
|
||||
static constexpr vtkm::IdComponent NUM_COMPONENTS = vtkm::VecTraits<T>::NUM_COMPONENTS;
|
||||
|
||||
using StorageType = vtkm::cont::internal::Storage<T, vtkm::cont::StorageTagSOA>;
|
||||
|
||||
using ComponentArrayType = vtkm::cont::ArrayHandle<ComponentType, vtkm::cont::StorageTagBasic>;
|
||||
|
||||
public:
|
||||
|
@ -333,10 +333,6 @@ public:
|
||||
(ArrayHandleStride<T>),
|
||||
(ArrayHandle<T, vtkm::cont::StorageTagStride>));
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
ArrayHandleStride(vtkm::Id stride, vtkm::Id offset, vtkm::Id modulo = 0, vtkm::Id divisor = 1)
|
||||
: Superclass(StorageType::CreateBuffers(
|
||||
vtkm::cont::internal::Buffer{},
|
||||
|
@ -246,8 +246,7 @@ class Storage<typename StorageTagTransform<ArrayHandleType, FunctorType>::ValueT
|
||||
using FunctorManager = TransformFunctorManager<FunctorType>;
|
||||
using ValueType = typename StorageTagTransform<ArrayHandleType, FunctorType>::ValueType;
|
||||
|
||||
using SourceStorage =
|
||||
Storage<typename ArrayHandleType::ValueType, typename ArrayHandleType::StorageTag>;
|
||||
using SourceStorage = typename ArrayHandleType::StorageType;
|
||||
|
||||
static std::vector<vtkm::cont::internal::Buffer> SourceBuffers(
|
||||
const std::vector<vtkm::cont::internal::Buffer>& buffers)
|
||||
@ -323,8 +322,7 @@ class Storage<
|
||||
using InverseFunctorManager = TransformFunctorManager<InverseFunctorType>;
|
||||
using ValueType = typename StorageTagTransform<ArrayHandleType, FunctorType>::ValueType;
|
||||
|
||||
using SourceStorage =
|
||||
Storage<typename ArrayHandleType::ValueType, typename ArrayHandleType::StorageTag>;
|
||||
using SourceStorage = typename ArrayHandleType::StorageType;
|
||||
|
||||
static std::vector<vtkm::cont::internal::Buffer> SourceBuffers(
|
||||
const std::vector<vtkm::cont::internal::Buffer>& buffers)
|
||||
@ -454,10 +452,6 @@ public:
|
||||
typename internal::StorageTagTransform<ArrayHandleType, FunctorType>::ValueType,
|
||||
internal::StorageTagTransform<ArrayHandleType, FunctorType>>));
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
ArrayHandleTransform(const ArrayHandleType& handle,
|
||||
const FunctorType& functor = FunctorType{},
|
||||
@ -498,10 +492,6 @@ public:
|
||||
ValueType,
|
||||
internal::StorageTagTransform<ArrayHandleType, FunctorType, InverseFunctorType>>));
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
ArrayHandleTransform(const ArrayHandleType& handle,
|
||||
const FunctorType& functor = FunctorType(),
|
||||
const InverseFunctorType& inverseFunctor = InverseFunctorType())
|
||||
|
@ -51,10 +51,6 @@ public:
|
||||
ArrayHandleUniformPointCoordinates,
|
||||
(vtkm::cont::ArrayHandle<vtkm::Vec3f, vtkm::cont::StorageTagUniformPoints>));
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
ArrayHandleUniformPointCoordinates(vtkm::Id3 dimensions,
|
||||
ValueType origin = ValueType(0.0f, 0.0f, 0.0f),
|
||||
|
@ -197,10 +197,6 @@ public:
|
||||
(vtkm::cont::ArrayHandle<typename ArrayHandleType::ValueType,
|
||||
StorageTagView<typename ArrayHandleType::StorageTag>>));
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
ArrayHandleView(const ArrayHandleType& array, vtkm::Id startIndex, vtkm::Id numValues)
|
||||
: Superclass(StorageType::CreateBuffers(startIndex, numValues, array))
|
||||
|
@ -291,10 +291,6 @@ public:
|
||||
(ArrayHandleXGCCoordinates<T>),
|
||||
(vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>, vtkm::cont::StorageTagXGCCoordinates>));
|
||||
|
||||
private:
|
||||
using StorageType = vtkm::cont::internal::Storage<ValueType, StorageTag>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
ArrayHandleXGCCoordinates(const OriginalType& array,
|
||||
vtkm::Id numberOfPlanes,
|
||||
|
@ -129,10 +129,6 @@ struct ArrayHandleZipTraits
|
||||
using Tag =
|
||||
StorageTagZip<typename FirstHandleType::StorageTag, typename SecondHandleType::StorageTag>;
|
||||
|
||||
/// The storage type.
|
||||
///
|
||||
using Storage = vtkm::cont::internal::Storage<ValueType, Tag>;
|
||||
|
||||
/// The superclass for ArrayHandleZip.
|
||||
///
|
||||
using Superclass = vtkm::cont::ArrayHandle<ValueType, Tag>;
|
||||
@ -259,9 +255,6 @@ class ArrayHandleZip
|
||||
// template argument is not a valid ArrayHandle type.
|
||||
VTKM_IS_ARRAY_HANDLE(SecondHandleType);
|
||||
|
||||
using StorageType =
|
||||
typename internal::ArrayHandleZipTraits<FirstHandleType, SecondHandleType>::Storage;
|
||||
|
||||
public:
|
||||
VTKM_ARRAY_HANDLE_SUBCLASS(
|
||||
ArrayHandleZip,
|
||||
|
@ -27,12 +27,7 @@ template <typename ValueType>
|
||||
struct TemplatedTests
|
||||
{
|
||||
using ArrayHandleType = vtkm::cont::ArrayHandleCounting<ValueType>;
|
||||
|
||||
using ArrayHandleType2 = vtkm::cont::ArrayHandle<ValueType, vtkm::cont::StorageTagCounting>;
|
||||
|
||||
using PortalType =
|
||||
typename vtkm::cont::internal::Storage<ValueType,
|
||||
typename ArrayHandleType::StorageTag>::ReadPortalType;
|
||||
using PortalType = typename ArrayHandleType::ReadPortalType;
|
||||
|
||||
void operator()(const ValueType& startingValue, const ValueType& step)
|
||||
{
|
||||
@ -41,7 +36,8 @@ struct TemplatedTests
|
||||
ArrayHandleType arrayMake =
|
||||
vtkm::cont::make_ArrayHandleCounting(startingValue, step, ARRAY_SIZE);
|
||||
|
||||
ArrayHandleType2 arrayHandle = ArrayHandleType(startingValue, step, ARRAY_SIZE);
|
||||
typename ArrayHandleType::Superclass arrayHandle =
|
||||
ArrayHandleType(startingValue, step, ARRAY_SIZE);
|
||||
|
||||
VTKM_TEST_ASSERT(arrayConst.GetNumberOfValues() == ARRAY_SIZE,
|
||||
"Counting array using constructor has wrong size.");
|
||||
|
Loading…
Reference in New Issue
Block a user