Commit 63ef84ed authored by Kenneth Moreland's avatar Kenneth Moreland

Optionally remove all use of ArrayHandleVirtual

As we remove more and more virtual methods from VTK-m, I expect several
users will be interested in completely removing them from the build for
several reasons.

1. They may be compiling for hardware that does not support virtual
methods.
2. They may need to compile for CUDA but need shared libraries.
3. It should go a bit faster.

To enable this, a CMake option named `VTKm_NO_DEPRECATED_VIRTUAL` is
added. It defaults to `OFF`. But when it is `ON`, none of the code that
both uses virtuals and is deprecated will be built.

Currently, only `ArrayHandleVirtual` is deprecated, so the rest of the
virtual classes will still be built. As we move forward, more will be
removed until all virtual method functionality is removed.
parent e11f612a
...@@ -132,6 +132,13 @@ vtkm_option(VTKm_ENABLE_DEVELOPER_FLAGS "Enable compiler flags that are useful w ...@@ -132,6 +132,13 @@ vtkm_option(VTKm_ENABLE_DEVELOPER_FLAGS "Enable compiler flags that are useful w
# Some application might need not to install those, hence this option. # Some application might need not to install those, hence this option.
vtkm_option(VTKm_NO_INSTALL_README_LICENSE "disable the installation of README and LICENSE files" OFF) vtkm_option(VTKm_NO_INSTALL_README_LICENSE "disable the installation of README and LICENSE files" OFF)
# We are in the process of deprecating the use of virtual methods because they
# are not well supported on many accelerators. Turn this option on to remove
# the code entirely. Note that the deprecation of virtual methods is work in
# progress, so not all use of virtual methods may be done. In VTK-m 2.0
# virtual methods should be removed entirely and this option will be removed.
vtkm_option(VTKm_NO_DEPRECATED_VIRTUAL "Do not compile support of deprecated virtual methods" OFF)
mark_as_advanced( mark_as_advanced(
VTKm_ENABLE_LOGGING VTKm_ENABLE_LOGGING
VTKm_NO_ASSERT VTKm_NO_ASSERT
...@@ -140,6 +147,7 @@ mark_as_advanced( ...@@ -140,6 +147,7 @@ mark_as_advanced(
VTKm_HIDE_PRIVATE_SYMBOLS VTKm_HIDE_PRIVATE_SYMBOLS
VTKm_ENABLE_DEVELOPER_FLAGS VTKm_ENABLE_DEVELOPER_FLAGS
VTKm_NO_INSTALL_README_LICENSE VTKm_NO_INSTALL_README_LICENSE
VTKm_NO_DEPRECATED_VIRTUAL
) )
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
......
...@@ -13,13 +13,16 @@ ...@@ -13,13 +13,16 @@
#include <vtkm/cont/ArrayHandle.h> #include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ArrayHandleMultiplexer.h> #include <vtkm/cont/ArrayHandleMultiplexer.h>
#include <vtkm/cont/ArrayHandleVirtual.h>
#include <vtkm/cont/CellSetStructured.h> #include <vtkm/cont/CellSetStructured.h>
#include <vtkm/cont/ImplicitFunctionHandle.h> #include <vtkm/cont/ImplicitFunctionHandle.h>
#include <vtkm/cont/Initialize.h> #include <vtkm/cont/Initialize.h>
#include <vtkm/cont/Invoker.h> #include <vtkm/cont/Invoker.h>
#include <vtkm/cont/Timer.h> #include <vtkm/cont/Timer.h>
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
#include <vtkm/cont/ArrayHandleVirtual.h>
#endif
#include <vtkm/worklet/WorkletMapField.h> #include <vtkm/worklet/WorkletMapField.h>
#include <vtkm/worklet/WorkletMapTopology.h> #include <vtkm/worklet/WorkletMapTopology.h>
...@@ -433,6 +436,7 @@ void BenchBlackScholesStatic(::benchmark::State& state) ...@@ -433,6 +436,7 @@ void BenchBlackScholesStatic(::benchmark::State& state)
}; };
VTKM_BENCHMARK_TEMPLATES(BenchBlackScholesStatic, ValueTypes); VTKM_BENCHMARK_TEMPLATES(BenchBlackScholesStatic, ValueTypes);
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
template <typename ValueType> template <typename ValueType>
void BenchBlackScholesDynamic(::benchmark::State& state) void BenchBlackScholesDynamic(::benchmark::State& state)
{ {
...@@ -442,6 +446,7 @@ void BenchBlackScholesDynamic(::benchmark::State& state) ...@@ -442,6 +446,7 @@ void BenchBlackScholesDynamic(::benchmark::State& state)
vtkm::cont::make_ArrayHandleVirtual(impl.OptionYears)); vtkm::cont::make_ArrayHandleVirtual(impl.OptionYears));
}; };
VTKM_BENCHMARK_TEMPLATES(BenchBlackScholesDynamic, ValueTypes); VTKM_BENCHMARK_TEMPLATES(BenchBlackScholesDynamic, ValueTypes);
#endif //VTKM_NO_DEPRECATED_VIRTUAL
template <typename ValueType> template <typename ValueType>
void BenchBlackScholesMultiplexer0(::benchmark::State& state) void BenchBlackScholesMultiplexer0(::benchmark::State& state)
...@@ -537,6 +542,7 @@ void BenchMathStatic(::benchmark::State& state) ...@@ -537,6 +542,7 @@ void BenchMathStatic(::benchmark::State& state)
}; };
VTKM_BENCHMARK_TEMPLATES(BenchMathStatic, ValueTypes); VTKM_BENCHMARK_TEMPLATES(BenchMathStatic, ValueTypes);
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
template <typename ValueType> template <typename ValueType>
void BenchMathDynamic(::benchmark::State& state) void BenchMathDynamic(::benchmark::State& state)
{ {
...@@ -546,6 +552,7 @@ void BenchMathDynamic(::benchmark::State& state) ...@@ -546,6 +552,7 @@ void BenchMathDynamic(::benchmark::State& state)
vtkm::cont::make_ArrayHandleVirtual(impl.TempHandle2)); vtkm::cont::make_ArrayHandleVirtual(impl.TempHandle2));
}; };
VTKM_BENCHMARK_TEMPLATES(BenchMathDynamic, ValueTypes); VTKM_BENCHMARK_TEMPLATES(BenchMathDynamic, ValueTypes);
#endif //VTKM_NO_DEPRECATED_VIRTUAL
template <typename ValueType> template <typename ValueType>
void BenchMathMultiplexer0(::benchmark::State& state) void BenchMathMultiplexer0(::benchmark::State& state)
...@@ -636,6 +643,7 @@ void BenchFusedMathStatic(::benchmark::State& state) ...@@ -636,6 +643,7 @@ void BenchFusedMathStatic(::benchmark::State& state)
}; };
VTKM_BENCHMARK_TEMPLATES(BenchFusedMathStatic, ValueTypes); VTKM_BENCHMARK_TEMPLATES(BenchFusedMathStatic, ValueTypes);
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
template <typename ValueType> template <typename ValueType>
void BenchFusedMathDynamic(::benchmark::State& state) void BenchFusedMathDynamic(::benchmark::State& state)
{ {
...@@ -643,6 +651,7 @@ void BenchFusedMathDynamic(::benchmark::State& state) ...@@ -643,6 +651,7 @@ void BenchFusedMathDynamic(::benchmark::State& state)
impl.Run(vtkm::cont::make_ArrayHandleVirtual(impl.InputHandle)); impl.Run(vtkm::cont::make_ArrayHandleVirtual(impl.InputHandle));
}; };
VTKM_BENCHMARK_TEMPLATES(BenchFusedMathDynamic, ValueTypes); VTKM_BENCHMARK_TEMPLATES(BenchFusedMathDynamic, ValueTypes);
#endif //VTKM_NO_DEPRECATED_VIRTUAL
template <typename ValueType> template <typename ValueType>
void BenchFusedMathMultiplexer0(::benchmark::State& state) void BenchFusedMathMultiplexer0(::benchmark::State& state)
...@@ -756,6 +765,7 @@ void BenchEdgeInterpStatic(::benchmark::State& state) ...@@ -756,6 +765,7 @@ void BenchEdgeInterpStatic(::benchmark::State& state)
}; };
VTKM_BENCHMARK_TEMPLATES(BenchEdgeInterpStatic, InterpValueTypes); VTKM_BENCHMARK_TEMPLATES(BenchEdgeInterpStatic, InterpValueTypes);
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
template <typename ValueType> template <typename ValueType>
void BenchEdgeInterpDynamic(::benchmark::State& state) void BenchEdgeInterpDynamic(::benchmark::State& state)
{ {
...@@ -765,6 +775,7 @@ void BenchEdgeInterpDynamic(::benchmark::State& state) ...@@ -765,6 +775,7 @@ void BenchEdgeInterpDynamic(::benchmark::State& state)
vtkm::cont::make_ArrayHandleVirtual(impl.FieldHandle)); vtkm::cont::make_ArrayHandleVirtual(impl.FieldHandle));
}; };
VTKM_BENCHMARK_TEMPLATES(BenchEdgeInterpDynamic, InterpValueTypes); VTKM_BENCHMARK_TEMPLATES(BenchEdgeInterpDynamic, InterpValueTypes);
#endif //VTKM_NO_DEPRECATED_VIRTUAL
struct ImplicitFunctionBenchData struct ImplicitFunctionBenchData
{ {
......
...@@ -67,13 +67,12 @@ struct AllAreArrayHandles ...@@ -67,13 +67,12 @@ struct AllAreArrayHandles
// `vtkm::Vec<Float32, 3>`. This also validates that all members have the same `ValueType`. // `vtkm::Vec<Float32, 3>`. This also validates that all members have the same `ValueType`.
template <typename ExpectedValueType, typename ArrayType> template <typename ExpectedValueType, typename ArrayType>
constexpr bool CheckValueType() struct CheckValueType
{ {
VTKM_STATIC_ASSERT_MSG((std::is_same<ExpectedValueType, typename ArrayType::ValueType>::value), VTKM_STATIC_ASSERT_MSG((std::is_same<ExpectedValueType, typename ArrayType::ValueType>::value),
"ArrayHandleCompositeVector must be built from " "ArrayHandleCompositeVector must be built from "
"ArrayHandles with the same ValueTypes."); "ArrayHandles with the same ValueTypes.");
return std::is_same<ExpectedValueType, typename ArrayType::ValueType>::value; };
}
template <typename ArrayType0, typename... ArrayTypes> template <typename ArrayType0, typename... ArrayTypes>
struct GetValueType struct GetValueType
...@@ -81,9 +80,7 @@ struct GetValueType ...@@ -81,9 +80,7 @@ struct GetValueType
static constexpr vtkm::IdComponent COUNT = static constexpr vtkm::IdComponent COUNT =
static_cast<vtkm::IdComponent>(sizeof...(ArrayTypes)) + 1; static_cast<vtkm::IdComponent>(sizeof...(ArrayTypes)) + 1;
using ComponentType = typename ArrayType0::ValueType; using ComponentType = typename ArrayType0::ValueType;
static constexpr std::array<bool, sizeof...(ArrayTypes) + 1> ValueCheck{ using ValueCheck = vtkm::List<CheckValueType<ComponentType, ArrayTypes>...>;
{ true, CheckValueType<ComponentType, ArrayTypes>()... }
};
using ValueType = vtkm::Vec<ComponentType, COUNT>; using ValueType = vtkm::Vec<ComponentType, COUNT>;
}; };
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
#include <memory> #include <memory>
#ifdef VTKM_NO_DEPRECATED_VIRTUAL
#error "ArrayHandleVirtual is removed. Do not include ArrayHandleVirtual.h"
#endif
namespace vtkm namespace vtkm
{ {
namespace cont namespace cont
......
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
#include <memory> #include <memory>
#include <type_traits> #include <type_traits>
#ifdef VTKM_NO_DEPRECATED_VIRTUAL
#error "ArrayHandleVirtualCoordiantes is removed. Do not include ArrayHandleVirtualCoordinates.h"
#endif
namespace vtkm namespace vtkm
{ {
namespace cont namespace cont
......
...@@ -16,9 +16,12 @@ ...@@ -16,9 +16,12 @@
#include <vtkm/cont/ArrayHandleCartesianProduct.h> #include <vtkm/cont/ArrayHandleCartesianProduct.h>
#include <vtkm/cont/ArrayHandleCompositeVector.h> #include <vtkm/cont/ArrayHandleCompositeVector.h>
#include <vtkm/cont/ArrayHandleUniformPointCoordinates.h> #include <vtkm/cont/ArrayHandleUniformPointCoordinates.h>
#include <vtkm/cont/ArrayHandleVirtual.h>
#include <vtkm/cont/DeviceAdapterTag.h> #include <vtkm/cont/DeviceAdapterTag.h>
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
#include <vtkm/cont/ArrayHandleVirtual.h>
#endif
namespace vtkm namespace vtkm
{ {
namespace cont namespace cont
...@@ -87,12 +90,14 @@ VTK_M_ARRAY_RANGE_COMPUTE_EXPORT_VEC(vtkm::Float64, 4, vtkm::cont::StorageTagBas ...@@ -87,12 +90,14 @@ VTK_M_ARRAY_RANGE_COMPUTE_EXPORT_VEC(vtkm::Float64, 4, vtkm::cont::StorageTagBas
#undef VTK_M_ARRAY_RANGE_COMPUTE_EXPORT_T #undef VTK_M_ARRAY_RANGE_COMPUTE_EXPORT_T
#undef VTK_M_ARRAY_RANGE_COMPUTE_EXPORT_VEC #undef VTK_M_ARRAY_RANGE_COMPUTE_EXPORT_VEC
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
VTKM_DEPRECATED_SUPPRESS_BEGIN VTKM_DEPRECATED_SUPPRESS_BEGIN
VTKM_CONT VTKM_DEPRECATED(1.6, "ArrayHandleVirtual no longer supported.") VTKM_CONT VTKM_DEPRECATED(1.6, "ArrayHandleVirtual no longer supported.")
vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeCompute( vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeCompute(
const vtkm::cont::ArrayHandleVirtual<vtkm::Vec3f>& input, const vtkm::cont::ArrayHandleVirtual<vtkm::Vec3f>& input,
vtkm::cont::DeviceAdapterId device = vtkm::cont::DeviceAdapterTagAny()); vtkm::cont::DeviceAdapterId device = vtkm::cont::DeviceAdapterTagAny());
VTKM_DEPRECATED_SUPPRESS_END VTKM_DEPRECATED_SUPPRESS_END
#endif //VTKM_NO_DEPRECATED_VIRTUAL
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeCompute( VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeCompute(
const vtkm::cont::ArrayHandle<vtkm::Vec3f, const vtkm::cont::ArrayHandle<vtkm::Vec3f,
......
...@@ -94,6 +94,7 @@ inline vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeComputeImpl( ...@@ -94,6 +94,7 @@ inline vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeComputeImpl(
} // namespace detail } // namespace detail
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
VTKM_CONT VTKM_CONT
inline vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeCompute( inline vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeCompute(
const vtkm::cont::ArrayHandleVirtual<vtkm::Vec3f>& input, const vtkm::cont::ArrayHandleVirtual<vtkm::Vec3f>& input,
...@@ -132,6 +133,7 @@ inline vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeCompute( ...@@ -132,6 +133,7 @@ inline vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeCompute(
return detail::ArrayRangeComputeImpl(input, device); return detail::ArrayRangeComputeImpl(input, device);
} }
} }
#endif //VTKM_NO_DEPRECATED_VIRTUAL
template <typename ArrayHandleType> template <typename ArrayHandleType>
inline vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeCompute(const ArrayHandleType& input, inline vtkm::cont::ArrayHandle<vtkm::Range> ArrayRangeCompute(const ArrayHandleType& input,
......
...@@ -41,8 +41,6 @@ set(headers ...@@ -41,8 +41,6 @@ set(headers
ArrayHandleTransform.h ArrayHandleTransform.h
ArrayHandleUniformPointCoordinates.h ArrayHandleUniformPointCoordinates.h
ArrayHandleView.h ArrayHandleView.h
ArrayHandleVirtual.h
ArrayHandleVirtualCoordinates.h
ArrayHandleZip.h ArrayHandleZip.h
ArrayPortal.h ArrayPortal.h
ArrayPortalToIterators.h ArrayPortalToIterators.h
...@@ -111,7 +109,6 @@ set(headers ...@@ -111,7 +109,6 @@ set(headers
StorageImplicit.h StorageImplicit.h
StorageList.h StorageList.h
StorageListTag.h StorageListTag.h
StorageVirtual.h
Timer.h Timer.h
Token.h Token.h
TryExecute.h TryExecute.h
...@@ -124,7 +121,6 @@ set(headers ...@@ -124,7 +121,6 @@ set(headers
set(template_sources set(template_sources
ArrayHandle.hxx ArrayHandle.hxx
ArrayHandleVirtual.hxx
ArrayRangeCompute.hxx ArrayRangeCompute.hxx
CellSetExplicit.hxx CellSetExplicit.hxx
CellSetExtrude.hxx CellSetExtrude.hxx
...@@ -133,7 +129,6 @@ set(template_sources ...@@ -133,7 +129,6 @@ set(template_sources
FieldRangeCompute.hxx FieldRangeCompute.hxx
FieldRangeGlobalCompute.hxx FieldRangeGlobalCompute.hxx
ParticleArrayCopy.hxx ParticleArrayCopy.hxx
StorageVirtual.hxx
VirtualObjectHandle.hxx VirtualObjectHandle.hxx
) )
...@@ -162,7 +157,6 @@ set(sources ...@@ -162,7 +157,6 @@ set(sources
# This list of sources has code that uses devices and so might need to be # This list of sources has code that uses devices and so might need to be
# compiled with a device-specific compiler (like CUDA). # compiled with a device-specific compiler (like CUDA).
set(device_sources set(device_sources
ArrayHandleVirtual.cxx
ArrayRangeCompute.cxx ArrayRangeCompute.cxx
AssignerPartitionedDataSet.cxx AssignerPartitionedDataSet.cxx
BoundsCompute.cxx BoundsCompute.cxx
...@@ -190,11 +184,28 @@ set(sources ...@@ -190,11 +184,28 @@ set(sources
PointLocator.cxx PointLocator.cxx
PointLocatorUniformGrid.cxx PointLocatorUniformGrid.cxx
RuntimeDeviceInformation.cxx RuntimeDeviceInformation.cxx
StorageVirtual.cxx
Timer.cxx Timer.cxx
UnknownArrayHandle.cxx UnknownArrayHandle.cxx
) )
if (NOT VTKm_NO_DEPRECATED_VIRTUAL)
set(headers ${headers}
ArrayHandleVirtual.h
ArrayHandleVirtualCoordinates.h
StorageVirtual.h
)
set(template_sources ${template_sources}
ArrayHandleVirtual.hxx
StorageVirtual.hxx
)
set(device_sources ${device_sources}
ArrayHandleVirtual.cxx
StorageVirtual.cxx
)
endif()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Set up default types, which can be custom configured by other build systems. # Set up default types, which can be custom configured by other build systems.
vtkm_get_kit_name(kit_name kit_dir) vtkm_get_kit_name(kit_name kit_dir)
......
...@@ -16,6 +16,7 @@ namespace vtkm ...@@ -16,6 +16,7 @@ namespace vtkm
namespace cont namespace cont
{ {
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
namespace detail namespace detail
{ {
...@@ -27,6 +28,7 @@ vtkm::cont::ArrayHandleVirtualCoordinates CoordDataDepWrapper::ToArray() const ...@@ -27,6 +28,7 @@ vtkm::cont::ArrayHandleVirtualCoordinates CoordDataDepWrapper::ToArray() const
VTKM_DEPRECATED_SUPPRESS_END VTKM_DEPRECATED_SUPPRESS_END
} // namespace detail } // namespace detail
#endif //VTKM_NO_DEPRECATED_VIRTUAL
VTKM_CONT CoordinateSystem::CoordinateSystem() VTKM_CONT CoordinateSystem::CoordinateSystem()
: Superclass() : Superclass()
...@@ -52,10 +54,19 @@ CoordinateSystem::CoordinateSystem(std::string name, ...@@ -52,10 +54,19 @@ CoordinateSystem::CoordinateSystem(std::string name,
{ {
} }
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
VTKM_CONT vtkm::cont::detail::CoordDataDepWrapper CoordinateSystem::GetData() const VTKM_CONT vtkm::cont::detail::CoordDataDepWrapper CoordinateSystem::GetData() const
{ {
return vtkm::cont::detail::CoordDataDepWrapper(this->Superclass::GetData()); return vtkm::cont::detail::CoordDataDepWrapper(this->Superclass::GetData());
} }
#else //!VTKM_NO_DEPRECATED_VIRTUAL
VTKM_CONT vtkm::cont::VariantArrayHandleBase<vtkm::TypeListFieldVec3> CoordinateSystem::GetData()
const
{
return vtkm::cont::VariantArrayHandleBase<vtkm::TypeListFieldVec3>(this->Superclass::GetData());
}
#endif //!VTKM_NO_DEPRECATED_VIRTUAL
VTKM_CONT vtkm::cont::CoordinateSystem::MultiplexerArrayType VTKM_CONT vtkm::cont::CoordinateSystem::MultiplexerArrayType
CoordinateSystem::GetDataAsMultiplexer() const CoordinateSystem::GetDataAsMultiplexer() const
......
...@@ -14,15 +14,19 @@ ...@@ -14,15 +14,19 @@
#include <vtkm/Deprecated.h> #include <vtkm/Deprecated.h>
#include <vtkm/cont/ArrayHandleCast.h> #include <vtkm/cont/ArrayHandleCast.h>
#include <vtkm/cont/ArrayHandleVirtualCoordinates.h>
#include <vtkm/cont/CastAndCall.h> #include <vtkm/cont/CastAndCall.h>
#include <vtkm/cont/Field.h> #include <vtkm/cont/Field.h>
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
#include <vtkm/cont/ArrayHandleVirtualCoordinates.h>
#endif
namespace vtkm namespace vtkm
{ {
namespace cont namespace cont
{ {
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
namespace detail namespace detail
{ {
...@@ -117,6 +121,7 @@ VTKM_CONT VTKM_DEPRECATED( ...@@ -117,6 +121,7 @@ VTKM_CONT VTKM_DEPRECATED(
vtkm::cont::printSummary_ArrayHandle(coordArray, out, full); vtkm::cont::printSummary_ArrayHandle(coordArray, out, full);
} }
VTKM_DEPRECATED_SUPPRESS_END VTKM_DEPRECATED_SUPPRESS_END
#endif //VTKM_NO_DEPRECATED_VIRTUAL
class VTKM_CONT_EXPORT CoordinateSystem : public vtkm::cont::Field class VTKM_CONT_EXPORT CoordinateSystem : public vtkm::cont::Field
{ {
...@@ -146,7 +151,11 @@ public: ...@@ -146,7 +151,11 @@ public:
VTKM_CONT VTKM_CONT
vtkm::Id GetNumberOfPoints() const { return this->GetNumberOfValues(); } vtkm::Id GetNumberOfPoints() const { return this->GetNumberOfValues(); }
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
VTKM_CONT detail::CoordDataDepWrapper GetData() const; VTKM_CONT detail::CoordDataDepWrapper GetData() const;
#else
VTKM_CONT vtkm::cont::VariantArrayHandleBase<vtkm::TypeListFieldVec3> GetData() const;
#endif
private: private:
#ifdef VTKM_USE_DOUBLE_PRECISION #ifdef VTKM_USE_DOUBLE_PRECISION
...@@ -267,11 +276,14 @@ struct DynamicTransformTraits<vtkm::cont::CoordinateSystem> ...@@ -267,11 +276,14 @@ struct DynamicTransformTraits<vtkm::cont::CoordinateSystem>
using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall; using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall;
}; };
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
template <> template <>
struct DynamicTransformTraits<vtkm::cont::detail::CoordDataDepWrapper> struct DynamicTransformTraits<vtkm::cont::detail::CoordDataDepWrapper>
{ {
using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall; using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall;
}; };
#endif //VTKM_NO_DEPRECATED_VIRTUAL
} // namespace internal } // namespace internal
} // namespace cont } // namespace cont
...@@ -283,12 +295,14 @@ struct DynamicTransformTraits<vtkm::cont::detail::CoordDataDepWrapper> ...@@ -283,12 +295,14 @@ struct DynamicTransformTraits<vtkm::cont::detail::CoordDataDepWrapper>
namespace mangled_diy_namespace namespace mangled_diy_namespace
{ {
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
template <> template <>
struct Serialization<vtkm::cont::detail::CoordDataDepWrapper> struct Serialization<vtkm::cont::detail::CoordDataDepWrapper>
: public Serialization< : public Serialization<
vtkm::cont::VariantArrayHandleBase<vtkm::List<vtkm::Vec3f_32, vtkm::Vec3f_64>>> vtkm::cont::VariantArrayHandleBase<vtkm::List<vtkm::Vec3f_32, vtkm::Vec3f_64>>>
{ {
}; };
#endif //VTKM_NO_DEPRECATED_VIRTUAL
template <> template <>
struct Serialization<vtkm::cont::CoordinateSystem> struct Serialization<vtkm::cont::CoordinateSystem>
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
#include <typeinfo> #include <typeinfo>
#ifdef VTKM_NO_DEPRECATED_VIRTUAL
#error "ArrayHandleVirtual is removed. Do not include StorageVirtual.h"
#endif
namespace vtkm namespace vtkm
{ {
namespace cont namespace cont
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <vtkm/cont/ArrayHandleMultiplexer.h> #include <vtkm/cont/ArrayHandleMultiplexer.h>
#include <vtkm/cont/ArrayHandleTransform.h> #include <vtkm/cont/ArrayHandleTransform.h>
#include <vtkm/cont/ArrayHandleVirtual.h>
#include <vtkm/cont/CastAndCall.h> #include <vtkm/cont/CastAndCall.h>
#include <vtkm/cont/DefaultTypes.h> #include <vtkm/cont/DefaultTypes.h>
#include <vtkm/cont/ErrorBadType.h> #include <vtkm/cont/ErrorBadType.h>
...@@ -26,11 +25,16 @@ ...@@ -26,11 +25,16 @@
#include <vtkm/cont/UncertainArrayHandle.h> #include <vtkm/cont/UncertainArrayHandle.h>
#include <vtkm/cont/UnknownArrayHandle.h> #include <vtkm/cont/UnknownArrayHandle.h>
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
#include <vtkm/cont/ArrayHandleVirtual.h>
#endif //VTKM_NO_DEPRECATED_VIRTUAL
namespace vtkm namespace vtkm
{ {
namespace cont namespace cont