Merge topic 'modify-default-policy'

42bc9a393 Fix gaps in type support
dc112b516 Enable changing policy used for library compiles
76f870150 Type check input and output array arguments differently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1997
This commit is contained in:
Kenneth Moreland 2020-03-24 16:17:17 +00:00 committed by Kitware Robot
commit b54719b4e0
42 changed files with 661 additions and 157 deletions

@ -0,0 +1,53 @@
# Configurable default types
Because VTK-m compiles efficient code for accelerator architectures, it
often has to compile for static types. This means that dynamic types often
have to be determined at runtime and converted to static types. This is the
reason for the `CastAndCall` architecture in VTK-m.
For this `CastAndCall` to work, there has to be a finite set of static
types to try at runtime. If you don't compile in the types you need, you
will get runtime errors. However, the more types you compile in, the longer
the compile time and executable size. Thus, getting the types right is
important.
The "right" types to use can change depending on the application using
VTK-m. For example, when VTK links in VTK-m, it needs to support lots of
types and can sacrifice the compile times to do so. However, if using VTK-m
in situ with a fortran simulation, space and time are critical and you
might only need to worry about double SoA arrays.
Thus, it is important to customize what types VTK-m uses based on the
application. This leads to the oxymoronic phrase of configuring the default
types used by VTK-m.
This is being implemented by providing VTK-m with a header file that
defines the default types. The header file provided to VTK-m should define
one or more of the following preprocessor macros:
* `VTKM_DEFAULT_TYPE_LIST` - a `vtkm::List` of value types for fields that
filters should directly operate on (where applicable).
* `VTKM_DEFAULT_STORAGE_LIST` - a `vtkm::List` of storage tags for fields
that filters should directly operate on.
* `VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED` - a `vtkm::List` of
`vtkm::cont::CellSet` types that filters should operate on as a
strutured cell set.
* `VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED` - a `vtkm::List` of
`vtkm::cont::CellSet` types that filters should operate on as an
unstrutured cell set.
* `VTKM_DEFAULT_CELL_SET_LIST` - a `vtkm::List` of `vtkm::cont::CellSet`
types that filters should operate on (where applicable). The default of
`vtkm::ListAppend<VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED, VTKM_DEFAULT_CELL_SET_LIST>`
is usually correct.
If any of these macros are not defined, a default version will be defined.
(This is the same default used if no header file is provided.)
This header file is provided to the build by setting the
`VTKm_DEFAULT_TYPES_HEADER` CMake variable. `VTKm_DEFAULT_TYPES_HEADER`
points to the file, which will be configured and copied to VTK-m's build
directory.
For convenience, header files can be added to the VTK_m source directory
(conventionally under vtkm/cont/internal). If this is the case, an advanced
CMake option should be added to select the provided header file.

@ -10,10 +10,6 @@
#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>

@ -64,7 +64,7 @@ VTKM_DEPRECATED(
1.6,
"VTKM_DEFAULT_TYPE_LIST_TAG replaced by VTKM_DEFAULT_TYPE_LIST. "
"Note that the new VTKM_DEFAULT_TYPE_LIST cannot be subclassed.")
TypeListTagDefault : vtkm::internal::ListAsListTag<VTKM_DEFAULT_TYPE_LIST>
TypeListTagDefault : vtkm::internal::ListAsListTag<vtkm::TypeListCommon>
{
};
/// @endcond

@ -13,8 +13,6 @@
#include <vtkm/cont/StorageExtrude.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/CoordinateSystem.h>
#include <vtkm/cont/CoordinateSystem.hxx>
namespace vtkm
{

@ -189,6 +189,39 @@ set(sources
Timer.cxx
)
#-----------------------------------------------------------------------------
# Set up default types, which can be custom configured by other build systems.
vtkm_get_kit_name(kit_name kit_dir)
# Some custom types included with VTK-m
option(VTKm_USE_DEFAULT_TYPES_FOR_VTK "Compile VTK-m algorithms for use with types from VTK." OFF)
if (VTKm_USE_DEFAULT_TYPES_FOR_VTK)
set(VTKm_DEFAULT_TYPES_HEADER "internal/DefaultTypesVTK.h.in")
endif()
mark_as_advanced(VTKm_USE_DEFAULT_TYPES_FOR_VTK)
if (VTKm_DEFAULT_TYPES_HEADER)
set(VTK_M_HAS_DEFAULT_TYPES_HEADER TRUE)
get_filename_component(VTKm_DEFAULT_TYPES_HEADER_FILENAME ${VTKm_DEFAULT_TYPES_HEADER} NAME_WE)
set(VTKm_DEFAULT_TYPES_HEADER_FILENAME "${VTKm_DEFAULT_TYPES_HEADER_FILENAME}.h")
configure_file(${VTKm_DEFAULT_TYPES_HEADER}
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/internal/${VTKm_DEFAULT_TYPES_HEADER_FILENAME}
@ONLY
)
vtkm_install_headers(vtkm/cont/internal
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/internal/${VTKm_DEFAULT_TYPES_HEADER_FILENAME}
)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DefaultTypes.h.in
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/DefaultTypes.h
@ONLY
)
vtkm_install_headers(vtkm/cont
${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/DefaultTypes.h
)
#-----------------------------------------------------------------------------
vtkm_library( NAME vtkm_cont
SOURCES ${sources}

@ -15,9 +15,6 @@
#include <vtkm/StaticAssert.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
#include <vtkm/cont/Field.h>
#include <vtkm/cont/VariantArrayHandle.h>
namespace vtkm
{

@ -10,10 +10,6 @@
#ifndef vtk_m_cont_CellSetList_h
#define vtk_m_cont_CellSetList_h
#ifndef VTKM_DEFAULT_CELL_SET_LIST
#define VTKM_DEFAULT_CELL_SET_LIST ::vtkm::cont::CellSetListCommon
#endif
#include <vtkm/List.h>
#include <vtkm/cont/CellSetExplicit.h>

@ -15,6 +15,7 @@
#include <vtkm/TopologyElementTag.h>
#include <vtkm/cont/CellSet.h>
#include <vtkm/cont/DeviceAdapter.h>
#include <vtkm/cont/ErrorBadType.h>
#include <vtkm/exec/ConnectivityStructured.h>
#include <vtkm/internal/ConnectivityStructuredInternals.h>

@ -38,7 +38,10 @@ public:
const vtkm::cont::VariantArrayHandleBase<TypeList>& data);
template <typename T, typename Storage>
VTKM_CONT CoordinateSystem(std::string name, const ArrayHandle<T, Storage>& data);
VTKM_CONT CoordinateSystem(std::string name, const ArrayHandle<T, Storage>& data)
: Superclass(name, Association::POINTS, vtkm::cont::ArrayHandleVirtualCoordinates(data))
{
}
/// This constructor of coordinate system sets up a regular grid of points.
///

@ -56,13 +56,6 @@ VTKM_CONT CoordinateSystem::CoordinateSystem(
{
}
template <typename T, typename Storage>
VTKM_CONT CoordinateSystem::CoordinateSystem(std::string name,
const vtkm::cont::ArrayHandle<T, Storage>& data)
: Superclass(name, Association::POINTS, vtkm::cont::ArrayHandleVirtualCoordinates(data))
{
}
template <typename T, typename Storage>
VTKM_CONT void CoordinateSystem::SetData(const vtkm::cont::ArrayHandle<T, Storage>& newdata)
{

104
vtkm/cont/DefaultTypes.h.in Normal file

@ -0,0 +1,104 @@
//============================================================================
// 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.
//============================================================================
// The intention of the header file is to configure VTK-m to compile its algorithms
// and filters for some set of types and data storage. You can customize the types
// for which VTK-m is compiled for by setting the VTKm_DEFAULT_TYPES_HEADER CMake
// variable. This CMake variable can be set to a header file that defines one or
// more of the following macros:
//
// VTKM_FIELD_TYPE_LIST - a vtkm::List of value types for fields that filters
// should directly operate on (where applicable).
// VTKM_FIELD_STORAGE_LIST - a vtkm::List of storage tags for fields that
// filters should directly operate on.
// VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED - a vtkm::List of vtkm::cont::CellSet types
// that filters should operate on as a strutured cell set.
// VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED - a vtkm::List of vtkm::cont::CellSet types
// that filters should operate on as an unstrutured cell set.
// VTKM_DEFAULT_CELL_SET_LIST - a vtkm::List of vtkm::cont::CellSet types that filters
// should operate on (where applicable). The default of
// vtkm::ListAppend<VTKM_STRUCTURED_CELL_SET_LIST, VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED>
// is usually correct.
//
// Note that if you specify VTKm_DEFAULT_TYPES_HEADER, that file will be copied
// to the VTK-m build directory. Thus, be careful about editing the file included
// by this one (if it exists).
#ifndef vtk_m_cont_DefaultTypes_h
#define vtk_m_cont_DefaultTypes_h
#cmakedefine VTK_M_HAS_DEFAULT_TYPES_HEADER
#ifdef VTK_M_HAS_DEFAULT_TYPES_HEADER
#include "internal/@VTKm_DEFAULT_TYPES_HEADER_FILENAME@"
#endif
#ifndef VTKM_DEFAULT_TYPE_LIST
#include <vtkm/TypeList.h>
#define VTKM_DEFAULT_TYPE_LIST ::vtkm::TypeListCommon
#endif //VTKM_DEFAULT_TYPE_LIST
#ifndef VTKM_DEFAULT_STORAGE_LIST
#include <vtkm/cont/ArrayHandleCartesianProduct.h>
#include <vtkm/cont/ArrayHandleUniformPointCoordinates.h>
#include <vtkm/cont/StorageList.h>
namespace vtkm
{
namespace cont
{
namespace internal
{
using StorageListField = vtkm::ListAppend<
vtkm::cont::StorageListBasic,
vtkm::List<
vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag,
vtkm::cont::ArrayHandleCartesianProduct<vtkm::cont::ArrayHandle<vtkm::Float32>,
vtkm::cont::ArrayHandle<vtkm::Float32>,
vtkm::cont::ArrayHandle<vtkm::Float32>>::StorageTag,
vtkm::cont::ArrayHandleCartesianProduct<vtkm::cont::ArrayHandle<vtkm::Float64>,
vtkm::cont::ArrayHandle<vtkm::Float64>,
vtkm::cont::ArrayHandle<vtkm::Float64>>::StorageTag>>;
}
}
} // namespace vtkm::cont
#define VTKM_DEFAULT_STORAGE_LIST ::vtkm::cont::internal::StorageListField
#endif // VTKM_FIELD_STORAGE_LIST
#ifndef VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED
#include <vtkm/cont/CellSetList.h>
#define VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED ::vtkm::cont::CellSetListStructured
#endif // VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED
#ifndef VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED
#include <vtkm/cont/CellSetList.h>
#define VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED ::vtkm::cont::CellSetListUnstructured
#endif // VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED
#ifndef VTKM_DEFAULT_CELL_SET_LIST
namespace vtkm
{
namespace cont
{
namespace internal
{
using CellSetList = vtkm::ListAppend<VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED, VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED>;
}
}
} // namespace vtkm::cont::internal
#define VTKM_DEFAULT_CELL_SET_LIST ::vtkm::cont::internal::CellSetList
#endif // VTKM_CELL_SET_LIST
#endif //vtk_m_cont_DefaultTypes_h

@ -13,6 +13,7 @@
#include <vtkm/cont/CastAndCall.h>
#include <vtkm/cont/CellSet.h>
#include <vtkm/cont/CellSetList.h>
#include <vtkm/cont/DefaultTypes.h>
#include <vtkm/cont/ErrorBadValue.h>
#include <vtkm/cont/Logging.h>

@ -10,10 +10,6 @@
#ifndef vtk_m_cont_StorageList_h
#define vtk_m_cont_StorageList_h
#ifndef VTKM_DEFAULT_STORAGE_LIST
#define VTKM_DEFAULT_STORAGE_LIST ::vtkm::cont::StorageListBasic
#endif
#include <vtkm/List.h>
#include <vtkm/cont/Storage.h>
@ -25,10 +21,6 @@ namespace cont
{
using StorageListBasic = vtkm::List<vtkm::cont::StorageTagBasic>;
// If we want to compile VTK-m with support of memory layouts other than the basic layout, then
// add the appropriate storage tags here.
using StorageListSupported = vtkm::List<vtkm::cont::StorageTagBasic>;
}
} // namespace vtkm::cont

@ -37,9 +37,9 @@ struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(
struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(
1.6,
"StorageListTagSupported replaced by StorageListSupported. "
"StorageListTagSupported replaced by StorageListBasic. "
"Note that the new StorageListSupported cannot be subclassed.") StorageListTagSupported
: vtkm::internal::ListAsListTag<StorageListSupported>
: vtkm::internal::ListAsListTag<StorageListBasic>
{
/// @cond NONE
};
@ -52,7 +52,7 @@ struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(
1.6,
"VTKM_DEFAULT_STORAGE_LIST_TAG replaced by VTKM_DEFAULT_STORAGE_LIST. "
"Note that the new VTKM_DEFAULT_STORAGE_LIST cannot be subclassed.") StorageListTagDefault
: vtkm::internal::ListAsListTag<VTKM_DEFAULT_STORAGE_LIST>
: vtkm::internal::ListAsListTag<vtkm::cont::StorageListBasic>
{
/// @cond NONE
};

@ -19,6 +19,7 @@
#include <vtkm/cont/ArrayHandleTransform.h>
#include <vtkm/cont/ArrayHandleVirtual.h>
#include <vtkm/cont/CastAndCall.h>
#include <vtkm/cont/DefaultTypes.h>
#include <vtkm/cont/ErrorBadType.h>
#include <vtkm/cont/Logging.h>
#include <vtkm/cont/StorageList.h>

@ -27,7 +27,9 @@ set(headers
TransportTagWholeArrayInOut.h
TransportTagWholeArrayOut.h
TypeCheck.h
TypeCheckTagArray.h
TypeCheckTagArrayIn.h
TypeCheckTagArrayInOut.h
TypeCheckTagArrayOut.h
TypeCheckTagAtomicArray.h
TypeCheckTagBitField.h
TypeCheckTagCellSet.h

@ -1,42 +0,0 @@
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#ifndef vtk_m_cont_arg_TypeCheckTagArray_h
#define vtk_m_cont_arg_TypeCheckTagArray_h
#include <vtkm/cont/arg/TypeCheck.h>
#include <vtkm/List.h>
#include <vtkm/cont/ArrayHandle.h>
namespace vtkm
{
namespace cont
{
namespace arg
{
/// The Array type check passes for any object that behaves like an \c
/// ArrayHandle class and can be passed to the ArrayIn and ArrayOut transports.
///
struct TypeCheckTagArray
{
};
template <typename ArrayType>
struct TypeCheck<TypeCheckTagArray, ArrayType>
{
static constexpr bool value = vtkm::cont::internal::ArrayHandleCheck<ArrayType>::type::value;
};
}
}
} // namespace vtkm::cont::arg
#endif //vtk_m_cont_arg_TypeCheckTagArray_h

@ -0,0 +1,66 @@
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#ifndef vtk_m_cont_arg_TypeCheckTagArrayIn_h
#define vtk_m_cont_arg_TypeCheckTagArrayIn_h
#include <vtkm/cont/arg/TypeCheck.h>
#include <vtkm/List.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/internal/ArrayPortalHelpers.h>
namespace vtkm
{
namespace cont
{
namespace arg
{
/// The Array type check passes for any object that behaves like an \c
/// ArrayHandle class and can be passed to the ArrayIn transport.
///
struct TypeCheckTagArrayIn
{
};
namespace detail
{
template <typename ArrayType,
bool IsArrayHandle = vtkm::cont::internal::ArrayHandleCheck<ArrayType>::type::value>
struct IsArrayHandleIn;
template <typename ArrayType>
struct IsArrayHandleIn<ArrayType, true>
{
static constexpr bool value =
vtkm::internal::PortalSupportsGets<typename ArrayType::ReadPortalType>::value;
};
template <typename ArrayType>
struct IsArrayHandleIn<ArrayType, false>
{
static constexpr bool value = false;
};
} // namespace detail
template <typename ArrayType>
struct TypeCheck<TypeCheckTagArrayIn, ArrayType>
{
static constexpr bool value = detail::IsArrayHandleIn<ArrayType>::value;
};
}
}
} // namespace vtkm::cont::arg
#endif //vtk_m_cont_arg_TypeCheckTagArray_h

@ -0,0 +1,67 @@
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#ifndef vtk_m_cont_arg_TypeCheckTagArrayInOut_h
#define vtk_m_cont_arg_TypeCheckTagArrayInOut_h
#include <vtkm/cont/arg/TypeCheck.h>
#include <vtkm/List.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/internal/ArrayPortalHelpers.h>
namespace vtkm
{
namespace cont
{
namespace arg
{
/// The Array type check passes for any object that behaves like an
/// `ArrayHandle` class and can be passed to the ArrayInOut transport.
///
struct TypeCheckTagArrayInOut
{
};
namespace detail
{
template <typename ArrayType,
bool IsArrayHandle = vtkm::cont::internal::ArrayHandleCheck<ArrayType>::type::value>
struct IsArrayHandleInOut;
template <typename ArrayType>
struct IsArrayHandleInOut<ArrayType, true>
{
static constexpr bool value =
(vtkm::internal::PortalSupportsGets<typename ArrayType::ReadPortalType>::value &&
vtkm::internal::PortalSupportsSets<typename ArrayType::WritePortalType>::value);
};
template <typename ArrayType>
struct IsArrayHandleInOut<ArrayType, false>
{
static constexpr bool value = false;
};
} // namespace detail
template <typename ArrayType>
struct TypeCheck<TypeCheckTagArrayInOut, ArrayType>
{
static constexpr bool value = detail::IsArrayHandleInOut<ArrayType>::value;
};
}
}
} // namespace vtkm::cont::arg
#endif //vtk_m_cont_arg_TypeCheckTagArray_h

@ -0,0 +1,67 @@
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#ifndef vtk_m_cont_arg_TypeCheckTagArrayOut_h
#define vtk_m_cont_arg_TypeCheckTagArrayOut_h
#include <vtkm/cont/arg/TypeCheck.h>
#include <vtkm/List.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/internal/ArrayPortalHelpers.h>
namespace vtkm
{
namespace cont
{
namespace arg
{
/// The Array type check passes for any object that behaves like an
/// `ArrayHandle` class and can be passed to the ArrayOut transport.
///
struct TypeCheckTagArrayOut
{
};
namespace detail
{
template <typename ArrayType,
bool IsArrayHandle = vtkm::cont::internal::ArrayHandleCheck<ArrayType>::type::value>
struct IsArrayHandleOut;
template <typename ArrayType>
struct IsArrayHandleOut<ArrayType, true>
{
static constexpr bool value =
(vtkm::internal::PortalSupportsGets<typename ArrayType::ReadPortalType>::value &&
vtkm::internal::PortalSupportsSets<typename ArrayType::WritePortalType>::value);
};
template <typename ArrayType>
struct IsArrayHandleOut<ArrayType, false>
{
static constexpr bool value = false;
};
} // namespace detail
template <typename ArrayType>
struct TypeCheck<TypeCheckTagArrayOut, ArrayType>
{
static constexpr bool value = detail::IsArrayHandleOut<ArrayType>::value;
};
}
}
} // namespace vtkm::cont::arg
#endif //vtk_m_cont_arg_TypeCheckTagArray_h

@ -12,7 +12,7 @@
#include <vtkm/cont/arg/TypeCheck.h>
#include <vtkm/cont/CellSet.h>
#include <vtkm/cont/CellSetStructured.h>
namespace vtkm
{

@ -8,7 +8,9 @@
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#include <vtkm/cont/arg/TypeCheckTagArray.h>
#include <vtkm/cont/arg/TypeCheckTagArrayIn.h>
#include <vtkm/cont/arg/TypeCheckTagArrayInOut.h>
#include <vtkm/cont/arg/TypeCheckTagArrayOut.h>
#include <vtkm/cont/arg/TypeCheckTagAtomicArray.h>
#include <vtkm/cont/ArrayHandle.h>
@ -26,27 +28,50 @@ struct TryArraysOfType
void operator()(T) const
{
using vtkm::cont::arg::TypeCheck;
using vtkm::cont::arg::TypeCheckTagArray;
using vtkm::cont::arg::TypeCheckTagArrayIn;
using vtkm::cont::arg::TypeCheckTagArrayInOut;
using vtkm::cont::arg::TypeCheckTagArrayOut;
using StandardArray = vtkm::cont::ArrayHandle<T>;
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArray, StandardArray>::value),
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArrayIn, StandardArray>::value),
"Standard array type check failed.");
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArrayInOut, StandardArray>::value),
"Standard array type check failed.");
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArrayOut, StandardArray>::value),
"Standard array type check failed.");
using CountingArray = vtkm::cont::ArrayHandleCounting<T>;
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArray, CountingArray>::value),
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArrayIn, CountingArray>::value),
"Counting array type check failed.");
VTKM_TEST_ASSERT((!TypeCheck<TypeCheckTagArrayInOut, CountingArray>::value),
"Counting array type check failed.");
VTKM_TEST_ASSERT((!TypeCheck<TypeCheckTagArrayOut, CountingArray>::value),
"Counting array type check failed.");
using CompositeArray = vtkm::cont::ArrayHandleCompositeVector<StandardArray, CountingArray>;
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArray, CompositeArray>::value),
using CompositeArray = vtkm::cont::ArrayHandleCompositeVector<StandardArray, StandardArray>;
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArrayIn, CompositeArray>::value),
"Composite array type check failed.");
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArrayInOut, CompositeArray>::value),
"Counting array type check failed.");
VTKM_TEST_ASSERT((TypeCheck<TypeCheckTagArrayOut, CompositeArray>::value),
"Counting array type check failed.");
// Just some type that is not a valid array.
using NotAnArray = typename StandardArray::WritePortalType;
VTKM_TEST_ASSERT(!(TypeCheck<TypeCheckTagArray, NotAnArray>::value),
VTKM_TEST_ASSERT(!(TypeCheck<TypeCheckTagArrayIn, NotAnArray>::value),
"Not an array type check failed.");
VTKM_TEST_ASSERT(!(TypeCheck<TypeCheckTagArrayInOut, NotAnArray>::value),
"Not an array type check failed.");
VTKM_TEST_ASSERT(!(TypeCheck<TypeCheckTagArrayOut, NotAnArray>::value),
"Not an array type check failed.");
// Another type that is not a valid array.
VTKM_TEST_ASSERT(!(TypeCheck<TypeCheckTagArray, T>::value), "Not an array type check failed.");
VTKM_TEST_ASSERT(!(TypeCheck<TypeCheckTagArrayIn, T>::value),
"Not an array type check failed.");
VTKM_TEST_ASSERT(!(TypeCheck<TypeCheckTagArrayInOut, T>::value),
"Not an array type check failed.");
VTKM_TEST_ASSERT(!(TypeCheck<TypeCheckTagArrayOut, T>::value),
"Not an array type check failed.");
}
};

@ -0,0 +1,107 @@
//============================================================================
// 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 vtkmDefaultTypes_h
#define vtkmDefaultTypes_h
// This configures the default types to use when compiling VTK-m for use as an
// accelerator in VTK.
#include <vtkm/TypeList.h>
#include <vtkm/cont/CellSetList.h>
namespace tovtkm
{
//------------------------------------------------------------------------------
// All scalar types in vtkType.h
using VTKScalarTypes = vtkm::List< //
char, //
signed char, //
unsigned char, //
short, //
unsigned short, //
int, //
unsigned int, //
long, //
unsigned long, //
long long, //
unsigned long long, //
float, //
double //
>;
using SpecialGradientOutTypes =
vtkm::List<vtkm::Vec<vtkm::Vec<vtkm::Float32, 3>, 3>, vtkm::Vec<vtkm::Vec<vtkm::Float64, 3>, 3> >;
using FieldTypeInVTK = vtkm::ListAppend<vtkm::TypeListVecCommon, VTKScalarTypes>;
using FieldTypeOutVTK =
vtkm::ListAppend<vtkm::TypeListVecCommon, SpecialGradientOutTypes, VTKScalarTypes>;
//------------------------------------------------------------------------------
using CellListStructuredInVTK =
vtkm::List<vtkm::cont::CellSetStructured<3>, vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<1> >;
using CellListStructuredOutVTK = CellListStructuredInVTK;
// vtkCellArray may use either 32 or 64 bit arrays to hold connectivity/offset
// data, so we may be using ArrayHandleCast to convert to vtkm::Ids.
#ifdef VTKM_USE_64BIT_IDS
using Int32AOSHandle = vtkm::cont::ArrayHandle<vtkm::Int32>;
using Int32AsIdAOSHandle = vtkm::cont::ArrayHandleCast<vtkm::Id, Int32AOSHandle>;
using Int32AsIdAOSStorage = typename Int32AsIdAOSHandle::StorageTag;
using CellSetExplicit32Bit = vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic,
Int32AsIdAOSStorage, Int32AsIdAOSStorage>;
using CellSetExplicit64Bit = vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic,
vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>;
using CellSetSingleType32Bit = vtkm::cont::CellSetSingleType<Int32AsIdAOSStorage>;
using CellSetSingleType64Bit = vtkm::cont::CellSetSingleType<vtkm::cont::StorageTagBasic>;
#else // VTKM_USE_64BIT_IDS
using Int64AOSHandle = vtkm::cont::ArrayHandle<vtkm::Int64, vtkm::cont::StorageTagBasic>;
using Int64AsIdAOSHandle = vtkm::cont::ArrayHandleCast<vtkm::Id, Int64AOSHandle>;
using Int64AsIdAOSStorage = typename Int64AsIdAOSHandle::StorageTag;
using CellSetExplicit32Bit = vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic,
vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>;
using CellSetExplicit64Bit = vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic,
Int64AsIdAOSStorage, Int64AsIdAOSStorage>;
using CellSetSingleType32Bit = vtkm::cont::CellSetSingleType<vtkm::cont::StorageTagBasic>;
using CellSetSingleType64Bit = vtkm::cont::CellSetSingleType<Int64AsIdAOSStorage>;
#endif // VTKM_USE_64BIT_IDS
//------------------------------------------------------------------------------
using CellListUnstructuredInVTK = vtkm::List< //
CellSetExplicit32Bit, //
CellSetExplicit64Bit, //
CellSetSingleType32Bit, //
CellSetSingleType64Bit //
>;
using CellListUnstructuredOutVTK = vtkm::List< //
vtkm::cont::CellSetExplicit<>, //
vtkm::cont::CellSetSingleType<>, //
CellSetExplicit32Bit, //
CellSetExplicit64Bit, //
CellSetSingleType32Bit, //
CellSetSingleType64Bit //
>;
//------------------------------------------------------------------------------
using CellListAllInVTK = vtkm::ListAppend<CellListStructuredInVTK, CellListUnstructuredInVTK>;
using CellListAllOutVTK = vtkm::ListAppend<CellListStructuredOutVTK, CellListUnstructuredOutVTK>;
} // end namespace tovtkm
#define VTKM_DEFAULT_TYPE_LIST ::tovtkm::FieldTypeInVTK
#define VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED ::tovtkm::CellListStructuredInVTK
#define VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED ::tovtkm::CellListUnstructuredInVTK
#endif //vtkmDefaultTypes_h

@ -110,7 +110,7 @@ struct CheckFunctor
template <typename T>
void operator()(
const vtkm::cont::ArrayHandle<T, typename ArrayHandleWithUnusualStorage<T>::StorageTag>& array,
const vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagImplicit<UnusualPortal<T>>>& array,
bool& vtkmNotUsed(calledBasic),
bool& calledUnusual,
bool& vtkmNotUsed(calledVirtual)) const
@ -138,6 +138,12 @@ struct CheckFunctor
auto portal = array.ReadPortal();
CheckPortal(portal);
}
template <typename T, typename S>
void operator()(const vtkm::cont::ArrayHandle<T, S>&, bool&, bool&, bool&) const
{
VTKM_TEST_FAIL("Array resolved to unexpected type.");
}
};
template <typename TypeList>

@ -46,6 +46,13 @@ inline VTKM_EXEC vtkm::Id3 To3D(vtkm::Vec<vtkm::Id, 1> index)
{
return vtkm::Id3(index[0], 1, 1);
}
/// Given a \c Vec of (semi) arbitrary size, inflate it to a vtkm::Id3 by padding with zeros.
/// \overload
inline VTKM_EXEC vtkm::Id3 To3D(vtkm::Id index)
{
return vtkm::Id3(index, 1, 1);
}
}
/// \brief Container for thread information in a WorkletPointNeighborhood.

@ -22,8 +22,8 @@ namespace filter
class CrossProduct : public vtkm::filter::FilterField<CrossProduct>
{
public:
//currently the DotProduct filter only works on vector data.
using SupportedTypes = TypeListVecCommon;
//CrossProduct filter only works on vec3 data.
using SupportedTypes = vtkm::TypeListFieldVec3;
VTKM_CONT
CrossProduct();

@ -22,9 +22,6 @@ namespace filter
class DotProduct : public vtkm::filter::FilterField<DotProduct>
{
public:
//currently the DotProduct filter only works on vector data.
using SupportedTypes = TypeListVecCommon;
VTKM_CONT
DotProduct();
@ -123,11 +120,10 @@ public:
//@}
template <typename T, typename StorageType, typename DerivedPolicy>
VTKM_CONT vtkm::cont::DataSet DoExecute(
const vtkm::cont::DataSet& input,
const vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>, StorageType>& field,
const vtkm::filter::FieldMetadata& fieldMeta,
vtkm::filter::PolicyBase<DerivedPolicy> policy);
VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input,
const vtkm::cont::ArrayHandle<T, StorageType>& field,
const vtkm::filter::FieldMetadata& fieldMeta,
vtkm::filter::PolicyBase<DerivedPolicy> policy);
private:
std::string SecondaryFieldName;

@ -33,7 +33,7 @@ inline VTKM_CONT DotProduct::DotProduct()
template <typename T, typename StorageType, typename DerivedPolicy>
inline VTKM_CONT vtkm::cont::DataSet DotProduct::DoExecute(
const vtkm::cont::DataSet& inDataSet,
const vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>, StorageType>& primary,
const vtkm::cont::ArrayHandle<T, StorageType>& primary,
const vtkm::filter::FieldMetadata& fieldMetadata,
vtkm::filter::PolicyBase<DerivedPolicy> policy)
{
@ -46,10 +46,9 @@ inline VTKM_CONT vtkm::cont::DataSet DotProduct::DoExecute(
{
secondaryField = inDataSet.GetField(this->SecondaryFieldName, this->SecondaryFieldAssociation);
}
auto secondary =
vtkm::filter::ApplyPolicyFieldOfType<vtkm::Vec<T, 3>>(secondaryField, policy, *this);
auto secondary = vtkm::filter::ApplyPolicyFieldOfType<T>(secondaryField, policy, *this);
vtkm::cont::ArrayHandle<T> output;
vtkm::cont::ArrayHandle<typename vtkm::VecTraits<T>::ComponentType> output;
this->Invoke(vtkm::worklet::DotProduct{}, primary, secondary, output);
return CreateResult(inDataSet, output, this->GetOutputFieldName(), fieldMetadata);

@ -16,6 +16,7 @@
#include <vtkm/cont/CellSetList.h>
#include <vtkm/cont/CoordinateSystem.h>
#include <vtkm/cont/DataSet.h>
#include <vtkm/cont/DefaultTypes.h>
#include <vtkm/cont/DeviceAdapterList.h>
#include <vtkm/cont/DynamicCellSet.h>
#include <vtkm/cont/Field.h>
@ -32,19 +33,10 @@ template <typename Derived>
struct PolicyBase
{
using FieldTypeList = VTKM_DEFAULT_TYPE_LIST;
using StorageList = vtkm::ListAppend<
VTKM_DEFAULT_STORAGE_LIST,
vtkm::List<
vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag,
vtkm::cont::ArrayHandleCartesianProduct<vtkm::cont::ArrayHandle<vtkm::Float32>,
vtkm::cont::ArrayHandle<vtkm::Float32>,
vtkm::cont::ArrayHandle<vtkm::Float32>>::StorageTag,
vtkm::cont::ArrayHandleCartesianProduct<vtkm::cont::ArrayHandle<vtkm::Float64>,
vtkm::cont::ArrayHandle<vtkm::Float64>,
vtkm::cont::ArrayHandle<vtkm::Float64>>::StorageTag>>;
using StorageList = VTKM_DEFAULT_STORAGE_LIST;
using StructuredCellSetList = vtkm::cont::CellSetListStructured;
using UnstructuredCellSetList = vtkm::cont::CellSetListUnstructured;
using StructuredCellSetList = VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED;
using UnstructuredCellSetList = VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED;
using AllCellSetList = VTKM_DEFAULT_CELL_SET_LIST;
};

@ -428,9 +428,12 @@ public:
}
else
{
auto cellSetUnstructured =
cellset.ResetCellSetList(VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED{});
vtkm::cont::ArrayHandle<vtkm::Id> segmentsPerCell;
vtkm::worklet::DispatcherMapTopology<CountSegments> countInvoker;
countInvoker.Invoke(cellset, segmentsPerCell);
countInvoker.Invoke(cellSetUnstructured, segmentsPerCell);
vtkm::Id total = 0;
total = vtkm::cont::Algorithm::Reduce(segmentsPerCell, vtkm::Id(0));
@ -440,7 +443,7 @@ public:
outputIndices.Allocate(total);
vtkm::worklet::DispatcherMapTopology<Cylinderize> cylInvoker;
cylInvoker.Invoke(cellset, cellOffsets, outputIndices);
cylInvoker.Invoke(cellSetUnstructured, cellOffsets, outputIndices);
output = total;
}

@ -113,7 +113,8 @@ public:
{
if (DIM == 2)
{
// Do nothing mark says
outputIndices.Set(
cellIndex, { cellIndex, cellIndices[0], cellIndices[1], cellIndices[2], cellIndices[3] });
}
else if (DIM == 3)
{
@ -123,7 +124,8 @@ public:
vtkm::Id4 idx;
idx[0] = 0;
idx[1] = 1;
idx[2] = 5, idx[3] = 4;
idx[2] = 5;
idx[3] = 4;
cell2quad(idx, quad, offset, cellIndices, outputIndices);
idx[0] = 1;
@ -300,24 +302,38 @@ public:
vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::Id, 5>>& outputIndices,
vtkm::Id& output)
{
vtkm::cont::Invoker invoke;
if (cellset.IsSameType(vtkm::cont::CellSetStructured<3>()))
{
vtkm::cont::CellSetStructured<3> cellSetStructured3D =
cellset.Cast<vtkm::cont::CellSetStructured<3>>();
const vtkm::Id numCells = cellSetStructured3D.GetNumberOfCells();
vtkm::cont::ArrayHandleCounting<vtkm::Id> cellIdxs(0, 1, numCells);
vtkm::cont::ArrayHandleIndex cellIdxs(numCells);
outputIndices.Allocate(numCells * QUAD_PER_CSS);
vtkm::worklet::DispatcherMapTopology<SegmentedStructured<3>> segInvoker;
segInvoker.Invoke(cellSetStructured3D, cellIdxs, outputIndices);
invoke(SegmentedStructured<3>{}, cellSetStructured3D, cellIdxs, outputIndices);
output = numCells * QUAD_PER_CSS;
}
else if (cellset.IsSameType(vtkm::cont::CellSetStructured<2>()))
{
vtkm::cont::CellSetStructured<2> cellSetStructured2D =
cellset.Cast<vtkm::cont::CellSetStructured<2>>();
const vtkm::Id numCells = cellSetStructured2D.GetNumberOfCells();
vtkm::cont::ArrayHandleIndex cellIdxs(numCells);
outputIndices.Allocate(numCells);
invoke(SegmentedStructured<2>{}, cellSetStructured2D, cellIdxs, outputIndices);
output = numCells;
}
else
{
auto cellSetUnstructured =
cellset.ResetCellSetList(VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED{});
vtkm::cont::ArrayHandle<vtkm::Id> quadsPerCell;
vtkm::worklet::DispatcherMapTopology<CountQuads> countInvoker;
countInvoker.Invoke(cellset, quadsPerCell);
invoke(CountQuads{}, cellSetUnstructured, quadsPerCell);
vtkm::Id total = 0;
total = vtkm::cont::Algorithm::Reduce(quadsPerCell, vtkm::Id(0));
@ -326,8 +342,7 @@ public:
vtkm::cont::Algorithm::ScanExclusive(quadsPerCell, cellOffsets);
outputIndices.Allocate(total);
vtkm::worklet::DispatcherMapTopology<Quadralize> quadInvoker;
quadInvoker.Invoke(cellset, cellOffsets, outputIndices);
invoke(Quadralize{}, cellSetUnstructured, cellOffsets, outputIndices);
output = total;
}

@ -682,9 +682,11 @@ public:
}
else
{
auto cellSetUnstructured =
cellset.ResetCellSetList(VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED{});
vtkm::cont::ArrayHandle<vtkm::Id> trianglesPerCell;
vtkm::worklet::DispatcherMapTopology<CountTriangles>(CountTriangles())
.Invoke(cellset, trianglesPerCell);
.Invoke(cellSetUnstructured, trianglesPerCell);
vtkm::Id totalTriangles = 0;
totalTriangles = vtkm::cont::Algorithm::Reduce(trianglesPerCell, vtkm::Id(0));
@ -694,7 +696,7 @@ public:
outputIndices.Allocate(totalTriangles);
vtkm::worklet::DispatcherMapTopology<Trianglulate>(Trianglulate())
.Invoke(cellset, cellOffsets, outputIndices);
.Invoke(cellSetUnstructured, cellOffsets, outputIndices);
outputTriangles = totalTriangles;
}

@ -12,6 +12,7 @@
#include <vtkm/cont/ArrayHandleIndex.h>
#include <vtkm/cont/ArrayPortalToIterators.h>
#include <vtkm/cont/DeviceAdapter.h>
#include <vtkm/cont/Field.h>
#include <vtkm/cont/Invoker.h>
#include <vtkm/cont/TryExecute.h>

@ -255,9 +255,11 @@ void CylinderExtractor::SetCylinderIdsFromCells(const vtkm::cont::DynamicCellSet
//
if (cells.IsSameType(vtkm::cont::CellSetExplicit<>()))
{
auto cellsExplicit = cells.Cast<vtkm::cont::CellSetExplicit<>>();
vtkm::cont::ArrayHandle<vtkm::Id> points;
vtkm::worklet::DispatcherMapTopology<detail::CountSegments>(detail::CountSegments())
.Invoke(cells, points);
.Invoke(cellsExplicit, points);
vtkm::Id totalPoints = 0;
totalPoints = vtkm::cont::Algorithm::Reduce(points, vtkm::Id(0));
@ -267,7 +269,7 @@ void CylinderExtractor::SetCylinderIdsFromCells(const vtkm::cont::DynamicCellSet
CylIds.Allocate(totalPoints);
vtkm::worklet::DispatcherMapTopology<detail::Pointify>(detail::Pointify())
.Invoke(cells, cellOffsets, this->CylIds);
.Invoke(cellsExplicit, cellOffsets, this->CylIds);
}
}

@ -221,9 +221,11 @@ void QuadExtractor::SetQuadIdsFromCells(const vtkm::cont::DynamicCellSet& cells)
//
if (cells.IsSameType(vtkm::cont::CellSetExplicit<>()))
{
auto cellsExplicit = cells.Cast<vtkm::cont::CellSetExplicit<>>();
vtkm::cont::ArrayHandle<vtkm::Id> points;
vtkm::worklet::DispatcherMapTopology<detail::CountQuads>(detail::CountQuads())
.Invoke(cells, points);
.Invoke(cellsExplicit, points);
vtkm::Id total = 0;
total = vtkm::cont::Algorithm::Reduce(points, vtkm::Id(0));
@ -233,7 +235,7 @@ void QuadExtractor::SetQuadIdsFromCells(const vtkm::cont::DynamicCellSet& cells)
QuadIds.Allocate(total);
vtkm::worklet::DispatcherMapTopology<detail::Pointify>(detail::Pointify())
.Invoke(cells, cellOffsets, this->QuadIds);
.Invoke(cellsExplicit, cellOffsets, this->QuadIds);
}
}

@ -224,9 +224,11 @@ void SphereExtractor::SetPointIdsFromCells(const vtkm::cont::DynamicCellSet& cel
//
if (cells.IsSameType(vtkm::cont::CellSetExplicit<>()))
{
auto cellsExplicit = cells.Cast<vtkm::cont::CellSetExplicit<>>();
vtkm::cont::ArrayHandle<vtkm::Id> points;
vtkm::worklet::DispatcherMapTopology<detail::CountPoints>(detail::CountPoints())
.Invoke(cells, points);
.Invoke(cellsExplicit, points);
vtkm::Id totalPoints = 0;
totalPoints = vtkm::cont::Algorithm::Reduce(points, vtkm::Id(0));
@ -236,7 +238,7 @@ void SphereExtractor::SetPointIdsFromCells(const vtkm::cont::DynamicCellSet& cel
PointIds.Allocate(totalPoints);
vtkm::worklet::DispatcherMapTopology<detail::Pointify>(detail::Pointify())
.Invoke(cells, cellOffsets, this->PointIds);
.Invoke(cellsExplicit, cellOffsets, this->PointIds);
}
else if (cells.IsSameType(SingleType()))
{

@ -12,6 +12,7 @@
#include <vtkm/worklet/WorkletMapField.h>
#include <vtkm/Math.h>
#include <vtkm/VectorAnalysis.h>
namespace vtkm
@ -29,7 +30,13 @@ public:
const vtkm::Vec<T, Size>& v2,
T& outValue) const
{
outValue = vtkm::Dot(v1, v2);
outValue = static_cast<T>(vtkm::Dot(v1, v2));
}
template <typename T>
VTKM_EXEC void operator()(T s1, T s2, T& outValue) const
{
outValue = static_cast<T>(s1 * s2);
}
};
}

@ -16,7 +16,9 @@
#include <vtkm/cont/arg/TransportTagArrayIn.h>
#include <vtkm/cont/arg/TransportTagArrayInOut.h>
#include <vtkm/cont/arg/TransportTagArrayOut.h>
#include <vtkm/cont/arg/TypeCheckTagArray.h>
#include <vtkm/cont/arg/TypeCheckTagArrayIn.h>
#include <vtkm/cont/arg/TypeCheckTagArrayInOut.h>
#include <vtkm/cont/arg/TypeCheckTagArrayOut.h>
#include <vtkm/exec/arg/FetchTagArrayDirectIn.h>
#include <vtkm/exec/arg/FetchTagArrayDirectInOut.h>
@ -47,7 +49,7 @@ public:
///
struct FieldIn : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
using TransportTag = vtkm::cont::arg::TransportTagArrayIn;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn;
};
@ -58,7 +60,7 @@ public:
///
struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayOut;
using TransportTag = vtkm::cont::arg::TransportTagArrayOut;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectOut;
};
@ -69,7 +71,7 @@ public:
///
struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayInOut;
using TransportTag = vtkm::cont::arg::TransportTagArrayInOut;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectInOut;
};

@ -19,7 +19,9 @@
#include <vtkm/cont/arg/TransportTagArrayOut.h>
#include <vtkm/cont/arg/TransportTagCellSetIn.h>
#include <vtkm/cont/arg/TransportTagTopologyFieldIn.h>
#include <vtkm/cont/arg/TypeCheckTagArray.h>
#include <vtkm/cont/arg/TypeCheckTagArrayIn.h>
#include <vtkm/cont/arg/TypeCheckTagArrayInOut.h>
#include <vtkm/cont/arg/TypeCheckTagArrayOut.h>
#include <vtkm/cont/arg/TypeCheckTagCellSet.h>
#include <vtkm/exec/arg/CellShape.h>
@ -75,7 +77,7 @@ public:
///
struct FieldInVisit : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
using TransportTag = vtkm::cont::arg::TransportTagTopologyFieldIn<VisitTopologyType>;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn;
};
@ -85,7 +87,7 @@ public:
///
struct FieldInIncident : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
using TransportTag = vtkm::cont::arg::TransportTagTopologyFieldIn<IncidentTopologyType>;
using FetchTag = vtkm::exec::arg::FetchTagArrayTopologyMapIn;
};
@ -97,7 +99,7 @@ public:
///
struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayOut;
using TransportTag = vtkm::cont::arg::TransportTagArrayOut;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectOut;
};
@ -107,7 +109,7 @@ public:
///
struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayInOut;
using TransportTag = vtkm::cont::arg::TransportTagArrayInOut;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectInOut;
};

@ -25,7 +25,9 @@
#include <vtkm/cont/arg/TransportTagArrayInOut.h>
#include <vtkm/cont/arg/TransportTagArrayOut.h>
#include <vtkm/cont/arg/TransportTagCellSetIn.h>
#include <vtkm/cont/arg/TypeCheckTagArray.h>
#include <vtkm/cont/arg/TypeCheckTagArrayIn.h>
#include <vtkm/cont/arg/TypeCheckTagArrayInOut.h>
#include <vtkm/cont/arg/TypeCheckTagArrayOut.h>
#include <vtkm/cont/arg/TypeCheckTagCellSetStructured.h>
#include <vtkm/exec/arg/Boundary.h>
@ -110,7 +112,7 @@ public:
///
struct FieldIn : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
using TransportTag = vtkm::cont::arg::TransportTagArrayIn;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn;
};
@ -122,7 +124,7 @@ public:
///
struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayOut;
using TransportTag = vtkm::cont::arg::TransportTagArrayOut;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectOut;
};
@ -134,7 +136,7 @@ public:
///
struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayInOut;
using TransportTag = vtkm::cont::arg::TransportTagArrayInOut;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectInOut;
};
@ -166,7 +168,7 @@ public:
///
struct FieldInNeighborhood : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
using TransportTag = vtkm::cont::arg::TransportTagArrayIn;
using FetchTag = vtkm::exec::arg::FetchTagArrayNeighborhoodIn;
};

@ -19,7 +19,9 @@
#include <vtkm/cont/arg/TransportTagKeyedValuesInOut.h>
#include <vtkm/cont/arg/TransportTagKeyedValuesOut.h>
#include <vtkm/cont/arg/TransportTagKeysIn.h>
#include <vtkm/cont/arg/TypeCheckTagArray.h>
#include <vtkm/cont/arg/TypeCheckTagArrayIn.h>
#include <vtkm/cont/arg/TypeCheckTagArrayInOut.h>
#include <vtkm/cont/arg/TypeCheckTagArrayOut.h>
#include <vtkm/cont/arg/TypeCheckTagKeys.h>
#include <vtkm/exec/internal/ReduceByKeyLookup.h>
@ -69,7 +71,7 @@ public:
///
struct ValuesIn : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
using TransportTag = vtkm::cont::arg::TransportTagKeyedValuesIn;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn;
};
@ -85,7 +87,7 @@ public:
///
struct ValuesInOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayInOut;
using TransportTag = vtkm::cont::arg::TransportTagKeyedValuesInOut;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn;
};
@ -101,7 +103,7 @@ public:
///
struct ValuesOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayOut;
using TransportTag = vtkm::cont::arg::TransportTagKeyedValuesOut;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn;
};
@ -118,7 +120,7 @@ public:
///
struct ReducedValuesIn : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
using TransportTag = vtkm::cont::arg::TransportTagArrayIn;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn;
};
@ -135,7 +137,7 @@ public:
///
struct ReducedValuesInOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayInOut;
using TransportTag = vtkm::cont::arg::TransportTagArrayInOut;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectInOut;
};
@ -149,7 +151,7 @@ public:
///
struct ReducedValuesOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayOut;
using TransportTag = vtkm::cont::arg::TransportTagArrayOut;
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectOut;
};

@ -32,7 +32,9 @@
#include <vtkm/cont/arg/TransportTagWholeArrayIn.h>
#include <vtkm/cont/arg/TransportTagWholeArrayInOut.h>
#include <vtkm/cont/arg/TransportTagWholeArrayOut.h>
#include <vtkm/cont/arg/TypeCheckTagArray.h>
#include <vtkm/cont/arg/TypeCheckTagArrayIn.h>
#include <vtkm/cont/arg/TypeCheckTagArrayInOut.h>
#include <vtkm/cont/arg/TypeCheckTagArrayOut.h>
#include <vtkm/cont/arg/TypeCheckTagAtomicArray.h>
#include <vtkm/cont/arg/TypeCheckTagBitField.h>
#include <vtkm/cont/arg/TypeCheckTagCellSet.h>
@ -140,7 +142,7 @@ public:
///
struct WholeArrayIn : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
using TransportTag = vtkm::cont::arg::TransportTagWholeArrayIn;
using FetchTag = vtkm::exec::arg::FetchTagExecObject;
};
@ -158,7 +160,7 @@ public:
///
struct WholeArrayOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayOut;
using TransportTag = vtkm::cont::arg::TransportTagWholeArrayOut;
using FetchTag = vtkm::exec::arg::FetchTagExecObject;
};
@ -177,7 +179,7 @@ public:
///
struct WholeArrayInOut : vtkm::cont::arg::ControlSignatureTagBase
{
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray;
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayInOut;
using TransportTag = vtkm::cont::arg::TransportTagWholeArrayInOut;
using FetchTag = vtkm::exec::arg::FetchTagExecObject;
};