mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 09:59:12 +00:00
Update lists in TypeListTag.h
A new header named TypeList.h and the type lists have been redefined in this new file. All the types have been renamed from `TypeListTag*` to `TypeList*`. TypeListTag.h has been gutted to provide deprecated versions of the old type list names. There were also some other type lists that were changed from using the old `ListTagBase` to the new `List`.
This commit is contained in:
parent
6fc883213c
commit
cd302effb3
@ -40,13 +40,13 @@ static constexpr vtkm::Id NumWrites = 33554432; // 2^25
|
|||||||
VTKM_MAKE_BENCHMARK(Name##1048576, Class, 1048576)
|
VTKM_MAKE_BENCHMARK(Name##1048576, Class, 1048576)
|
||||||
|
|
||||||
#define RUN_ATOMIC_BENCHMARKS(Name, id) \
|
#define RUN_ATOMIC_BENCHMARKS(Name, id) \
|
||||||
VTKM_RUN_BENCHMARK(Name##1, vtkm::cont::AtomicArrayTypeListTag{}, id); \
|
VTKM_RUN_BENCHMARK(Name##1, vtkm::cont::AtomicArrayTypeList{}, id); \
|
||||||
VTKM_RUN_BENCHMARK(Name##8, vtkm::cont::AtomicArrayTypeListTag{}, id); \
|
VTKM_RUN_BENCHMARK(Name##8, vtkm::cont::AtomicArrayTypeList{}, id); \
|
||||||
VTKM_RUN_BENCHMARK(Name##32, vtkm::cont::AtomicArrayTypeListTag{}, id); \
|
VTKM_RUN_BENCHMARK(Name##32, vtkm::cont::AtomicArrayTypeList{}, id); \
|
||||||
VTKM_RUN_BENCHMARK(Name##512, vtkm::cont::AtomicArrayTypeListTag{}, id); \
|
VTKM_RUN_BENCHMARK(Name##512, vtkm::cont::AtomicArrayTypeList{}, id); \
|
||||||
VTKM_RUN_BENCHMARK(Name##2048, vtkm::cont::AtomicArrayTypeListTag{}, id); \
|
VTKM_RUN_BENCHMARK(Name##2048, vtkm::cont::AtomicArrayTypeList{}, id); \
|
||||||
VTKM_RUN_BENCHMARK(Name##32768, vtkm::cont::AtomicArrayTypeListTag{}, id); \
|
VTKM_RUN_BENCHMARK(Name##32768, vtkm::cont::AtomicArrayTypeList{}, id); \
|
||||||
VTKM_RUN_BENCHMARK(Name##1048576, vtkm::cont::AtomicArrayTypeListTag{}, id)
|
VTKM_RUN_BENCHMARK(Name##1048576, vtkm::cont::AtomicArrayTypeList{}, id)
|
||||||
|
|
||||||
class BenchmarkAtomicArray
|
class BenchmarkAtomicArray
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,7 @@ class HelloField : public vtkm::filter::FilterField<HelloField>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Specify that this filter operates on 3-vectors
|
// Specify that this filter operates on 3-vectors
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
template <typename FieldType, typename Policy>
|
template <typename FieldType, typename Policy>
|
||||||
VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inDataSet,
|
VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inDataSet,
|
||||||
|
@ -25,7 +25,7 @@ public:
|
|||||||
//currently the HistogramMPI filter only works on scalar data.
|
//currently the HistogramMPI filter only works on scalar data.
|
||||||
//this mainly has to do with getting the ranges for each bin
|
//this mainly has to do with getting the ranges for each bin
|
||||||
//would require returning a more complex value type
|
//would require returning a more complex value type
|
||||||
using SupportedTypes = vtkm::TypeListTagScalarAll;
|
using SupportedTypes = vtkm::TypeListScalarAll;
|
||||||
|
|
||||||
//Construct a HistogramMPI with a default of 10 bins
|
//Construct a HistogramMPI with a default of 10 bins
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
|
@ -44,6 +44,7 @@ set(headers
|
|||||||
Swap.h
|
Swap.h
|
||||||
TopologyElementTag.h
|
TopologyElementTag.h
|
||||||
Transform3D.h
|
Transform3D.h
|
||||||
|
TypeList.h
|
||||||
TypeListTag.h
|
TypeListTag.h
|
||||||
Types.h
|
Types.h
|
||||||
TypeTraits.h
|
TypeTraits.h
|
||||||
|
176
vtkm/TypeList.h
Normal file
176
vtkm/TypeList.h
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
//============================================================================
|
||||||
|
// 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_TypeList_h
|
||||||
|
#define vtk_m_TypeList_h
|
||||||
|
|
||||||
|
#ifndef VTKM_DEFAULT_TYPE_LIST
|
||||||
|
#define VTKM_DEFAULT_TYPE_LIST ::vtkm::TypeListCommon
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <vtkm/List.h>
|
||||||
|
#include <vtkm/Types.h>
|
||||||
|
|
||||||
|
namespace vtkm
|
||||||
|
{
|
||||||
|
|
||||||
|
/// A list containing the type vtkm::Id.
|
||||||
|
///
|
||||||
|
using TypeListId = vtkm::List<vtkm::Id>;
|
||||||
|
|
||||||
|
/// A list containing the type vtkm::Id2.
|
||||||
|
///
|
||||||
|
using TypeListId2 = vtkm::List<vtkm::Id2>;
|
||||||
|
|
||||||
|
/// A list containing the type vtkm::Id3.
|
||||||
|
///
|
||||||
|
using TypeListId3 = vtkm::List<vtkm::Id3>;
|
||||||
|
|
||||||
|
/// A list containing the type vtkm::Id4.
|
||||||
|
///
|
||||||
|
using TypeListId4 = vtkm::List<vtkm::Id4>;
|
||||||
|
|
||||||
|
/// A list containing the type vtkm::IdComponent
|
||||||
|
///
|
||||||
|
using TypeListIdComponent = vtkm::List<vtkm::IdComponent>;
|
||||||
|
|
||||||
|
/// A list containing types used to index arrays. Contains vtkm::Id, vtkm::Id2,
|
||||||
|
/// and vtkm::Id3.
|
||||||
|
///
|
||||||
|
using TypeListIndex = vtkm::List<vtkm::Id, vtkm::Id2, vtkm::Id3>;
|
||||||
|
|
||||||
|
/// A list containing types used for scalar fields. Specifically, contains
|
||||||
|
/// floating point numbers of different widths (i.e. vtkm::Float32 and
|
||||||
|
/// vtkm::Float64).
|
||||||
|
using TypeListFieldScalar = vtkm::List<vtkm::Float32, vtkm::Float64>;
|
||||||
|
|
||||||
|
/// A list containing types for values for fields with two dimensional
|
||||||
|
/// vectors.
|
||||||
|
///
|
||||||
|
using TypeListFieldVec2 = vtkm::List<vtkm::Vec2f_32, vtkm::Vec2f_64>;
|
||||||
|
|
||||||
|
/// A list containing types for values for fields with three dimensional
|
||||||
|
/// vectors.
|
||||||
|
///
|
||||||
|
using TypeListFieldVec3 = vtkm::List<vtkm::Vec3f_32, vtkm::Vec3f_64>;
|
||||||
|
|
||||||
|
/// A list containing types for values for fields with four dimensional
|
||||||
|
/// vectors.
|
||||||
|
///
|
||||||
|
using TypeListFieldVec4 = vtkm::List<vtkm::Vec4f_32, vtkm::Vec4f_64>;
|
||||||
|
|
||||||
|
/// A list containing common types for floating-point vectors. Specifically contains
|
||||||
|
/// floating point vectors of size 2, 3, and 4 with floating point components.
|
||||||
|
/// Scalars are not included.
|
||||||
|
///
|
||||||
|
using TypeListFloatVec = vtkm::List<vtkm::Vec2f_32,
|
||||||
|
vtkm::Vec2f_64,
|
||||||
|
vtkm::Vec3f_32,
|
||||||
|
vtkm::Vec3f_64,
|
||||||
|
vtkm::Vec4f_32,
|
||||||
|
vtkm::Vec4f_64>;
|
||||||
|
|
||||||
|
/// A list containing common types for values in fields. Specifically contains
|
||||||
|
/// floating point scalars and vectors of size 2, 3, and 4 with floating point
|
||||||
|
/// components.
|
||||||
|
///
|
||||||
|
using TypeListField = vtkm::List<vtkm::Float32,
|
||||||
|
vtkm::Float64,
|
||||||
|
vtkm::Vec2f_32,
|
||||||
|
vtkm::Vec2f_64,
|
||||||
|
vtkm::Vec3f_32,
|
||||||
|
vtkm::Vec3f_64,
|
||||||
|
vtkm::Vec4f_32,
|
||||||
|
vtkm::Vec4f_64>;
|
||||||
|
|
||||||
|
/// A list of all scalars defined in vtkm/Types.h. A scalar is a type that
|
||||||
|
/// holds a single number.
|
||||||
|
///
|
||||||
|
using TypeListScalarAll = vtkm::List<vtkm::Int8,
|
||||||
|
vtkm::UInt8,
|
||||||
|
vtkm::Int16,
|
||||||
|
vtkm::UInt16,
|
||||||
|
vtkm::Int32,
|
||||||
|
vtkm::UInt32,
|
||||||
|
vtkm::Int64,
|
||||||
|
vtkm::UInt64,
|
||||||
|
vtkm::Float32,
|
||||||
|
vtkm::Float64>;
|
||||||
|
|
||||||
|
/// A list of the most commonly use Vec classes. Specifically, these are
|
||||||
|
/// vectors of size 2, 3, or 4 containing either unsigned bytes, signed
|
||||||
|
/// integers of 32 or 64 bits, or floating point values of 32 or 64 bits.
|
||||||
|
///
|
||||||
|
using TypeListVecCommon = vtkm::List<vtkm::Vec2ui_8,
|
||||||
|
vtkm::Vec2i_32,
|
||||||
|
vtkm::Vec2i_64,
|
||||||
|
vtkm::Vec2f_32,
|
||||||
|
vtkm::Vec2f_64,
|
||||||
|
vtkm::Vec3ui_8,
|
||||||
|
vtkm::Vec3i_32,
|
||||||
|
vtkm::Vec3i_64,
|
||||||
|
vtkm::Vec3f_32,
|
||||||
|
vtkm::Vec3f_64,
|
||||||
|
vtkm::Vec4ui_8,
|
||||||
|
vtkm::Vec4i_32,
|
||||||
|
vtkm::Vec4i_64,
|
||||||
|
vtkm::Vec4f_32,
|
||||||
|
vtkm::Vec4f_64>;
|
||||||
|
|
||||||
|
namespace internal
|
||||||
|
{
|
||||||
|
|
||||||
|
/// A list of uncommon Vec classes with length up to 4. This is not much
|
||||||
|
/// use in general, but is used when joined with \c TypeListVecCommon
|
||||||
|
/// to get a list of all vectors up to size 4.
|
||||||
|
///
|
||||||
|
using TypeListVecUncommon = vtkm::List<vtkm::Vec2i_8,
|
||||||
|
vtkm::Vec2i_16,
|
||||||
|
vtkm::Vec2ui_16,
|
||||||
|
vtkm::Vec2ui_32,
|
||||||
|
vtkm::Vec2ui_64,
|
||||||
|
vtkm::Vec3i_8,
|
||||||
|
vtkm::Vec3i_16,
|
||||||
|
vtkm::Vec3ui_16,
|
||||||
|
vtkm::Vec3ui_32,
|
||||||
|
vtkm::Vec3ui_64,
|
||||||
|
vtkm::Vec4i_8,
|
||||||
|
vtkm::Vec4i_16,
|
||||||
|
vtkm::Vec4ui_16,
|
||||||
|
vtkm::Vec4ui_32,
|
||||||
|
vtkm::Vec4ui_64>;
|
||||||
|
|
||||||
|
} // namespace internal
|
||||||
|
|
||||||
|
/// A list of all vector classes with standard types as components and
|
||||||
|
/// lengths between 2 and 4.
|
||||||
|
///
|
||||||
|
using TypeListVecAll =
|
||||||
|
vtkm::ListAppend<vtkm::TypeListVecCommon, vtkm::internal::TypeListVecUncommon>;
|
||||||
|
|
||||||
|
/// A list of all basic types listed in vtkm/Types.h. Does not include all
|
||||||
|
/// possible VTK-m types like arbitrarily typed and sized Vecs (only up to
|
||||||
|
/// length 4) or math types like matrices.
|
||||||
|
///
|
||||||
|
using TypeListAll = vtkm::ListAppend<vtkm::TypeListScalarAll, vtkm::TypeListVecAll>;
|
||||||
|
|
||||||
|
/// A list of the most commonly used types across multiple domains. Includes
|
||||||
|
/// integers, floating points, and 3 dimensional vectors of floating points.
|
||||||
|
///
|
||||||
|
using TypeListCommon = vtkm::List<vtkm::UInt8,
|
||||||
|
vtkm::Int32,
|
||||||
|
vtkm::Int64,
|
||||||
|
vtkm::Float32,
|
||||||
|
vtkm::Float64,
|
||||||
|
vtkm::Vec3f_32,
|
||||||
|
vtkm::Vec3f_64>;
|
||||||
|
|
||||||
|
} // namespace vtkm
|
||||||
|
|
||||||
|
#endif //vtk_m_TypeList_h
|
@ -10,202 +10,63 @@
|
|||||||
#ifndef vtk_m_TypeListTag_h
|
#ifndef vtk_m_TypeListTag_h
|
||||||
#define vtk_m_TypeListTag_h
|
#define vtk_m_TypeListTag_h
|
||||||
|
|
||||||
|
// Everything in this header file is deprecated and movded to TypeList.h.
|
||||||
|
|
||||||
#ifndef VTKM_DEFAULT_TYPE_LIST_TAG
|
#ifndef VTKM_DEFAULT_TYPE_LIST_TAG
|
||||||
#define VTKM_DEFAULT_TYPE_LIST_TAG ::vtkm::TypeListTagCommon
|
#define VTKM_DEFAULT_TYPE_LIST_TAG ::vtkm::internal::TypeListTagDefault
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <vtkm/ListTag.h>
|
#include <vtkm/ListTag.h>
|
||||||
#include <vtkm/Types.h>
|
#include <vtkm/TypeList.h>
|
||||||
|
|
||||||
|
#define VTK_M_OLD_TYPE_LIST_DEFINITION(name) \
|
||||||
|
struct VTKM_ALWAYS_EXPORT \
|
||||||
|
VTKM_DEPRECATED( \
|
||||||
|
1.6, \
|
||||||
|
"TypeListTag" #name " replaced by TypeList" #name ". " \
|
||||||
|
"Note that the new TypeList" #name " cannot be subclassed.") \
|
||||||
|
TypeListTag ## name : vtkm::internal::ListAsListTag<TypeList ## name> \
|
||||||
|
{ \
|
||||||
|
}
|
||||||
|
|
||||||
namespace vtkm
|
namespace vtkm
|
||||||
{
|
{
|
||||||
|
|
||||||
/// A list containing the type vtkm::Id.
|
VTK_M_OLD_TYPE_LIST_DEFINITION(Id);
|
||||||
///
|
VTK_M_OLD_TYPE_LIST_DEFINITION(Id2);
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagId : vtkm::ListTagBase<vtkm::Id>
|
VTK_M_OLD_TYPE_LIST_DEFINITION(Id3);
|
||||||
{
|
VTK_M_OLD_TYPE_LIST_DEFINITION(IdComponent);
|
||||||
};
|
VTK_M_OLD_TYPE_LIST_DEFINITION(Index);
|
||||||
|
VTK_M_OLD_TYPE_LIST_DEFINITION(FieldScalar);
|
||||||
/// A list containing the type vtkm::Id2.
|
VTK_M_OLD_TYPE_LIST_DEFINITION(FieldVec2);
|
||||||
///
|
VTK_M_OLD_TYPE_LIST_DEFINITION(FieldVec3);
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagId2 : vtkm::ListTagBase<vtkm::Id2>
|
VTK_M_OLD_TYPE_LIST_DEFINITION(FieldVec4);
|
||||||
{
|
VTK_M_OLD_TYPE_LIST_DEFINITION(FloatVec);
|
||||||
};
|
VTK_M_OLD_TYPE_LIST_DEFINITION(Field);
|
||||||
|
VTK_M_OLD_TYPE_LIST_DEFINITION(ScalarAll);
|
||||||
/// A list containing the type vtkm::Id3.
|
VTK_M_OLD_TYPE_LIST_DEFINITION(VecCommon);
|
||||||
///
|
VTK_M_OLD_TYPE_LIST_DEFINITION(VecAll);
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagId3 : vtkm::ListTagBase<vtkm::Id3>
|
VTK_M_OLD_TYPE_LIST_DEFINITION(All);
|
||||||
{
|
VTK_M_OLD_TYPE_LIST_DEFINITION(Common);
|
||||||
};
|
|
||||||
|
|
||||||
/// A list containing the type vtkm::IdComponent
|
|
||||||
///
|
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagIdComponent : vtkm::ListTagBase<vtkm::IdComponent>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/// A list containing types used to index arrays. Contains vtkm::Id, vtkm::Id2,
|
|
||||||
/// and vtkm::Id3.
|
|
||||||
///
|
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagIndex : vtkm::ListTagBase<vtkm::Id, vtkm::Id2, vtkm::Id3>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/// A list containing types used for scalar fields. Specifically, contains
|
|
||||||
/// floating point numbers of different widths (i.e. vtkm::Float32 and
|
|
||||||
/// vtkm::Float64).
|
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagFieldScalar : vtkm::ListTagBase<vtkm::Float32, vtkm::Float64>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/// A list containing types for values for fields with two dimensional
|
|
||||||
/// vectors.
|
|
||||||
///
|
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagFieldVec2
|
|
||||||
: vtkm::ListTagBase<vtkm::Vec2f_32, vtkm::Vec2f_64>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/// A list containing types for values for fields with three dimensional
|
|
||||||
/// vectors.
|
|
||||||
///
|
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagFieldVec3
|
|
||||||
: vtkm::ListTagBase<vtkm::Vec3f_32, vtkm::Vec3f_64>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/// A list containing types for values for fields with four dimensional
|
|
||||||
/// vectors.
|
|
||||||
///
|
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagFieldVec4
|
|
||||||
: vtkm::ListTagBase<vtkm::Vec4f_32, vtkm::Vec4f_64>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/// A list containing common types for floating-point vectors. Specifically contains
|
|
||||||
/// floating point vectors of size 2, 3, and 4 with floating point components.
|
|
||||||
/// Scalars are not included.
|
|
||||||
///
|
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagFloatVec
|
|
||||||
: vtkm::ListTagBase<vtkm::Vec2f_32,
|
|
||||||
vtkm::Vec2f_64,
|
|
||||||
vtkm::Vec3f_32,
|
|
||||||
vtkm::Vec3f_64,
|
|
||||||
vtkm::Vec4f_32,
|
|
||||||
vtkm::Vec4f_64>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/// A list containing common types for values in fields. Specifically contains
|
|
||||||
/// floating point scalars and vectors of size 2, 3, and 4 with floating point
|
|
||||||
/// components.
|
|
||||||
///
|
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagField
|
|
||||||
: vtkm::ListTagBase<vtkm::Float32,
|
|
||||||
vtkm::Float64,
|
|
||||||
vtkm::Vec2f_32,
|
|
||||||
vtkm::Vec2f_64,
|
|
||||||
vtkm::Vec3f_32,
|
|
||||||
vtkm::Vec3f_64,
|
|
||||||
vtkm::Vec4f_32,
|
|
||||||
vtkm::Vec4f_64>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/// A list of all scalars defined in vtkm/Types.h. A scalar is a type that
|
|
||||||
/// holds a single number.
|
|
||||||
///
|
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagScalarAll
|
|
||||||
: vtkm::ListTagBase<vtkm::Int8,
|
|
||||||
vtkm::UInt8,
|
|
||||||
vtkm::Int16,
|
|
||||||
vtkm::UInt16,
|
|
||||||
vtkm::Int32,
|
|
||||||
vtkm::UInt32,
|
|
||||||
vtkm::Int64,
|
|
||||||
vtkm::UInt64,
|
|
||||||
vtkm::Float32,
|
|
||||||
vtkm::Float64>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/// A list of the most commonly use Vec classes. Specifically, these are
|
|
||||||
/// vectors of size 2, 3, or 4 containing either unsigned bytes, signed
|
|
||||||
/// integers of 32 or 64 bits, or floating point values of 32 or 64 bits.
|
|
||||||
///
|
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagVecCommon
|
|
||||||
: vtkm::ListTagBase<vtkm::Vec2ui_8,
|
|
||||||
vtkm::Vec2i_32,
|
|
||||||
vtkm::Vec2i_64,
|
|
||||||
vtkm::Vec2f_32,
|
|
||||||
vtkm::Vec2f_64,
|
|
||||||
vtkm::Vec3ui_8,
|
|
||||||
vtkm::Vec3i_32,
|
|
||||||
vtkm::Vec3i_64,
|
|
||||||
vtkm::Vec3f_32,
|
|
||||||
vtkm::Vec3f_64,
|
|
||||||
vtkm::Vec4ui_8,
|
|
||||||
vtkm::Vec4i_32,
|
|
||||||
vtkm::Vec4i_64,
|
|
||||||
vtkm::Vec4f_32,
|
|
||||||
vtkm::Vec4f_64>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace internal
|
namespace internal
|
||||||
{
|
{
|
||||||
|
|
||||||
/// A list of uncommon Vec classes with length up to 4. This is not much
|
VTK_M_OLD_TYPE_LIST_DEFINITION(VecUncommon);
|
||||||
/// use in general, but is used when joined with \c TypeListTagVecCommon
|
|
||||||
/// to get a list of all vectors up to size 4.
|
// Special definition of TypeListTagCommon to give descriptive warning when
|
||||||
///
|
// VTKM_DEFAULT_TYPE_LIST_TAG is used.
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagVecUncommon
|
struct VTKM_ALWAYS_EXPORT
|
||||||
: vtkm::ListTagBase<vtkm::Vec2i_8,
|
VTKM_DEPRECATED(
|
||||||
vtkm::Vec2i_16,
|
1.6,
|
||||||
vtkm::Vec2ui_16,
|
"VTKM_DEFAULT_TYPE_LIST_TAG replaced by VTKM_DEFAULT_TYPE_LIST. "
|
||||||
vtkm::Vec2ui_32,
|
"Note that the new VTKM_DEFAULT_TYPE_LIST cannot be subclassed.")
|
||||||
vtkm::Vec2ui_64,
|
TypeListTagDefault : vtkm::internal::ListAsListTag<vtkm::TypeListCommon>
|
||||||
vtkm::Vec3i_8,
|
|
||||||
vtkm::Vec3i_16,
|
|
||||||
vtkm::Vec3ui_16,
|
|
||||||
vtkm::Vec3ui_32,
|
|
||||||
vtkm::Vec3ui_64,
|
|
||||||
vtkm::Vec4i_8,
|
|
||||||
vtkm::Vec4i_16,
|
|
||||||
vtkm::Vec4ui_16,
|
|
||||||
vtkm::Vec4ui_32,
|
|
||||||
vtkm::Vec4ui_64>
|
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
|
||||||
/// A list of all vector classes with standard types as components and
|
|
||||||
/// lengths between 2 and 4.
|
|
||||||
///
|
|
||||||
using TypeListTagVecAll =
|
|
||||||
vtkm::ListAppend<vtkm::TypeListTagVecCommon, vtkm::internal::TypeListTagVecUncommon>;
|
|
||||||
|
|
||||||
/// A list of all basic types listed in vtkm/Types.h. Does not include all
|
|
||||||
/// possible VTK-m types like arbitrarily typed and sized Vecs (only up to
|
|
||||||
/// length 4) or math types like matrices.
|
|
||||||
///
|
|
||||||
using TypeListTagAll = vtkm::ListAppend<vtkm::TypeListTagScalarAll, vtkm::TypeListTagVecAll>;
|
|
||||||
|
|
||||||
/// A list of the most commonly used types across multiple domains. Includes
|
|
||||||
/// integers, floating points, and 3 dimensional vectors of floating points.
|
|
||||||
///
|
|
||||||
struct VTKM_ALWAYS_EXPORT TypeListTagCommon
|
|
||||||
: vtkm::ListTagBase<vtkm::UInt8,
|
|
||||||
vtkm::Int32,
|
|
||||||
vtkm::Int64,
|
|
||||||
vtkm::Float32,
|
|
||||||
vtkm::Float64,
|
|
||||||
vtkm::Vec3f_32,
|
|
||||||
vtkm::Vec3f_64>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||||
// Special implementation of ListContains for TypeListTagAll to always be
|
// Special implementation of ListContains for TypeListTagAll to always be
|
||||||
// true. Although TypeListTagAll is necessarily finite, the point is to
|
// true. Although TypeListTagAll is necessarily finite, the point is to
|
||||||
@ -218,21 +79,25 @@ struct ListContains<vtkm::TypeListTagAll, Type>
|
|||||||
};
|
};
|
||||||
VTKM_DEPRECATED_SUPPRESS_END
|
VTKM_DEPRECATED_SUPPRESS_END
|
||||||
|
|
||||||
// Special implementation of ListContains for TypeListTagAll to always be
|
// Special implementation of ListHas for TypeListTagAll to always be
|
||||||
// true. Although TypeListTagAll is necessarily finite, the point is to
|
// true. Although TypeListTagAll is necessarily finite, the point is to
|
||||||
// be all inclusive. Besides, this should speed up the compilation when
|
// be all inclusive. Besides, this should speed up the compilation when
|
||||||
// checking a list that should contain everything.
|
// checking a list that should contain everything.
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
|
|
||||||
|
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||||
template<typename Type>
|
template<typename Type>
|
||||||
struct ListHasImpl<vtkm::TypeListTagAll, Type>
|
struct ListHasImpl<vtkm::TypeListTagAll, Type>
|
||||||
{
|
{
|
||||||
using type = std::true_type;
|
using type = std::true_type;
|
||||||
};
|
};
|
||||||
|
VTKM_DEPRECATED_SUPPRESS_END
|
||||||
|
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
||||||
} // namespace vtkm
|
} // namespace vtkm
|
||||||
|
|
||||||
|
#undef VTK_M_OLD_TYPE_LIST_DEFINITION
|
||||||
|
|
||||||
#endif //vtk_m_TypeListTag_h
|
#endif //vtk_m_TypeListTag_h
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#ifndef vtk_m_cont_ArrayHandleMultiplexer_h
|
#ifndef vtk_m_cont_ArrayHandleMultiplexer_h
|
||||||
#define vtk_m_cont_ArrayHandleMultiplexer_h
|
#define vtk_m_cont_ArrayHandleMultiplexer_h
|
||||||
|
|
||||||
#include <vtkm/TypeListTag.h>
|
|
||||||
#include <vtkm/TypeTraits.h>
|
#include <vtkm/TypeTraits.h>
|
||||||
|
|
||||||
#include <vtkm/internal/Variant.h>
|
#include <vtkm/internal/Variant.h>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#ifndef vtk_m_cont_AtomicArray_h
|
#ifndef vtk_m_cont_AtomicArray_h
|
||||||
#define vtk_m_cont_AtomicArray_h
|
#define vtk_m_cont_AtomicArray_h
|
||||||
|
|
||||||
|
#include <vtkm/List.h>
|
||||||
#include <vtkm/ListTag.h>
|
#include <vtkm/ListTag.h>
|
||||||
#include <vtkm/StaticAssert.h>
|
#include <vtkm/StaticAssert.h>
|
||||||
#include <vtkm/cont/ArrayHandle.h>
|
#include <vtkm/cont/ArrayHandle.h>
|
||||||
@ -24,8 +25,12 @@ namespace cont
|
|||||||
|
|
||||||
/// \brief A type list containing types that can be used with an AtomicArray.
|
/// \brief A type list containing types that can be used with an AtomicArray.
|
||||||
///
|
///
|
||||||
struct AtomicArrayTypeListTag
|
using AtomicArrayTypeList = vtkm::List<vtkm::UInt32, vtkm::Int32, vtkm::UInt64, vtkm::Int64>;
|
||||||
: vtkm::ListTagBase<vtkm::UInt32, vtkm::Int32, vtkm::UInt64, vtkm::Int64>
|
|
||||||
|
struct VTKM_DEPRECATED(1.6,
|
||||||
|
"AtomicArrayTypeListTag replaced by AtomicArrayTypeList. Note that the "
|
||||||
|
"new AtomicArrayTypeList cannot be subclassed.") AtomicArrayTypeListTag
|
||||||
|
: vtkm::internal::ListAsListTag<AtomicArrayTypeList>
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -48,7 +53,7 @@ struct AtomicArrayTypeListTag
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
class AtomicArray : public vtkm::cont::ExecutionObjectBase
|
class AtomicArray : public vtkm::cont::ExecutionObjectBase
|
||||||
{
|
{
|
||||||
static constexpr bool ValueTypeIsValid = vtkm::ListHas<AtomicArrayTypeListTag, T>::value;
|
static constexpr bool ValueTypeIsValid = vtkm::ListHas<AtomicArrayTypeList, T>::value;
|
||||||
VTKM_STATIC_ASSERT_MSG(ValueTypeIsValid, "AtomicArray used with unsupported ValueType.");
|
VTKM_STATIC_ASSERT_MSG(ValueTypeIsValid, "AtomicArray used with unsupported ValueType.");
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ VTKM_CONT vtkm::cont::ArrayHandleVirtualCoordinates MakeArrayHandleVirtualCoordi
|
|||||||
const vtkm::cont::VariantArrayHandleBase<TypeList>& array)
|
const vtkm::cont::VariantArrayHandleBase<TypeList>& array)
|
||||||
{
|
{
|
||||||
vtkm::cont::ArrayHandleVirtualCoordinates output;
|
vtkm::cont::ArrayHandleVirtualCoordinates output;
|
||||||
vtkm::cont::CastAndCall(array.ResetTypes(vtkm::TypeListTagFieldVec3{}),
|
vtkm::cont::CastAndCall(array.ResetTypes(vtkm::TypeListFieldVec3{}),
|
||||||
MakeArrayHandleVirtualCoordinatesFunctor{},
|
MakeArrayHandleVirtualCoordinatesFunctor{},
|
||||||
output);
|
output);
|
||||||
return output;
|
return output;
|
||||||
|
@ -224,7 +224,7 @@ namespace vtkm
|
|||||||
namespace cont
|
namespace cont
|
||||||
{
|
{
|
||||||
|
|
||||||
template <typename FieldTypeList = VTKM_DEFAULT_TYPE_LIST_TAG,
|
template <typename FieldTypeList = VTKM_DEFAULT_TYPE_LIST,
|
||||||
typename CellSetTypesList = VTKM_DEFAULT_CELL_SET_LIST_TAG>
|
typename CellSetTypesList = VTKM_DEFAULT_CELL_SET_LIST_TAG>
|
||||||
struct SerializableDataSet
|
struct SerializableDataSet
|
||||||
{
|
{
|
||||||
|
@ -107,13 +107,13 @@ public:
|
|||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
const vtkm::cont::ArrayHandle<vtkm::Range>& GetRange() const
|
const vtkm::cont::ArrayHandle<vtkm::Range>& GetRange() const
|
||||||
{
|
{
|
||||||
return this->GetRangeImpl(VTKM_DEFAULT_TYPE_LIST_TAG());
|
return this->GetRangeImpl(VTKM_DEFAULT_TYPE_LIST());
|
||||||
};
|
}
|
||||||
|
|
||||||
VTKM_CONT void GetRange(vtkm::Range* range) const
|
VTKM_CONT void GetRange(vtkm::Range* range) const
|
||||||
{
|
{
|
||||||
return this->GetRange(range, VTKM_DEFAULT_TYPE_LIST_TAG());
|
return this->GetRange(range, VTKM_DEFAULT_TYPE_LIST());
|
||||||
};
|
}
|
||||||
|
|
||||||
template <typename T, typename StorageTag>
|
template <typename T, typename StorageTag>
|
||||||
VTKM_CONT void SetData(const vtkm::cont::ArrayHandle<T, StorageTag>& newdata)
|
VTKM_CONT void SetData(const vtkm::cont::ArrayHandle<T, StorageTag>& newdata)
|
||||||
@ -248,7 +248,7 @@ namespace vtkm
|
|||||||
{
|
{
|
||||||
namespace cont
|
namespace cont
|
||||||
{
|
{
|
||||||
template <typename TypeList = VTKM_DEFAULT_TYPE_LIST_TAG>
|
template <typename TypeList = VTKM_DEFAULT_TYPE_LIST>
|
||||||
struct SerializableField
|
struct SerializableField
|
||||||
{
|
{
|
||||||
SerializableField() = default;
|
SerializableField() = default;
|
||||||
|
@ -23,8 +23,7 @@ vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(const vtkm::cont::DataSet
|
|||||||
const std::string& name,
|
const std::string& name,
|
||||||
vtkm::cont::Field::Association assoc)
|
vtkm::cont::Field::Association assoc)
|
||||||
{
|
{
|
||||||
return vtkm::cont::detail::FieldRangeComputeImpl(
|
return vtkm::cont::detail::FieldRangeComputeImpl(dataset, name, assoc, VTKM_DEFAULT_TYPE_LIST());
|
||||||
dataset, name, assoc, VTKM_DEFAULT_TYPE_LIST_TAG());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -33,7 +32,7 @@ vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeCompute(const vtkm::cont::Partiti
|
|||||||
const std::string& name,
|
const std::string& name,
|
||||||
vtkm::cont::Field::Association assoc)
|
vtkm::cont::Field::Association assoc)
|
||||||
{
|
{
|
||||||
return vtkm::cont::detail::FieldRangeComputeImpl(pds, name, assoc, VTKM_DEFAULT_TYPE_LIST_TAG());
|
return vtkm::cont::detail::FieldRangeComputeImpl(pds, name, assoc, VTKM_DEFAULT_TYPE_LIST());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace vtkm::cont
|
} // namespace vtkm::cont
|
||||||
|
@ -27,7 +27,7 @@ vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeGlobalCompute(const vtkm::cont::D
|
|||||||
const std::string& name,
|
const std::string& name,
|
||||||
vtkm::cont::Field::Association assoc)
|
vtkm::cont::Field::Association assoc)
|
||||||
{
|
{
|
||||||
return detail::FieldRangeGlobalComputeImpl(dataset, name, assoc, VTKM_DEFAULT_TYPE_LIST_TAG());
|
return detail::FieldRangeGlobalComputeImpl(dataset, name, assoc, VTKM_DEFAULT_TYPE_LIST());
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -37,7 +37,7 @@ vtkm::cont::ArrayHandle<vtkm::Range> FieldRangeGlobalCompute(
|
|||||||
const std::string& name,
|
const std::string& name,
|
||||||
vtkm::cont::Field::Association assoc)
|
vtkm::cont::Field::Association assoc)
|
||||||
{
|
{
|
||||||
return detail::FieldRangeGlobalComputeImpl(pds, name, assoc, VTKM_DEFAULT_TYPE_LIST_TAG());
|
return detail::FieldRangeGlobalComputeImpl(pds, name, assoc, VTKM_DEFAULT_TYPE_LIST());
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <vtkm/cont/vtkm_cont_export.h>
|
#include <vtkm/cont/vtkm_cont_export.h>
|
||||||
|
|
||||||
#include <vtkm/TypeListTag.h>
|
#include <vtkm/TypeList.h>
|
||||||
#include <vtkm/VecTraits.h>
|
#include <vtkm/VecTraits.h>
|
||||||
|
|
||||||
#include <vtkm/cont/ArrayHandleMultiplexer.h>
|
#include <vtkm/cont/ArrayHandleMultiplexer.h>
|
||||||
@ -46,7 +46,7 @@ namespace cont
|
|||||||
/// mechanism to determine the type when running algorithms.
|
/// mechanism to determine the type when running algorithms.
|
||||||
///
|
///
|
||||||
/// By default, \c VariantArrayHandle will assume that the value type in the
|
/// By default, \c VariantArrayHandle will assume that the value type in the
|
||||||
/// array matches one of the types specified by \c VTKM_DEFAULT_TYPE_LIST_TAG
|
/// array matches one of the types specified by \c VTKM_DEFAULT_TYPE_LIST
|
||||||
/// This list can be changed by using the \c ResetTypes. It is
|
/// This list can be changed by using the \c ResetTypes. It is
|
||||||
/// worthwhile to match these lists closely to the possible types that might be
|
/// worthwhile to match these lists closely to the possible types that might be
|
||||||
/// used. If a type is missing you will get a runtime error. If there are more
|
/// used. If a type is missing you will get a runtime error. If there are more
|
||||||
@ -201,7 +201,7 @@ public:
|
|||||||
/// \c CastAndCall Attempts to cast the held array to a specific value type,
|
/// \c CastAndCall Attempts to cast the held array to a specific value type,
|
||||||
/// then call the given functor with the cast array. The types
|
/// then call the given functor with the cast array. The types
|
||||||
/// tried in the cast are those in the lists defined by the TypeList.
|
/// tried in the cast are those in the lists defined by the TypeList.
|
||||||
/// By default \c VariantArrayHandle set this to \c VTKM_DEFAULT_TYPE_LIST_TAG.
|
/// By default \c VariantArrayHandle set this to \c VTKM_DEFAULT_TYPE_LIST.
|
||||||
///
|
///
|
||||||
/// In addition to the value type, an \c ArrayHandle also requires a storage tag.
|
/// In addition to the value type, an \c ArrayHandle also requires a storage tag.
|
||||||
/// By default, \c CastAndCall attempts to cast the array using the storage tags
|
/// By default, \c CastAndCall attempts to cast the array using the storage tags
|
||||||
@ -296,7 +296,7 @@ private:
|
|||||||
VTKM_CONT void CastAndCallImpl(std::true_type, StorageTagList, Functor&& f, Args&&...) const;
|
VTKM_CONT void CastAndCallImpl(std::true_type, StorageTagList, Functor&& f, Args&&...) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
using VariantArrayHandle = vtkm::cont::VariantArrayHandleBase<VTKM_DEFAULT_TYPE_LIST_TAG>;
|
using VariantArrayHandle = vtkm::cont::VariantArrayHandleBase<VTKM_DEFAULT_TYPE_LIST>;
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <vtkm/cont/arg/TypeCheck.h>
|
#include <vtkm/cont/arg/TypeCheck.h>
|
||||||
|
|
||||||
#include <vtkm/ListTag.h>
|
#include <vtkm/List.h>
|
||||||
|
|
||||||
#include <vtkm/cont/ArrayHandle.h>
|
#include <vtkm/cont/ArrayHandle.h>
|
||||||
#include <vtkm/cont/StorageBasic.h>
|
#include <vtkm/cont/StorageBasic.h>
|
||||||
@ -42,13 +42,13 @@ struct TypeCheck<TypeCheckTagAtomicArray, ArrayType>
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
struct TypeCheck<TypeCheckTagAtomicArray, vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic>>
|
struct TypeCheck<TypeCheckTagAtomicArray, vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic>>
|
||||||
{
|
{
|
||||||
static constexpr bool value = vtkm::ListHas<vtkm::cont::AtomicArrayTypeListTag, T>::value;
|
static constexpr bool value = vtkm::ListHas<vtkm::cont::AtomicArrayTypeList, T>::value;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct TypeCheck<TypeCheckTagAtomicArray, vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagVirtual>>
|
struct TypeCheck<TypeCheckTagAtomicArray, vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagVirtual>>
|
||||||
{
|
{
|
||||||
static constexpr bool value = vtkm::ListHas<vtkm::cont::AtomicArrayTypeListTag, T>::value;
|
static constexpr bool value = vtkm::ListHas<vtkm::cont::AtomicArrayTypeList, T>::value;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ struct TryArrayInOutType
|
|||||||
template <typename Device>
|
template <typename Device>
|
||||||
void TryArrayInOutTransport(Device)
|
void TryArrayInOutTransport(Device)
|
||||||
{
|
{
|
||||||
vtkm::testing::Testing::TryTypes(TryArrayInOutType<Device>(), vtkm::TypeListTagCommon());
|
vtkm::testing::Testing::TryTypes(TryArrayInOutType<Device>(), vtkm::TypeListCommon());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestArrayInOutTransport()
|
void TestArrayInOutTransport()
|
||||||
|
@ -184,9 +184,8 @@ struct TryAtomicArrayType
|
|||||||
template <typename Device>
|
template <typename Device>
|
||||||
void TryArrayOutTransport(Device)
|
void TryArrayOutTransport(Device)
|
||||||
{
|
{
|
||||||
vtkm::testing::Testing::TryTypes(TryWholeArrayType<Device>(), vtkm::TypeListTagCommon());
|
vtkm::testing::Testing::TryTypes(TryWholeArrayType<Device>(), vtkm::TypeListCommon());
|
||||||
vtkm::testing::Testing::TryTypes(TryAtomicArrayType<Device>(),
|
vtkm::testing::Testing::TryTypes(TryAtomicArrayType<Device>(), vtkm::cont::AtomicArrayTypeList());
|
||||||
vtkm::cont::AtomicArrayTypeListTag());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestWholeArrayTransport()
|
void TestWholeArrayTransport()
|
||||||
|
@ -319,7 +319,7 @@ inline VTKM_CONT TestEqualResult test_equal_CellSets(const CellSet1& cellset1,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FieldTypeList = VTKM_DEFAULT_TYPE_LIST_TAG>
|
template <typename FieldTypeList = VTKM_DEFAULT_TYPE_LIST>
|
||||||
inline VTKM_CONT TestEqualResult test_equal_Fields(const vtkm::cont::Field& f1,
|
inline VTKM_CONT TestEqualResult test_equal_Fields(const vtkm::cont::Field& f1,
|
||||||
const vtkm::cont::Field& f2,
|
const vtkm::cont::Field& f2,
|
||||||
FieldTypeList fTtypes = FieldTypeList())
|
FieldTypeList fTtypes = FieldTypeList())
|
||||||
@ -349,7 +349,7 @@ inline VTKM_CONT TestEqualResult test_equal_Fields(const vtkm::cont::Field& f1,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename CellSetTypes = VTKM_DEFAULT_CELL_SET_LIST_TAG,
|
template <typename CellSetTypes = VTKM_DEFAULT_CELL_SET_LIST_TAG,
|
||||||
typename FieldTypeList = VTKM_DEFAULT_TYPE_LIST_TAG>
|
typename FieldTypeList = VTKM_DEFAULT_TYPE_LIST>
|
||||||
inline VTKM_CONT TestEqualResult test_equal_DataSets(const vtkm::cont::DataSet& ds1,
|
inline VTKM_CONT TestEqualResult test_equal_DataSets(const vtkm::cont::DataSet& ds1,
|
||||||
const vtkm::cont::DataSet& ds2,
|
const vtkm::cont::DataSet& ds2,
|
||||||
CellSetTypes ctypes = CellSetTypes(),
|
CellSetTypes ctypes = CellSetTypes(),
|
||||||
|
@ -391,7 +391,7 @@ struct DecoratorTests
|
|||||||
|
|
||||||
void TestArrayHandleDecorator()
|
void TestArrayHandleDecorator()
|
||||||
{
|
{
|
||||||
vtkm::testing::Testing::TryTypes(DecoratorTests{}, vtkm::TypeListTagScalarAll{});
|
vtkm::testing::Testing::TryTypes(DecoratorTests{}, vtkm::TypeListScalarAll{});
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -67,7 +67,7 @@ struct ImplicitTests
|
|||||||
|
|
||||||
void TestArrayHandleImplicit()
|
void TestArrayHandleImplicit()
|
||||||
{
|
{
|
||||||
vtkm::testing::Testing::TryTypes(ImplicitTests(), vtkm::TypeListTagCommon());
|
vtkm::testing::Testing::TryTypes(ImplicitTests(), vtkm::TypeListCommon());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -243,7 +243,7 @@ struct TryInputType
|
|||||||
|
|
||||||
void TestArrayHandlePermutation()
|
void TestArrayHandlePermutation()
|
||||||
{
|
{
|
||||||
vtkm::testing::Testing::TryTypes(TryInputType(), vtkm::TypeListTagCommon());
|
vtkm::testing::Testing::TryTypes(TryInputType(), vtkm::TypeListCommon());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <vtkm/Pair.h>
|
#include <vtkm/Pair.h>
|
||||||
#include <vtkm/Range.h>
|
#include <vtkm/Range.h>
|
||||||
|
|
||||||
#include <vtkm/TypeListTag.h>
|
#include <vtkm/TypeList.h>
|
||||||
#include <vtkm/cont/testing/Testing.h>
|
#include <vtkm/cont/testing/Testing.h>
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
@ -107,14 +107,14 @@ struct vtkmComplexCustomTypes : vtkm::ListTagBase<vtkm::Vec<vtkm::Vec<float, 3>,
|
|||||||
void TestContDataTypesHaveMoveSemantics()
|
void TestContDataTypesHaveMoveSemantics()
|
||||||
{
|
{
|
||||||
//verify the Vec types are triv and noexcept
|
//verify the Vec types are triv and noexcept
|
||||||
vtkm::testing::Testing::TryTypes(IsTrivNoExcept{}, vtkm::TypeListTagVecCommon{});
|
vtkm::testing::Testing::TryTypes(IsTrivNoExcept{}, vtkm::TypeListVecCommon{});
|
||||||
//verify that vtkm::Pair, Bitset, Bounds, and Range are triv and noexcept
|
//verify that vtkm::Pair, Bitset, Bounds, and Range are triv and noexcept
|
||||||
vtkm::testing::Testing::TryTypes(IsTrivNoExcept{}, vtkmComplexCustomTypes{});
|
vtkm::testing::Testing::TryTypes(IsTrivNoExcept{}, vtkmComplexCustomTypes{});
|
||||||
|
|
||||||
|
|
||||||
//verify that ArrayHandles and related portals are noexcept movable
|
//verify that ArrayHandles and related portals are noexcept movable
|
||||||
//allowing for efficient storage in containers such as std::vector
|
//allowing for efficient storage in containers such as std::vector
|
||||||
vtkm::testing::Testing::TryTypes(IsNoExceptHandle{}, vtkm::TypeListTagAll{});
|
vtkm::testing::Testing::TryTypes(IsNoExceptHandle{}, vtkm::TypeListAll{});
|
||||||
|
|
||||||
vtkm::testing::Testing::TryTypes(IsNoExceptHandle{}, ::vtkmComplexCustomTypes{});
|
vtkm::testing::Testing::TryTypes(IsNoExceptHandle{}, ::vtkmComplexCustomTypes{});
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ void CheckCastToVirtualArrayHandle(const ArrayType& array)
|
|||||||
using Storage = typename ArrayType::StorageTag;
|
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_TAG, vtkm::List<Storage>>;
|
||||||
|
|
||||||
using TypeList = vtkm::ListAppend<VTKM_DEFAULT_TYPE_LIST_TAG, vtkm::List<ValueType>>;
|
using TypeList = vtkm::ListAppend<VTKM_DEFAULT_TYPE_LIST, vtkm::List<ValueType>>;
|
||||||
using VariantArrayType = vtkm::cont::VariantArrayHandleBase<TypeList>;
|
using VariantArrayType = vtkm::cont::VariantArrayHandleBase<TypeList>;
|
||||||
|
|
||||||
VariantArrayType arrayVariant = array;
|
VariantArrayType arrayVariant = array;
|
||||||
@ -442,9 +442,9 @@ struct TryBasicVTKmType
|
|||||||
vtkm::cont::VariantArrayHandle array = CreateArrayVariant(T());
|
vtkm::cont::VariantArrayHandle array = CreateArrayVariant(T());
|
||||||
|
|
||||||
CheckArrayVariant(
|
CheckArrayVariant(
|
||||||
array.ResetTypes(vtkm::TypeListTagAll()), vtkm::VecTraits<T>::NUM_COMPONENTS, true, false);
|
array.ResetTypes(vtkm::TypeListAll()), vtkm::VecTraits<T>::NUM_COMPONENTS, true, false);
|
||||||
|
|
||||||
TryNewInstance(T(), array.ResetTypes(vtkm::TypeListTagAll()));
|
TryNewInstance(T(), array.ResetTypes(vtkm::TypeListAll()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ struct TryType
|
|||||||
|
|
||||||
void TestExecObjectFetch()
|
void TestExecObjectFetch()
|
||||||
{
|
{
|
||||||
vtkm::testing::Testing::TryTypes(TryType(), vtkm::TypeListTagCommon());
|
vtkm::testing::Testing::TryTypes(TryType(), vtkm::TypeListCommon());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -242,7 +242,7 @@ void TryStructuredPointCoordinates()
|
|||||||
|
|
||||||
void TestArrayTopologyMapIn()
|
void TestArrayTopologyMapIn()
|
||||||
{
|
{
|
||||||
vtkm::testing::Testing::TryTypes(TryType(), vtkm::TypeListTagCommon());
|
vtkm::testing::Testing::TryTypes(TryType(), vtkm::TypeListCommon());
|
||||||
|
|
||||||
TryStructuredPointCoordinates();
|
TryStructuredPointCoordinates();
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ template <typename IntegrationType>
|
|||||||
class CellMeasures : public vtkm::filter::FilterCell<CellMeasures<IntegrationType>>
|
class CellMeasures : public vtkm::filter::FilterCell<CellMeasures<IntegrationType>>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
CellMeasures();
|
CellMeasures();
|
||||||
|
@ -27,7 +27,7 @@ namespace filter
|
|||||||
class CellSetConnectivity : public vtkm::filter::FilterDataSet<CellSetConnectivity>
|
class CellSetConnectivity : public vtkm::filter::FilterDataSet<CellSetConnectivity>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagScalarAll;
|
using SupportedTypes = vtkm::TypeListScalarAll;
|
||||||
VTKM_CONT CellSetConnectivity();
|
VTKM_CONT CellSetConnectivity();
|
||||||
|
|
||||||
void SetOutputFieldName(const std::string& name) { this->OutputFieldName = name; }
|
void SetOutputFieldName(const std::string& name) { this->OutputFieldName = name; }
|
||||||
|
@ -29,7 +29,7 @@ namespace filter
|
|||||||
class VTKM_ALWAYS_EXPORT ClipWithField : public vtkm::filter::FilterDataSetWithField<ClipWithField>
|
class VTKM_ALWAYS_EXPORT ClipWithField : public vtkm::filter::FilterDataSetWithField<ClipWithField>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagScalarAll;
|
using SupportedTypes = vtkm::TypeListScalarAll;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
void SetClipValue(vtkm::Float64 value) { this->ClipValue = value; }
|
void SetClipValue(vtkm::Float64 value) { this->ClipValue = value; }
|
||||||
|
@ -73,7 +73,7 @@ namespace filter
|
|||||||
class ContourTreeMesh2D : public vtkm::filter::FilterCell<ContourTreeMesh2D>
|
class ContourTreeMesh2D : public vtkm::filter::FilterCell<ContourTreeMesh2D>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = TypeListTagScalarAll;
|
using SupportedTypes = TypeListScalarAll;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ContourTreeMesh2D();
|
ContourTreeMesh2D();
|
||||||
@ -95,7 +95,7 @@ public:
|
|||||||
class ContourTreeMesh3D : public vtkm::filter::FilterCell<ContourTreeMesh3D>
|
class ContourTreeMesh3D : public vtkm::filter::FilterCell<ContourTreeMesh3D>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = TypeListTagScalarAll;
|
using SupportedTypes = TypeListScalarAll;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ContourTreeMesh3D();
|
ContourTreeMesh3D();
|
||||||
|
@ -78,7 +78,7 @@ class MultiBlockContourTreeHelper;
|
|||||||
class ContourTreePPP2 : public vtkm::filter::FilterCell<ContourTreePPP2>
|
class ContourTreePPP2 : public vtkm::filter::FilterCell<ContourTreePPP2>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagScalarAll;
|
using SupportedTypes = vtkm::TypeListScalarAll;
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ContourTreePPP2(bool useMarchingCubes = false, unsigned int computeRegularStructure = 1);
|
ContourTreePPP2(bool useMarchingCubes = false, unsigned int computeRegularStructure = 1);
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class CylindricalCoordinateTransform
|
|||||||
: public vtkm::filter::FilterField<CylindricalCoordinateTransform>
|
: public vtkm::filter::FilterField<CylindricalCoordinateTransform>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
CylindricalCoordinateTransform();
|
CylindricalCoordinateTransform();
|
||||||
@ -46,7 +46,7 @@ private:
|
|||||||
class SphericalCoordinateTransform : public vtkm::filter::FilterField<SphericalCoordinateTransform>
|
class SphericalCoordinateTransform : public vtkm::filter::FilterField<SphericalCoordinateTransform>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
SphericalCoordinateTransform();
|
SphericalCoordinateTransform();
|
||||||
|
@ -23,7 +23,7 @@ class CrossProduct : public vtkm::filter::FilterField<CrossProduct>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//currently the DotProduct filter only works on vector data.
|
//currently the DotProduct filter only works on vector data.
|
||||||
using SupportedTypes = TypeListTagVecCommon;
|
using SupportedTypes = TypeListVecCommon;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
CrossProduct();
|
CrossProduct();
|
||||||
|
@ -23,7 +23,7 @@ class DotProduct : public vtkm::filter::FilterField<DotProduct>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//currently the DotProduct filter only works on vector data.
|
//currently the DotProduct filter only works on vector data.
|
||||||
using SupportedTypes = TypeListTagVecCommon;
|
using SupportedTypes = TypeListVecCommon;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
DotProduct();
|
DotProduct();
|
||||||
|
@ -26,7 +26,7 @@ class Entropy : public vtkm::filter::FilterField<Entropy>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//currently the Entropy filter only works on scalar data.
|
//currently the Entropy filter only works on scalar data.
|
||||||
using SupportedTypes = TypeListTagScalarAll;
|
using SupportedTypes = TypeListScalarAll;
|
||||||
|
|
||||||
//Construct a histogram which is used to compute the entropy with a default of 10 bins
|
//Construct a histogram which is used to compute the entropy with a default of 10 bins
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
|
@ -39,7 +39,7 @@ class ExtractGeometry : public vtkm::filter::FilterDataSet<ExtractGeometry>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//currently the ExtractGeometry filter only works on scalar data.
|
//currently the ExtractGeometry filter only works on scalar data.
|
||||||
using SupportedTypes = TypeListTagScalarAll;
|
using SupportedTypes = TypeListScalarAll;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ExtractGeometry();
|
ExtractGeometry();
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#ifndef vtk_m_filter_FilterTraits_h
|
#ifndef vtk_m_filter_FilterTraits_h
|
||||||
#define vtk_m_filter_FilterTraits_h
|
#define vtk_m_filter_FilterTraits_h
|
||||||
|
|
||||||
#include <vtkm/TypeListTag.h>
|
#include <vtkm/List.h>
|
||||||
|
|
||||||
namespace vtkm
|
namespace vtkm
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ namespace filter
|
|||||||
class Histogram : public vtkm::filter::FilterField<Histogram>
|
class Histogram : public vtkm::filter::FilterField<Histogram>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagScalarAll;
|
using SupportedTypes = vtkm::TypeListScalarAll;
|
||||||
|
|
||||||
//Construct a histogram with a default of 10 bins
|
//Construct a histogram with a default of 10 bins
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
|
@ -31,7 +31,7 @@ namespace filter
|
|||||||
class ImageConnectivity : public vtkm::filter::FilterCell<ImageConnectivity>
|
class ImageConnectivity : public vtkm::filter::FilterCell<ImageConnectivity>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagScalarAll;
|
using SupportedTypes = vtkm::TypeListScalarAll;
|
||||||
|
|
||||||
VTKM_CONT ImageConnectivity();
|
VTKM_CONT ImageConnectivity();
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class ImageMedian : public vtkm::filter::FilterField<ImageMedian>
|
|||||||
int Neighborhood = 1;
|
int Neighborhood = 1;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagScalarAll;
|
using SupportedTypes = vtkm::TypeListScalarAll;
|
||||||
|
|
||||||
VTKM_CONT ImageMedian();
|
VTKM_CONT ImageMedian();
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ namespace filter
|
|||||||
class Lagrangian : public vtkm::filter::FilterDataSetWithField<Lagrangian>
|
class Lagrangian : public vtkm::filter::FilterDataSetWithField<Lagrangian>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
Lagrangian();
|
Lagrangian();
|
||||||
|
@ -28,7 +28,7 @@ namespace filter
|
|||||||
class LagrangianStructures : public vtkm::filter::FilterDataSetWithField<LagrangianStructures>
|
class LagrangianStructures : public vtkm::filter::FilterDataSetWithField<LagrangianStructures>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
LagrangianStructures();
|
LagrangianStructures();
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ enum class CellMetric
|
|||||||
class MeshQuality : public vtkm::filter::FilterField<MeshQuality>
|
class MeshQuality : public vtkm::filter::FilterField<MeshQuality>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
VTKM_CONT MeshQuality(CellMetric);
|
VTKM_CONT MeshQuality(CellMetric);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace filter
|
|||||||
class Pathline : public vtkm::filter::FilterDataSetWithField<Pathline>
|
class Pathline : public vtkm::filter::FilterDataSetWithField<Pathline>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
Pathline();
|
Pathline();
|
||||||
|
@ -28,7 +28,7 @@ namespace filter
|
|||||||
class PointElevation : public vtkm::filter::FilterField<PointElevation>
|
class PointElevation : public vtkm::filter::FilterField<PointElevation>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
PointElevation();
|
PointElevation();
|
||||||
|
@ -24,7 +24,7 @@ namespace filter
|
|||||||
class PointTransform : public vtkm::filter::FilterField<PointTransform>
|
class PointTransform : public vtkm::filter::FilterField<PointTransform>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
PointTransform();
|
PointTransform();
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#ifndef vtk_m_filter_PolicyBase_h
|
#ifndef vtk_m_filter_PolicyBase_h
|
||||||
#define vtk_m_filter_PolicyBase_h
|
#define vtk_m_filter_PolicyBase_h
|
||||||
|
|
||||||
#include <vtkm/TypeListTag.h>
|
#include <vtkm/List.h>
|
||||||
|
|
||||||
#include <vtkm/cont/CellSetListTag.h>
|
#include <vtkm/cont/CellSetListTag.h>
|
||||||
#include <vtkm/cont/CoordinateSystem.h>
|
#include <vtkm/cont/CoordinateSystem.h>
|
||||||
@ -31,7 +31,7 @@ namespace filter
|
|||||||
template <typename Derived>
|
template <typename Derived>
|
||||||
struct PolicyBase
|
struct PolicyBase
|
||||||
{
|
{
|
||||||
using FieldTypeList = VTKM_DEFAULT_TYPE_LIST_TAG;
|
using FieldTypeList = VTKM_DEFAULT_TYPE_LIST;
|
||||||
using StorageList = vtkm::ListAppend<
|
using StorageList = vtkm::ListAppend<
|
||||||
VTKM_DEFAULT_STORAGE_LIST_TAG,
|
VTKM_DEFAULT_STORAGE_LIST_TAG,
|
||||||
vtkm::List<
|
vtkm::List<
|
||||||
|
@ -36,7 +36,7 @@ class SplitSharpEdges : public vtkm::filter::FilterDataSetWithField<SplitSharpEd
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// SplitSharpEdges filter needs cell normals to decide split.
|
// SplitSharpEdges filter needs cell normals to decide split.
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
SplitSharpEdges();
|
SplitSharpEdges();
|
||||||
|
@ -28,7 +28,7 @@ namespace filter
|
|||||||
class StreamSurface : public vtkm::filter::FilterDataSetWithField<StreamSurface>
|
class StreamSurface : public vtkm::filter::FilterDataSetWithField<StreamSurface>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
StreamSurface();
|
StreamSurface();
|
||||||
|
@ -27,7 +27,7 @@ namespace filter
|
|||||||
class Streamline : public vtkm::filter::FilterDataSetWithField<Streamline>
|
class Streamline : public vtkm::filter::FilterDataSetWithField<Streamline>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
Streamline();
|
Streamline();
|
||||||
|
@ -26,7 +26,7 @@ namespace filter
|
|||||||
class SurfaceNormals : public vtkm::filter::FilterCell<SurfaceNormals>
|
class SurfaceNormals : public vtkm::filter::FilterCell<SurfaceNormals>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
/// Create SurfaceNormals filter. This calls
|
/// Create SurfaceNormals filter. This calls
|
||||||
/// this->SetUseCoordinateSystemAsField(true) since that is the most common
|
/// this->SetUseCoordinateSystemAsField(true) since that is the most common
|
||||||
|
@ -33,7 +33,7 @@ namespace filter
|
|||||||
class VTKM_ALWAYS_EXPORT Threshold : public vtkm::filter::FilterDataSetWithField<Threshold>
|
class VTKM_ALWAYS_EXPORT Threshold : public vtkm::filter::FilterDataSetWithField<Threshold>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagScalarAll;
|
using SupportedTypes = vtkm::TypeListScalarAll;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
void SetLowerThreshold(vtkm::Float64 value) { this->LowerValue = value; }
|
void SetLowerThreshold(vtkm::Float64 value) { this->LowerValue = value; }
|
||||||
|
@ -23,7 +23,7 @@ namespace filter
|
|||||||
class ThresholdPoints : public vtkm::filter::FilterDataSetWithField<ThresholdPoints>
|
class ThresholdPoints : public vtkm::filter::FilterDataSetWithField<ThresholdPoints>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagScalarAll;
|
using SupportedTypes = vtkm::TypeListScalarAll;
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ThresholdPoints();
|
ThresholdPoints();
|
||||||
|
@ -25,7 +25,7 @@ class VTKM_ALWAYS_EXPORT VectorMagnitude : public vtkm::filter::FilterField<Vect
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//currently the VectorMagnitude filter only works on vector data.
|
//currently the VectorMagnitude filter only works on vector data.
|
||||||
using SupportedTypes = vtkm::TypeListTagVecCommon;
|
using SupportedTypes = vtkm::TypeListVecCommon;
|
||||||
|
|
||||||
VTKM_FILTER_EXPORT
|
VTKM_FILTER_EXPORT
|
||||||
VectorMagnitude();
|
VectorMagnitude();
|
||||||
|
@ -30,7 +30,7 @@ class WarpScalar : public vtkm::filter::FilterField<WarpScalar>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// WarpScalar can only applies to Float and Double Vec3 arrays
|
// WarpScalar can only applies to Float and Double Vec3 arrays
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
|
|
||||||
// WarpScalar often operates on a constant normal value
|
// WarpScalar often operates on a constant normal value
|
||||||
using AdditionalFieldStorage =
|
using AdditionalFieldStorage =
|
||||||
|
@ -29,7 +29,7 @@ namespace filter
|
|||||||
class WarpVector : public vtkm::filter::FilterField<WarpVector>
|
class WarpVector : public vtkm::filter::FilterField<WarpVector>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using SupportedTypes = vtkm::TypeListTagFieldVec3;
|
using SupportedTypes = vtkm::TypeListFieldVec3;
|
||||||
using AdditionalFieldStorage =
|
using AdditionalFieldStorage =
|
||||||
vtkm::ListTagBase<vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_32>::StorageTag,
|
vtkm::ListTagBase<vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_32>::StorageTag,
|
||||||
vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_64>::StorageTag>;
|
vtkm::cont::ArrayHandleConstant<vtkm::Vec3f_64>::StorageTag>;
|
||||||
|
@ -134,11 +134,9 @@ public:
|
|||||||
class PolicyRadiantDataSet : public vtkm::filter::PolicyBase<PolicyRadiantDataSet>
|
class PolicyRadiantDataSet : public vtkm::filter::PolicyBase<PolicyRadiantDataSet>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct TypeListTagRadiantCellSetTypes : vtkm::ListTagBase<MakeRadiantDataSet::CellSet>
|
using TypeListRadiantCellSetTypes = vtkm::List<MakeRadiantDataSet::CellSet>;
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
using AllCellSetList = TypeListTagRadiantCellSetTypes;
|
using AllCellSetList = TypeListRadiantCellSetTypes;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComponent dim)
|
inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComponent dim)
|
||||||
|
@ -55,12 +55,9 @@ class PolicyWarpVector : public vtkm::filter::PolicyBase<PolicyWarpVector>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using vecType = vtkm::Vec3f;
|
using vecType = vtkm::Vec3f;
|
||||||
struct TypeListTagWarpVectorTags
|
using TypeListWarpVectorTags = vtkm::List<vtkm::cont::ArrayHandleConstant<vecType>::StorageTag,
|
||||||
: vtkm::ListTagBase<vtkm::cont::ArrayHandleConstant<vecType>::StorageTag,
|
vtkm::cont::ArrayHandle<vecType>::StorageTag>;
|
||||||
vtkm::cont::ArrayHandle<vecType>::StorageTag>
|
using FieldStorageList = TypeListWarpVectorTags;
|
||||||
{
|
|
||||||
};
|
|
||||||
using FieldStorageList = TypeListTagWarpVectorTags;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void CheckResult(const vtkm::filter::WarpVector& filter, const vtkm::cont::DataSet& result)
|
void CheckResult(const vtkm::filter::WarpVector& filter, const vtkm::cont::DataSet& result)
|
||||||
|
@ -293,8 +293,8 @@ void DoTest()
|
|||||||
// simply doing a += (or similar) operation on them automatically creates a conversion warning
|
// simply doing a += (or similar) operation on them automatically creates a conversion warning
|
||||||
// on some compilers. Since we want to test these operators, just remove the short types from
|
// on some compilers. Since we want to test these operators, just remove the short types from
|
||||||
// the list to avoid the warning.
|
// the list to avoid the warning.
|
||||||
vtkm::testing::Testing::TryTypes(
|
vtkm::testing::Testing::TryTypes(DoTestForType(),
|
||||||
DoTestForType(), vtkm::ListTagBase<vtkm::Id, vtkm::FloatDefault, vtkm::Vec3f_64>());
|
vtkm::List<vtkm::Id, vtkm::FloatDefault, vtkm::Vec3f_64>());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -86,7 +86,7 @@ struct StreamIOType<vtkm::UInt8>
|
|||||||
|
|
||||||
// Since Fields and DataSets store data in the default VariantArrayHandle, convert
|
// Since Fields and DataSets store data in the default VariantArrayHandle, convert
|
||||||
// the data to the closest type supported by default. The following will
|
// the data to the closest type supported by default. The following will
|
||||||
// need to be updated if VariantArrayHandle or TypeListTagCommon changes.
|
// need to be updated if VariantArrayHandle or TypeListCommon changes.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct ClosestCommonType
|
struct ClosestCommonType
|
||||||
{
|
{
|
||||||
|
@ -29,10 +29,7 @@ namespace rendering
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
struct TypeListTagId4 : vtkm::ListTagBase<vtkm::Vec<Id, 4>>
|
using Id4Type = TypeListId4;
|
||||||
{
|
|
||||||
};
|
|
||||||
using Id4Type = TypeListTagId4;
|
|
||||||
|
|
||||||
class MapColorAndVertices : public vtkm::worklet::WorkletMapField
|
class MapColorAndVertices : public vtkm::worklet::WorkletMapField
|
||||||
{
|
{
|
||||||
|
@ -267,7 +267,7 @@ void MapperWireframer::RenderCells(const vtkm::cont::DynamicCellSet& inCellSet,
|
|||||||
vtkm::worklet::DispatcherMapField<Convert1DCoordinates>(
|
vtkm::worklet::DispatcherMapField<Convert1DCoordinates>(
|
||||||
Convert1DCoordinates(this->LogarithmY, this->LogarithmX))
|
Convert1DCoordinates(this->LogarithmY, this->LogarithmX))
|
||||||
.Invoke(coords.GetData(),
|
.Invoke(coords.GetData(),
|
||||||
inScalarField.GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
inScalarField.GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
newCoords,
|
newCoords,
|
||||||
newScalars);
|
newScalars);
|
||||||
|
|
||||||
|
@ -542,7 +542,7 @@ private:
|
|||||||
vtkm::worklet::DispatcherMapField<EdgePlotter<DeviceTag>> plotterDispatcher(plotter);
|
vtkm::worklet::DispatcherMapField<EdgePlotter<DeviceTag>> plotterDispatcher(plotter);
|
||||||
plotterDispatcher.SetDevice(DeviceTag());
|
plotterDispatcher.SetDevice(DeviceTag());
|
||||||
plotterDispatcher.Invoke(
|
plotterDispatcher.Invoke(
|
||||||
PointIndices, Coordinates, ScalarField.GetData().ResetTypes(vtkm::TypeListTagFieldScalar()));
|
PointIndices, Coordinates, ScalarField.GetData().ResetTypes(vtkm::TypeListFieldScalar()));
|
||||||
|
|
||||||
BufferConverter converter;
|
BufferConverter converter;
|
||||||
vtkm::worklet::DispatcherMapField<BufferConverter> converterDispatcher(converter);
|
vtkm::worklet::DispatcherMapField<BufferConverter> converterDispatcher(converter);
|
||||||
|
@ -286,7 +286,7 @@ void CylinderExtractor::SetVaryingRadius(const vtkm::Float32 minRadius,
|
|||||||
Radii.Allocate(this->CylIds.GetNumberOfValues());
|
Radii.Allocate(this->CylIds.GetNumberOfValues());
|
||||||
vtkm::worklet::DispatcherMapField<detail::FieldRadius>(
|
vtkm::worklet::DispatcherMapField<detail::FieldRadius>(
|
||||||
detail::FieldRadius(minRadius, maxRadius, range))
|
detail::FieldRadius(minRadius, maxRadius, range))
|
||||||
.Invoke(this->CylIds, this->Radii, field.GetData().ResetTypes(vtkm::TypeListTagFieldScalar()));
|
.Invoke(this->CylIds, this->Radii, field.GetData().ResetTypes(vtkm::TypeListFieldScalar()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ void QuadIntersector::IntersectionDataImp(Ray<Precision>& rays,
|
|||||||
detail::GetScalar<Precision>(vtkm::Float32(scalarRange.Min), vtkm::Float32(scalarRange.Max)))
|
detail::GetScalar<Precision>(vtkm::Float32(scalarRange.Min), vtkm::Float32(scalarRange.Max)))
|
||||||
.Invoke(rays.HitIdx,
|
.Invoke(rays.HitIdx,
|
||||||
rays.Scalar,
|
rays.Scalar,
|
||||||
scalarField.GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
scalarField.GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
QuadIds);
|
QuadIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,8 +266,7 @@ void SphereExtractor::SetVaryingRadius(const vtkm::Float32 minRadius,
|
|||||||
Radii.Allocate(this->PointIds.GetNumberOfValues());
|
Radii.Allocate(this->PointIds.GetNumberOfValues());
|
||||||
vtkm::worklet::DispatcherMapField<detail::FieldRadius>(
|
vtkm::worklet::DispatcherMapField<detail::FieldRadius>(
|
||||||
detail::FieldRadius(minRadius, maxRadius, range))
|
detail::FieldRadius(minRadius, maxRadius, range))
|
||||||
.Invoke(
|
.Invoke(this->PointIds, this->Radii, field.GetData().ResetTypes(vtkm::TypeListFieldScalar()));
|
||||||
this->PointIds, this->Radii, field.GetData().ResetTypes(vtkm::TypeListTagFieldScalar()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkm::cont::ArrayHandle<vtkm::Id> SphereExtractor::GetPointIds()
|
vtkm::cont::ArrayHandle<vtkm::Id> SphereExtractor::GetPointIds()
|
||||||
|
@ -360,7 +360,7 @@ void SphereIntersector::IntersectionDataImp(Ray<Precision>& rays,
|
|||||||
detail::GetScalar<Precision>(vtkm::Float32(scalarRange.Min), vtkm::Float32(scalarRange.Max)))
|
detail::GetScalar<Precision>(vtkm::Float32(scalarRange.Min), vtkm::Float32(scalarRange.Max)))
|
||||||
.Invoke(rays.HitIdx,
|
.Invoke(rays.HitIdx,
|
||||||
rays.Scalar,
|
rays.Scalar,
|
||||||
scalarField.GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
scalarField.GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
PointIds);
|
PointIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -831,7 +831,7 @@ void VolumeRendererStructured::RenderOnDevice(vtkm::rendering::raytracing::Ray<P
|
|||||||
rays.MinDistance,
|
rays.MinDistance,
|
||||||
rays.MaxDistance,
|
rays.MaxDistance,
|
||||||
rays.Buffers.at(0).Buffer,
|
rays.Buffers.at(0).Buffer,
|
||||||
ScalarField->GetData().ResetTypes(vtkm::TypeListTagFieldScalar()));
|
ScalarField->GetData().ResetTypes(vtkm::TypeListFieldScalar()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -846,7 +846,7 @@ void VolumeRendererStructured::RenderOnDevice(vtkm::rendering::raytracing::Ray<P
|
|||||||
rays.MinDistance,
|
rays.MinDistance,
|
||||||
rays.MaxDistance,
|
rays.MaxDistance,
|
||||||
rays.Buffers.at(0).Buffer,
|
rays.Buffers.at(0).Buffer,
|
||||||
ScalarField->GetData().ResetTypes(vtkm::TypeListTagFieldScalar()));
|
ScalarField->GetData().ResetTypes(vtkm::TypeListFieldScalar()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -869,7 +869,7 @@ void VolumeRendererStructured::RenderOnDevice(vtkm::rendering::raytracing::Ray<P
|
|||||||
rays.MinDistance,
|
rays.MinDistance,
|
||||||
rays.MaxDistance,
|
rays.MaxDistance,
|
||||||
rays.Buffers.at(0).Buffer,
|
rays.Buffers.at(0).Buffer,
|
||||||
ScalarField->GetData().ResetTypes(vtkm::TypeListTagFieldScalar()));
|
ScalarField->GetData().ResetTypes(vtkm::TypeListFieldScalar()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -887,7 +887,7 @@ void VolumeRendererStructured::RenderOnDevice(vtkm::rendering::raytracing::Ray<P
|
|||||||
rays.MinDistance,
|
rays.MinDistance,
|
||||||
rays.MaxDistance,
|
rays.MaxDistance,
|
||||||
rays.Buffers.at(0).Buffer,
|
rays.Buffers.at(0).Buffer,
|
||||||
ScalarField->GetData().ResetTypes(vtkm::TypeListTagFieldScalar()));
|
ScalarField->GetData().ResetTypes(vtkm::TypeListFieldScalar()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ set(unit_tests
|
|||||||
UnitTestRange.cxx
|
UnitTestRange.cxx
|
||||||
UnitTestTesting.cxx
|
UnitTestTesting.cxx
|
||||||
UnitTestTransform3D.cxx
|
UnitTestTransform3D.cxx
|
||||||
|
UnitTestTypeList.cxx
|
||||||
UnitTestTypeListTag.cxx
|
UnitTestTypeListTag.cxx
|
||||||
UnitTestTypes.cxx
|
UnitTestTypes.cxx
|
||||||
UnitTestTypeTraits.cxx
|
UnitTestTypeTraits.cxx
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <vtkm/Matrix.h>
|
#include <vtkm/Matrix.h>
|
||||||
#include <vtkm/Pair.h>
|
#include <vtkm/Pair.h>
|
||||||
#include <vtkm/Range.h>
|
#include <vtkm/Range.h>
|
||||||
#include <vtkm/TypeListTag.h>
|
#include <vtkm/TypeList.h>
|
||||||
#include <vtkm/TypeTraits.h>
|
#include <vtkm/TypeTraits.h>
|
||||||
#include <vtkm/Types.h>
|
#include <vtkm/Types.h>
|
||||||
#include <vtkm/VecTraits.h>
|
#include <vtkm/VecTraits.h>
|
||||||
@ -422,7 +422,7 @@ public:
|
|||||||
// template<typename FunctionType>
|
// template<typename FunctionType>
|
||||||
// static void TryAllTypes(const FunctionType &function)
|
// static void TryAllTypes(const FunctionType &function)
|
||||||
// {
|
// {
|
||||||
// TryTypes(function, vtkm::TypeListTagAll());
|
// TryTypes(function, vtkm::TypeListAll());
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/// Runs templated \p function on all cell shapes defined in VTK-m. This is
|
/// Runs templated \p function on all cell shapes defined in VTK-m. This is
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include <vtkm/Geometry.h>
|
#include <vtkm/Geometry.h>
|
||||||
#include <vtkm/Math.h>
|
#include <vtkm/Math.h>
|
||||||
|
|
||||||
#include <vtkm/TypeListTag.h>
|
#include <vtkm/TypeList.h>
|
||||||
#include <vtkm/VecTraits.h>
|
#include <vtkm/VecTraits.h>
|
||||||
|
|
||||||
#include <vtkm/exec/FunctorBase.h>
|
#include <vtkm/exec/FunctorBase.h>
|
||||||
@ -472,13 +472,13 @@ template <typename Device>
|
|||||||
void RunGeometryTests()
|
void RunGeometryTests()
|
||||||
{
|
{
|
||||||
std::cout << "Tests for rays." << std::endl;
|
std::cout << "Tests for rays." << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TryRayTests<Device>(), vtkm::TypeListTagFieldScalar());
|
vtkm::testing::Testing::TryTypes(TryRayTests<Device>(), vtkm::TypeListFieldScalar());
|
||||||
std::cout << "Tests for line segments." << std::endl;
|
std::cout << "Tests for line segments." << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TryLineSegmentTests<Device>(), vtkm::TypeListTagFieldScalar());
|
vtkm::testing::Testing::TryTypes(TryLineSegmentTests<Device>(), vtkm::TypeListFieldScalar());
|
||||||
std::cout << "Tests for planes." << std::endl;
|
std::cout << "Tests for planes." << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TryPlaneTests<Device>(), vtkm::TypeListTagFieldScalar());
|
vtkm::testing::Testing::TryTypes(TryPlaneTests<Device>(), vtkm::TypeListFieldScalar());
|
||||||
std::cout << "Tests for spheres." << std::endl;
|
std::cout << "Tests for spheres." << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TrySphereTests<Device>(), vtkm::TypeListTagFieldScalar());
|
vtkm::testing::Testing::TryTypes(TrySphereTests<Device>(), vtkm::TypeListFieldScalar());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace UnitTestGeometryNamespace
|
} // namespace UnitTestGeometryNamespace
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <vtkm/Math.h>
|
#include <vtkm/Math.h>
|
||||||
|
|
||||||
#include <vtkm/TypeListTag.h>
|
#include <vtkm/TypeList.h>
|
||||||
#include <vtkm/VecTraits.h>
|
#include <vtkm/VecTraits.h>
|
||||||
|
|
||||||
#include <vtkm/exec/FunctorBase.h>
|
#include <vtkm/exec/FunctorBase.h>
|
||||||
@ -742,9 +742,8 @@ struct TryAbsTests
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
using TypeListAbs = vtkm::ListAppend<vtkm::List<vtkm::Int32, vtkm::Int64>,
|
using TypeListAbs =
|
||||||
vtkm::TypeListTagIndex,
|
vtkm::ListAppend<vtkm::List<vtkm::Int32, vtkm::Int64>, vtkm::TypeListIndex, vtkm::TypeListField>;
|
||||||
vtkm::TypeListTagField>;
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static constexpr vtkm::Id BitOpSamples = 1024 * 1024;
|
static constexpr vtkm::Id BitOpSamples = 1024 * 1024;
|
||||||
@ -821,9 +820,9 @@ template <typename Device>
|
|||||||
void RunMathTests()
|
void RunMathTests()
|
||||||
{
|
{
|
||||||
std::cout << "Tests for scalar types." << std::endl;
|
std::cout << "Tests for scalar types." << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TryScalarFieldTests<Device>(), vtkm::TypeListTagFieldScalar());
|
vtkm::testing::Testing::TryTypes(TryScalarFieldTests<Device>(), vtkm::TypeListFieldScalar());
|
||||||
std::cout << "Test for scalar and vector types." << std::endl;
|
std::cout << "Test for scalar and vector types." << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TryScalarVectorFieldTests<Device>(), vtkm::TypeListTagField());
|
vtkm::testing::Testing::TryTypes(TryScalarVectorFieldTests<Device>(), vtkm::TypeListField());
|
||||||
std::cout << "Test for exemplar types." << std::endl;
|
std::cout << "Test for exemplar types." << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TryAllTypesTests<Device>());
|
vtkm::testing::Testing::TryTypes(TryAllTypesTests<Device>());
|
||||||
std::cout << "Test all Abs types" << std::endl;
|
std::cout << "Test all Abs types" << std::endl;
|
||||||
|
@ -593,14 +593,14 @@ void TestMatrices()
|
|||||||
{
|
{
|
||||||
// std::cout << "****** Rectangle tests" << std::endl;
|
// std::cout << "****** Rectangle tests" << std::endl;
|
||||||
// vtkm::testing::Testing::TryTypes(MatrixTestFunctor(),
|
// vtkm::testing::Testing::TryTypes(MatrixTestFunctor(),
|
||||||
// vtkm::TypeListTagScalarAll());
|
// vtkm::TypeListScalarAll());
|
||||||
|
|
||||||
std::cout << "****** Square tests" << std::endl;
|
std::cout << "****** Square tests" << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(SquareMatrixTestFunctor(), vtkm::TypeListTagFieldScalar());
|
vtkm::testing::Testing::TryTypes(SquareMatrixTestFunctor(), vtkm::TypeListFieldScalar());
|
||||||
|
|
||||||
// std::cout << "***** Vector multiply tests" << std::endl;
|
// std::cout << "***** Vector multiply tests" << std::endl;
|
||||||
// vtkm::testing::Testing::TryTypes(VectorMultFunctor(),
|
// vtkm::testing::Testing::TryTypes(VectorMultFunctor(),
|
||||||
// vtkm::TypeListTagVecAll());
|
// vtkm::TypeListVecAll());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -147,13 +147,11 @@ void PairTest()
|
|||||||
PairTestOrdering<T, U>();
|
PairTestOrdering<T, U>();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct PairTypesToTry : vtkm::ListTagBase<vtkm::Int8, // Integer types
|
using PairTypesToTry = vtkm::List<vtkm::Int8, // Integer types
|
||||||
vtkm::FloatDefault, // Float types
|
vtkm::FloatDefault, // Float types
|
||||||
vtkm::Id3, // Vec types
|
vtkm::Id3, // Vec types
|
||||||
vtkm::Pair<vtkm::Vec3f_32, vtkm::Int64> // Recursive Pairs
|
vtkm::Pair<vtkm::Vec3f_32, vtkm::Int64> // Recursive Pairs
|
||||||
>
|
>;
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename FirstType>
|
template <typename FirstType>
|
||||||
struct DecideSecondType
|
struct DecideSecondType
|
||||||
|
@ -197,7 +197,7 @@ void TestTransforms()
|
|||||||
std::cout << "Seed: " << seed << std::endl;
|
std::cout << "Seed: " << seed << std::endl;
|
||||||
g_RandomGenerator.seed(seed);
|
g_RandomGenerator.seed(seed);
|
||||||
|
|
||||||
vtkm::testing::Testing::TryTypes(TryTransformsFunctor(), vtkm::TypeListTagFieldScalar());
|
vtkm::testing::Testing::TryTypes(TryTransformsFunctor(), vtkm::TypeListFieldScalar());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
280
vtkm/testing/UnitTestTypeList.cxx
Normal file
280
vtkm/testing/UnitTestTypeList.cxx
Normal file
@ -0,0 +1,280 @@
|
|||||||
|
//============================================================================
|
||||||
|
// 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/TypeList.h>
|
||||||
|
|
||||||
|
#include <vtkm/Types.h>
|
||||||
|
|
||||||
|
#include <vtkm/testing/Testing.h>
|
||||||
|
|
||||||
|
#include <set>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
|
class TypeSet
|
||||||
|
{
|
||||||
|
using NameSetType = std::set<std::string>;
|
||||||
|
NameSetType NameSet;
|
||||||
|
|
||||||
|
public:
|
||||||
|
template <typename T>
|
||||||
|
void AddExpected(T)
|
||||||
|
{
|
||||||
|
this->NameSet.insert(vtkm::testing::TypeName<T>::Name());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
void Found(T)
|
||||||
|
{
|
||||||
|
std::string name = vtkm::testing::TypeName<T>::Name();
|
||||||
|
//std::cout << " found " << name << std::endl;
|
||||||
|
NameSetType::iterator typeLocation = this->NameSet.find(name);
|
||||||
|
if (typeLocation != this->NameSet.end())
|
||||||
|
{
|
||||||
|
// This type is expected. Remove it to mark it found.
|
||||||
|
this->NameSet.erase(typeLocation);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "**** Did not expect to get type " << name << std::endl;
|
||||||
|
VTKM_TEST_FAIL("Got unexpected type.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CheckFound()
|
||||||
|
{
|
||||||
|
for (NameSetType::iterator typeP = this->NameSet.begin(); typeP != this->NameSet.end(); typeP++)
|
||||||
|
{
|
||||||
|
std::cout << "**** Failed to find " << *typeP << std::endl;
|
||||||
|
}
|
||||||
|
VTKM_TEST_ASSERT(this->NameSet.empty(), "List did not call functor on all expected types.");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TestFunctor
|
||||||
|
{
|
||||||
|
TypeSet ExpectedTypes;
|
||||||
|
|
||||||
|
TestFunctor(const TypeSet& expectedTypes)
|
||||||
|
: ExpectedTypes(expectedTypes)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
VTKM_CONT void operator()(T)
|
||||||
|
{
|
||||||
|
this->ExpectedTypes.Found(T());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename ListTag>
|
||||||
|
void TryList(const TypeSet& expected, ListTag)
|
||||||
|
{
|
||||||
|
TestFunctor functor(expected);
|
||||||
|
vtkm::ListForEach(functor, ListTag());
|
||||||
|
functor.ExpectedTypes.CheckFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TestLists()
|
||||||
|
{
|
||||||
|
std::cout << "TypeListId" << std::endl;
|
||||||
|
TypeSet id;
|
||||||
|
id.AddExpected(vtkm::Id());
|
||||||
|
TryList(id, vtkm::TypeListId());
|
||||||
|
|
||||||
|
std::cout << "TypeListId2" << std::endl;
|
||||||
|
TypeSet id2;
|
||||||
|
id2.AddExpected(vtkm::Id2());
|
||||||
|
TryList(id2, vtkm::TypeListId2());
|
||||||
|
|
||||||
|
std::cout << "TypeListId3" << std::endl;
|
||||||
|
TypeSet id3;
|
||||||
|
id3.AddExpected(vtkm::Id3());
|
||||||
|
TryList(id3, vtkm::TypeListId3());
|
||||||
|
|
||||||
|
std::cout << "TypeListId4" << std::endl;
|
||||||
|
TypeSet id4;
|
||||||
|
id4.AddExpected(vtkm::Id4());
|
||||||
|
TryList(id4, vtkm::TypeListId4());
|
||||||
|
|
||||||
|
std::cout << "TypeListIndex" << std::endl;
|
||||||
|
TypeSet index;
|
||||||
|
index.AddExpected(vtkm::Id());
|
||||||
|
index.AddExpected(vtkm::Id2());
|
||||||
|
index.AddExpected(vtkm::Id3());
|
||||||
|
TryList(index, vtkm::TypeListIndex());
|
||||||
|
|
||||||
|
std::cout << "TypeListFieldScalar" << std::endl;
|
||||||
|
TypeSet scalar;
|
||||||
|
scalar.AddExpected(vtkm::Float32());
|
||||||
|
scalar.AddExpected(vtkm::Float64());
|
||||||
|
TryList(scalar, vtkm::TypeListFieldScalar());
|
||||||
|
|
||||||
|
std::cout << "TypeListFieldVec2" << std::endl;
|
||||||
|
TypeSet vec2;
|
||||||
|
vec2.AddExpected(vtkm::Vec2f_32());
|
||||||
|
vec2.AddExpected(vtkm::Vec2f_64());
|
||||||
|
TryList(vec2, vtkm::TypeListFieldVec2());
|
||||||
|
|
||||||
|
std::cout << "TypeListFieldVec3" << std::endl;
|
||||||
|
TypeSet vec3;
|
||||||
|
vec3.AddExpected(vtkm::Vec3f_32());
|
||||||
|
vec3.AddExpected(vtkm::Vec3f_64());
|
||||||
|
TryList(vec3, vtkm::TypeListFieldVec3());
|
||||||
|
|
||||||
|
std::cout << "TypeListFieldVec4" << std::endl;
|
||||||
|
TypeSet vec4;
|
||||||
|
vec4.AddExpected(vtkm::Vec4f_32());
|
||||||
|
vec4.AddExpected(vtkm::Vec4f_64());
|
||||||
|
TryList(vec4, vtkm::TypeListFieldVec4());
|
||||||
|
|
||||||
|
std::cout << "TypeListField" << std::endl;
|
||||||
|
TypeSet field;
|
||||||
|
field.AddExpected(vtkm::Float32());
|
||||||
|
field.AddExpected(vtkm::Float64());
|
||||||
|
field.AddExpected(vtkm::Vec2f_32());
|
||||||
|
field.AddExpected(vtkm::Vec2f_64());
|
||||||
|
field.AddExpected(vtkm::Vec3f_32());
|
||||||
|
field.AddExpected(vtkm::Vec3f_64());
|
||||||
|
field.AddExpected(vtkm::Vec4f_32());
|
||||||
|
field.AddExpected(vtkm::Vec4f_64());
|
||||||
|
TryList(field, vtkm::TypeListField());
|
||||||
|
|
||||||
|
std::cout << "TypeListCommon" << std::endl;
|
||||||
|
TypeSet common;
|
||||||
|
common.AddExpected(vtkm::Float32());
|
||||||
|
common.AddExpected(vtkm::Float64());
|
||||||
|
common.AddExpected(vtkm::UInt8());
|
||||||
|
common.AddExpected(vtkm::Int32());
|
||||||
|
common.AddExpected(vtkm::Int64());
|
||||||
|
common.AddExpected(vtkm::Vec3f_32());
|
||||||
|
common.AddExpected(vtkm::Vec3f_64());
|
||||||
|
TryList(common, vtkm::TypeListCommon());
|
||||||
|
|
||||||
|
std::cout << "TypeListScalarAll" << std::endl;
|
||||||
|
TypeSet scalarsAll;
|
||||||
|
scalarsAll.AddExpected(vtkm::Float32());
|
||||||
|
scalarsAll.AddExpected(vtkm::Float64());
|
||||||
|
scalarsAll.AddExpected(vtkm::Int8());
|
||||||
|
scalarsAll.AddExpected(vtkm::UInt8());
|
||||||
|
scalarsAll.AddExpected(vtkm::Int16());
|
||||||
|
scalarsAll.AddExpected(vtkm::UInt16());
|
||||||
|
scalarsAll.AddExpected(vtkm::Int32());
|
||||||
|
scalarsAll.AddExpected(vtkm::UInt32());
|
||||||
|
scalarsAll.AddExpected(vtkm::Int64());
|
||||||
|
scalarsAll.AddExpected(vtkm::UInt64());
|
||||||
|
TryList(scalarsAll, vtkm::TypeListScalarAll());
|
||||||
|
|
||||||
|
std::cout << "TypeListVecCommon" << std::endl;
|
||||||
|
TypeSet vecCommon;
|
||||||
|
vecCommon.AddExpected(vtkm::Vec2f_32());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec2f_64());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec2ui_8());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec2i_32());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec2i_64());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec3f_32());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec3f_64());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec3ui_8());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec3i_32());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec3i_64());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec4f_32());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec4f_64());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec4ui_8());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec4i_32());
|
||||||
|
vecCommon.AddExpected(vtkm::Vec4i_64());
|
||||||
|
TryList(vecCommon, vtkm::TypeListVecCommon());
|
||||||
|
|
||||||
|
std::cout << "TypeListVecAll" << std::endl;
|
||||||
|
TypeSet vecAll;
|
||||||
|
vecAll.AddExpected(vtkm::Vec2f_32());
|
||||||
|
vecAll.AddExpected(vtkm::Vec2f_64());
|
||||||
|
vecAll.AddExpected(vtkm::Vec2i_8());
|
||||||
|
vecAll.AddExpected(vtkm::Vec2i_16());
|
||||||
|
vecAll.AddExpected(vtkm::Vec2i_32());
|
||||||
|
vecAll.AddExpected(vtkm::Vec2i_64());
|
||||||
|
vecAll.AddExpected(vtkm::Vec2ui_8());
|
||||||
|
vecAll.AddExpected(vtkm::Vec2ui_16());
|
||||||
|
vecAll.AddExpected(vtkm::Vec2ui_32());
|
||||||
|
vecAll.AddExpected(vtkm::Vec2ui_64());
|
||||||
|
vecAll.AddExpected(vtkm::Vec3f_32());
|
||||||
|
vecAll.AddExpected(vtkm::Vec3f_64());
|
||||||
|
vecAll.AddExpected(vtkm::Vec3i_8());
|
||||||
|
vecAll.AddExpected(vtkm::Vec3i_16());
|
||||||
|
vecAll.AddExpected(vtkm::Vec3i_32());
|
||||||
|
vecAll.AddExpected(vtkm::Vec3i_64());
|
||||||
|
vecAll.AddExpected(vtkm::Vec3ui_8());
|
||||||
|
vecAll.AddExpected(vtkm::Vec3ui_16());
|
||||||
|
vecAll.AddExpected(vtkm::Vec3ui_32());
|
||||||
|
vecAll.AddExpected(vtkm::Vec3ui_64());
|
||||||
|
vecAll.AddExpected(vtkm::Vec4f_32());
|
||||||
|
vecAll.AddExpected(vtkm::Vec4f_64());
|
||||||
|
vecAll.AddExpected(vtkm::Vec4i_8());
|
||||||
|
vecAll.AddExpected(vtkm::Vec4i_16());
|
||||||
|
vecAll.AddExpected(vtkm::Vec4i_32());
|
||||||
|
vecAll.AddExpected(vtkm::Vec4i_64());
|
||||||
|
vecAll.AddExpected(vtkm::Vec4ui_8());
|
||||||
|
vecAll.AddExpected(vtkm::Vec4ui_16());
|
||||||
|
vecAll.AddExpected(vtkm::Vec4ui_32());
|
||||||
|
vecAll.AddExpected(vtkm::Vec4ui_64());
|
||||||
|
TryList(vecAll, vtkm::TypeListVecAll());
|
||||||
|
|
||||||
|
std::cout << "TypeListAll" << std::endl;
|
||||||
|
TypeSet all;
|
||||||
|
all.AddExpected(vtkm::Float32());
|
||||||
|
all.AddExpected(vtkm::Float64());
|
||||||
|
all.AddExpected(vtkm::Int8());
|
||||||
|
all.AddExpected(vtkm::UInt8());
|
||||||
|
all.AddExpected(vtkm::Int16());
|
||||||
|
all.AddExpected(vtkm::UInt16());
|
||||||
|
all.AddExpected(vtkm::Int32());
|
||||||
|
all.AddExpected(vtkm::UInt32());
|
||||||
|
all.AddExpected(vtkm::Int64());
|
||||||
|
all.AddExpected(vtkm::UInt64());
|
||||||
|
all.AddExpected(vtkm::Vec2f_32());
|
||||||
|
all.AddExpected(vtkm::Vec2f_64());
|
||||||
|
all.AddExpected(vtkm::Vec2i_8());
|
||||||
|
all.AddExpected(vtkm::Vec2i_16());
|
||||||
|
all.AddExpected(vtkm::Vec2i_32());
|
||||||
|
all.AddExpected(vtkm::Vec2i_64());
|
||||||
|
all.AddExpected(vtkm::Vec2ui_8());
|
||||||
|
all.AddExpected(vtkm::Vec2ui_16());
|
||||||
|
all.AddExpected(vtkm::Vec2ui_32());
|
||||||
|
all.AddExpected(vtkm::Vec2ui_64());
|
||||||
|
all.AddExpected(vtkm::Vec3f_32());
|
||||||
|
all.AddExpected(vtkm::Vec3f_64());
|
||||||
|
all.AddExpected(vtkm::Vec3i_8());
|
||||||
|
all.AddExpected(vtkm::Vec3i_16());
|
||||||
|
all.AddExpected(vtkm::Vec3i_32());
|
||||||
|
all.AddExpected(vtkm::Vec3i_64());
|
||||||
|
all.AddExpected(vtkm::Vec3ui_8());
|
||||||
|
all.AddExpected(vtkm::Vec3ui_16());
|
||||||
|
all.AddExpected(vtkm::Vec3ui_32());
|
||||||
|
all.AddExpected(vtkm::Vec3ui_64());
|
||||||
|
all.AddExpected(vtkm::Vec4f_32());
|
||||||
|
all.AddExpected(vtkm::Vec4f_64());
|
||||||
|
all.AddExpected(vtkm::Vec4i_8());
|
||||||
|
all.AddExpected(vtkm::Vec4i_16());
|
||||||
|
all.AddExpected(vtkm::Vec4i_32());
|
||||||
|
all.AddExpected(vtkm::Vec4i_64());
|
||||||
|
all.AddExpected(vtkm::Vec4ui_8());
|
||||||
|
all.AddExpected(vtkm::Vec4ui_16());
|
||||||
|
all.AddExpected(vtkm::Vec4ui_32());
|
||||||
|
all.AddExpected(vtkm::Vec4ui_64());
|
||||||
|
TryList(all, vtkm::TypeListAll());
|
||||||
|
}
|
||||||
|
|
||||||
|
} // anonymous namespace
|
||||||
|
|
||||||
|
int UnitTestTypeList(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
return vtkm::testing::Testing::Run(TestLists, argc, argv);
|
||||||
|
}
|
@ -17,6 +17,8 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -273,3 +275,5 @@ int UnitTestTypeListTag(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
return vtkm::testing::Testing::Run(TestLists, argc, argv);
|
return vtkm::testing::Testing::Run(TestLists, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VTKM_DEPRECATED_SUPPRESS_END
|
||||||
|
@ -89,7 +89,7 @@ struct VecFromPortalTestFunctor
|
|||||||
|
|
||||||
void VecFromPortalTest()
|
void VecFromPortalTest()
|
||||||
{
|
{
|
||||||
vtkm::testing::Testing::TryTypes(VecFromPortalTestFunctor(), vtkm::TypeListTagCommon());
|
vtkm::testing::Testing::TryTypes(VecFromPortalTestFunctor(), vtkm::TypeListCommon());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace UnitTestVecFromPortalNamespace
|
} // namespace UnitTestVecFromPortalNamespace
|
||||||
|
@ -98,7 +98,7 @@ struct VecFromPortalPermuteTestFunctor
|
|||||||
|
|
||||||
void VecFromPortalPermuteTest()
|
void VecFromPortalPermuteTest()
|
||||||
{
|
{
|
||||||
vtkm::testing::Testing::TryTypes(VecFromPortalPermuteTestFunctor(), vtkm::TypeListTagCommon());
|
vtkm::testing::Testing::TryTypes(VecFromPortalPermuteTestFunctor(), vtkm::TypeListCommon());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace UnitTestVecFromPortalPermuteNamespace
|
} // namespace UnitTestVecFromPortalPermuteNamespace
|
||||||
|
@ -94,7 +94,7 @@ struct VecVariableTestFunctor
|
|||||||
|
|
||||||
void TestVecVariable()
|
void TestVecVariable()
|
||||||
{
|
{
|
||||||
vtkm::testing::Testing::TryTypes(VecVariableTestFunctor(), vtkm::TypeListTagFieldScalar());
|
vtkm::testing::Testing::TryTypes(VecVariableTestFunctor(), vtkm::TypeListFieldScalar());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -245,9 +245,9 @@ struct TestVectorFunctor
|
|||||||
|
|
||||||
void TestVectorAnalysis()
|
void TestVectorAnalysis()
|
||||||
{
|
{
|
||||||
vtkm::testing::Testing::TryTypes(TestLinearFunctor(), vtkm::TypeListTagField());
|
vtkm::testing::Testing::TryTypes(TestLinearFunctor(), vtkm::TypeListField());
|
||||||
vtkm::testing::Testing::TryTypes(TestCrossFunctor(), vtkm::TypeListTagFieldVec3());
|
vtkm::testing::Testing::TryTypes(TestCrossFunctor(), vtkm::TypeListFieldVec3());
|
||||||
vtkm::testing::Testing::TryTypes(TestVectorFunctor(), vtkm::TypeListTagFloatVec());
|
vtkm::testing::Testing::TryTypes(TestVectorFunctor(), vtkm::TypeListFloatVec());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -61,7 +61,7 @@ public:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
CastAndCall(
|
CastAndCall(
|
||||||
fieldArray.ResetTypes(vtkm::TypeListTagScalarAll()),
|
fieldArray.ResetTypes(vtkm::TypeListScalarAll()),
|
||||||
vtkm::worklet::histogram::ComputeBins(Bin1DIndex, numberOfBins, rangeOfValues, binDelta));
|
vtkm::worklet::histogram::ComputeBins(Bin1DIndex, numberOfBins, rangeOfValues, binDelta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ public:
|
|||||||
|
|
||||||
template <typename CellSetType, typename NormalCompType>
|
template <typename CellSetType, typename NormalCompType>
|
||||||
void Run(const CellSetType& cellset,
|
void Run(const CellSetType& cellset,
|
||||||
const vtkm::cont::VariantArrayHandleBase<vtkm::TypeListTagFieldVec3>& points,
|
const vtkm::cont::VariantArrayHandleBase<vtkm::TypeListFieldVec3>& points,
|
||||||
vtkm::cont::ArrayHandle<vtkm::Vec<NormalCompType, 3>>& normals)
|
vtkm::cont::ArrayHandle<vtkm::Vec<NormalCompType, 3>>& normals)
|
||||||
{
|
{
|
||||||
if (this->Normalize)
|
if (this->Normalize)
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
#include <vtkm/worklet/internal/WorkletBase.h>
|
#include <vtkm/worklet/internal/WorkletBase.h>
|
||||||
|
|
||||||
#include <vtkm/TypeListTag.h>
|
|
||||||
|
|
||||||
#include <vtkm/cont/arg/ControlSignatureTagBase.h>
|
#include <vtkm/cont/arg/ControlSignatureTagBase.h>
|
||||||
#include <vtkm/cont/arg/TransportTagArrayIn.h>
|
#include <vtkm/cont/arg/TransportTagArrayIn.h>
|
||||||
#include <vtkm/cont/arg/TransportTagArrayInOut.h>
|
#include <vtkm/cont/arg/TransportTagArrayInOut.h>
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include <vtkm/worklet/internal/WorkletBase.h>
|
#include <vtkm/worklet/internal/WorkletBase.h>
|
||||||
|
|
||||||
#include <vtkm/TopologyElementTag.h>
|
#include <vtkm/TopologyElementTag.h>
|
||||||
#include <vtkm/TypeListTag.h>
|
|
||||||
|
|
||||||
#include <vtkm/cont/arg/ControlSignatureTagBase.h>
|
#include <vtkm/cont/arg/ControlSignatureTagBase.h>
|
||||||
#include <vtkm/cont/arg/TransportTagArrayInOut.h>
|
#include <vtkm/cont/arg/TransportTagArrayInOut.h>
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include <vtkm/worklet/internal/WorkletBase.h>
|
#include <vtkm/worklet/internal/WorkletBase.h>
|
||||||
|
|
||||||
#include <vtkm/TopologyElementTag.h>
|
#include <vtkm/TopologyElementTag.h>
|
||||||
#include <vtkm/TypeListTag.h>
|
|
||||||
|
|
||||||
#include <vtkm/cont/arg/ControlSignatureTagBase.h>
|
#include <vtkm/cont/arg/ControlSignatureTagBase.h>
|
||||||
#include <vtkm/cont/arg/TransportTagArrayIn.h>
|
#include <vtkm/cont/arg/TransportTagArrayIn.h>
|
||||||
|
@ -165,7 +165,7 @@ public:
|
|||||||
const vtkm::cont::VariantArrayHandleBase<T>& pixels,
|
const vtkm::cont::VariantArrayHandleBase<T>& pixels,
|
||||||
OutputPortalType& componentsOut) const
|
OutputPortalType& componentsOut) const
|
||||||
{
|
{
|
||||||
using Types = vtkm::TypeListTagScalarAll;
|
using Types = vtkm::TypeListScalarAll;
|
||||||
vtkm::cont::CastAndCall(pixels.ResetTypes(Types{}), RunImpl(), input, componentsOut);
|
vtkm::cont::CastAndCall(pixels.ResetTypes(Types{}), RunImpl(), input, componentsOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
#ifndef vtkm_worklet_cosmotools_graft_tagtypes_h
|
#ifndef vtkm_worklet_cosmotools_graft_tagtypes_h
|
||||||
#define vtkm_worklet_cosmotools_graft_tagtypes_h
|
#define vtkm_worklet_cosmotools_graft_tagtypes_h
|
||||||
|
|
||||||
#include <vtkm/TypeListTag.h>
|
#include <vtkm/List.h>
|
||||||
|
|
||||||
namespace vtkm
|
namespace vtkm
|
||||||
{
|
{
|
||||||
@ -60,14 +60,10 @@ namespace worklet
|
|||||||
namespace cosmotools
|
namespace cosmotools
|
||||||
{
|
{
|
||||||
|
|
||||||
struct UInt32TagType : vtkm::ListTagBase<vtkm::UInt32>
|
using UInt32TagType = vtkm::List<vtkm::UInt32>;
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct Vec3TagType : vtkm::ListTagBase<vtkm::Vec<T, 3>>
|
using Vec3TagType = vtkm::List<vtkm::Vec<T, 3>>;
|
||||||
{
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#define vtk_m_worklet_internal_WorkletBase_h
|
#define vtk_m_worklet_internal_WorkletBase_h
|
||||||
|
|
||||||
#include <vtkm/TopologyElementTag.h>
|
#include <vtkm/TopologyElementTag.h>
|
||||||
#include <vtkm/TypeListTag.h>
|
|
||||||
|
|
||||||
#include <vtkm/exec/FunctorBase.h>
|
#include <vtkm/exec/FunctorBase.h>
|
||||||
#include <vtkm/exec/arg/BasicArg.h>
|
#include <vtkm/exec/arg/BasicArg.h>
|
||||||
|
@ -119,7 +119,7 @@ void TestClippingExplicit()
|
|||||||
bool invertClip = false;
|
bool invertClip = false;
|
||||||
vtkm::cont::CellSetExplicit<> outputCellSet =
|
vtkm::cont::CellSetExplicit<> outputCellSet =
|
||||||
clip.Run(ds.GetCellSet(),
|
clip.Run(ds.GetCellSet(),
|
||||||
ds.GetField("scalars").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
ds.GetField("scalars").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
clipValue,
|
clipValue,
|
||||||
invertClip);
|
invertClip);
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ void TestClippingStructured()
|
|||||||
vtkm::worklet::Clip clip;
|
vtkm::worklet::Clip clip;
|
||||||
vtkm::cont::CellSetExplicit<> outputCellSet =
|
vtkm::cont::CellSetExplicit<> outputCellSet =
|
||||||
clip.Run(ds.GetCellSet(),
|
clip.Run(ds.GetCellSet(),
|
||||||
ds.GetField("scalars").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
ds.GetField("scalars").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
clipValue,
|
clipValue,
|
||||||
invertClip);
|
invertClip);
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ void TestClippingExplicit()
|
|||||||
bool invertClip = false;
|
bool invertClip = false;
|
||||||
vtkm::cont::CellSetExplicit<> outputCellSet =
|
vtkm::cont::CellSetExplicit<> outputCellSet =
|
||||||
clip.Run(ds.GetCellSet(),
|
clip.Run(ds.GetCellSet(),
|
||||||
ds.GetField("scalars").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
ds.GetField("scalars").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
clipValue,
|
clipValue,
|
||||||
invertClip);
|
invertClip);
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ void TestClippingStructured()
|
|||||||
vtkm::worklet::Clip clip;
|
vtkm::worklet::Clip clip;
|
||||||
vtkm::cont::CellSetExplicit<> outputCellSet =
|
vtkm::cont::CellSetExplicit<> outputCellSet =
|
||||||
clip.Run(ds.GetCellSet(),
|
clip.Run(ds.GetCellSet(),
|
||||||
ds.GetField("scalars").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
ds.GetField("scalars").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
clipValue,
|
clipValue,
|
||||||
invertClip);
|
invertClip);
|
||||||
|
|
||||||
|
@ -339,51 +339,46 @@ struct TestToRGBA
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
struct TypeListTagScalarColorTypes : vtkm::ListTagBase<vtkm::Float32,
|
using TypeListScalarColorTypes = vtkm::List<vtkm::Float32,
|
||||||
vtkm::Float64,
|
vtkm::Float64,
|
||||||
vtkm::Vec2f_32,
|
vtkm::Vec2f_32,
|
||||||
vtkm::Vec2f_64,
|
vtkm::Vec2f_64,
|
||||||
vtkm::Vec3f_32,
|
vtkm::Vec3f_32,
|
||||||
vtkm::Vec3f_64,
|
vtkm::Vec3f_64,
|
||||||
vtkm::Vec4f_32,
|
vtkm::Vec4f_32,
|
||||||
vtkm::Vec4f_64>
|
vtkm::Vec4f_64>;
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
struct TypeListTagUIntColorTypes
|
using TypeListUIntColorTypes =
|
||||||
: vtkm::ListTagBase<vtkm::UInt8, vtkm::Vec2ui_8, vtkm::Vec3ui_8, vtkm::Vec4ui_8>
|
vtkm::List<vtkm::UInt8, vtkm::Vec2ui_8, vtkm::Vec3ui_8, vtkm::Vec4ui_8>;
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void TestScalarsToColors()
|
void TestScalarsToColors()
|
||||||
{
|
{
|
||||||
std::cout << "Test ConvertToRGB with UInt8 types" << std::endl;
|
std::cout << "Test ConvertToRGB with UInt8 types" << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGB(), TypeListTagUIntColorTypes());
|
vtkm::testing::Testing::TryTypes(TestToRGB(), TypeListUIntColorTypes());
|
||||||
std::cout << "Test ConvertToRGB with Scalar types" << std::endl;
|
std::cout << "Test ConvertToRGB with Scalar types" << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGB(0.0f, 1.0f), TypeListTagScalarColorTypes());
|
vtkm::testing::Testing::TryTypes(TestToRGB(0.0f, 1.0f), TypeListScalarColorTypes());
|
||||||
std::cout << "Test ShiftScaleToRGB with scalar types and varying range" << std::endl;
|
std::cout << "Test ShiftScaleToRGB with scalar types and varying range" << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGB(1024.0f, 4096.0f), TypeListTagScalarColorTypes());
|
vtkm::testing::Testing::TryTypes(TestToRGB(1024.0f, 4096.0f), TypeListScalarColorTypes());
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGB(-2048.0f, 1024.0f), TypeListTagScalarColorTypes());
|
vtkm::testing::Testing::TryTypes(TestToRGB(-2048.0f, 1024.0f), TypeListScalarColorTypes());
|
||||||
|
|
||||||
std::cout << "Test ConvertToRGBA with UInt8 types and alpha values=[1.0, 0.5, 0.0]" << std::endl;
|
std::cout << "Test ConvertToRGBA with UInt8 types and alpha values=[1.0, 0.5, 0.0]" << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGBA(), TypeListTagUIntColorTypes());
|
vtkm::testing::Testing::TryTypes(TestToRGBA(), TypeListUIntColorTypes());
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 255.0f, 0.5f), TypeListTagUIntColorTypes());
|
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 255.0f, 0.5f), TypeListUIntColorTypes());
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 255.0f, 0.0f), TypeListTagUIntColorTypes());
|
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 255.0f, 0.0f), TypeListUIntColorTypes());
|
||||||
|
|
||||||
std::cout << "Test ConvertToRGBA with Scalar types and alpha values=[0.3, 0.6, 1.0]" << std::endl;
|
std::cout << "Test ConvertToRGBA with Scalar types and alpha values=[0.3, 0.6, 1.0]" << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 1.0f, 0.3f), TypeListTagScalarColorTypes());
|
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 1.0f, 0.3f), TypeListScalarColorTypes());
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 1.0f, 0.6f), TypeListTagScalarColorTypes());
|
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 1.0f, 0.6f), TypeListScalarColorTypes());
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 1.0f, 1.0f), TypeListTagScalarColorTypes());
|
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 1.0f, 1.0f), TypeListScalarColorTypes());
|
||||||
|
|
||||||
std::cout
|
std::cout
|
||||||
<< "Test ConvertToRGBA with Scalar types and varying range with alpha values=[0.25, 0.5, 0.75]"
|
<< "Test ConvertToRGBA with Scalar types and varying range with alpha values=[0.25, 0.5, 0.75]"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGBA(-0.075f, -0.025f, 0.25f),
|
vtkm::testing::Testing::TryTypes(TestToRGBA(-0.075f, -0.025f, 0.25f), TypeListScalarColorTypes());
|
||||||
TypeListTagScalarColorTypes());
|
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 2048.0f, 0.5f), TypeListScalarColorTypes());
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGBA(0.0f, 2048.0f, 0.5f), TypeListTagScalarColorTypes());
|
|
||||||
vtkm::testing::Testing::TryTypes(TestToRGBA(-2048.0f, 2048.0f, 0.75f),
|
vtkm::testing::Testing::TryTypes(TestToRGBA(-2048.0f, 2048.0f, 0.75f),
|
||||||
TypeListTagScalarColorTypes());
|
TypeListScalarColorTypes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,9 +107,9 @@ public:
|
|||||||
// Output dataset gets new cell set of points that meet threshold predicate
|
// Output dataset gets new cell set of points that meet threshold predicate
|
||||||
vtkm::worklet::ThresholdPoints threshold;
|
vtkm::worklet::ThresholdPoints threshold;
|
||||||
OutCellSetType outCellSet;
|
OutCellSetType outCellSet;
|
||||||
outCellSet = threshold.Run(
|
outCellSet =
|
||||||
dataset.GetCellSet(),
|
threshold.Run(dataset.GetCellSet(),
|
||||||
dataset.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
dataset.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
ValuesBetween(40.0f, 71.0f));
|
ValuesBetween(40.0f, 71.0f));
|
||||||
outDataSet.SetCellSet(outCellSet);
|
outDataSet.SetCellSet(outCellSet);
|
||||||
|
|
||||||
@ -139,9 +139,9 @@ public:
|
|||||||
// Output dataset gets new cell set of points that meet threshold predicate
|
// Output dataset gets new cell set of points that meet threshold predicate
|
||||||
vtkm::worklet::ThresholdPoints threshold;
|
vtkm::worklet::ThresholdPoints threshold;
|
||||||
OutCellSetType outCellSet;
|
OutCellSetType outCellSet;
|
||||||
outCellSet = threshold.Run(
|
outCellSet =
|
||||||
dataset.GetCellSet(),
|
threshold.Run(dataset.GetCellSet(),
|
||||||
dataset.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
dataset.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
ValuesAbove(1.0f));
|
ValuesAbove(1.0f));
|
||||||
outDataSet.SetCellSet(outCellSet);
|
outDataSet.SetCellSet(outCellSet);
|
||||||
|
|
||||||
@ -164,9 +164,9 @@ public:
|
|||||||
// Output dataset gets new cell set of points that meet threshold predicate
|
// Output dataset gets new cell set of points that meet threshold predicate
|
||||||
vtkm::worklet::ThresholdPoints threshold;
|
vtkm::worklet::ThresholdPoints threshold;
|
||||||
OutCellSetType outCellSet;
|
OutCellSetType outCellSet;
|
||||||
outCellSet = threshold.Run(
|
outCellSet =
|
||||||
dataset.GetCellSet(),
|
threshold.Run(dataset.GetCellSet(),
|
||||||
dataset.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
dataset.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
ValuesBelow(50.0f));
|
ValuesBelow(50.0f));
|
||||||
outDataSet.SetCellSet(outCellSet);
|
outDataSet.SetCellSet(outCellSet);
|
||||||
|
|
||||||
|
@ -67,8 +67,7 @@ void TestWarpScalar()
|
|||||||
vtkm::cont::make_ArrayHandleConstant(normal, nov);
|
vtkm::cont::make_ArrayHandleConstant(normal, nov);
|
||||||
|
|
||||||
vtkm::cont::ArrayHandle<vtkm::FloatDefault> scaleFactorArray;
|
vtkm::cont::ArrayHandle<vtkm::FloatDefault> scaleFactorArray;
|
||||||
auto scaleFactor =
|
auto scaleFactor = ds.GetField("scalefactor").GetData().ResetTypes(vtkm::TypeListFieldScalar());
|
||||||
ds.GetField("scalefactor").GetData().ResetTypes(vtkm::TypeListTagFieldScalar());
|
|
||||||
scaleFactor.CopyTo(scaleFactorArray);
|
scaleFactor.CopyTo(scaleFactorArray);
|
||||||
auto sFAPortal = scaleFactorArray.GetPortalControl();
|
auto sFAPortal = scaleFactorArray.GetPortalControl();
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ void TestWorkletMapField(vtkm::cont::DeviceAdapterId id)
|
|||||||
std::cout << "Testing Map Field on device adapter: " << id.GetName() << std::endl;
|
std::cout << "Testing Map Field on device adapter: " << id.GetName() << std::endl;
|
||||||
|
|
||||||
vtkm::testing::Testing::TryTypes(mapfield::DoTestWorklet<TestMapFieldWorklet>(),
|
vtkm::testing::Testing::TryTypes(mapfield::DoTestWorklet<TestMapFieldWorklet>(),
|
||||||
vtkm::TypeListTagCommon());
|
vtkm::TypeListCommon());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // mapfield namespace
|
} // mapfield namespace
|
||||||
|
@ -109,7 +109,7 @@ void TestWorkletMapFieldExecArg(vtkm::cont::DeviceAdapterId id)
|
|||||||
|
|
||||||
std::cout << "--- Worklet accepting all types." << std::endl;
|
std::cout << "--- Worklet accepting all types." << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(map_exec_field::DoTestWorklet<TestExecObjectWorklet>(),
|
vtkm::testing::Testing::TryTypes(map_exec_field::DoTestWorklet<TestExecObjectWorklet>(),
|
||||||
vtkm::TypeListTagCommon());
|
vtkm::TypeListCommon());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -92,7 +92,7 @@ void TestWorkletMapFieldExecArg(vtkm::cont::DeviceAdapterId id)
|
|||||||
|
|
||||||
std::cout << "--- Worklet accepting all types." << std::endl;
|
std::cout << "--- Worklet accepting all types." << std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(map_whole_array::DoTestWholeArrayWorklet(),
|
vtkm::testing::Testing::TryTypes(map_whole_array::DoTestWholeArrayWorklet(),
|
||||||
vtkm::TypeListTagCommon());
|
vtkm::TypeListCommon());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -47,7 +47,7 @@ struct DoTestAtomicArrayWorklet
|
|||||||
std::cout << "Create and run dispatcher." << std::endl;
|
std::cout << "Create and run dispatcher." << std::endl;
|
||||||
vtkm::worklet::DispatcherMapField<WorkletType> dispatcher;
|
vtkm::worklet::DispatcherMapField<WorkletType> dispatcher;
|
||||||
dispatcher.Invoke(vtkm::cont::ArrayHandleIndex(ARRAY_SIZE),
|
dispatcher.Invoke(vtkm::cont::ArrayHandleIndex(ARRAY_SIZE),
|
||||||
inOutArray.ResetTypes<vtkm::cont::AtomicArrayTypeListTag>());
|
inOutArray.ResetTypes<vtkm::cont::AtomicArrayTypeList>());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@ -73,7 +73,7 @@ void TestWorkletMapFieldExecArgAtomic(vtkm::cont::DeviceAdapterId id)
|
|||||||
std::cout << "Testing Worklet with AtomicWholeArray on device adapter: " << id.GetName()
|
std::cout << "Testing Worklet with AtomicWholeArray on device adapter: " << id.GetName()
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
vtkm::testing::Testing::TryTypes(map_whole_array::DoTestAtomicArrayWorklet(),
|
vtkm::testing::Testing::TryTypes(map_whole_array::DoTestAtomicArrayWorklet(),
|
||||||
vtkm::cont::AtomicArrayTypeListTag());
|
vtkm::cont::AtomicArrayTypeList());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -210,7 +210,7 @@ static void TestMaxNeighborValue()
|
|||||||
|
|
||||||
vtkm::cont::DataSet dataSet3D = testDataSet.Make3DUniformDataSet0();
|
vtkm::cont::DataSet dataSet3D = testDataSet.Make3DUniformDataSet0();
|
||||||
dispatcher.Invoke(
|
dispatcher.Invoke(
|
||||||
dataSet3D.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
dataSet3D.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
dataSet3D.GetCellSet(),
|
dataSet3D.GetCellSet(),
|
||||||
output);
|
output);
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ static void TestMaxNeighborValue()
|
|||||||
|
|
||||||
vtkm::cont::DataSet dataSet2D = testDataSet.Make2DUniformDataSet1();
|
vtkm::cont::DataSet dataSet2D = testDataSet.Make2DUniformDataSet1();
|
||||||
dispatcher.Invoke(
|
dispatcher.Invoke(
|
||||||
dataSet2D.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
dataSet2D.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
dataSet2D.GetCellSet(),
|
dataSet2D.GetCellSet(),
|
||||||
output);
|
output);
|
||||||
|
|
||||||
|
@ -87,9 +87,8 @@ static void TestMaxPointOrCell()
|
|||||||
vtkm::cont::ArrayHandle<vtkm::Float32> result;
|
vtkm::cont::ArrayHandle<vtkm::Float32> result;
|
||||||
|
|
||||||
vtkm::worklet::DispatcherMapTopology<::test_explicit::MaxPointOrCellValue> dispatcher;
|
vtkm::worklet::DispatcherMapTopology<::test_explicit::MaxPointOrCellValue> dispatcher;
|
||||||
dispatcher.Invoke(
|
dispatcher.Invoke(dataSet.GetField("cellvar").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
dataSet.GetField("cellvar").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
dataSet.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
dataSet.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
|
||||||
&cellset,
|
&cellset,
|
||||||
result);
|
result);
|
||||||
|
|
||||||
|
@ -110,9 +110,8 @@ static void TestMaxPointOrCell()
|
|||||||
vtkm::cont::ArrayHandle<vtkm::Float32> result;
|
vtkm::cont::ArrayHandle<vtkm::Float32> result;
|
||||||
|
|
||||||
vtkm::worklet::DispatcherMapTopology<::test_uniform::MaxPointOrCellValue> dispatcher;
|
vtkm::worklet::DispatcherMapTopology<::test_uniform::MaxPointOrCellValue> dispatcher;
|
||||||
dispatcher.Invoke(
|
dispatcher.Invoke(dataSet.GetField("cellvar").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
dataSet.GetField("cellvar").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
dataSet.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListFieldScalar()),
|
||||||
dataSet.GetField("pointvar").GetData().ResetTypes(vtkm::TypeListTagFieldScalar()),
|
|
||||||
// We know that the cell set is a structured 2D grid and
|
// We know that the cell set is a structured 2D grid and
|
||||||
// The worklet does not work with general types because
|
// The worklet does not work with general types because
|
||||||
// of the way we get cell indices. We need to make that
|
// of the way we get cell indices. We need to make that
|
||||||
|
Loading…
Reference in New Issue
Block a user