mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Convert uses of ListTagBase to List
This commit is contained in:
parent
34b0bba842
commit
92db376236
@ -539,7 +539,7 @@ struct BenchmarkArrayTransfer
|
||||
|
||||
//----------- Benchmark caller -----------------------------------------------
|
||||
|
||||
using TestTypes = vtkm::ListTagBase<vtkm::Float32>;
|
||||
using TestTypes = vtkm::List<vtkm::Float32>;
|
||||
|
||||
static VTKM_CONT bool Run(vtkm::cont::DeviceAdapterId id)
|
||||
{
|
||||
|
@ -142,31 +142,27 @@ struct BenchDevAlgoConfig
|
||||
// functors):
|
||||
static BenchDevAlgoConfig Config = BenchDevAlgoConfig();
|
||||
|
||||
struct BaseTypes : vtkm::ListTagBase<vtkm::UInt8,
|
||||
vtkm::Int32,
|
||||
vtkm::Int64,
|
||||
vtkm::Pair<vtkm::Id, vtkm::Float32>,
|
||||
vtkm::Float32,
|
||||
vtkm::Vec3f_32,
|
||||
vtkm::Float64,
|
||||
vtkm::Vec3f_64>
|
||||
{
|
||||
};
|
||||
using BaseTypes = vtkm::List<vtkm::UInt8,
|
||||
vtkm::Int32,
|
||||
vtkm::Int64,
|
||||
vtkm::Pair<vtkm::Id, vtkm::Float32>,
|
||||
vtkm::Float32,
|
||||
vtkm::Vec3f_32,
|
||||
vtkm::Float64,
|
||||
vtkm::Vec3f_64>;
|
||||
|
||||
struct ExtendedTypes : vtkm::ListTagBase<vtkm::UInt8,
|
||||
vtkm::Vec4ui_8,
|
||||
vtkm::Int32,
|
||||
vtkm::Int64,
|
||||
vtkm::Pair<vtkm::Int32, vtkm::Float32>,
|
||||
vtkm::Pair<vtkm::Int32, vtkm::Float32>,
|
||||
vtkm::Pair<vtkm::Int64, vtkm::Float64>,
|
||||
vtkm::Pair<vtkm::Int64, vtkm::Float64>,
|
||||
vtkm::Float32,
|
||||
vtkm::Vec3f_32,
|
||||
vtkm::Float64,
|
||||
vtkm::Vec3f_64>
|
||||
{
|
||||
};
|
||||
using ExtendedTypes = vtkm::List<vtkm::UInt8,
|
||||
vtkm::Vec4ui_8,
|
||||
vtkm::Int32,
|
||||
vtkm::Int64,
|
||||
vtkm::Pair<vtkm::Int32, vtkm::Float32>,
|
||||
vtkm::Pair<vtkm::Int32, vtkm::Float32>,
|
||||
vtkm::Pair<vtkm::Int64, vtkm::Float64>,
|
||||
vtkm::Pair<vtkm::Int64, vtkm::Float64>,
|
||||
vtkm::Float32,
|
||||
vtkm::Vec3f_32,
|
||||
vtkm::Float64,
|
||||
vtkm::Vec3f_64>;
|
||||
|
||||
static const std::string DIVIDER(40, '-');
|
||||
|
||||
@ -1329,10 +1325,10 @@ public:
|
||||
template <typename ValueTypes>
|
||||
static VTKM_CONT void RunInternal(vtkm::cont::DeviceAdapterId id)
|
||||
{
|
||||
using UInt8Type = vtkm::ListTagBase<vtkm::UInt8>;
|
||||
using UInt16Type = vtkm::ListTagBase<vtkm::UInt16>;
|
||||
using UInt32Type = vtkm::ListTagBase<vtkm::UInt32>;
|
||||
using UInt64Type = vtkm::ListTagBase<vtkm::UInt64>;
|
||||
using UInt8Type = vtkm::List<vtkm::UInt8>;
|
||||
using UInt16Type = vtkm::List<vtkm::UInt16>;
|
||||
using UInt32Type = vtkm::List<vtkm::UInt32>;
|
||||
using UInt64Type = vtkm::List<vtkm::UInt64>;
|
||||
|
||||
// These need specific word types:
|
||||
if (Config.BenchmarkFlags & BITFIELD_TO_UNORDERED_SET)
|
||||
|
@ -338,13 +338,9 @@ BMArrayHandleMultiplexer<ArrayHandleType> make_ArrayHandleMultiplexerN(const Arr
|
||||
return BMArrayHandleMultiplexer<ArrayHandleType>(ArrayHandlePassThrough<ArrayHandleType>(array));
|
||||
}
|
||||
|
||||
struct ValueTypes : vtkm::ListTagBase<vtkm::Float32, vtkm::Float64>
|
||||
{
|
||||
};
|
||||
using ValueTypes = vtkm::List<vtkm::Float32, vtkm::Float64>;
|
||||
|
||||
struct InterpValueTypes : vtkm::ListTagBase<vtkm::Float32, vtkm::Vec3f_32>
|
||||
{
|
||||
};
|
||||
using InterpValueTypes = vtkm::List<vtkm::Float32, vtkm::Vec3f_32>;
|
||||
|
||||
/// This class runs a series of micro-benchmarks to measure
|
||||
/// performance of different field operations
|
||||
@ -1106,7 +1102,7 @@ public:
|
||||
|
||||
if (benchmarks & IMPLICIT_FUNCTION)
|
||||
{
|
||||
using FloatDefaultType = vtkm::ListTagBase<vtkm::FloatDefault>;
|
||||
using FloatDefaultType = vtkm::List<vtkm::FloatDefault>;
|
||||
|
||||
std::cout << "\nBenchmarking Implicit Function\n";
|
||||
VTKM_RUN_BENCHMARK(ImplicitFunction, FloatDefaultType(), id);
|
||||
|
@ -690,7 +690,7 @@ public:
|
||||
static VTKM_CONT int Run(int benches, vtkm::cont::DeviceAdapterId id)
|
||||
{
|
||||
// This has no influence on the benchmarks. See issue #286.
|
||||
auto dummyTypes = vtkm::ListTagBase<vtkm::Int32>{};
|
||||
auto dummyTypes = vtkm::List<vtkm::Int32>{};
|
||||
|
||||
std::cout << DIVIDER << "\nRunning Filter benchmarks\n";
|
||||
|
||||
|
@ -139,6 +139,6 @@ int main(int argc, char* argv[])
|
||||
vtkm::cont::InitializeOptions::DefaultAnyDevice | vtkm::cont::InitializeOptions::Strict;
|
||||
auto config = vtkm::cont::Initialize(argc, argv, opts);
|
||||
|
||||
VTKM_RUN_BENCHMARK(RayTracing, vtkm::ListTagBase<vtkm::Float32>(), config.Device);
|
||||
VTKM_RUN_BENCHMARK(RayTracing, vtkm::List<vtkm::Float32>(), config.Device);
|
||||
return 0;
|
||||
}
|
||||
|
@ -118,10 +118,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
struct ValueTypes
|
||||
: vtkm::ListTagBase<vtkm::UInt32, vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>
|
||||
{
|
||||
};
|
||||
using ValueTypes = vtkm::List<vtkm::UInt32, vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>;
|
||||
|
||||
/// This class runs a series of micro-benchmarks to measure
|
||||
/// performance of different field operations
|
||||
|
@ -65,7 +65,7 @@
|
||||
* // We can now run our benchmark using VTKM_RUN_BENCHMARK, passing the
|
||||
* // benchmark name and type list to run on
|
||||
* int main(int, char**){
|
||||
* VTKM_RUN_BENCHMARK(Silly, vtkm::ListTagBase<vtkm::Float32>());
|
||||
* VTKM_RUN_BENCHMARK(Silly, vtkm::List<vtkm::Float32>());
|
||||
* return 0;
|
||||
* }
|
||||
*
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
struct GameOfLifePolicy : public vtkm::filter::PolicyBase<GameOfLifePolicy>
|
||||
{
|
||||
using FieldTypeList = vtkm::ListTagBase<vtkm::UInt8, vtkm::Vec4ui_8>;
|
||||
using FieldTypeList = vtkm::List<vtkm::UInt8, vtkm::Vec4ui_8>;
|
||||
};
|
||||
|
||||
struct UpdateLifeState : public vtkm::worklet::WorkletPointNeighborhood
|
||||
|
@ -25,8 +25,7 @@ using RuntimeTaskQueue = TaskQueue<std::function<void()>>;
|
||||
class MultiDeviceGradient : public vtkm::filter::FilterField<MultiDeviceGradient>
|
||||
{
|
||||
public:
|
||||
using SupportedTypes =
|
||||
vtkm::ListTagBase<vtkm::Float32, vtkm::Float64, vtkm::Vec3f_32, vtkm::Vec3f_64>;
|
||||
using SupportedTypes = vtkm::List<vtkm::Float32, vtkm::Float64, vtkm::Vec3f_32, vtkm::Vec3f_64>;
|
||||
|
||||
//Construct a MultiDeviceGradient and worker pool
|
||||
VTKM_CONT
|
||||
|
@ -27,7 +27,10 @@ namespace vtkm
|
||||
/// A special tag for a list that represents holding all potential values
|
||||
///
|
||||
/// Note: Can not be used with ForEach for obvious reasons.
|
||||
struct ListTagUniversal : detail::ListRoot
|
||||
struct VTKM_DEPRECATED(
|
||||
1.6,
|
||||
"ListTagUniversal replaced by ListUniversal. Note that ListUniversal cannot be subclassed.")
|
||||
ListTagUniversal : detail::ListRoot
|
||||
{
|
||||
using list = vtkm::detail::ListBase<vtkm::detail::UniversalTag>;
|
||||
};
|
||||
@ -86,8 +89,22 @@ template <typename ListTag>
|
||||
using ListTagAsBrigandList = typename detail::ListTagAsBrigandListImpl<ListTag>::type;
|
||||
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Could use ListApply instead, but that causes deprecation warnings.
|
||||
template <typename List>
|
||||
using ListAsListTag = brigand::wrap<List, vtkm::ListTagBase>;
|
||||
struct ListAsListTagImpl;
|
||||
template <typename... Ts>
|
||||
struct ListAsListTagImpl<vtkm::List<Ts...>>
|
||||
{
|
||||
using type = vtkm::ListTagBase<Ts...>;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <typename List>
|
||||
using ListAsListTag = typename detail::ListAsListTagImpl<List>::type;
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
|
||||
// This allows the new `List` operations work on `ListTag`s.
|
||||
@ -135,9 +152,10 @@ using ListTagApply VTKM_DEPRECATED(1.6, "ListTagApply replaced by ListApply.") =
|
||||
|
||||
/// A special tag for an empty list.
|
||||
///
|
||||
struct VTKM_DEPRECATED(1.6,
|
||||
"ListTagEmpty replaced by ListTag. Note that ListTag cannot be subclassed.")
|
||||
ListTagEmpty : detail::ListRoot
|
||||
struct VTKM_DEPRECATED(
|
||||
1.6,
|
||||
"ListTagEmpty replaced by ListEmpty. Note that ListEmpty cannot be subclassed.") ListTagEmpty
|
||||
: detail::ListRoot
|
||||
{
|
||||
using list = vtkm::detail::ListBase<>;
|
||||
};
|
||||
|
@ -29,6 +29,8 @@
|
||||
{ \
|
||||
}
|
||||
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
|
||||
@ -61,13 +63,12 @@ VTKM_DEPRECATED(
|
||||
1.6,
|
||||
"VTKM_DEFAULT_TYPE_LIST_TAG replaced by VTKM_DEFAULT_TYPE_LIST. "
|
||||
"Note that the new VTKM_DEFAULT_TYPE_LIST cannot be subclassed.")
|
||||
TypeListTagDefault : vtkm::internal::ListAsListTag<vtkm::TypeListCommon>
|
||||
TypeListTagDefault : vtkm::internal::ListAsListTag<VTKM_DEFAULT_TYPE_LIST>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
// Special implementation of ListContains for TypeListTagAll to always be
|
||||
// true. Although TypeListTagAll is necessarily finite, the point is to
|
||||
// be all inclusive. Besides, this should speed up the compilation when
|
||||
@ -77,7 +78,6 @@ struct ListContains<vtkm::TypeListTagAll, Type>
|
||||
{
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
|
||||
// Special implementation of ListHas for TypeListTagAll to always be
|
||||
// true. Although TypeListTagAll is necessarily finite, the point is to
|
||||
@ -86,18 +86,17 @@ VTKM_DEPRECATED_SUPPRESS_END
|
||||
namespace detail
|
||||
{
|
||||
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
template<typename Type>
|
||||
struct ListHasImpl<vtkm::TypeListTagAll, Type>
|
||||
{
|
||||
using type = std::true_type;
|
||||
};
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace vtkm
|
||||
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
#undef VTK_M_OLD_TYPE_LIST_DEFINITION
|
||||
|
||||
#endif //vtk_m_TypeListTag_h
|
||||
|
@ -59,6 +59,7 @@ set(headers
|
||||
CellSet.h
|
||||
CellSetExplicit.h
|
||||
CellSetExtrude.h
|
||||
CellSetList.h
|
||||
CellSetListTag.h
|
||||
CellSetPermutation.h
|
||||
CellSetSingleType.h
|
||||
@ -73,6 +74,7 @@ set(headers
|
||||
DataSetFieldAdd.h
|
||||
DeviceAdapter.h
|
||||
DeviceAdapterAlgorithm.h
|
||||
DeviceAdapterList.h
|
||||
DeviceAdapterListTag.h
|
||||
DeviceAdapterTag.h
|
||||
DynamicCellSet.h
|
||||
@ -104,6 +106,7 @@ set(headers
|
||||
StorageBasic.h
|
||||
StorageExtrude.h
|
||||
StorageImplicit.h
|
||||
StorageList.h
|
||||
StorageListTag.h
|
||||
StorageVirtual.h
|
||||
Timer.h
|
||||
|
57
vtkm/cont/CellSetList.h
Normal file
57
vtkm/cont/CellSetList.h
Normal file
@ -0,0 +1,57 @@
|
||||
//============================================================================
|
||||
// Copyright (c) Kitware, Inc.
|
||||
// All rights reserved.
|
||||
// See LICENSE.txt for details.
|
||||
//
|
||||
// This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_CellSetList_h
|
||||
#define vtk_m_cont_CellSetList_h
|
||||
|
||||
#ifndef VTKM_DEFAULT_CELL_SET_LIST
|
||||
#define VTKM_DEFAULT_CELL_SET_LIST ::vtkm::cont::CellSetListCommon
|
||||
#endif
|
||||
|
||||
#include <vtkm/List.h>
|
||||
|
||||
#include <vtkm/cont/CellSetExplicit.h>
|
||||
#include <vtkm/cont/CellSetExtrude.h>
|
||||
#include <vtkm/cont/CellSetSingleType.h>
|
||||
#include <vtkm/cont/CellSetStructured.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
{
|
||||
|
||||
using CellSetListStructured1D = vtkm::List<vtkm::cont::CellSetStructured<1>>;
|
||||
|
||||
using CellSetListStructured2D = vtkm::List<vtkm::cont::CellSetStructured<2>>;
|
||||
|
||||
using CellSetListStructured3D = vtkm::List<vtkm::cont::CellSetStructured<3>>;
|
||||
|
||||
|
||||
template <typename ShapesStorageTag = VTKM_DEFAULT_SHAPES_STORAGE_TAG,
|
||||
typename ConnectivityStorageTag = VTKM_DEFAULT_CONNECTIVITY_STORAGE_TAG,
|
||||
typename OffsetsStorageTag = VTKM_DEFAULT_OFFSETS_STORAGE_TAG>
|
||||
using CellSetListExplicit = vtkm::List<
|
||||
vtkm::cont::CellSetExplicit<ShapesStorageTag, ConnectivityStorageTag, OffsetsStorageTag>>;
|
||||
|
||||
using CellSetListExplicitDefault = CellSetListExplicit<>;
|
||||
|
||||
using CellSetListCommon = vtkm::List<vtkm::cont::CellSetStructured<2>,
|
||||
vtkm::cont::CellSetStructured<3>,
|
||||
vtkm::cont::CellSetExplicit<>,
|
||||
vtkm::cont::CellSetSingleType<>>;
|
||||
|
||||
using CellSetListStructured =
|
||||
vtkm::List<vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3>>;
|
||||
|
||||
using CellSetListUnstructured =
|
||||
vtkm::List<vtkm::cont::CellSetExplicit<>, vtkm::cont::CellSetSingleType<>>;
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
#endif //vtk_m_cont_CellSetList_h
|
@ -10,68 +10,65 @@
|
||||
#ifndef vtk_m_cont_CellSetListTag_h
|
||||
#define vtk_m_cont_CellSetListTag_h
|
||||
|
||||
// Everything in this header file is deprecated and movded to CellSetList.h.
|
||||
|
||||
#ifndef VTKM_DEFAULT_CELL_SET_LIST_TAG
|
||||
#define VTKM_DEFAULT_CELL_SET_LIST_TAG ::vtkm::cont::CellSetListTagCommon
|
||||
#define VTKM_DEFAULT_CELL_SET_LIST_TAG ::vtkm::cont::detail::CellSetListTagDefault
|
||||
#endif
|
||||
|
||||
#include <vtkm/ListTag.h>
|
||||
|
||||
#include <vtkm/cont/CellSetExplicit.h>
|
||||
#include <vtkm/cont/CellSetExtrude.h>
|
||||
#include <vtkm/cont/CellSetSingleType.h>
|
||||
#include <vtkm/cont/CellSetStructured.h>
|
||||
#include <vtkm/cont/CellSetList.h>
|
||||
|
||||
#define VTK_M_OLD_CELL_LIST_DEFINITION(name) \
|
||||
struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED( \
|
||||
1.6, \
|
||||
"CellSetListTag" #name " replaced by CellSetList" #name ". " \
|
||||
"Note that the new CellSetList" #name " cannot be subclassed.") CellSetListTag##name \
|
||||
: vtkm::internal::ListAsListTag<CellSetList##name> \
|
||||
{ \
|
||||
}
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
{
|
||||
|
||||
struct VTKM_ALWAYS_EXPORT CellSetListTagStructured1D
|
||||
: vtkm::ListTagBase<vtkm::cont::CellSetStructured<1>>
|
||||
{
|
||||
};
|
||||
|
||||
struct VTKM_ALWAYS_EXPORT CellSetListTagStructured2D
|
||||
: vtkm::ListTagBase<vtkm::cont::CellSetStructured<2>>
|
||||
{
|
||||
};
|
||||
|
||||
struct VTKM_ALWAYS_EXPORT CellSetListTagStructured3D
|
||||
: vtkm::ListTagBase<vtkm::cont::CellSetStructured<3>>
|
||||
{
|
||||
};
|
||||
|
||||
VTK_M_OLD_CELL_LIST_DEFINITION(Structured1D);
|
||||
VTK_M_OLD_CELL_LIST_DEFINITION(Structured2D);
|
||||
VTK_M_OLD_CELL_LIST_DEFINITION(Structured3D);
|
||||
VTK_M_OLD_CELL_LIST_DEFINITION(ExplicitDefault);
|
||||
VTK_M_OLD_CELL_LIST_DEFINITION(Common);
|
||||
VTK_M_OLD_CELL_LIST_DEFINITION(Structured);
|
||||
VTK_M_OLD_CELL_LIST_DEFINITION(Unstructured);
|
||||
|
||||
template <typename ShapesStorageTag = VTKM_DEFAULT_SHAPES_STORAGE_TAG,
|
||||
typename ConnectivityStorageTag = VTKM_DEFAULT_CONNECTIVITY_STORAGE_TAG,
|
||||
typename OffsetsStorageTag = VTKM_DEFAULT_OFFSETS_STORAGE_TAG>
|
||||
struct VTKM_ALWAYS_EXPORT CellSetListTagExplicit
|
||||
: vtkm::ListTagBase<
|
||||
vtkm::cont::CellSetExplicit<ShapesStorageTag, ConnectivityStorageTag, OffsetsStorageTag>>
|
||||
struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(
|
||||
1.6,
|
||||
"CellSetListTagExplicit replaced by CellSetListExplicit. "
|
||||
"Note that the new CellSetListExplicit cannot be subclassed.") CellSetListTagExplicit
|
||||
: vtkm::internal::ListAsListTag<
|
||||
CellSetListExplicit<ShapesStorageTag, ConnectivityStorageTag, OffsetsStorageTag>>
|
||||
{
|
||||
};
|
||||
|
||||
struct VTKM_ALWAYS_EXPORT CellSetListTagExplicitDefault : CellSetListTagExplicit<>
|
||||
namespace detail
|
||||
{
|
||||
|
||||
struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(
|
||||
1.6,
|
||||
"VTKM_DEFAULT_CELL_SET_LIST_TAG replaced by VTKM_DEFAULT_CELL_SET_LIST. "
|
||||
"Note that the new VTKM_DEFAULT_CELL_SET_LIST cannot be subclassed.") CellSetListTagDefault
|
||||
: vtkm::internal::ListAsListTag<VTKM_DEFAULT_CELL_SET_LIST>
|
||||
{
|
||||
};
|
||||
|
||||
struct VTKM_ALWAYS_EXPORT CellSetListTagCommon : vtkm::ListTagBase<vtkm::cont::CellSetStructured<2>,
|
||||
vtkm::cont::CellSetStructured<3>,
|
||||
vtkm::cont::CellSetExplicit<>,
|
||||
vtkm::cont::CellSetSingleType<>>
|
||||
{
|
||||
};
|
||||
|
||||
struct VTKM_ALWAYS_EXPORT CellSetListTagStructured
|
||||
: vtkm::ListTagBase<vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3>>
|
||||
{
|
||||
};
|
||||
|
||||
struct VTKM_ALWAYS_EXPORT CellSetListTagUnstructured
|
||||
: vtkm::ListTagBase<vtkm::cont::CellSetExplicit<>, vtkm::cont::CellSetSingleType<>>
|
||||
{
|
||||
};
|
||||
} // namespace detail
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
#undef VTK_M_OLD_CELL_LIST_DEFINITION
|
||||
|
||||
#endif //vtk_m_cont_CellSetListTag_h
|
||||
|
@ -24,8 +24,7 @@ namespace cont
|
||||
class VTKM_CONT_EXPORT CoordinateSystem : public vtkm::cont::Field
|
||||
{
|
||||
using Superclass = vtkm::cont::Field;
|
||||
using CoordinatesTypeList =
|
||||
vtkm::ListTagBase<vtkm::cont::ArrayHandleVirtualCoordinates::ValueType>;
|
||||
using CoordinatesTypeList = vtkm::List<vtkm::cont::ArrayHandleVirtualCoordinates::ValueType>;
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
|
@ -225,7 +225,7 @@ namespace cont
|
||||
{
|
||||
|
||||
template <typename FieldTypeList = VTKM_DEFAULT_TYPE_LIST,
|
||||
typename CellSetTypesList = VTKM_DEFAULT_CELL_SET_LIST_TAG>
|
||||
typename CellSetTypesList = VTKM_DEFAULT_CELL_SET_LIST>
|
||||
struct SerializableDataSet
|
||||
{
|
||||
SerializableDataSet() = default;
|
||||
|
36
vtkm/cont/DeviceAdapterList.h
Normal file
36
vtkm/cont/DeviceAdapterList.h
Normal file
@ -0,0 +1,36 @@
|
||||
//============================================================================
|
||||
// Copyright (c) Kitware, Inc.
|
||||
// All rights reserved.
|
||||
// See LICENSE.txt for details.
|
||||
//
|
||||
// This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_DeviceAdapterList_h
|
||||
#define vtk_m_cont_DeviceAdapterList_h
|
||||
|
||||
#ifndef VTKM_DEFAULT_DEVICE_ADAPTER_LIST
|
||||
#define VTKM_DEFAULT_DEVICE_ADAPTER_LIST ::vtkm::cont::DeviceAdapterListCommon
|
||||
#endif
|
||||
|
||||
#include <vtkm/List.h>
|
||||
|
||||
#include <vtkm/cont/cuda/DeviceAdapterCuda.h>
|
||||
#include <vtkm/cont/openmp/DeviceAdapterOpenMP.h>
|
||||
#include <vtkm/cont/serial/DeviceAdapterSerial.h>
|
||||
#include <vtkm/cont/tbb/DeviceAdapterTBB.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
{
|
||||
|
||||
using DeviceAdapterListCommon = vtkm::List<vtkm::cont::DeviceAdapterTagCuda,
|
||||
vtkm::cont::DeviceAdapterTagTBB,
|
||||
vtkm::cont::DeviceAdapterTagOpenMP,
|
||||
vtkm::cont::DeviceAdapterTagSerial>;
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
#endif //vtk_m_cont_DeviceAdapterList_h
|
@ -10,28 +10,40 @@
|
||||
#ifndef vtk_m_cont_DeviceAdapterListTag_h
|
||||
#define vtk_m_cont_DeviceAdapterListTag_h
|
||||
|
||||
// Everything in this header file is deprecated and movded to DeviceAdapterList.h.
|
||||
|
||||
#ifndef VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG
|
||||
#define VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG ::vtkm::cont::DeviceAdapterListTagCommon
|
||||
#define VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG ::vtkm::cont::detail::DeviceAdapterListTagDefault
|
||||
#endif
|
||||
|
||||
#include <vtkm/ListTag.h>
|
||||
#include <vtkm/List.h>
|
||||
|
||||
#include <vtkm/cont/cuda/DeviceAdapterCuda.h>
|
||||
#include <vtkm/cont/openmp/DeviceAdapterOpenMP.h>
|
||||
#include <vtkm/cont/serial/DeviceAdapterSerial.h>
|
||||
#include <vtkm/cont/tbb/DeviceAdapterTBB.h>
|
||||
#include <vtkm/cont/DeviceAdapterList.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
{
|
||||
|
||||
struct DeviceAdapterListTagCommon : vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagCuda,
|
||||
vtkm::cont::DeviceAdapterTagTBB,
|
||||
vtkm::cont::DeviceAdapterTagOpenMP,
|
||||
vtkm::cont::DeviceAdapterTagSerial>
|
||||
struct VTKM_DEPRECATED(1.6,
|
||||
"DeviceAdapterListTagCommon replaced by DeviceAdapterListCommon. "
|
||||
"Note that the new DeviceAdapterListCommon cannot be subclassed.")
|
||||
DeviceAdapterListTagCommon : vtkm::internal::ListAsListTag<DeviceAdapterListCommon>
|
||||
{
|
||||
};
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
struct VTKM_DEPRECATED(
|
||||
1.6,
|
||||
"VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG replaced by VTKM_DEFAULT_DEVICE_ADAPTER_LIST. "
|
||||
"Note that the new VTKM_DEFAULT_DEVICE_ADAPTER_LIST cannot be subclassed.")
|
||||
DeviceAdapterListTagDefault : vtkm::internal::ListAsListTag<VTKM_DEFAULT_DEVICE_ADAPTER_LIST>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
|
@ -293,7 +293,7 @@ VTKM_CONT void DynamicCellSetBase<CellSetList>::CastAndCall(Functor&& f, Args&&.
|
||||
}
|
||||
}
|
||||
|
||||
using DynamicCellSet = DynamicCellSetBase<VTKM_DEFAULT_CELL_SET_LIST_TAG>;
|
||||
using DynamicCellSet = DynamicCellSetBase<VTKM_DEFAULT_CELL_SET_LIST>;
|
||||
|
||||
namespace internal
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ public:
|
||||
ImplicitFunctionHandle() = default;
|
||||
|
||||
template <typename ImplicitFunctionType,
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG>
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST>
|
||||
explicit ImplicitFunctionHandle(ImplicitFunctionType* function,
|
||||
bool acquireOwnership = true,
|
||||
DeviceAdapterList devices = DeviceAdapterList())
|
||||
@ -38,7 +38,7 @@ public:
|
||||
};
|
||||
|
||||
template <typename ImplicitFunctionType,
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG>
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST>
|
||||
VTKM_CONT ImplicitFunctionHandle
|
||||
make_ImplicitFunctionHandle(ImplicitFunctionType&& func,
|
||||
DeviceAdapterList devices = DeviceAdapterList())
|
||||
@ -53,7 +53,7 @@ VTKM_CONT ImplicitFunctionHandle make_ImplicitFunctionHandle(Args&&... args)
|
||||
{
|
||||
return ImplicitFunctionHandle(new ImplicitFunctionType(std::forward<Args>(args)...),
|
||||
true,
|
||||
VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG());
|
||||
VTKM_DEFAULT_DEVICE_ADAPTER_LIST());
|
||||
}
|
||||
|
||||
template <typename ImplicitFunctionType, typename DeviceAdapterList, typename... Args>
|
||||
@ -82,7 +82,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ImplicitFunctionType,
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG>
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST>
|
||||
explicit ImplicitFunctionValueHandle(ImplicitFunctionType* function,
|
||||
bool acquireOwnership = true,
|
||||
DeviceAdapterList devices = DeviceAdapterList())
|
||||
@ -105,7 +105,7 @@ public:
|
||||
};
|
||||
|
||||
template <typename ImplicitFunctionType,
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG>
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST>
|
||||
VTKM_CONT ImplicitFunctionValueHandle
|
||||
make_ImplicitFunctionValueHandle(ImplicitFunctionType&& func,
|
||||
DeviceAdapterList devices = DeviceAdapterList())
|
||||
@ -120,7 +120,7 @@ VTKM_CONT ImplicitFunctionValueHandle make_ImplicitFunctionValueHandle(Args&&...
|
||||
{
|
||||
return ImplicitFunctionValueHandle(new ImplicitFunctionType(std::forward<Args>(args)...),
|
||||
true,
|
||||
VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG());
|
||||
VTKM_DEFAULT_DEVICE_ADAPTER_LIST());
|
||||
}
|
||||
|
||||
template <typename ImplicitFunctionType, typename DeviceAdapterList, typename... Args>
|
||||
|
@ -102,7 +102,7 @@ private:
|
||||
RuntimeDeviceNames()
|
||||
{
|
||||
InitializeDeviceNames functor(DeviceNames, LowerCaseDeviceNames);
|
||||
vtkm::ListForEach(functor, VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG());
|
||||
vtkm::ListForEach(functor, VTKM_DEFAULT_DEVICE_ADAPTER_LIST());
|
||||
}
|
||||
|
||||
friend struct InitializeDeviceNames;
|
||||
@ -175,7 +175,7 @@ bool RuntimeDeviceInformation::Exists(DeviceAdapterId id) const
|
||||
}
|
||||
|
||||
RuntimeDeviceInformationFunctor functor;
|
||||
vtkm::ListForEach(functor, VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG(), id);
|
||||
vtkm::ListForEach(functor, VTKM_DEFAULT_DEVICE_ADAPTER_LIST(), id);
|
||||
return functor.Exists;
|
||||
}
|
||||
}
|
||||
|
35
vtkm/cont/StorageList.h
Normal file
35
vtkm/cont/StorageList.h
Normal file
@ -0,0 +1,35 @@
|
||||
//============================================================================
|
||||
// Copyright (c) Kitware, Inc.
|
||||
// All rights reserved.
|
||||
// See LICENSE.txt for details.
|
||||
//
|
||||
// This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_StorageList_h
|
||||
#define vtk_m_cont_StorageList_h
|
||||
|
||||
#ifndef VTKM_DEFAULT_STORAGE_LIST
|
||||
#define VTKM_DEFAULT_STORAGE_LIST ::vtkm::cont::StorageListBasic
|
||||
#endif
|
||||
|
||||
#include <vtkm/List.h>
|
||||
|
||||
#include <vtkm/cont/Storage.h>
|
||||
#include <vtkm/cont/StorageBasic.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
{
|
||||
|
||||
using StorageListBasic = vtkm::List<vtkm::cont::StorageTagBasic>;
|
||||
|
||||
// If we want to compile VTK-m with support of memory layouts other than the basic layout, then
|
||||
// add the appropriate storage tags here.
|
||||
using StorageListSupported = vtkm::List<vtkm::cont::StorageTagBasic>;
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
#endif //vtk_m_cont_StorageList_h
|
@ -10,29 +10,49 @@
|
||||
#ifndef vtk_m_cont_StorageListTag_h
|
||||
#define vtk_m_cont_StorageListTag_h
|
||||
|
||||
// Everything in this header file is deprecated and movded to StorageList.h.
|
||||
|
||||
#ifndef VTKM_DEFAULT_STORAGE_LIST_TAG
|
||||
#define VTKM_DEFAULT_STORAGE_LIST_TAG ::vtkm::cont::StorageListTagBasic
|
||||
#define VTKM_DEFAULT_STORAGE_LIST_TAG ::vtkm::cont::detail::StorageListTagDefault
|
||||
#endif
|
||||
|
||||
#include <vtkm/ListTag.h>
|
||||
|
||||
#include <vtkm/cont/Storage.h>
|
||||
#include <vtkm/cont/StorageBasic.h>
|
||||
#include <vtkm/cont/StorageList.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace cont
|
||||
{
|
||||
|
||||
struct VTKM_ALWAYS_EXPORT StorageListTagBasic : vtkm::ListTagBase<vtkm::cont::StorageTagBasic>
|
||||
struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(
|
||||
1.6,
|
||||
"StorageListTagBasic replaced by StorageListBasic. "
|
||||
"Note that the new StorageListBasic cannot be subclassed.") StorageListTagBasic
|
||||
: vtkm::internal::ListAsListTag<StorageListBasic>
|
||||
{
|
||||
};
|
||||
|
||||
// If we want to compile VTK-m with support of memory layouts other than the basic layout, then
|
||||
// add the appropriate storage tags here.
|
||||
struct VTKM_ALWAYS_EXPORT StorageListTagSupported : vtkm::ListTagBase<vtkm::cont::StorageTagBasic>
|
||||
struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(
|
||||
1.6,
|
||||
"StorageListTagSupported replaced by StorageListSupported. "
|
||||
"Note that the new StorageListSupported cannot be subclassed.") StorageListTagSupported
|
||||
: vtkm::internal::ListAsListTag<StorageListSupported>
|
||||
{
|
||||
};
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(
|
||||
1.6,
|
||||
"VTKM_DEFAULT_STORAGE_LIST_TAG replaced by VTKM_DEFAULT_STORAGE_LIST. "
|
||||
"Note that the new VTKM_DEFAULT_STORAGE_LIST cannot be subclassed.") StorageListTagDefault
|
||||
: vtkm::internal::ListAsListTag<VTKM_DEFAULT_STORAGE_LIST>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
|
@ -11,29 +11,17 @@
|
||||
#include <vtkm/cont/RuntimeDeviceTracker.h>
|
||||
#include <vtkm/cont/Timer.h>
|
||||
|
||||
#include <vtkm/internal/brigand.hpp>
|
||||
#include <tuple>
|
||||
|
||||
namespace
|
||||
{
|
||||
template <typename State, typename T>
|
||||
struct RemoveDisabledDevice
|
||||
{
|
||||
using type = typename std::conditional<T::IsEnabled, brigand::push_back<State, T>, State>::type;
|
||||
};
|
||||
template <typename Device>
|
||||
using DeviceInvalid = std::integral_constant<bool, !Device::IsEnabled>;
|
||||
using EnabledDeviceList = vtkm::ListRemoveIf<vtkm::cont::DeviceAdapterListCommon, DeviceInvalid>;
|
||||
|
||||
/// TMP code to generate enabled device timer container
|
||||
using AllDeviceList = vtkm::internal::ListTagAsBrigandList<vtkm::cont::DeviceAdapterListTagCommon>;
|
||||
using EnabledDeviceList = brigand::fold<AllDeviceList,
|
||||
brigand::list<>,
|
||||
RemoveDisabledDevice<brigand::_state, brigand::_element>>;
|
||||
struct EnabledDeviceListTag : vtkm::ListTagBase<>
|
||||
{
|
||||
using list = EnabledDeviceList;
|
||||
};
|
||||
using EnabledTimerImpls =
|
||||
brigand::transform<EnabledDeviceList,
|
||||
brigand::bind<vtkm::cont::DeviceAdapterTimerImplementation, brigand::_1>>;
|
||||
using EnabledTimerImplTuple = brigand::as_tuple<EnabledTimerImpls>;
|
||||
vtkm::ListTransform<EnabledDeviceList, vtkm::cont::DeviceAdapterTimerImplementation>;
|
||||
using EnabledTimerImplTuple = vtkm::ListApply<EnabledTimerImpls, std::tuple>;
|
||||
} // anonymous namespace
|
||||
|
||||
namespace vtkm
|
||||
@ -239,7 +227,7 @@ void Timer::Init()
|
||||
|
||||
void Timer::Reset()
|
||||
{
|
||||
vtkm::ListForEach(ResetFunctor(), EnabledDeviceListTag(), this, this->Internal.get());
|
||||
vtkm::ListForEach(ResetFunctor(), EnabledDeviceList(), this, this->Internal.get());
|
||||
}
|
||||
|
||||
void Timer::Reset(vtkm::cont::DeviceAdapterId device)
|
||||
@ -258,32 +246,32 @@ void Timer::Reset(vtkm::cont::DeviceAdapterId device)
|
||||
|
||||
void Timer::Start()
|
||||
{
|
||||
vtkm::ListForEach(StartFunctor(), EnabledDeviceListTag(), this, this->Internal.get());
|
||||
vtkm::ListForEach(StartFunctor(), EnabledDeviceList(), this, this->Internal.get());
|
||||
}
|
||||
|
||||
void Timer::Stop()
|
||||
{
|
||||
vtkm::ListForEach(StopFunctor(), EnabledDeviceListTag(), this, this->Internal.get());
|
||||
vtkm::ListForEach(StopFunctor(), EnabledDeviceList(), this, this->Internal.get());
|
||||
}
|
||||
|
||||
bool Timer::Started() const
|
||||
{
|
||||
StartedFunctor functor;
|
||||
vtkm::ListForEach(functor, EnabledDeviceListTag(), this, this->Internal.get());
|
||||
vtkm::ListForEach(functor, EnabledDeviceList(), this, this->Internal.get());
|
||||
return functor.Value;
|
||||
}
|
||||
|
||||
bool Timer::Stopped() const
|
||||
{
|
||||
StoppedFunctor functor;
|
||||
vtkm::ListForEach(functor, EnabledDeviceListTag(), this, this->Internal.get());
|
||||
vtkm::ListForEach(functor, EnabledDeviceList(), this, this->Internal.get());
|
||||
return functor.Value;
|
||||
}
|
||||
|
||||
bool Timer::Ready() const
|
||||
{
|
||||
ReadyFunctor functor;
|
||||
vtkm::ListForEach(functor, EnabledDeviceListTag(), this, this->Internal.get());
|
||||
vtkm::ListForEach(functor, EnabledDeviceList(), this, this->Internal.get());
|
||||
return functor.Value;
|
||||
}
|
||||
|
||||
@ -327,7 +315,7 @@ vtkm::Float64 Timer::GetElapsedTime(vtkm::cont::DeviceAdapterId device) const
|
||||
}
|
||||
|
||||
ElapsedTimeFunctor functor;
|
||||
vtkm::ListForEach(functor, EnabledDeviceListTag(), deviceToTime, this->Internal.get());
|
||||
vtkm::ListForEach(functor, EnabledDeviceList(), deviceToTime, this->Internal.get());
|
||||
|
||||
return functor.ElapsedTime;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
#ifndef vtk_m_cont_TryExecute_h
|
||||
#define vtk_m_cont_TryExecute_h
|
||||
|
||||
#include <vtkm/cont/DeviceAdapterListTag.h>
|
||||
#include <vtkm/cont/DeviceAdapterList.h>
|
||||
#include <vtkm/cont/DeviceAdapterTag.h>
|
||||
#include <vtkm/cont/Logging.h>
|
||||
#include <vtkm/cont/RuntimeDeviceTracker.h>
|
||||
@ -115,7 +115,7 @@ inline bool TryExecuteImpl(vtkm::cont::DeviceAdapterId devId,
|
||||
auto& tracker = vtkm::cont::GetRuntimeDeviceTracker();
|
||||
TryExecuteWrapper task;
|
||||
vtkm::ListForEach(task,
|
||||
VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG(),
|
||||
VTKM_DEFAULT_DEVICE_ADAPTER_LIST(),
|
||||
std::forward<Functor>(functor),
|
||||
devId,
|
||||
tracker,
|
||||
@ -181,7 +181,7 @@ VTKM_CONT bool TryExecuteOnDevice(vtkm::cont::DeviceAdapterId devId,
|
||||
Args&&... args)
|
||||
{
|
||||
//determine if we are being passed a device adapter or runtime tracker as our argument
|
||||
using is_deviceAdapter = typename std::is_base_of<vtkm::detail::ListRoot, Arg1>::type;
|
||||
using is_deviceAdapter = vtkm::internal::IsList<Arg1>;
|
||||
|
||||
return detail::TryExecuteImpl(devId,
|
||||
std::forward<Functor>(functor),
|
||||
@ -223,7 +223,7 @@ VTKM_CONT bool TryExecuteOnDevice(vtkm::cont::DeviceAdapterId devId,
|
||||
/// vtkm::cont::TryExecute(TryCallExample(), int{42});
|
||||
///
|
||||
/// // Executing with a device list
|
||||
/// using DeviceList = vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagSerial>;
|
||||
/// using DeviceList = vtkm::List<vtkm::cont::DeviceAdapterTagSerial>;
|
||||
/// vtkm::cont::TryExecute(TryCallExample(), DeviceList(), int{42});
|
||||
///
|
||||
/// \endcode
|
||||
|
@ -134,7 +134,7 @@ public:
|
||||
/// be specified in the second template parameter, which will be passed to
|
||||
/// the CastAndCall.
|
||||
///
|
||||
template <typename T, typename StorageTagList = VTKM_DEFAULT_STORAGE_LIST_TAG>
|
||||
template <typename T, typename StorageTagList = VTKM_DEFAULT_STORAGE_LIST>
|
||||
VTKM_CONT vtkm::cont::ArrayHandleVirtual<T> AsVirtual() const
|
||||
{
|
||||
VTKM_IS_LIST(StorageTagList);
|
||||
@ -287,7 +287,7 @@ private:
|
||||
VTKM_CONT void CastAndCallImpl(std::false_type, Functor&& f, Args&&... args) const
|
||||
{
|
||||
this->CastAndCallImpl(std::true_type(),
|
||||
VTKM_DEFAULT_STORAGE_LIST_TAG(),
|
||||
VTKM_DEFAULT_STORAGE_LIST(),
|
||||
std::forward<Functor>(f),
|
||||
std::forward<Args>(args)...);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename VirtualDerivedType,
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG>
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST>
|
||||
VTKM_CONT explicit VirtualObjectHandle(VirtualDerivedType* derived,
|
||||
bool acquireOwnership = true,
|
||||
DeviceAdapterList devices = DeviceAdapterList())
|
||||
@ -95,7 +95,7 @@ public:
|
||||
|
||||
/// Reset the underlying derived type object
|
||||
template <typename VirtualDerivedType,
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG>
|
||||
typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST>
|
||||
VTKM_CONT void Reset(VirtualDerivedType* derived,
|
||||
bool acquireOwnership = true,
|
||||
DeviceAdapterList devices = DeviceAdapterList())
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <vtkm/cont/internal/AtomicInterfaceExecution.h>
|
||||
|
||||
#include <vtkm/ListTag.h>
|
||||
#include <vtkm/List.h>
|
||||
#include <vtkm/Types.h>
|
||||
|
||||
namespace vtkm
|
||||
@ -31,7 +31,7 @@ class AtomicInterfaceExecution<DeviceAdapterTagCuda>
|
||||
public:
|
||||
// Note: There are 64-bit atomics available, but not on all devices. Stick
|
||||
// with 32-bit only until we require compute capability 3.5+
|
||||
using WordTypes = vtkm::ListTagBase<vtkm::UInt32>;
|
||||
using WordTypes = vtkm::List<vtkm::UInt32>;
|
||||
using WordTypePreferred = vtkm::UInt32;
|
||||
|
||||
#define VTKM_ATOMIC_OPS_FOR_TYPE(type) \
|
||||
|
@ -268,12 +268,12 @@ struct ArgToTemplateType
|
||||
|
||||
void Launch()
|
||||
{
|
||||
using Types = vtkm::ListTagBase<vtkm::UInt8,
|
||||
vtkm::Vec<vtkm::UInt8, 3>,
|
||||
vtkm::Float32,
|
||||
vtkm::Vec<vtkm::Float32, 4>,
|
||||
vtkm::Float64,
|
||||
vtkm::Vec<vtkm::Float64, 4>>;
|
||||
using Types = vtkm::List<vtkm::UInt8,
|
||||
vtkm::Vec<vtkm::UInt8, 3>,
|
||||
vtkm::Float32,
|
||||
vtkm::Vec<vtkm::Float32, 4>,
|
||||
vtkm::Float64,
|
||||
vtkm::Vec<vtkm::Float64, 4>>;
|
||||
vtkm::testing::Testing::TryTypes(ArgToTemplateType(), Types());
|
||||
}
|
||||
|
||||
|
@ -18,12 +18,12 @@ void TestVirtualObjectHandle()
|
||||
auto& tracker = vtkm::cont::GetRuntimeDeviceTracker();
|
||||
|
||||
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagCuda{});
|
||||
using DeviceAdapterList = vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagCuda>;
|
||||
using DeviceAdapterList = vtkm::List<vtkm::cont::DeviceAdapterTagCuda>;
|
||||
vtkm::cont::testing::TestingVirtualObjectHandle<DeviceAdapterList>::Run();
|
||||
|
||||
tracker.Reset();
|
||||
using DeviceAdapterList2 =
|
||||
vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagSerial, vtkm::cont::DeviceAdapterTagCuda>;
|
||||
vtkm::List<vtkm::cont::DeviceAdapterTagSerial, vtkm::cont::DeviceAdapterTagCuda>;
|
||||
vtkm::cont::testing::TestingVirtualObjectHandle<DeviceAdapterList2>::Run();
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <vtkm/internal/Configure.h>
|
||||
#include <vtkm/internal/Windows.h>
|
||||
|
||||
#include <vtkm/ListTag.h>
|
||||
#include <vtkm/List.h>
|
||||
#include <vtkm/Types.h>
|
||||
|
||||
#if defined(VTKM_MSVC) && !defined(VTKM_CUDA)
|
||||
@ -37,7 +37,7 @@ namespace internal
|
||||
class AtomicInterfaceControl
|
||||
{
|
||||
public:
|
||||
using WordTypes = vtkm::ListTagBase<vtkm::UInt8, vtkm::UInt16, vtkm::UInt32, vtkm::UInt64>;
|
||||
using WordTypes = vtkm::List<vtkm::UInt8, vtkm::UInt16, vtkm::UInt32, vtkm::UInt64>;
|
||||
|
||||
// TODO These support UInt64, too. This should be benchmarked to see which
|
||||
// is faster.
|
||||
|
@ -43,7 +43,7 @@ class AtomicInterfaceExecution
|
||||
/// operations.
|
||||
using WordTypePreferred = FastestWordTypeForDevice;
|
||||
|
||||
using WordTypes = vtkm::ListTagBase<vtkm::WordTypeDefault, WordTypePreferred>;
|
||||
using WordTypes = vtkm::List<vtkm::WordTypeDefault, WordTypePreferred>;
|
||||
|
||||
/// Atomically load a value from memory while enforcing, at minimum, "acquire"
|
||||
/// memory ordering.
|
||||
|
@ -16,9 +16,9 @@ namespace
|
||||
|
||||
void TestVirtualObjectHandle()
|
||||
{
|
||||
using DeviceAdapterList = vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagOpenMP>;
|
||||
using DeviceAdapterList = vtkm::List<vtkm::cont::DeviceAdapterTagOpenMP>;
|
||||
using DeviceAdapterList2 =
|
||||
vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagSerial, vtkm::cont::DeviceAdapterTagOpenMP>;
|
||||
vtkm::List<vtkm::cont::DeviceAdapterTagSerial, vtkm::cont::DeviceAdapterTagOpenMP>;
|
||||
|
||||
auto& tracker = vtkm::cont::GetRuntimeDeviceTracker();
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace
|
||||
|
||||
void TestVirtualObjectHandle()
|
||||
{
|
||||
using DeviceAdapterList = vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagSerial>;
|
||||
using DeviceAdapterList = vtkm::List<vtkm::cont::DeviceAdapterTagSerial>;
|
||||
vtkm::cont::testing::TestingVirtualObjectHandle<DeviceAdapterList>::Run();
|
||||
}
|
||||
|
||||
|
@ -19,12 +19,12 @@ void TestVirtualObjectHandle()
|
||||
auto& tracker = vtkm::cont::GetRuntimeDeviceTracker();
|
||||
|
||||
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagTBB{});
|
||||
using DeviceAdapterList = vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagTBB>;
|
||||
using DeviceAdapterList = vtkm::List<vtkm::cont::DeviceAdapterTagTBB>;
|
||||
vtkm::cont::testing::TestingVirtualObjectHandle<DeviceAdapterList>::Run();
|
||||
|
||||
tracker.Reset();
|
||||
using DeviceAdapterList2 =
|
||||
vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagSerial, vtkm::cont::DeviceAdapterTagTBB>;
|
||||
vtkm::List<vtkm::cont::DeviceAdapterTagSerial, vtkm::cont::DeviceAdapterTagTBB>;
|
||||
vtkm::cont::testing::TestingVirtualObjectHandle<DeviceAdapterList2>::Run();
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,7 @@ set(unit_tests
|
||||
UnitTestScopedRuntimeDeviceTracker.cxx
|
||||
UnitTestStorageBasic.cxx
|
||||
UnitTestStorageImplicit.cxx
|
||||
UnitTestStorageList.cxx
|
||||
UnitTestStorageListTag.cxx
|
||||
UnitTestTimer.cxx
|
||||
UnitTestTryExecute.cxx
|
||||
|
@ -348,7 +348,7 @@ inline VTKM_CONT TestEqualResult test_equal_Fields(const vtkm::cont::Field& f1,
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename CellSetTypes = VTKM_DEFAULT_CELL_SET_LIST_TAG,
|
||||
template <typename CellSetTypes = VTKM_DEFAULT_CELL_SET_LIST,
|
||||
typename FieldTypeList = VTKM_DEFAULT_TYPE_LIST>
|
||||
inline VTKM_CONT TestEqualResult test_equal_DataSets(const vtkm::cont::DataSet& ds1,
|
||||
const vtkm::cont::DataSet& ds2,
|
||||
|
@ -30,16 +30,14 @@ namespace cont
|
||||
namespace testing
|
||||
{
|
||||
|
||||
struct CustomTypeList : vtkm::ListTagBase<vtkm::Vec<Int32, 3>,
|
||||
vtkm::Vec<Int64, 3>,
|
||||
vtkm::Vec<Float32, 3>,
|
||||
vtkm::Vec<Float64, 3>,
|
||||
vtkm::Vec<Int32, 9>,
|
||||
vtkm::Vec<Int64, 9>,
|
||||
vtkm::Vec<Float32, 9>,
|
||||
vtkm::Vec<Float64, 9>>
|
||||
{
|
||||
};
|
||||
using CustomTypeList = vtkm::List<vtkm::Vec<Int32, 3>,
|
||||
vtkm::Vec<Int64, 3>,
|
||||
vtkm::Vec<Float32, 3>,
|
||||
vtkm::Vec<Float64, 3>,
|
||||
vtkm::Vec<Int32, 9>,
|
||||
vtkm::Vec<Int64, 9>,
|
||||
vtkm::Vec<Float32, 9>,
|
||||
vtkm::Vec<Float64, 9>>;
|
||||
|
||||
template <typename DeviceAdapterTag>
|
||||
class TestingComputeRange
|
||||
|
@ -1473,24 +1473,16 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
struct ScalarTypesToTest : vtkm::ListTagBase<vtkm::UInt8, vtkm::FloatDefault>
|
||||
{
|
||||
};
|
||||
using ScalarTypesToTest = vtkm::List<vtkm::UInt8, vtkm::FloatDefault>;
|
||||
|
||||
struct ZipTypesToTest : vtkm::ListTagBase<vtkm::Pair<vtkm::UInt8, vtkm::Id>,
|
||||
vtkm::Pair<vtkm::Float64, vtkm::Vec4ui_8>,
|
||||
vtkm::Pair<vtkm::Vec3f_32, vtkm::Vec4i_8>>
|
||||
{
|
||||
};
|
||||
using ZipTypesToTest = vtkm::List<vtkm::Pair<vtkm::UInt8, vtkm::Id>,
|
||||
vtkm::Pair<vtkm::Float64, vtkm::Vec4ui_8>,
|
||||
vtkm::Pair<vtkm::Vec3f_32, vtkm::Vec4i_8>>;
|
||||
|
||||
struct HandleTypesToTest
|
||||
: vtkm::ListTagBase<vtkm::Id, vtkm::Vec2i_32, vtkm::FloatDefault, vtkm::Vec3f_64>
|
||||
{
|
||||
};
|
||||
using HandleTypesToTest =
|
||||
vtkm::List<vtkm::Id, vtkm::Vec2i_32, vtkm::FloatDefault, vtkm::Vec3f_64>;
|
||||
|
||||
struct CastTypesToTest : vtkm::ListTagBase<vtkm::Int32, vtkm::UInt32>
|
||||
{
|
||||
};
|
||||
using CastTypesToTest = vtkm::List<vtkm::Int32, vtkm::UInt32>;
|
||||
|
||||
struct TestAll
|
||||
{
|
||||
|
@ -218,7 +218,7 @@ struct ArgToTemplateType
|
||||
|
||||
void TestArrayHandleExtractComponent()
|
||||
{
|
||||
using TestTypes = vtkm::ListTagBase<vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>;
|
||||
using TestTypes = vtkm::List<vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>;
|
||||
vtkm::testing::Testing::TryTypes(ArgToTemplateType(), TestTypes());
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ struct ArgToTemplateType
|
||||
|
||||
void TestArrayHandleSwizzle()
|
||||
{
|
||||
using TestTypes = vtkm::ListTagBase<vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>;
|
||||
using TestTypes = vtkm::List<vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>;
|
||||
vtkm::testing::Testing::TryTypes(ArgToTemplateType(), TestTypes());
|
||||
}
|
||||
|
||||
|
@ -17,12 +17,9 @@
|
||||
namespace
|
||||
{
|
||||
|
||||
struct NonDefaultCellSetList
|
||||
: vtkm::ListTagBase<
|
||||
vtkm::cont::CellSetStructured<1>,
|
||||
vtkm::cont::CellSetExplicit<vtkm::cont::ArrayHandleConstant<vtkm::UInt8>::StorageTag>>
|
||||
{
|
||||
};
|
||||
using NonDefaultCellSetList =
|
||||
vtkm::List<vtkm::cont::CellSetStructured<1>,
|
||||
vtkm::cont::CellSetExplicit<vtkm::cont::ArrayHandleConstant<vtkm::UInt8>::StorageTag>>;
|
||||
|
||||
template <typename ExpectedCellType>
|
||||
struct CheckFunctor
|
||||
@ -118,7 +115,7 @@ void TryCellSet(CellSetType cellSet, vtkm::cont::DynamicCellSetBase<CellSetList>
|
||||
{
|
||||
CheckDynamicCellSet(cellSet, dynamicCellSet);
|
||||
|
||||
CheckDynamicCellSet(cellSet, dynamicCellSet.ResetCellSetList(vtkm::ListTagBase<CellSetType>()));
|
||||
CheckDynamicCellSet(cellSet, dynamicCellSet.ResetCellSetList(vtkm::List<CellSetType>()));
|
||||
|
||||
TryNewInstance(cellSet, dynamicCellSet);
|
||||
}
|
||||
|
@ -94,13 +94,11 @@ struct IsNoExceptHandle
|
||||
}
|
||||
};
|
||||
|
||||
struct vtkmComplexCustomTypes : vtkm::ListTagBase<vtkm::Vec<vtkm::Vec<float, 3>, 3>,
|
||||
vtkm::Pair<vtkm::UInt64, vtkm::UInt64>,
|
||||
vtkm::Bitset<vtkm::UInt64>,
|
||||
vtkm::Bounds,
|
||||
vtkm::Range>
|
||||
{
|
||||
};
|
||||
using vtkmComplexCustomTypes = vtkm::List<vtkm::Vec<vtkm::Vec<float, 3>, 3>,
|
||||
vtkm::Pair<vtkm::UInt64, vtkm::UInt64>,
|
||||
vtkm::Bitset<vtkm::UInt64>,
|
||||
vtkm::Bounds,
|
||||
vtkm::Range>;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -65,7 +65,7 @@ inline void RunTest(const T& obj)
|
||||
//-----------------------------------------------------------------------------
|
||||
constexpr vtkm::Id ArraySize = 10;
|
||||
|
||||
using TestTypesList = vtkm::ListTagBase<vtkm::Int8, vtkm::Id, vtkm::FloatDefault, vtkm::Vec3f>;
|
||||
using TestTypesList = vtkm::List<vtkm::Int8, vtkm::Id, vtkm::FloatDefault, vtkm::Vec3f>;
|
||||
|
||||
template <typename T, typename S>
|
||||
inline vtkm::cont::VariantArrayHandleBase<vtkm::ListAppend<TestTypesList, vtkm::List<T>>>
|
||||
|
@ -15,12 +15,12 @@ using namespace vtkm::cont::testing::serialization;
|
||||
namespace
|
||||
{
|
||||
|
||||
using FieldTypeList = vtkm::ListTagBase<vtkm::Float32, vtkm::Vec3f>;
|
||||
using CellSetTypes = vtkm::ListTagBase<vtkm::cont::CellSetExplicit<>,
|
||||
vtkm::cont::CellSetSingleType<>,
|
||||
vtkm::cont::CellSetStructured<1>,
|
||||
vtkm::cont::CellSetStructured<2>,
|
||||
vtkm::cont::CellSetStructured<3>>;
|
||||
using FieldTypeList = vtkm::List<vtkm::Float32, vtkm::Vec3f>;
|
||||
using CellSetTypes = vtkm::List<vtkm::cont::CellSetExplicit<>,
|
||||
vtkm::cont::CellSetSingleType<>,
|
||||
vtkm::cont::CellSetStructured<1>,
|
||||
vtkm::cont::CellSetStructured<2>,
|
||||
vtkm::cont::CellSetStructured<3>>;
|
||||
|
||||
using DataSetWrapper = vtkm::cont::SerializableDataSet<FieldTypeList, CellSetTypes>;
|
||||
|
||||
|
72
vtkm/cont/testing/UnitTestStorageList.cxx
Normal file
72
vtkm/cont/testing/UnitTestStorageList.cxx
Normal file
@ -0,0 +1,72 @@
|
||||
//============================================================================
|
||||
// Copyright (c) Kitware, Inc.
|
||||
// All rights reserved.
|
||||
// See LICENSE.txt for details.
|
||||
//
|
||||
// This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
|
||||
#include <vtkm/cont/StorageList.h>
|
||||
|
||||
#include <vtkm/cont/testing/Testing.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
enum TypeId
|
||||
{
|
||||
BASIC
|
||||
};
|
||||
|
||||
TypeId GetTypeId(vtkm::cont::StorageTagBasic)
|
||||
{
|
||||
return BASIC;
|
||||
}
|
||||
|
||||
struct TestFunctor
|
||||
{
|
||||
std::vector<TypeId> FoundTypes;
|
||||
|
||||
template <typename T>
|
||||
VTKM_CONT void operator()(T)
|
||||
{
|
||||
this->FoundTypes.push_back(GetTypeId(T()));
|
||||
}
|
||||
};
|
||||
|
||||
template <vtkm::IdComponent N>
|
||||
void CheckSame(const vtkm::Vec<TypeId, N>& expected, const std::vector<TypeId>& found)
|
||||
{
|
||||
VTKM_TEST_ASSERT(static_cast<vtkm::IdComponent>(found.size()) == N, "Got wrong number of items.");
|
||||
|
||||
for (vtkm::IdComponent index = 0; index < N; index++)
|
||||
{
|
||||
vtkm::UInt32 i = static_cast<vtkm::UInt32>(index);
|
||||
VTKM_TEST_ASSERT(expected[index] == found[i], "Got wrong type.");
|
||||
}
|
||||
}
|
||||
|
||||
template <vtkm::IdComponent N, typename ListTag>
|
||||
void TryList(const vtkm::Vec<TypeId, N>& expected, ListTag)
|
||||
{
|
||||
TestFunctor functor;
|
||||
vtkm::ListForEach(functor, ListTag());
|
||||
CheckSame(expected, functor.FoundTypes);
|
||||
}
|
||||
|
||||
void TestLists()
|
||||
{
|
||||
std::cout << "StorageListBasic" << std::endl;
|
||||
TryList(vtkm::Vec<TypeId, 1>(BASIC), vtkm::cont::StorageListBasic());
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
int UnitTestStorageList(int argc, char* argv[])
|
||||
{
|
||||
return vtkm::cont::testing::Testing::Run(TestLists, argc, argv);
|
||||
}
|
@ -14,6 +14,8 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@ -70,3 +72,5 @@ int UnitTestStorageListTag(int argc, char* argv[])
|
||||
{
|
||||
return vtkm::cont::testing::Testing::Run(TestLists, argc, argv);
|
||||
}
|
||||
|
||||
VTKM_DEPRECATED_SUPPRESS_END
|
||||
|
@ -20,8 +20,8 @@
|
||||
namespace
|
||||
{
|
||||
|
||||
using TimerTestDevices = vtkm::ListAppend<VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG,
|
||||
vtkm::List<vtkm::cont::DeviceAdapterTagAny>>;
|
||||
using TimerTestDevices =
|
||||
vtkm::ListAppend<VTKM_DEFAULT_DEVICE_ADAPTER_LIST, vtkm::List<vtkm::cont::DeviceAdapterTagAny>>;
|
||||
|
||||
constexpr long long waitTimeMilliseconds = 250;
|
||||
constexpr vtkm::Float64 waitTimeSeconds = vtkm::Float64(waitTimeMilliseconds) / 1000;
|
||||
|
@ -130,7 +130,7 @@ struct EdgeCaseFunctor
|
||||
void TryExecuteAllEdgeCases()
|
||||
{
|
||||
using ValidDevice = vtkm::cont::DeviceAdapterTagSerial;
|
||||
using SingleValidList = vtkm::ListTagBase<ValidDevice>;
|
||||
using SingleValidList = vtkm::List<ValidDevice>;
|
||||
|
||||
std::cout << "TryExecute no Runtime, no Device, no parameters." << std::endl;
|
||||
vtkm::cont::TryExecute(EdgeCaseFunctor());
|
||||
@ -217,19 +217,19 @@ static void Run()
|
||||
TryExecuteAllEdgeCases();
|
||||
|
||||
std::cout << "Try a list with a single entry." << std::endl;
|
||||
using SingleValidList = vtkm::ListTagBase<ValidDevice>;
|
||||
using SingleValidList = vtkm::List<ValidDevice>;
|
||||
TryExecuteTests(SingleValidList(), true);
|
||||
|
||||
std::cout << "Try a list with two valid devices." << std::endl;
|
||||
using DoubleValidList = vtkm::ListTagBase<ValidDevice, ValidDevice>;
|
||||
using DoubleValidList = vtkm::List<ValidDevice, ValidDevice>;
|
||||
TryExecuteTests(DoubleValidList(), true);
|
||||
|
||||
std::cout << "Try a list with only invalid device." << std::endl;
|
||||
using SingleInvalidList = vtkm::ListTagBase<InvalidDevice>;
|
||||
using SingleInvalidList = vtkm::List<InvalidDevice>;
|
||||
TryExecuteTests(SingleInvalidList(), false);
|
||||
|
||||
std::cout << "Try a list with an invalid and valid device." << std::endl;
|
||||
using InvalidAndValidList = vtkm::ListTagBase<InvalidDevice, ValidDevice>;
|
||||
using InvalidAndValidList = vtkm::List<InvalidDevice, ValidDevice>;
|
||||
TryExecuteTests(InvalidAndValidList(), true);
|
||||
|
||||
TryExecuteErrorTests();
|
||||
|
@ -271,7 +271,7 @@ void CheckCastToVirtualArrayHandle(const ArrayType& array)
|
||||
static constexpr vtkm::IdComponent NumComps = VTraits::NUM_COMPONENTS;
|
||||
|
||||
using Storage = typename ArrayType::StorageTag;
|
||||
using StorageList = vtkm::ListAppend<VTKM_DEFAULT_STORAGE_LIST_TAG, vtkm::List<Storage>>;
|
||||
using StorageList = vtkm::ListAppend<VTKM_DEFAULT_STORAGE_LIST, vtkm::List<Storage>>;
|
||||
|
||||
using TypeList = vtkm::ListAppend<VTKM_DEFAULT_TYPE_LIST, vtkm::List<ValueType>>;
|
||||
using VariantArrayType = vtkm::cont::VariantArrayHandleBase<TypeList>;
|
||||
|
@ -30,7 +30,7 @@ namespace filter
|
||||
class VTKM_ALWAYS_EXPORT Contour : public vtkm::filter::FilterDataSetWithField<Contour>
|
||||
{
|
||||
public:
|
||||
using SupportedTypes = vtkm::ListTagBase<vtkm::UInt8, vtkm::Int8, vtkm::Float32, vtkm::Float64>;
|
||||
using SupportedTypes = vtkm::List<vtkm::UInt8, vtkm::Int8, vtkm::Float32, vtkm::Float64>;
|
||||
|
||||
VTKM_FILTER_EXPORT
|
||||
Contour();
|
||||
|
@ -23,10 +23,10 @@ class Filter;
|
||||
|
||||
//namespace detail
|
||||
//{
|
||||
//// template<typename T> vtkm::ListTagBase<T> as_list(T);
|
||||
//vtkm::ListTagUniversal as_list(vtkm::ListTagUniversal);
|
||||
//// template<typename T> vtkm::List<T> as_list(T);
|
||||
//vtkm::ListUniversal as_list(vtkm::ListTagUniversal);
|
||||
//template <typename... T>
|
||||
//vtkm::ListTagBase<T...> as_list(vtkm::ListTagBase<T...>);
|
||||
//vtkm::List<T...> as_list(vtkm::List<T...>);
|
||||
//}
|
||||
|
||||
|
||||
|
@ -19,13 +19,13 @@ namespace filter
|
||||
|
||||
struct GhostCellClassifyPolicy : vtkm::filter::PolicyBase<GhostCellClassifyPolicy>
|
||||
{
|
||||
using FieldTypeList = vtkm::ListTagBase<vtkm::UInt8>;
|
||||
using FieldTypeList = vtkm::List<vtkm::UInt8>;
|
||||
};
|
||||
|
||||
class GhostCellClassify : public vtkm::filter::FilterDataSet<GhostCellClassify>
|
||||
{
|
||||
public:
|
||||
using SupportedTypes = vtkm::ListTagBase<vtkm::UInt8>;
|
||||
using SupportedTypes = vtkm::List<vtkm::UInt8>;
|
||||
|
||||
VTKM_CONT
|
||||
GhostCellClassify();
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
struct TypeUInt8 : vtkm::ListTagBase<vtkm::UInt8>
|
||||
struct TypeUInt8 : vtkm::List<vtkm::UInt8>
|
||||
{
|
||||
};
|
||||
|
||||
|
@ -22,7 +22,7 @@ namespace filter
|
||||
|
||||
struct GhostCellRemovePolicy : vtkm::filter::PolicyBase<GhostCellRemovePolicy>
|
||||
{
|
||||
using FieldTypeList = vtkm::ListTagBase<vtkm::UInt8>;
|
||||
using FieldTypeList = vtkm::List<vtkm::UInt8>;
|
||||
};
|
||||
|
||||
/// \brief Removes ghost cells
|
||||
@ -31,7 +31,7 @@ class GhostCellRemove : public vtkm::filter::FilterDataSetWithField<GhostCellRem
|
||||
{
|
||||
public:
|
||||
//currently the GhostCellRemove filter only works on uint8 data.
|
||||
using SupportedTypes = vtkm::ListTagBase<vtkm::UInt8>;
|
||||
using SupportedTypes = vtkm::List<vtkm::UInt8>;
|
||||
|
||||
VTKM_CONT
|
||||
GhostCellRemove();
|
||||
|
@ -30,8 +30,7 @@ namespace filter
|
||||
class Gradient : public vtkm::filter::FilterCell<Gradient>
|
||||
{
|
||||
public:
|
||||
using SupportedTypes =
|
||||
vtkm::ListTagBase<vtkm::Float32, vtkm::Float64, vtkm::Vec3f_32, vtkm::Vec3f_64>;
|
||||
using SupportedTypes = vtkm::List<vtkm::Float32, vtkm::Float64, vtkm::Vec3f_32, vtkm::Vec3f_64>;
|
||||
|
||||
/// When this flag is on (default is off), the gradient filter will provide a
|
||||
/// point based gradients, which are significantly more costly since for each
|
||||
|
@ -33,7 +33,7 @@ struct PolicyBase
|
||||
{
|
||||
using FieldTypeList = VTKM_DEFAULT_TYPE_LIST;
|
||||
using StorageList = vtkm::ListAppend<
|
||||
VTKM_DEFAULT_STORAGE_LIST_TAG,
|
||||
VTKM_DEFAULT_STORAGE_LIST,
|
||||
vtkm::List<
|
||||
vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag,
|
||||
vtkm::cont::ArrayHandleCartesianProduct<vtkm::cont::ArrayHandle<vtkm::Float32>,
|
||||
@ -43,9 +43,9 @@ struct PolicyBase
|
||||
vtkm::cont::ArrayHandle<vtkm::Float64>,
|
||||
vtkm::cont::ArrayHandle<vtkm::Float64>>::StorageTag>>;
|
||||
|
||||
using StructuredCellSetList = vtkm::cont::CellSetListTagStructured;
|
||||
using UnstructuredCellSetList = vtkm::cont::CellSetListTagUnstructured;
|
||||
using AllCellSetList = VTKM_DEFAULT_CELL_SET_LIST_TAG;
|
||||
using StructuredCellSetList = vtkm::cont::CellSetListStructured;
|
||||
using UnstructuredCellSetList = vtkm::cont::CellSetListUnstructured;
|
||||
using AllCellSetList = VTKM_DEFAULT_CELL_SET_LIST;
|
||||
};
|
||||
|
||||
namespace internal
|
||||
|
@ -31,11 +31,11 @@ namespace filter
|
||||
struct VTKM_ALWAYS_EXPORT PolicyExtrude : vtkm::filter::PolicyBase<PolicyExtrude>
|
||||
{
|
||||
public:
|
||||
using UnstructuredCellSetList = vtkm::ListTagBase<vtkm::cont::CellSetExtrude>;
|
||||
using AllCellSetList = vtkm::ListTagBase<vtkm::cont::CellSetExtrude>;
|
||||
using UnstructuredCellSetList = vtkm::List<vtkm::cont::CellSetExtrude>;
|
||||
using AllCellSetList = vtkm::List<vtkm::cont::CellSetExtrude>;
|
||||
//Todo: add in Cylinder storage tag when it is written
|
||||
using CoordinateStorageList =
|
||||
vtkm::ListTagBase<vtkm::cont::StorageTagBasic, vtkm::cont::internal::StorageTagExtrude>;
|
||||
vtkm::List<vtkm::cont::StorageTagBasic, vtkm::cont::internal::StorageTagExtrude>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ public:
|
||||
|
||||
// WarpScalar often operates on a constant normal value
|
||||
using AdditionalFieldStorage =
|
||||
vtkm::ListTagBase<vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_32>::StorageTag,
|
||||
vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_64>::StorageTag>;
|
||||
vtkm::List<vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_32>::StorageTag,
|
||||
vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_64>::StorageTag>;
|
||||
|
||||
VTKM_CONT
|
||||
WarpScalar(vtkm::FloatDefault scaleAmount);
|
||||
|
@ -31,8 +31,8 @@ class WarpVector : public vtkm::filter::FilterField<WarpVector>
|
||||
public:
|
||||
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||
using AdditionalFieldStorage =
|
||||
vtkm::ListTagBase<vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_32>::StorageTag,
|
||||
vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_64>::StorageTag>;
|
||||
vtkm::List<vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_32>::StorageTag,
|
||||
vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_64>::StorageTag>;
|
||||
|
||||
VTKM_CONT
|
||||
WarpVector(vtkm::FloatDefault scale);
|
||||
|
@ -27,7 +27,7 @@ namespace filter
|
||||
class ZFPCompressor1D : public vtkm::filter::FilterField<ZFPCompressor1D>
|
||||
{
|
||||
public:
|
||||
using SupportedTypes = vtkm::ListTagBase<vtkm::Int32, vtkm::Float32, vtkm::Float64>;
|
||||
using SupportedTypes = vtkm::List<vtkm::Int32, vtkm::Float32, vtkm::Float64>;
|
||||
|
||||
VTKM_CONT
|
||||
ZFPCompressor1D();
|
||||
|
@ -27,7 +27,7 @@ namespace filter
|
||||
class ZFPCompressor2D : public vtkm::filter::FilterField<ZFPCompressor2D>
|
||||
{
|
||||
public:
|
||||
using SupportedTypes = vtkm::ListTagBase<vtkm::Int32, vtkm::Float32, vtkm::Float64>;
|
||||
using SupportedTypes = vtkm::List<vtkm::Int32, vtkm::Float32, vtkm::Float64>;
|
||||
|
||||
VTKM_CONT
|
||||
ZFPCompressor2D();
|
||||
|
@ -27,7 +27,7 @@ namespace filter
|
||||
class ZFPCompressor3D : public vtkm::filter::FilterField<ZFPCompressor3D>
|
||||
{
|
||||
public:
|
||||
using SupportedTypes = vtkm::ListTagBase<vtkm::Int32, vtkm::Float32, vtkm::Float64>;
|
||||
using SupportedTypes = vtkm::List<vtkm::Int32, vtkm::Float32, vtkm::Float64>;
|
||||
VTKM_CONT
|
||||
ZFPCompressor3D();
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace filter
|
||||
class ZFPDecompressor1D : public vtkm::filter::FilterField<ZFPDecompressor1D>
|
||||
{
|
||||
public:
|
||||
using SupportedTypes = vtkm::ListTagBase<vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>;
|
||||
using SupportedTypes = vtkm::List<vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>;
|
||||
|
||||
VTKM_CONT
|
||||
ZFPDecompressor1D();
|
||||
|
@ -28,7 +28,7 @@ namespace filter
|
||||
class ZFPDecompressor2D : public vtkm::filter::FilterField<ZFPDecompressor2D>
|
||||
{
|
||||
public:
|
||||
using SupportedTypes = vtkm::ListTagBase<vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>;
|
||||
using SupportedTypes = vtkm::List<vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>;
|
||||
|
||||
VTKM_CONT
|
||||
ZFPDecompressor2D();
|
||||
|
@ -28,7 +28,7 @@ namespace filter
|
||||
class ZFPDecompressor3D : public vtkm::filter::FilterField<ZFPDecompressor3D>
|
||||
{
|
||||
public:
|
||||
using SupportedTypes = vtkm::ListTagBase<vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>;
|
||||
using SupportedTypes = vtkm::List<vtkm::Int32, vtkm::Int64, vtkm::Float32, vtkm::Float64>;
|
||||
|
||||
VTKM_CONT
|
||||
ZFPDecompressor3D();
|
||||
|
@ -15,6 +15,7 @@
|
||||
#error ListTagDetail.h must be included from ListTag.h
|
||||
#endif
|
||||
|
||||
#include <vtkm/Deprecated.h>
|
||||
#include <vtkm/Types.h>
|
||||
#include <vtkm/internal/brigand.hpp>
|
||||
|
||||
@ -244,7 +245,8 @@ struct ListAppendUniqueImpl
|
||||
/// A basic tag for a list of typenames. This struct can be subclassed
|
||||
/// and still behave like a list tag.
|
||||
template <typename... ArgTypes>
|
||||
struct ListTagBase : detail::ListRoot
|
||||
struct VTKM_DEPRECATED(1.6, "ListTagBase replace by List. Note that List cannot be subclassed.")
|
||||
ListTagBase : detail::ListRoot
|
||||
{
|
||||
using list = detail::ListBase<ArgTypes...>;
|
||||
};
|
||||
|
@ -124,21 +124,15 @@ using ColorBuffer4b = vtkm::cont::ArrayHandle<vtkm::Vec4ui_8>;
|
||||
//vec3s
|
||||
using Vec3F = vtkm::Vec3f_32;
|
||||
using Vec3D = vtkm::Vec3f_64;
|
||||
struct Vec3RenderingTypes : vtkm::ListTagBase<Vec3F, Vec3D>
|
||||
{
|
||||
};
|
||||
using Vec3RenderingTypes = vtkm::List<Vec3F, Vec3D>;
|
||||
|
||||
// Scalars Types
|
||||
using ScalarF = vtkm::Float32;
|
||||
using ScalarD = vtkm::Float64;
|
||||
|
||||
struct RayStatusType : vtkm::ListTagBase<vtkm::UInt8>
|
||||
{
|
||||
};
|
||||
using RayStatusType = vtkm::List<vtkm::UInt8>;
|
||||
|
||||
struct ScalarRenderingTypes : vtkm::ListTagBase<ScalarF, ScalarD>
|
||||
{
|
||||
};
|
||||
using ScalarRenderingTypes = vtkm::List<ScalarF, ScalarD>;
|
||||
}
|
||||
}
|
||||
} //namespace vtkm::rendering::raytracing
|
||||
|
@ -218,13 +218,9 @@ class Clip
|
||||
{
|
||||
// Add support for invert
|
||||
public:
|
||||
struct TypeClipStats : vtkm::ListTagBase<ClipStats>
|
||||
{
|
||||
};
|
||||
using TypeClipStats = vtkm::List<ClipStats>;
|
||||
|
||||
struct TypeEdgeInterp : vtkm::ListTagBase<EdgeInterpolation>
|
||||
{
|
||||
};
|
||||
using TypeEdgeInterp = vtkm::List<EdgeInterpolation>;
|
||||
|
||||
class ComputeStats : public vtkm::worklet::WorkletVisitCellsWithPoints
|
||||
{
|
||||
@ -757,9 +753,7 @@ public:
|
||||
{
|
||||
public:
|
||||
using ValueType = typename ArrayHandleType::ValueType;
|
||||
struct TypeMappedValue : vtkm::ListTagBase<ValueType>
|
||||
{
|
||||
};
|
||||
using TypeMappedValue = vtkm::List<ValueType>;
|
||||
|
||||
InterpolateField(vtkm::cont::ArrayHandle<EdgeInterpolation> edgeInterpolationArray,
|
||||
vtkm::cont::ArrayHandle<vtkm::Id> inCellInterpolationKeys,
|
||||
|
@ -130,7 +130,7 @@ class ExtractStructured
|
||||
{
|
||||
public:
|
||||
using DynamicCellSetStructured =
|
||||
vtkm::cont::DynamicCellSetBase<vtkm::cont::CellSetListTagStructured>;
|
||||
vtkm::cont::DynamicCellSetBase<vtkm::cont::CellSetListStructured>;
|
||||
|
||||
private:
|
||||
using AxisIndexArrayPoints =
|
||||
|
@ -32,15 +32,8 @@ namespace worklet
|
||||
///
|
||||
class VTKM_WORKLET_EXPORT MaskSelect : public internal::MaskBase
|
||||
{
|
||||
struct MaskTypes : vtkm::ListTagBase<vtkm::Int32,
|
||||
vtkm::Int64,
|
||||
vtkm::UInt32,
|
||||
vtkm::UInt64,
|
||||
vtkm::Int8,
|
||||
vtkm::UInt8,
|
||||
char>
|
||||
{
|
||||
};
|
||||
using MaskTypes =
|
||||
vtkm::List<vtkm::Int32, vtkm::Int64, vtkm::UInt32, vtkm::UInt64, vtkm::Int8, vtkm::UInt8, char>;
|
||||
using VariantArrayHandleMask = vtkm::cont::VariantArrayHandleBase<MaskTypes>;
|
||||
|
||||
public:
|
||||
|
@ -207,7 +207,7 @@ public:
|
||||
/// Intepolate the input point field data at the points of the geometry
|
||||
template <typename T,
|
||||
typename Storage,
|
||||
typename InputCellSetTypeList = VTKM_DEFAULT_CELL_SET_LIST_TAG>
|
||||
typename InputCellSetTypeList = VTKM_DEFAULT_CELL_SET_LIST>
|
||||
vtkm::cont::ArrayHandle<T> ProcessPointField(
|
||||
const vtkm::cont::ArrayHandle<T, Storage>& field,
|
||||
InputCellSetTypeList icsTypes = InputCellSetTypeList()) const
|
||||
|
@ -43,16 +43,14 @@ struct ScatterCountingBuilder;
|
||||
///
|
||||
struct VTKM_WORKLET_EXPORT ScatterCounting : internal::ScatterBase
|
||||
{
|
||||
struct CountTypes : vtkm::ListTagBase<vtkm::Int64,
|
||||
vtkm::Int32,
|
||||
vtkm::Int16,
|
||||
vtkm::Int8,
|
||||
vtkm::UInt64,
|
||||
vtkm::UInt32,
|
||||
vtkm::UInt16,
|
||||
vtkm::UInt8>
|
||||
{
|
||||
};
|
||||
using CountTypes = vtkm::List<vtkm::Int64,
|
||||
vtkm::Int32,
|
||||
vtkm::Int16,
|
||||
vtkm::Int8,
|
||||
vtkm::UInt64,
|
||||
vtkm::UInt32,
|
||||
vtkm::UInt16,
|
||||
vtkm::UInt8>;
|
||||
using VariantArrayHandleCount = vtkm::cont::VariantArrayHandleBase<CountTypes>;
|
||||
|
||||
/// Construct a \c ScatterCounting object using an array of counts for the
|
||||
|
@ -265,9 +265,7 @@ struct VertexClustering
|
||||
}
|
||||
};
|
||||
|
||||
struct TypeInt64 : vtkm::ListTagBase<vtkm::Int64>
|
||||
{
|
||||
};
|
||||
using TypeInt64 = vtkm::List<vtkm::Int64>;
|
||||
|
||||
class Cid3HashWorklet : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
|
@ -25,10 +25,7 @@ namespace worklet
|
||||
namespace colorconversion
|
||||
{
|
||||
|
||||
struct LookupTableTypes
|
||||
: vtkm::ListTagBase<vtkm::Vec3ui_8, vtkm::Vec4ui_8, vtkm::Vec3f_32, vtkm::Vec4f_64>
|
||||
{
|
||||
};
|
||||
using LookupTableTypes = vtkm::List<vtkm::Vec3ui_8, vtkm::Vec4ui_8, vtkm::Vec3f_32, vtkm::Vec4f_64>;
|
||||
|
||||
struct LookupTable : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
|
@ -182,7 +182,7 @@ public:
|
||||
const vtkm::cont::ArrayHandle<T, S>& pixels,
|
||||
OutputPortalType& componentsOut) const
|
||||
{
|
||||
input.ResetCellSetList(vtkm::cont::CellSetListTagStructured())
|
||||
input.ResetCellSetList(vtkm::cont::CellSetListStructured())
|
||||
.CastAndCall(ResolveDynamicCellSet(), pixels, componentsOut);
|
||||
}
|
||||
};
|
||||
|
@ -99,9 +99,7 @@ template <typename T>
|
||||
class JoinSuperArcFinder : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn vertex, // (input) index into sorted edges
|
||||
WholeArrayIn values, // (input) data values
|
||||
|
@ -87,9 +87,7 @@ namespace contourtree
|
||||
class Mesh2D_DEM_SaddleStarter : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct PairType : vtkm::ListTagBase<vtkm::Pair<vtkm::Id, vtkm::Id>>
|
||||
{
|
||||
};
|
||||
using PairType = vtkm::List<vtkm::Pair<vtkm::Id, vtkm::Id>>;
|
||||
|
||||
using ControlSignature = void(FieldIn vertex, // (input) index into active vertices
|
||||
FieldIn outDegFirstEdge, // (input) out degree/first edge of vertex
|
||||
|
@ -89,9 +89,7 @@ template <typename T>
|
||||
class Mesh2D_DEM_VertexStarter : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn vertex, // (input) index of vertex
|
||||
WholeArrayIn values, // (input) values within mesh
|
||||
|
@ -88,9 +88,7 @@ namespace contourtree
|
||||
class Mesh3D_DEM_SaddleStarter : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct PairType : vtkm::ListTagBase<vtkm::Pair<vtkm::Id, vtkm::Id>>
|
||||
{
|
||||
};
|
||||
using PairType = vtkm::List<vtkm::Pair<vtkm::Id, vtkm::Id>>;
|
||||
|
||||
using ControlSignature = void(FieldIn vertex, // (input) index into active vertices
|
||||
FieldIn outDegFirstEdge, // (input) out degree/first edge of vertex
|
||||
|
@ -90,9 +90,7 @@ template <typename T>
|
||||
class Mesh3D_DEM_VertexStarter : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn vertex, // (input) index of vertex
|
||||
WholeArrayIn values, // (input) values within mesh
|
||||
|
@ -90,9 +90,7 @@ template <typename T>
|
||||
class RegularPointTransferrer : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn vertexID, // (input) vertex ID
|
||||
WholeArrayIn chainExtremum, // (input) chain extremum
|
||||
|
@ -65,9 +65,7 @@ template <typename T>
|
||||
class ComputeBins : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn xLoc, // (input) x location in halo
|
||||
FieldIn yLoc, // (input) y location in halo
|
||||
|
@ -65,9 +65,7 @@ template <typename T>
|
||||
class ComputePotential : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn index, // (input) particle Id
|
||||
WholeArrayIn partId, // (input) first particle in halo
|
||||
|
@ -65,9 +65,7 @@ template <typename T>
|
||||
class ComputePotentialBin : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn binId, // (input) bin Id
|
||||
WholeArrayIn binCount, // (input) particles per bin
|
||||
|
@ -65,9 +65,7 @@ template <typename T>
|
||||
class ComputePotentialMxN : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn index, // (input) index into particles for one bin
|
||||
WholeArrayIn partId, // (input) original particle id
|
||||
|
@ -65,9 +65,7 @@ template <typename T>
|
||||
class ComputePotentialNeighbors : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn index, // (input) particle Id
|
||||
WholeArrayIn binId, // (input) bin id for this particle
|
||||
|
@ -65,9 +65,7 @@ template <typename T>
|
||||
class ComputePotentialNxN : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn partId, // (input) particle Id
|
||||
WholeArrayIn xLoc, // (input) x location in domain
|
||||
|
@ -65,9 +65,7 @@ template <typename T>
|
||||
class ComputePotentialOnCandidates : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn partId, // (input) particle is part of M
|
||||
WholeArrayIn xLoc, // (input) x location in domain
|
||||
|
@ -65,9 +65,7 @@ template <typename T>
|
||||
class EqualsMinimumPotential : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn partId, // (input) particle Id
|
||||
FieldIn potential1, // (input) particle potential
|
||||
|
@ -65,9 +65,7 @@ template <typename T>
|
||||
class SetCandidateParticles : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
public:
|
||||
struct TagType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using TagType = vtkm::List<T>;
|
||||
|
||||
using ControlSignature = void(FieldIn bestPot, // (input) bin's best potential
|
||||
FieldIn partOffset, // (input) offset to first particle
|
||||
|
@ -25,9 +25,7 @@ namespace gradient
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct CellGradientInType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using CellGradientInType = vtkm::List<T>;
|
||||
|
||||
template <typename T>
|
||||
struct CellGradient : vtkm::worklet::WorkletVisitCellsWithPoints
|
||||
|
@ -20,10 +20,7 @@ namespace worklet
|
||||
namespace gradient
|
||||
{
|
||||
|
||||
struct DivergenceTypes
|
||||
: vtkm::ListTagBase<vtkm::Vec<vtkm::Vec3f_32, 3>, vtkm::Vec<vtkm::Vec3f_64, 3>>
|
||||
{
|
||||
};
|
||||
using DivergenceTypes = vtkm::List<vtkm::Vec<vtkm::Vec3f_32, 3>, vtkm::Vec<vtkm::Vec3f_64, 3>>;
|
||||
|
||||
|
||||
struct Divergence : public vtkm::worklet::WorkletMapField
|
||||
|
@ -26,9 +26,7 @@ namespace gradient
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct PointGradientInType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using PointGradientInType = vtkm::List<T>;
|
||||
|
||||
template <typename T>
|
||||
struct PointGradient : public vtkm::worklet::WorkletVisitPointsWithCells
|
||||
|
@ -20,10 +20,7 @@ namespace worklet
|
||||
namespace gradient
|
||||
{
|
||||
|
||||
struct QCriterionTypes
|
||||
: vtkm::ListTagBase<vtkm::Vec<vtkm::Vec3f_32, 3>, vtkm::Vec<vtkm::Vec3f_64, 3>>
|
||||
{
|
||||
};
|
||||
using QCriterionTypes = vtkm::List<vtkm::Vec<vtkm::Vec3f_32, 3>, vtkm::Vec<vtkm::Vec3f_64, 3>>;
|
||||
|
||||
struct QCriterion : public vtkm::worklet::WorkletMapField
|
||||
{
|
||||
|
@ -23,9 +23,7 @@ namespace gradient
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct StructuredPointGradientInType : vtkm::ListTagBase<T>
|
||||
{
|
||||
};
|
||||
using StructuredPointGradientInType = vtkm::List<T>;
|
||||
|
||||
template <typename T>
|
||||
struct StructuredPointGradient : public vtkm::worklet::WorkletPointNeighborhood
|
||||
|
@ -22,9 +22,7 @@ namespace gradient
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct TransposeType : vtkm::ListTagBase<vtkm::Vec<vtkm::Vec<T, 3>, 3>>
|
||||
{
|
||||
};
|
||||
using TransposeType = vtkm::List<vtkm::Vec<vtkm::Vec<T, 3>, 3>>;
|
||||
|
||||
template <typename T>
|
||||
struct Transpose3x3 : vtkm::worklet::WorkletMapField
|
||||
|
@ -20,10 +20,7 @@ namespace worklet
|
||||
namespace gradient
|
||||
{
|
||||
|
||||
struct VorticityTypes
|
||||
: vtkm::ListTagBase<vtkm::Vec<vtkm::Vec3f_32, 3>, vtkm::Vec<vtkm::Vec3f_64, 3>>
|
||||
{
|
||||
};
|
||||
using VorticityTypes = vtkm::List<vtkm::Vec<vtkm::Vec3f_32, 3>, vtkm::Vec<vtkm::Vec3f_64, 3>>;
|
||||
|
||||
|
||||
struct Vorticity : public vtkm::worklet::WorkletMapField
|
||||
|
@ -106,7 +106,7 @@ void TestCellMeasure()
|
||||
TestCellMeasureWorklet(data,
|
||||
"explicit dataset 6 (empty)",
|
||||
{ 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.0f, 0.0f },
|
||||
vtkm::ListTagBase<>());
|
||||
vtkm::List<>());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,9 +129,9 @@ struct DoVariantTestWorklet
|
||||
vtkm::cont::ArrayCopy(inputHandle, inoutHandle);
|
||||
vtkm::cont::VariantArrayHandle outputVariant(outputHandle);
|
||||
vtkm::cont::VariantArrayHandle inoutVariant(inoutHandle);
|
||||
dispatcher.Invoke(inputVariant.ResetTypes(vtkm::ListTagBase<T>{}),
|
||||
outputVariant.ResetTypes(vtkm::ListTagBase<T>{}),
|
||||
inoutVariant.ResetTypes(vtkm::ListTagBase<T>{}));
|
||||
dispatcher.Invoke(inputVariant.ResetTypes(vtkm::List<T>{}),
|
||||
outputVariant.ResetTypes(vtkm::List<T>{}),
|
||||
inoutVariant.ResetTypes(vtkm::List<T>{}));
|
||||
CheckPortal(outputHandle.GetPortalConstControl());
|
||||
CheckPortal(inoutHandle.GetPortalConstControl());
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user