VTK-m  1.4
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
vtkm::cont Namespace Reference

VTK-m Control Environment. More...

Namespaces

 arg
 Transportation controls for Control Environment Objects.
 
 cuda
 CUDA implementation for Control Environment.
 
 openmp
 OPenMP implementation for Control Environment.
 
 serial
 Serial implementation for Control Environment.
 
 tbb
 TBB implementation for Control Environment.
 

Classes

struct  Algorithm
 
class  ArrayHandle
 Manages an array-worth of data. More...
 
class  ArrayHandle< T,::vtkm::cont::StorageTagBasic >
 Specialization of ArrayHandle for Basic storage. More...
 
class  ArrayHandleBitField
 The ArrayHandleBitField class is a boolean-valued ArrayHandle that is backed by a BitField. More...
 
class  ArrayHandleCartesianProduct
 ArrayHandleCartesianProduct is a specialization of ArrayHandle. More...
 
class  ArrayHandleCast
 Cast the values of an array to the specified type, on demand. More...
 
class  ArrayHandleCompositeVector
 An ArrayHandle that combines components from other arrays. More...
 
class  ArrayHandleConcatenate
 
class  ArrayHandleConstant
 An array handle with a constant value. More...
 
class  ArrayHandleCounting
 ArrayHandleCounting is a specialization of ArrayHandle. More...
 
class  ArrayHandleDecorator
 A fancy ArrayHandle that can be used to modify the results from one or more source ArrayHandle. More...
 
class  ArrayHandleDiscard
 ArrayHandleDiscard is a write-only array that discards all data written to it. More...
 
class  ArrayHandleExtractComponent
 A fancy ArrayHandle that turns a vector array into a scalar array by slicing out a single component of each vector. More...
 
class  ArrayHandleExtrudeCoords
 
class  ArrayHandleExtrudeField
 
class  ArrayHandleGroupVec
 Fancy array handle that groups values into vectors. More...
 
class  ArrayHandleGroupVecVariable
 Fancy array handle that groups values into vectors of different sizes. More...
 
class  ArrayHandleImplicit
 An ArrayHandle that computes values on the fly. More...
 
class  ArrayHandleIndex
 An implicit array handle containing the its own indices. More...
 
class  ArrayHandleMultiplexer
 An ArrayHandle that can behave like several other handles. More...
 
class  ArrayHandlePermutation
 Implicitly permutes the values in an array. More...
 
class  ArrayHandleReverse
 Reverse the order of an array, on demand. More...
 
class  ArrayHandleSOA
 An ArrayHandle that for Vecs stores each component in a separate physical array. More...
 
class  ArrayHandleStreaming
 
class  ArrayHandleSwizzle
 
class  ArrayHandleTransform
 Implicitly transform values of one array to another with a functor. More...
 
class  ArrayHandleTransform< ArrayHandleType, FunctorType, internal::NullFunctorType >
 
class  ArrayHandleUniformPointCoordinates
 ArrayHandleUniformPointCoordinates is a specialization of ArrayHandle. More...
 
class  ArrayHandleView
 
class  ArrayHandleVirtualCoordinates
 ArrayHandleVirtualCoordinates is a specialization of ArrayHandle. More...
 
class  ArrayHandleZip
 ArrayHandleZip is a specialization of ArrayHandle. More...
 
class  ArrayPortal
 A class that points to and access and array of data. More...
 
class  ArrayPortalToIterators
 Convert an ArrayPortal to STL iterators. More...
 
class  ArrayPortalToIterators< vtkm::cont::internal::ArrayPortalFromIterators< IterType > >
 Partial specialization of ArrayPortalToIterators for ArrayPortalFromIterators.
 
class  ArrayPortalToIterators< vtkm::exec::cuda::internal::ArrayPortalFromThrust< T > >
 Partial specialization of ArrayPortalToIterators for ArrayPortalFromThrust.
 
class  ArrayPortalToIterators< vtkm::exec::cuda::internal::ConstArrayPortalFromThrust< T > >
 Partial specialization of ArrayPortalToIterators for ConstArrayPortalFromThrust.
 
class  AssignerPartitionedDataSet
 Assigner for PartitionedDataSet partitions. More...
 
class  AtomicArray
 A class that can be used to atomically operate on an array of values safely across multiple instances of the same worklet. More...
 
struct  AtomicArrayTypeListTag
 A type list containing types that can be used with an AtomicArray. More...
 
class  AtomicInterfaceExecution
 Class providing a device-specific support for atomic operations. More...
 
class  BitField
 
class  CellInterpolationHelper
 
class  CellLocator
 
class  CellLocatorBoundingIntervalHierarchy
 
class  CellLocatorGeneral
 
class  CellLocatorRectilinearGrid
 
class  CellLocatorUniformBins
 
class  CellLocatorUniformGrid
 
class  CellSet
 
class  CellSetExplicit
 
class  CellSetExtrude
 
struct  CellSetListTagCommon
 
struct  CellSetListTagExplicit
 
struct  CellSetListTagExplicitDefault
 
struct  CellSetListTagStructured
 
struct  CellSetListTagStructured1D
 
struct  CellSetListTagStructured2D
 
struct  CellSetListTagStructured3D
 
struct  CellSetListTagUnstructured
 
class  CellSetPermutation
 
class  CellSetPermutation< CellSetPermutation< CellSetType, PermutationArrayHandleType1 >, PermutationArrayHandleType2 >
 
class  CellSetSingleType
 
class  CellSetStructured
 
class  ColorTable
 Color Table for coloring arbitrary fields. More...
 
class  ColorTableSamplesRGB
 Color Sample Table used with vtkm::cont::ColorTable for fast coloring. More...
 
class  ColorTableSamplesRGBA
 Color Sample Table used with vtkm::cont::ColorTable for fast coloring. More...
 
class  CoordinateSystem
 
class  DataSet
 
class  DataSetBuilderExplicit
 
class  DataSetBuilderExplicitIterative
 
class  DataSetBuilderRectilinear
 
class  DataSetBuilderUniform
 
class  DataSetFieldAdd
 
struct  DeviceAdapterAlgorithm
 Struct containing device adapter algorithms. More...
 
struct  DeviceAdapterAlgorithm< vtkm::cont::DeviceAdapterTagCuda >
 
struct  DeviceAdapterAlgorithm< vtkm::cont::DeviceAdapterTagOpenMP >
 
struct  DeviceAdapterAlgorithm< vtkm::cont::DeviceAdapterTagSerial >
 
struct  DeviceAdapterAlgorithm< vtkm::cont::DeviceAdapterTagTBB >
 
struct  DeviceAdapterId
 
struct  DeviceAdapterListTagCommon
 
class  DeviceAdapterRuntimeDetector
 Class providing a device-specific runtime support detector. More...
 
class  DeviceAdapterRuntimeDetector< vtkm::cont::DeviceAdapterTagCuda >
 Class providing a CUDA runtime support detector. More...
 
class  DeviceAdapterRuntimeDetector< vtkm::cont::DeviceAdapterTagOpenMP >
 Determine if this machine supports Serial backend. More...
 
class  DeviceAdapterRuntimeDetector< vtkm::cont::DeviceAdapterTagSerial >
 Determine if this machine supports Serial backend. More...
 
class  DeviceAdapterRuntimeDetector< vtkm::cont::DeviceAdapterTagTBB >
 Determine if this machine supports Serial backend. More...
 
struct  DeviceAdapterTag___
 A tag specifying the interface between the control and execution environments. More...
 
class  DeviceAdapterTimerImplementation
 Class providing a device-specific timer. More...
 
class  DeviceAdapterTimerImplementation< vtkm::cont::DeviceAdapterTagCuda >
 Specialization of DeviceAdapterTimerImplementation for CUDA CUDA contains its own high resolution timer that are able to track how long it takes to execute async kernels. More...
 
class  DeviceAdapterTimerImplementation< vtkm::cont::DeviceAdapterTagTBB >
 TBB contains its own high resolution timer. More...
 
struct  DeviceAdapterTraits
 
class  DeviceTaskTypes
 Class providing a device-specific support for selecting the optimal Task type for a given worklet. More...
 
class  DeviceTaskTypes< vtkm::cont::DeviceAdapterTagCuda >
 
class  DeviceTaskTypes< vtkm::cont::DeviceAdapterTagOpenMP >
 
class  DeviceTaskTypes< vtkm::cont::DeviceAdapterTagSerial >
 
class  DeviceTaskTypes< vtkm::cont::DeviceAdapterTagTBB >
 
class  DynamicCellSetBase
 Holds a cell set without having to specify concrete type. More...
 
class  EnvironmentTracker
 Maintain MPI controller, if any, for distributed operation. More...
 
class  Error
 The superclass of all exceptions thrown by any VTKm function or method. More...
 
class  ErrorBadAllocation
 This class is thrown when VTK-m attempts to manipulate memory that it should not. More...
 
class  ErrorBadDevice
 This class is thrown when VTK-m performs an operation that is not supported on the current device. More...
 
class  ErrorBadType
 This class is thrown when VTK-m encounters data of a type that is incompatible with the current operation. More...
 
class  ErrorBadValue
 This class is thrown when a VTKm function or method encounters an invalid value that inhibits progress. More...
 
class  ErrorExecution
 This class is thrown in the control environment whenever an error occurs in the execution environment. More...
 
class  ErrorFilterExecution
 This class is primarily intended to filters to throw in the control environment to indicate an execution failure due to misconfiguration e.g. More...
 
class  ErrorInternal
 This class is thrown when VTKm detects an internal state that should never be reached. More...
 
struct  ExecutionAndControlObjectBase
 Base ExecutionAndControlObjectBase class. More...
 
struct  ExecutionObjectBase
 Base ExecutionObjectBase for execution objects to inherit from so that you can use an arbitrary object as a parameter in an execution environment function. More...
 
class  ExplicitCellInterpolationHelper
 
class  Field
 A Field encapsulates an array on some piece of the mesh, such as the points, a cell set, a point logical dimension, or the whole mesh. More...
 
class  ImplicitFunctionHandle
 
class  ImplicitFunctionValueHandle
 A helpful wrapper that returns a functor that calls the (virtual) value method of a given ImplicitFunction. More...
 
struct  InitializeResult
 
struct  Invoker
 Allows launching any worklet without a dispatcher. More...
 
struct  IsArrayHandleDiscard
 Helper to determine if an ArrayHandle type is an ArrayHandleDiscard. More...
 
struct  IsArrayHandleDiscard< ArrayHandle< T, internal::StorageTagDiscard > >
 
class  PartitionedDataSet
 
class  PointLocator
 
class  PointLocatorUniformGrid
 
struct  ResizeVectorType
 
class  RuntimeDeviceInformation
 A class that can be used to determine if a given device adapter is supported on the current machine at runtime. More...
 
class  RuntimeDeviceTracker
 RuntimeDeviceTracker is the central location for determining which device adapter will be active for algorithm execution. More...
 
struct  ScopedRuntimeDeviceTracker
 A class that can be used to determine or modify which device adapter VTK-m algorithms should be run on. More...
 
struct  SerializableTypeString< vtkm::cont::ArrayHandleVirtualCoordinates >
 
class  SingleCellTypeInterpolationHelper
 
struct  StorageListTagBasic
 
struct  StorageListTagSupported
 
struct  StorageTag___
 A tag specifying client memory allocation. More...
 
struct  StorageTagBasic
 A tag for the basic implementation of a Storage object. More...
 
class  StorageTagConcatenate
 
class  StorageTagExtractComponent
 
struct  StorageTagImplicit
 An implementation for read-only implicit arrays. More...
 
struct  StorageTagMultiplexer
 
class  StorageTagReverse
 
struct  StorageTagSOA
 
struct  StorageTagStreaming
 
class  StorageTagSwizzle
 
struct  StorageTagView
 
struct  StorageTagVirtual
 
class  StructuredCellInterpolationHelper
 
class  Timer
 A class that can be used to time operations in VTK-m that might be occuring in parallel. More...
 
class  VariantArrayHandleBase
 Holds an array handle without having to specify template parameters. More...
 
class  VirtualObjectHandle
 Implements VTK-m's execution side Virtual Methods functionality. More...
 

Typedefs

template<typename ListTag >
using ArrayHandleMultiplexerFromListTag = vtkm::ListTagApply< ListTag, ArrayHandleMultiplexer >
 Converts a vtkm::ListTag to an ArrayHandleMultiplexer. More...
 
using DeviceAdapterNameType = std::string
 
using DynamicCellSet = DynamicCellSetBase< VTKM_DEFAULT_CELL_SET_LIST_TAG >
 
using VariantArrayHandle = vtkm::cont::VariantArrayHandleBase< VTKM_DEFAULT_TYPE_LIST_TAG >
 

Enumerations

enum  ColorSpace {
  ColorSpace::RGB, ColorSpace::HSV, ColorSpace::HSV_WRAP, ColorSpace::LAB,
  ColorSpace::DIVERGING
}
 
enum  InitializeOptions {
  InitializeOptions::None = 0x00, InitializeOptions::RequireDevice = 0x01, InitializeOptions::DefaultAnyDevice = 0x02, InitializeOptions::AddHelp = 0x04,
  InitializeOptions::ErrorOnBadOption = 0x08, InitializeOptions::ErrorOnBadArgument = 0x10, InitializeOptions::Strict = ErrorOnBadOption | ErrorOnBadArgument | AddHelp
}
 
enum  LogLevel {
  LogLevel::Off = -9, LogLevel::Fatal = -3, LogLevel::Error = -2, LogLevel::Warn = -1,
  LogLevel::Info = 0, LogLevel::UserFirst = 1, LogLevel::UserLast = 255, LogLevel::DevicesEnabled,
  LogLevel::Perf, LogLevel::MemCont, LogLevel::MemExec, LogLevel::MemTransfer,
  LogLevel::KernelLaunches, LogLevel::Cast, LogLevel::UserVerboseFirst = 1024, LogLevel::UserVerboseLast = 2047
}
 Log levels for use with the logging macros. More...
 
enum  RuntimeDeviceTrackerMode { RuntimeDeviceTrackerMode::Force, RuntimeDeviceTrackerMode::Enable, RuntimeDeviceTrackerMode::Disable }
 

Functions

template<typename InValueType , typename InStorage , typename OutValueType , typename OutStorage >
VTKM_CONT void ArrayCopy (const vtkm::cont::ArrayHandle< InValueType, InStorage > &source, vtkm::cont::ArrayHandle< OutValueType, OutStorage > &destination)
 Does a deep copy from one array to another array. More...
 
template<typename T >
VTKM_CONT vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagBasicmake_ArrayHandle (const T *array, vtkm::Id length, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 A convenience function for creating an ArrayHandle from a standard C array. More...
 
template<typename T , typename Allocator >
VTKM_CONT vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagBasicmake_ArrayHandle (const std::vector< T, Allocator > &array, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 A convenience function for creating an ArrayHandle from an std::vector. More...
 
template<typename T , typename StorageT >
VTKM_NEVER_EXPORT VTKM_CONT void printSummary_ArrayHandle (const vtkm::cont::ArrayHandle< T, StorageT > &array, std::ostream &out, bool full=false)
 
VTKM_CONT vtkm::cont::ArrayHandleBitField make_ArrayHandleBitField (const vtkm::cont::BitField &bitField)
 
VTKM_CONT vtkm::cont::ArrayHandleBitField make_ArrayHandleBitField (vtkm::cont::BitField &&bitField) noexcept
 
template<typename FirstHandleType , typename SecondHandleType , typename ThirdHandleType >
VTKM_CONT vtkm::cont::ArrayHandleCartesianProduct< FirstHandleType, SecondHandleType, ThirdHandleType > make_ArrayHandleCartesianProduct (const FirstHandleType &first, const SecondHandleType &second, const ThirdHandleType &third)
 A convenience function for creating an ArrayHandleCartesianProduct. More...
 
template<typename T , typename ArrayType >
VTKM_CONT detail::MakeArrayHandleCastImpl< T, typename ArrayType::ValueType, ArrayType >::ReturnType make_ArrayHandleCast (const ArrayType &array, const T &=T())
 make_ArrayHandleCast is convenience function to generate an ArrayHandleCast. More...
 
template<typename... ArrayTs>
VTKM_CONT ArrayHandleCompositeVector< ArrayTs... > make_ArrayHandleCompositeVector (const ArrayTs &...arrays)
 Create a composite vector array from other arrays. More...
 
template<typename ArrayHandleType1 , typename ArrayHandleType2 >
VTKM_CONT ArrayHandleConcatenate< ArrayHandleType1, ArrayHandleType2 > make_ArrayHandleConcatenate (const ArrayHandleType1 &array1, const ArrayHandleType2 &array2)
 
template<typename T >
vtkm::cont::ArrayHandleConstant< T > make_ArrayHandleConstant (T value, vtkm::Id numberOfValues)
 make_ArrayHandleConstant is convenience function to generate an ArrayHandleImplicit. More...
 
template<typename CountingValueType >
VTKM_CONT vtkm::cont::ArrayHandleCounting< CountingValueType > make_ArrayHandleCounting (CountingValueType start, CountingValueType step, vtkm::Id length)
 A convenience function for creating an ArrayHandleCounting. More...
 
template<typename DecoratorImplT , typename... ArrayTs>
VTKM_CONT ArrayHandleDecorator< typename std::decay< DecoratorImplT >::type, typename std::decay< ArrayTs >::type... > make_ArrayHandleDecorator (vtkm::Id numValues, DecoratorImplT &&f, ArrayTs &&...arrays)
 Create an ArrayHandleDecorator with the specified number of values that uses the provided DecoratorImplT and source ArrayHandles. More...
 
template<typename ArrayHandleType >
VTKM_CONT ArrayHandleExtractComponent< ArrayHandleType > make_ArrayHandleExtractComponent (const ArrayHandleType &array, vtkm::IdComponent component)
 make_ArrayHandleExtractComponent is convenience function to generate an ArrayHandleExtractComponent. More...
 
template<typename T >
vtkm::cont::ArrayHandleExtrudeCoords< T > make_ArrayHandleExtrudeCoords (const vtkm::cont::ArrayHandle< T > arrHandle, vtkm::Int32 numberOfPlanes, bool cylindrical)
 
template<typename T >
vtkm::cont::ArrayHandleExtrudeCoords< T > make_ArrayHandleExtrudeCoords (const T *array, vtkm::Id length, vtkm::Int32 numberOfPlanes, bool cylindrical, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 
template<typename T >
vtkm::cont::ArrayHandleExtrudeCoords< T > make_ArrayHandleExtrudeCoords (const std::vector< T > &array, vtkm::Int32 numberOfPlanes, bool cylindrical, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 
template<typename T >
vtkm::cont::ArrayHandleExtrudeField< T > make_ArrayHandleExtrudeField (const vtkm::cont::ArrayHandle< T > &array, vtkm::Int32 numberOfPlanes, bool cylindrical)
 
template<typename T >
vtkm::cont::ArrayHandleExtrudeField< T > make_ArrayHandleExtrudeField (const T *array, vtkm::Id length, vtkm::Int32 numberOfPlanes, bool cylindrical, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 
template<typename T >
vtkm::cont::ArrayHandleExtrudeField< T > make_ArrayHandleExtrudeField (const std::vector< T > &array, vtkm::Int32 numberOfPlanes, bool cylindrical, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 
template<vtkm::IdComponent NUM_COMPONENTS, typename ArrayHandleType >
VTKM_CONT vtkm::cont::ArrayHandleGroupVec< ArrayHandleType, NUM_COMPONENTS > make_ArrayHandleGroupVec (const ArrayHandleType &array)
 make_ArrayHandleGroupVec is convenience function to generate an ArrayHandleGroupVec. More...
 
template<typename SourceArrayHandleType , typename OffsetsArrayHandleType >
VTKM_CONT vtkm::cont::ArrayHandleGroupVecVariable< SourceArrayHandleType, OffsetsArrayHandleType > make_ArrayHandleGroupVecVariable (const SourceArrayHandleType &sourceArray, const OffsetsArrayHandleType &offsetsArray)
 make_ArrayHandleGroupVecVariable is convenience function to generate an ArrayHandleGroupVecVariable. More...
 
template<typename NumComponentsArrayType , typename OffsetsStorage >
VTKM_CONT void ConvertNumComponentsToOffsets (const NumComponentsArrayType &numComponentsArray, vtkm::cont::ArrayHandle< vtkm::Id, OffsetsStorage > &offsetsArray, vtkm::Id &sourceArraySize, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
 ConvertNumComponentsToOffsets takes an array of Vec sizes (i.e. More...
 
template<typename NumComponentsArrayType , typename OffsetsStorage >
VTKM_CONT void ConvertNumComponentsToOffsets (const NumComponentsArrayType &numComponentsArray, vtkm::cont::ArrayHandle< vtkm::Id, OffsetsStorage > &offsetsArray, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
 
template<typename NumComponentsArrayType >
VTKM_CONT vtkm::cont::ArrayHandle< vtkm::IdConvertNumComponentsToOffsets (const NumComponentsArrayType &numComponentsArray, vtkm::Id &sourceArraySize, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
 
template<typename NumComponentsArrayType >
VTKM_CONT vtkm::cont::ArrayHandle< vtkm::IdConvertNumComponentsToOffsets (const NumComponentsArrayType &numComponentsArray, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
 
template<typename FunctorType >
VTKM_CONT vtkm::cont::ArrayHandleImplicit< FunctorType > make_ArrayHandleImplicit (FunctorType functor, vtkm::Id length)
 make_ArrayHandleImplicit is convenience function to generate an ArrayHandleImplicit. More...
 
template<typename IndexArrayHandleType , typename ValueArrayHandleType >
VTKM_CONT vtkm::cont::ArrayHandlePermutation< IndexArrayHandleType, ValueArrayHandleType > make_ArrayHandlePermutation (IndexArrayHandleType indexArray, ValueArrayHandleType valueArray)
 make_ArrayHandleTransform is convenience function to generate an ArrayHandleTransform. More...
 
template<typename HandleType >
VTKM_CONT ArrayHandleReverse< HandleType > make_ArrayHandleReverse (const HandleType &handle)
 make_ArrayHandleReverse is convenience function to generate an ArrayHandleReverse. More...
 
template<typename ValueType >
VTKM_CONT ArrayHandleSOA< ValueType > make_ArrayHandleSOA (std::initializer_list< vtkm::cont::ArrayHandle< typename vtkm::VecTraits< ValueType >::ComponentType, vtkm::cont::StorageTagBasic >> &&componentArrays)
 
template<typename ComponentType , typename... RemainingArrays>
VTKM_CONT ArrayHandleSOA< vtkm::Vec< ComponentType, vtkm::IdComponent(sizeof...(RemainingArrays)+1)> > make_ArrayHandleSOA (const vtkm::cont::ArrayHandle< ComponentType, vtkm::cont::StorageTagBasic > &componentArray0, const RemainingArrays &...componentArrays)
 
template<typename ValueType >
VTKM_CONT ArrayHandleSOA< ValueType > make_ArrayHandleSOA (std::initializer_list< std::vector< typename vtkm::VecTraits< ValueType >::ComponentType >> &&componentVectors)
 
template<typename ComponentType , typename... RemainingVectors>
VTKM_CONT ArrayHandleSOA< vtkm::Vec< ComponentType, vtkm::IdComponent(sizeof...(RemainingVectors)+1)> > make_ArrayHandleSOA (vtkm::CopyFlag copy, const std::vector< ComponentType > &vector0, const RemainingVectors &...componentVectors)
 
template<typename ComponentType , typename... RemainingVectors>
VTKM_CONT ArrayHandleSOA< vtkm::Vec< ComponentType, vtkm::IdComponent(sizeof...(RemainingVectors)+1)> > make_ArrayHandleSOA (const std::vector< ComponentType > &vector0, const RemainingVectors &...componentVectors)
 
template<typename ValueType >
VTKM_CONT ArrayHandleSOA< ValueType > make_ArrayHandleSOA (std::initializer_list< const typename vtkm::VecTraits< ValueType >::ComponentType * > &&componentVectors, vtkm::Id length, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 
template<typename ComponentType , typename... RemainingArrays>
VTKM_CONT ArrayHandleSOA< vtkm::Vec< ComponentType, vtkm::IdComponent(sizeof...(RemainingArrays)+1)> > make_ArrayHandleSOA (vtkm::Id length, vtkm::CopyFlag copy, const ComponentType *array0, const RemainingArrays *...componentArrays)
 
template<typename ComponentType , typename... RemainingArrays>
VTKM_CONT ArrayHandleSOA< vtkm::Vec< ComponentType, vtkm::IdComponent(sizeof...(RemainingArrays)+1)> > make_ArrayHandleSOA (vtkm::Id length, const ComponentType *array0, const RemainingArrays *...componentArrays)
 
template<typename ArrayHandleType , vtkm::IdComponent OutSize>
VTKM_CONT ArrayHandleSwizzle< ArrayHandleType, OutSize > make_ArrayHandleSwizzle (const ArrayHandleType &array, const vtkm::Vec< vtkm::IdComponent, OutSize > &map)
 
template<typename ArrayHandleType , typename... SwizzleIndexTypes>
VTKM_CONT ArrayHandleSwizzle< ArrayHandleType, vtkm::IdComponent(sizeof...(SwizzleIndexTypes)+1)> make_ArrayHandleSwizzle (const ArrayHandleType &array, vtkm::IdComponent swizzleIndex0, SwizzleIndexTypes...swizzleIndices)
 
template<typename HandleType , typename FunctorType >
VTKM_CONT vtkm::cont::ArrayHandleTransform< HandleType, FunctorType > make_ArrayHandleTransform (HandleType handle, FunctorType functor)
 make_ArrayHandleTransform is convenience function to generate an ArrayHandleTransform. More...
 
template<typename HandleType , typename FunctorType , typename InverseFunctorType >
VTKM_CONT vtkm::cont::ArrayHandleTransform< HandleType, FunctorType, InverseFunctorType > make_ArrayHandleTransform (HandleType handle, FunctorType functor, InverseFunctorType inverseFunctor)
 
template<typename ArrayHandleType >
ArrayHandleView< ArrayHandleType > make_ArrayHandleView (const ArrayHandleType &array, vtkm::Id startIndex, vtkm::Id numValues)
 
template<typename Functor , typename... Args>
void CastAndCall (const vtkm::cont::ArrayHandleVirtualCoordinates &coords, Functor &&f, Args &&...args)
 
template<typename FirstHandleType , typename SecondHandleType >
VTKM_CONT vtkm::cont::ArrayHandleZip< FirstHandleType, SecondHandleType > make_ArrayHandleZip (const FirstHandleType &first, const SecondHandleType &second)
 A convenience function for creating an ArrayHandleZip. More...
 
template<typename PortalType >
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT vtkm::cont::ArrayPortalToIterators< PortalType >::IteratorType ArrayPortalToIteratorBegin (const PortalType &portal)
 Convenience function for converting an ArrayPortal to a begin iterator. More...
 
template<typename PortalType >
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT vtkm::cont::ArrayPortalToIterators< PortalType >::IteratorType ArrayPortalToIteratorEnd (const PortalType &portal)
 Convenience function for converting an ArrayPortal to an end iterator. More...
 
template<typename ArrayHandleType >
VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeArrayRangeCompute (const ArrayHandleType &input, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
 Compute the range of the data in an array handle. More...
 
VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeArrayRangeCompute (const vtkm::cont::ArrayHandleVirtual< vtkm::Vec3f > &input, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeArrayRangeCompute (const vtkm::cont::ArrayHandle< vtkm::Vec3f, vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag > &array, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeArrayRangeCompute (const vtkm::cont::ArrayHandle< vtkm::Vec3f_32, typename vtkm::cont::ArrayHandleCompositeVector< vtkm::cont::ArrayHandle< vtkm::Float32 >, vtkm::cont::ArrayHandle< vtkm::Float32 >, vtkm::cont::ArrayHandle< vtkm::Float32 >>::StorageTag > &input, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeArrayRangeCompute (const vtkm::cont::ArrayHandle< vtkm::Vec3f_64, typename vtkm::cont::ArrayHandleCompositeVector< vtkm::cont::ArrayHandle< vtkm::Float64 >, vtkm::cont::ArrayHandle< vtkm::Float64 >, vtkm::cont::ArrayHandle< vtkm::Float64 >>::StorageTag > &input, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
 
template<typename T , typename ArrayType1 , typename ArrayType2 , typename ArrayType3 >
VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeArrayRangeCompute (const vtkm::cont::ArrayHandle< T, vtkm::cont::internal::StorageTagCartesianProduct< ArrayType1, ArrayType2, ArrayType3 >> &input, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
 
VTKM_CONT_EXPORT void ThrowArrayRangeComputeFailed ()
 
template<typename DynamicObject , typename Functor , typename... Args>
void CastAndCall (const DynamicObject &dynamicObject, Functor &&f, Args &&...args)
 A Generic interface to CastAndCall. More...
 
template<typename Functor , typename... Args>
void CastAndCall (const CoordinateSystem &coords, Functor &&f, Args &&...args)
 A specialization of CastAndCall for basic CoordinateSystem to make it be treated just like any other dynamic object. More...
 
template<typename Functor , typename... Args>
void CastAndCall (const vtkm::cont::Field &field, Functor &&f, Args &&...args)
 A specialization of CastAndCall for basic Field to make it be treated just like any other dynamic object. More...
 
template<typename T , typename U , typename Functor , typename... Args>
void CastAndCall (const vtkm::cont::ArrayHandle< T, U > &handle, Functor &&f, Args &&...args)
 A specialization of CastAndCall for basic ArrayHandle types, Since the type is already known no deduction is needed. More...
 
template<vtkm::IdComponent Dim, typename Functor , typename... Args>
void CastAndCall (const vtkm::cont::CellSetStructured< Dim > &cellset, Functor &&f, Args &&...args)
 A specialization of CastAndCall for basic CellSetStructured types, Since the type is already known no deduction is needed. More...
 
template<typename ConnectivityStorageTag , typename Functor , typename... Args>
void CastAndCall (const vtkm::cont::CellSetSingleType< ConnectivityStorageTag > &cellset, Functor &&f, Args &&...args)
 A specialization of CastAndCall for basic CellSetSingleType types, Since the type is already known no deduction is needed. More...
 
template<typename T , typename S , typename U , typename Functor , typename... Args>
void CastAndCall (const vtkm::cont::CellSetExplicit< T, S, U > &cellset, Functor &&f, Args &&...args)
 A specialization of CastAndCall for basic CellSetExplicit types, Since the type is already known no deduction is needed. More...
 
template<typename PermutationType , typename CellSetType , typename Functor , typename... Args>
void CastAndCall (const vtkm::cont::CellSetPermutation< PermutationType, CellSetType > &cellset, Functor &&f, Args &&...args)
 A specialization of CastAndCall for basic CellSetPermutation types, Since the type is already known no deduction is needed. More...
 
template<typename Functor , typename... Args>
void CastAndCall (const vtkm::cont::CellSetExtrude &cellset, Functor &&f, Args &&...args)
 A specialization of CastAndCall for basic CellSetExtrude types, Since the type is already known no deduction is needed. More...
 
template<typename... Args>
void ConditionalCastAndCall (std::true_type, Args &&...args)
 CastAndCall if the condition is true. More...
 
template<typename... Args>
void ConditionalCastAndCall (std::false_type, Args &&...)
 No-op variant since the condition is false. More...
 
template<typename S1 , typename S2 >
void ConvertNumIndicesToOffsets (const vtkm::cont::ArrayHandle< vtkm::Id, S1 > &numIndices, vtkm::cont::ArrayHandle< vtkm::Id, S2 > &offsets)
 
template<typename T , typename S1 , typename S2 >
void ConvertNumIndicesToOffsets (const vtkm::cont::ArrayHandle< T, S1 > &numIndices, vtkm::cont::ArrayHandle< vtkm::Id, S2 > &offsets)
 
template<typename T , typename S1 , typename S2 >
void ConvertNumIndicesToOffsets (const vtkm::cont::ArrayHandle< T, S1 > &numIndices, vtkm::cont::ArrayHandle< vtkm::Id, S2 > &offsets, vtkm::Id &connectivitySize)
 
template<typename T , typename S >
vtkm::cont::ArrayHandle< vtkm::IdConvertNumIndicesToOffsets (const vtkm::cont::ArrayHandle< T, S > &numIndices)
 
template<typename T , typename S >
vtkm::cont::ArrayHandle< vtkm::IdConvertNumIndicesToOffsets (const vtkm::cont::ArrayHandle< T, S > &numIndices, vtkm::Id &connectivityLength)
 
template<typename T >
CellSetExtrude make_CellSetExtrude (const vtkm::cont::ArrayHandle< vtkm::Int32 > &conn, const vtkm::cont::ArrayHandleExtrudeCoords< T > &coords, const vtkm::cont::ArrayHandle< vtkm::Int32 > &nextNode, bool periodic=true)
 
template<typename T >
CellSetExtrude make_CellSetExtrude (const std::vector< vtkm::Int32 > &conn, const vtkm::cont::ArrayHandleExtrudeCoords< T > &coords, const std::vector< vtkm::Int32 > &nextNode, bool periodic=true)
 
template<typename OriginalCellSet , typename PermutationArrayHandleType >
vtkm::cont::CellSetPermutation< OriginalCellSet, PermutationArrayHandleType > make_CellSetPermutation (const PermutationArrayHandleType &cellIndexMap, const OriginalCellSet &cellSet)
 
template<typename T >
vtkm::cont::CoordinateSystem make_CoordinateSystem (std::string name, const std::vector< T > &data, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 
template<typename T >
vtkm::cont::CoordinateSystem make_CoordinateSystem (std::string name, const T *data, vtkm::Id numberOfValues, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 
VTKM_CONT_EXPORT DeviceAdapterId make_DeviceAdapterId (const DeviceAdapterNameType &name)
 Construct a device adapter id from a runtime string The string is case-insensitive. More...
 
DeviceAdapterId make_DeviceAdapterId (vtkm::Int8 id)
 Construct a device adapter id a vtkm::Int8. More...
 
template<typename CellSetType , typename Ts >
VTKM_CONT bool IsType (const vtkm::cont::DynamicCellSetBase< Ts > &dynamicCellSet)
 Returns true if dynamicCellSet matches the type of CellSetType. More...
 
template<typename CellSetType , typename Ts >
VTKM_CONT CellSetType Cast (const vtkm::cont::DynamicCellSetBase< Ts > &dynamicCellSet)
 Returns dynamicCellSet cast to the given CellSet type. More...
 
VTKM_SILENCE_WEAK_VTABLE_WARNING_END VTKM_CONT_EXPORT void throwFailedRuntimeDeviceTransfer (const std::string &className, vtkm::cont::DeviceAdapterId device)
 Throws an ErrorBadeDevice exception with the following message: "VTK-m was unable to transfer className to DeviceAdapter[id,name]. More...
 
VTKM_SILENCE_WEAK_VTABLE_WARNING_END VTKM_CONT_EXPORT void throwFailedDynamicCast (const std::string &baseType, const std::string &derivedType)
 Throws an ErrorBadType exception with the following message: Cast failed: baseType –> derivedType". More...
 
template<typename T , typename S >
vtkm::cont::Field make_FieldPoint (std::string name, const vtkm::cont::ArrayHandle< T, S > &data)
 Convenience function to build point fields from vtkm::cont::ArrayHandle. More...
 
vtkm::cont::Field make_FieldPoint (std::string name, const vtkm::cont::VariantArrayHandle &data)
 Convenience function to build point fields from vtkm::cont::VariantArrayHandle. More...
 
template<typename T , typename S >
vtkm::cont::Field make_FieldCell (std::string name, const vtkm::cont::ArrayHandle< T, S > &data)
 Convenience function to build cell fields from vtkm::cont::ArrayHandle. More...
 
vtkm::cont::Field make_FieldCell (std::string name, const vtkm::cont::VariantArrayHandle &data)
 Convenience function to build cell fields from vtkm::cont::VariantArrayHandle. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeFieldRangeCompute (const vtkm::cont::DataSet &dataset, const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::ANY)
 Compute ranges for fields in a DataSet or PartitionedDataSet. More...
 
template<typename TypeList >
VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeFieldRangeCompute (const vtkm::cont::DataSet &dataset, const std::string &name, vtkm::cont::Field::Association assoc, TypeList)
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeFieldRangeCompute (const vtkm::cont::PartitionedDataSet &pds, const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::ANY)
 Returns the range for a field from a PartitionedDataSet. More...
 
template<typename TypeList >
VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeFieldRangeCompute (const vtkm::cont::PartitionedDataSet &pds, const std::string &name, vtkm::cont::Field::Association assoc, TypeList)
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeFieldRangeGlobalCompute (const vtkm::cont::DataSet &dataset, const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::ANY)
 utility functions to compute global ranges for dataset fields. More...
 
template<typename TypeList >
VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeFieldRangeGlobalCompute (const vtkm::cont::DataSet &dataset, const std::string &name, vtkm::cont::Field::Association assoc, TypeList)
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeFieldRangeGlobalCompute (const vtkm::cont::PartitionedDataSet &pds, const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::ANY)
 Returns the range for a field from a PartitionedDataSet. More...
 
template<typename TypeList >
VTKM_CONT vtkm::cont::ArrayHandle< vtkm::RangeFieldRangeGlobalCompute (const vtkm::cont::PartitionedDataSet &pds, const std::string &name, vtkm::cont::Field::Association assoc, TypeList)
 
template<typename ImplicitFunctionType , typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG>
VTKM_CONT ImplicitFunctionHandle make_ImplicitFunctionHandle (ImplicitFunctionType &&func, DeviceAdapterList devices=DeviceAdapterList())
 
template<typename ImplicitFunctionType , typename... Args>
VTKM_CONT ImplicitFunctionHandle make_ImplicitFunctionHandle (Args &&...args)
 
template<typename ImplicitFunctionType , typename DeviceAdapterList , typename... Args>
VTKM_CONT ImplicitFunctionHandle make_ImplicitFunctionHandle (Args &&...args)
 
template<typename ImplicitFunctionType , typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG>
VTKM_CONT ImplicitFunctionValueHandle make_ImplicitFunctionValueHandle (ImplicitFunctionType &&func, DeviceAdapterList devices=DeviceAdapterList())
 
template<typename ImplicitFunctionType , typename... Args>
VTKM_CONT ImplicitFunctionValueHandle make_ImplicitFunctionValueHandle (Args &&...args)
 
template<typename ImplicitFunctionType , typename DeviceAdapterList , typename... Args>
VTKM_CONT ImplicitFunctionValueHandle make_ImplicitFunctionValueHandle (Args &&...args)
 
InitializeOptions operator| (const InitializeOptions &lhs, const InitializeOptions &rhs)
 
InitializeOptions operator& (const InitializeOptions &lhs, const InitializeOptions &rhs)
 
VTKM_CONT_EXPORT VTKM_CONT void SetStderrLogLevel (vtkm::cont::LogLevel level)
 Set the range of log levels that will be printed to stderr. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::LogLevel GetStderrLogLevel ()
 Get the active highest log level that will be printed to stderr. More...
 
VTKM_CONT_EXPORT VTKM_CONT void SetLogLevelName (vtkm::cont::LogLevel level, const std::string &name)
 Register a custom name to identify a log level. More...
 
VTKM_CONT_EXPORT VTKM_CONT std::string GetLogLevelName (vtkm::cont::LogLevel level)
 Get a human readable name for the log level. More...
 
VTKM_CONT_EXPORT VTKM_CONT std::string GetLogErrorContext ()
 
VTKM_CONT_EXPORT VTKM_CONT std::string GetStackTrace (vtkm::Int32 skip=0)
 Returns a stacktrace on supported platforms. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::RuntimeDeviceTrackerGetRuntimeDeviceTracker ()
 Get the RuntimeDeviceTracker for the current thread. More...
 
template<typename ArrayHandleType , typename Ts >
VTKM_CONT bool IsType (const vtkm::cont::VariantArrayHandleBase< Ts > &variant)
 Returns true if variant matches the type of ArrayHandleType. More...
 
template<typename ArrayHandleType , typename Ts >
VTKM_CONT ArrayHandleType Cast (const vtkm::cont::VariantArrayHandleBase< Ts > &variant)
 Returns variant cast to the given ArrayHandle type. More...
 
template<typename SIds , typename T , typename SData , typename SOut >
VTKM_CONT void ArrayGetValues (const vtkm::cont::ArrayHandle< vtkm::Id, SIds > &ids, const vtkm::cont::ArrayHandle< T, SData > &data, vtkm::cont::ArrayHandle< T, SOut > &output)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename SIds , typename T , typename SData , typename Alloc >
VTKM_CONT void ArrayGetValues (const vtkm::cont::ArrayHandle< vtkm::Id, SIds > &ids, const vtkm::cont::ArrayHandle< T, SData > &data, std::vector< T, Alloc > &output)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename SIds , typename T , typename SData >
VTKM_CONT std::vector< T > ArrayGetValues (const vtkm::cont::ArrayHandle< vtkm::Id, SIds > &ids, const vtkm::cont::ArrayHandle< T, SData > &data)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename T , typename Alloc , typename SData , typename SOut >
VTKM_CONT void ArrayGetValues (const std::vector< vtkm::Id, Alloc > &ids, const vtkm::cont::ArrayHandle< T, SData > &data, vtkm::cont::ArrayHandle< T, SOut > &output)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename T , typename AllocId , typename SData , typename AllocOut >
VTKM_CONT void ArrayGetValues (const std::vector< vtkm::Id, AllocId > &ids, const vtkm::cont::ArrayHandle< T, SData > &data, std::vector< T, AllocOut > &output)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename T , typename Alloc , typename SData >
VTKM_CONT std::vector< T > ArrayGetValues (const std::vector< vtkm::Id, Alloc > &ids, const vtkm::cont::ArrayHandle< T, SData > &data)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename T , typename SData , typename SOut >
VTKM_CONT void ArrayGetValues (const std::initializer_list< vtkm::Id > &ids, const vtkm::cont::ArrayHandle< T, SData > &data, vtkm::cont::ArrayHandle< T, SOut > &output)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename T , typename SData , typename Alloc >
VTKM_CONT void ArrayGetValues (const std::initializer_list< vtkm::Id > &ids, const vtkm::cont::ArrayHandle< T, SData > &data, std::vector< T, Alloc > &output)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename T , typename SData >
VTKM_CONT std::vector< T > ArrayGetValues (const std::initializer_list< vtkm::Id > &ids, const vtkm::cont::ArrayHandle< T, SData > &data)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename T , typename SData , typename SOut >
VTKM_CONT void ArrayGetValues (const vtkm::Id *ids, const vtkm::Id numIds, const vtkm::cont::ArrayHandle< T, SData > &data, vtkm::cont::ArrayHandle< T, SOut > &output)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename T , typename SData , typename Alloc >
VTKM_CONT void ArrayGetValues (const vtkm::Id *ids, const vtkm::Id numIds, const vtkm::cont::ArrayHandle< T, SData > &data, std::vector< T, Alloc > &output)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename T , typename SData >
VTKM_CONT std::vector< T > ArrayGetValues (const vtkm::Id *ids, const vtkm::Id numIds, const vtkm::cont::ArrayHandle< T, SData > &data)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename T , typename S >
VTKM_CONTArrayGetValue (vtkm::Id id, const vtkm::cont::ArrayHandle< T, S > &data)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
template<typename T , typename S >
VTKM_CONT void ArrayGetValue (vtkm::Id id, const vtkm::cont::ArrayHandle< T, S > &data, T &val)
 Obtain a small set of values from an ArrayHandle with minimal device transfers. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsCompute (const vtkm::cont::DataSet &dataset, vtkm::Id coordinate_system_index=0)
 Functions to compute bounds for a single dataSset or partition dataset. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsCompute (const vtkm::cont::PartitionedDataSet &pds, vtkm::Id coordinate_system_index=0)
 Functions to compute bounds for a single dataSset or partition dataset. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsCompute (const vtkm::cont::DataSet &dataset, const std::string &coordinate_system_name)
 Functions to compute bounds for a single dataSset or partition dataset. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsCompute (const vtkm::cont::PartitionedDataSet &pds, const std::string &coordinate_system_name)
 Functions to compute bounds for a single dataSset or partition dataset. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsGlobalCompute (const vtkm::cont::DataSet &dataset, vtkm::Id coordinate_system_index=0)
 Functions to compute bounds for a single dataset or partitioned dataset globally. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsGlobalCompute (const vtkm::cont::PartitionedDataSet &pds, vtkm::Id coordinate_system_index=0)
 Functions to compute bounds for a single dataset or partitioned dataset globally. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsGlobalCompute (const vtkm::cont::DataSet &dataset, const std::string &coordinate_system_name)
 Functions to compute bounds for a single dataset or partitioned dataset globally. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsGlobalCompute (const vtkm::cont::PartitionedDataSet &pds, const std::string &coordinate_system_name)
 Functions to compute bounds for a single dataset or partitioned dataset globally. More...
 
template<typename T >
vtkm::cont::Field make_Field (std::string name, Field::Association association, const T *data, vtkm::Id size, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 Convenience functions to build fields from C style arrays and std::vector. More...
 
template<typename T >
vtkm::cont::Field make_Field (std::string name, Field::Association association, const std::vector< T > &data, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 Convenience functions to build fields from C style arrays and std::vector. More...
 
VTKM_CONT_EXPORT VTKM_CONT InitializeResult Initialize (int &argc, char *argv[], InitializeOptions opts=InitializeOptions::None)
 Initialize the VTKm library, parsing arguments when provided: More...
 
VTKM_CONT_EXPORT VTKM_CONT InitializeResult Initialize ()
 Initialize the VTKm library, parsing arguments when provided: More...
 
VTKM_CONT_EXPORT VTKM_CONT void InitLogging (int &argc, char *argv[])
 This shouldn't be called directly – prefer calling vtkm::cont::Initialize, which takes care of logging as well as other initializations. More...
 
VTKM_CONT_EXPORT VTKM_CONT void InitLogging ()
 This shouldn't be called directly – prefer calling vtkm::cont::Initialize, which takes care of logging as well as other initializations. More...
 
VTKM_CONT_EXPORT VTKM_CONT void SetLogThreadName (const std::string &name)
 The name to identify the current thread in the log output. More...
 
VTKM_CONT_EXPORT VTKM_CONT std::string GetLogThreadName ()
 The name to identify the current thread in the log output. More...
 
VTKM_CONT_EXPORT VTKM_CONT std::string GetHumanReadableSize (vtkm::UInt64 bytes, int prec=2)
 Convert a size in bytes to a human readable string (e.g. More...
 
template<typename T >
VTKM_CONT std::string GetHumanReadableSize (T &&bytes, int prec=2)
 Convert a size in bytes to a human readable string (e.g. More...
 
VTKM_CONT_EXPORT VTKM_CONT std::string GetSizeString (vtkm::UInt64 bytes, int prec=2)
 Returns "%1 (%2 bytes)" where %1 is the result from GetHumanReadableSize and two is the exact number of bytes. More...
 
template<typename T >
VTKM_CONT std::string GetSizeString (T &&bytes, int prec=2)
 Returns "%1 (%2 bytes)" where %1 is the result from GetHumanReadableSize and two is the exact number of bytes. More...
 
template<typename Functor >
VTKM_CONT bool TryExecuteOnDevice (vtkm::cont::DeviceAdapterId devId, Functor &&functor)
 Try to execute a functor on a specific device selected at runtime. More...
 
template<typename Functor , typename Arg1 , typename... Args>
VTKM_CONT bool TryExecuteOnDevice (vtkm::cont::DeviceAdapterId devId, Functor &&functor, Arg1 &&arg1, Args &&...args)
 Try to execute a functor on a specific device selected at runtime. More...
 
template<typename Functor , typename... Args>
VTKM_CONT bool TryExecute (Functor &&functor, Args &&...args)
 Try to execute a functor on a set of devices until one succeeds. More...
 

Variables

template class VTKM_CONT_TEMPLATE_EXPORT CellSetStructured< 1 >
 
template class VTKM_CONT_TEMPLATE_EXPORT CellSetStructured< 2 >
 
template class VTKM_CONT_TEMPLATE_EXPORT CellSetStructured< 3 >
 

Detailed Description

VTK-m Control Environment.

vtkm::cont defines the publicly accessible API for the VTK-m Control Environment. Users of the VTK-m Toolkit can use this namespace to access the Control Environment.

Typedef Documentation

template<typename ListTag >
using vtkm::cont::ArrayHandleMultiplexerFromListTag = typedef vtkm::ListTagApply<ListTag, ArrayHandleMultiplexer>

Converts a vtkm::ListTag to an ArrayHandleMultiplexer.

The argument of this template must be a vtkm::ListTag and furthermore all the types in the list tag must be some type of ArrayHandle. The templated type gets aliased to an ArrayHandleMultiplexer that can store any of these ArrayHandle types.

using vtkm::cont::DeviceAdapterNameType = typedef std::string

Enumeration Type Documentation

Enumerator
RGB 
HSV 
HSV_WRAP 
LAB 
DIVERGING 
Enumerator
None 
RequireDevice 

Issue an error if the device argument is not specified.

DefaultAnyDevice 

If no device is specified, treat it as if the user gave –device=Any.

This means that DeviceAdapterTagUndefined will never be return in the result.

AddHelp 

Add a help argument.

If -h or –help is provided, prints a usage statement. Of course, the usage statement will only print out arguments processed by VTK-m.

ErrorOnBadOption 

If an unknown option is encountered, the program terminates with an error and a usage statement is printed.

If this option is not provided, any unknown options are returned in argv. If this option is used, it is a good idea to use AddHelp as well.

ErrorOnBadArgument 

If an extra argument is encountered, the program terminates with an error and a usage statement is printed.

If this option is not provided, any unknown arguments are returned in argv.

Strict 

If supplied, Initialize treats its own arguments as the only ones supported by the application and provides an error if not followed exactly.

This is a convenience option that is a combination of ErrorOnBadOption, ErrorOnBadArgument, and AddHelp.

enum vtkm::cont::LogLevel
strong

Log levels for use with the logging macros.

Enumerator
Off 

Used with SetStderrLogLevel to silence the log.

Do not actually log to this level.

Fatal 

Fatal errors that should abort execution.

Error 

Important but non-fatal errors, such as device fail-over.

Warn 

Less important user errors, such as out-of-bounds parameters.

Info 

Information messages (detected hardware, etc) and temporary debugging output.

UserFirst 

The range 1-255 are reserved to application use.

UserLast 

The range 1-255 are reserved to application use.

DevicesEnabled 

Information about which devices are enabled/disabled.

Perf 

General timing data and algorithm flow information, such as filter execution, worklet dispatches, and device algorithm calls.

MemCont 

Host-side resource allocations/frees (e.g. ArrayHandle control buffers)

MemExec 

Device-side resource allocations/frees (e.g ArrayHandle device buffers)

MemTransfer 

Host->device / device->host data copies.

KernelLaunches 

Details on Device-side Kernel Launches.

Cast 

When a dynamic object is (or isn't) resolved via CastAndCall, etc.

UserVerboseFirst 

1024-2047 are reserved for application usage.

UserVerboseLast 

1024-2047 are reserved for application usage.

Enumerator
Force 
Enable 
Disable 

Function Documentation

template<typename InValueType , typename InStorage , typename OutValueType , typename OutStorage >
VTKM_CONT void vtkm::cont::ArrayCopy ( const vtkm::cont::ArrayHandle< InValueType, InStorage > &  source,
vtkm::cont::ArrayHandle< OutValueType, OutStorage > &  destination 
)

Does a deep copy from one array to another array.

Given a source ArrayHandle and a destination ArrayHandle, this function allocates the destination ArrayHandle to the correct size and deeply copies all the values from the source to the destination.

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment, the runtime device tracker is used to try to find another device.

This should work on some non-writable array handles as well, as long as both source and destination are the same type.

template<typename T , typename S >
VTKM_CONT T vtkm::cont::ArrayGetValue ( vtkm::Id  id,
const vtkm::cont::ArrayHandle< T, S > &  data 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename T , typename S >
VTKM_CONT void vtkm::cont::ArrayGetValue ( vtkm::Id  id,
const vtkm::cont::ArrayHandle< T, S > &  data,
T &  val 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename SIds , typename T , typename SData , typename SOut >
VTKM_CONT void vtkm::cont::ArrayGetValues ( const vtkm::cont::ArrayHandle< vtkm::Id, SIds > &  ids,
const vtkm::cont::ArrayHandle< T, SData > &  data,
vtkm::cont::ArrayHandle< T, SOut > &  output 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename SIds , typename T , typename SData , typename Alloc >
VTKM_CONT void vtkm::cont::ArrayGetValues ( const vtkm::cont::ArrayHandle< vtkm::Id, SIds > &  ids,
const vtkm::cont::ArrayHandle< T, SData > &  data,
std::vector< T, Alloc > &  output 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename SIds , typename T , typename SData >
VTKM_CONT std::vector<T> vtkm::cont::ArrayGetValues ( const vtkm::cont::ArrayHandle< vtkm::Id, SIds > &  ids,
const vtkm::cont::ArrayHandle< T, SData > &  data 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename T , typename Alloc , typename SData , typename SOut >
VTKM_CONT void vtkm::cont::ArrayGetValues ( const std::vector< vtkm::Id, Alloc > &  ids,
const vtkm::cont::ArrayHandle< T, SData > &  data,
vtkm::cont::ArrayHandle< T, SOut > &  output 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename T , typename AllocId , typename SData , typename AllocOut >
VTKM_CONT void vtkm::cont::ArrayGetValues ( const std::vector< vtkm::Id, AllocId > &  ids,
const vtkm::cont::ArrayHandle< T, SData > &  data,
std::vector< T, AllocOut > &  output 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename T , typename Alloc , typename SData >
VTKM_CONT std::vector<T> vtkm::cont::ArrayGetValues ( const std::vector< vtkm::Id, Alloc > &  ids,
const vtkm::cont::ArrayHandle< T, SData > &  data 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename T , typename SData , typename SOut >
VTKM_CONT void vtkm::cont::ArrayGetValues ( const std::initializer_list< vtkm::Id > &  ids,
const vtkm::cont::ArrayHandle< T, SData > &  data,
vtkm::cont::ArrayHandle< T, SOut > &  output 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename T , typename SData , typename Alloc >
VTKM_CONT void vtkm::cont::ArrayGetValues ( const std::initializer_list< vtkm::Id > &  ids,
const vtkm::cont::ArrayHandle< T, SData > &  data,
std::vector< T, Alloc > &  output 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename T , typename SData >
VTKM_CONT std::vector<T> vtkm::cont::ArrayGetValues ( const std::initializer_list< vtkm::Id > &  ids,
const vtkm::cont::ArrayHandle< T, SData > &  data 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename T , typename SData , typename SOut >
VTKM_CONT void vtkm::cont::ArrayGetValues ( const vtkm::Id ids,
const vtkm::Id  numIds,
const vtkm::cont::ArrayHandle< T, SData > &  data,
vtkm::cont::ArrayHandle< T, SOut > &  output 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename T , typename SData , typename Alloc >
VTKM_CONT void vtkm::cont::ArrayGetValues ( const vtkm::Id ids,
const vtkm::Id  numIds,
const vtkm::cont::ArrayHandle< T, SData > &  data,
std::vector< T, Alloc > &  output 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename T , typename SData >
VTKM_CONT std::vector<T> vtkm::cont::ArrayGetValues ( const vtkm::Id ids,
const vtkm::Id  numIds,
const vtkm::cont::ArrayHandle< T, SData > &  data 
)

Obtain a small set of values from an ArrayHandle with minimal device transfers.

The values in data at the indices in ids are copied into a new array and returned. This is useful for retrieving a subset of an array from a device without transferring the entire array to the host.

These functions should not be called repeatedly in a loop to fetch all values from an array handle. The much more efficient way to do this is to use the proper control-side portals (ArrayHandle::GetPortalControl() and ArrayHandle::GetPortalConstControl()).

This method will attempt to copy the data using the device that the input data is already valid on. If the input data is only valid in the control environment or the device copy fails, a control-side copy is performed.

Since a serial control-side copy may be used, this method is only intended for copying small subsets of the input data. Larger subsets that would benefit from parallelization should prefer using the ArrayCopy method with an ArrayHandlePermutation.

This utility provides several convenient overloads:

A single id may be passed into ArrayGetValue, or multiple ids may be specified to ArrayGetValues as an ArrayHandle<vtkm::Id>, a std::vector<vtkm::Id>, a c-array (pointer and size), or as a brace-enclosed initializer list.

The single result from ArrayGetValue may be returned or written to an output argument. Multiple results from ArrayGetValues may be returned as an std::vector<T>, or written to an output argument as an ArrayHandle<T> or a std::vector<T>.

Examples:

// Fetch the first value in an array handle:
T firstVal = vtkm::cont::ArrayGetValue(0, data);
// Fetch the first and third values in an array handle:
std::vector<T> firstAndThird = vtkm::cont::ArrayGetValues({0, 2}, data);
// Fetch the first and last values in an array handle:
std::vector<T> firstAndLast =
// Fetch the first 4 values into an array handle:
const std::vector<vtkm::Id> ids{0, 1, 2, 3};
vtkm::cont::ArrayGetValues(ids, data, firstFour);
template<typename PortalType >
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT vtkm::cont::ArrayPortalToIterators<PortalType>::IteratorType vtkm::cont::ArrayPortalToIteratorBegin ( const PortalType &  portal)

Convenience function for converting an ArrayPortal to a begin iterator.

template<typename PortalType >
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT vtkm::cont::ArrayPortalToIterators<PortalType>::IteratorType vtkm::cont::ArrayPortalToIteratorEnd ( const PortalType &  portal)

Convenience function for converting an ArrayPortal to an end iterator.

template<typename ArrayHandleType >
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeCompute ( const ArrayHandleType &  input,
vtkm::cont::DeviceAdapterId  device = vtkm::cont::DeviceAdapterTagAny() 
)

Compute the range of the data in an array handle.

Given an ArrayHandle, this function computes the range (min and max) of the values in the array. For arrays containing Vec values, the range is computed for each component.

This method optionally takes a vtkm::cont::DeviceAdapterId to control which devices to try.

The result is returned in an ArrayHandle of Range objects. There is one value in the returned array for every component of the input's value type.

VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeCompute ( const vtkm::cont::ArrayHandleVirtual< vtkm::Vec3f > &  input,
vtkm::cont::DeviceAdapterId  device = vtkm::cont::DeviceAdapterTagAny() 
)
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeCompute ( const vtkm::cont::ArrayHandle< vtkm::Vec3f, vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag > &  array,
vtkm::cont::DeviceAdapterId  device = vtkm::cont::DeviceAdapterTagAny() 
)
template<typename T , typename ArrayType1 , typename ArrayType2 , typename ArrayType3 >
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeCompute ( const vtkm::cont::ArrayHandle< T, vtkm::cont::internal::StorageTagCartesianProduct< ArrayType1, ArrayType2, ArrayType3 >> &  input,
vtkm::cont::DeviceAdapterId  device = vtkm::cont::DeviceAdapterTagAny() 
)
inline
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds vtkm::cont::BoundsCompute ( const vtkm::cont::DataSet dataset,
vtkm::Id  coordinate_system_index = 0 
)

Functions to compute bounds for a single dataSset or partition dataset.

These are utility functions that compute bounds for a single dataset or partitioned dataset. When VTK-m is operating in an distributed environment, these are bounds on the local process. To get global bounds across all ranks, use vtkm::cont::BoundsGlobalCompute instead.

Note that if the provided CoordinateSystem does not exists, empty bounds are returned. Likewise, for PartitionedDataSet, partitions without the chosen CoordinateSystem are skipped.

VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds vtkm::cont::BoundsCompute ( const vtkm::cont::PartitionedDataSet pds,
vtkm::Id  coordinate_system_index = 0 
)

Functions to compute bounds for a single dataSset or partition dataset.

These are utility functions that compute bounds for a single dataset or partitioned dataset. When VTK-m is operating in an distributed environment, these are bounds on the local process. To get global bounds across all ranks, use vtkm::cont::BoundsGlobalCompute instead.

Note that if the provided CoordinateSystem does not exists, empty bounds are returned. Likewise, for PartitionedDataSet, partitions without the chosen CoordinateSystem are skipped.

VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds vtkm::cont::BoundsCompute ( const vtkm::cont::DataSet dataset,
const std::string &  coordinate_system_name 
)

Functions to compute bounds for a single dataSset or partition dataset.

These are utility functions that compute bounds for a single dataset or partitioned dataset. When VTK-m is operating in an distributed environment, these are bounds on the local process. To get global bounds across all ranks, use vtkm::cont::BoundsGlobalCompute instead.

Note that if the provided CoordinateSystem does not exists, empty bounds are returned. Likewise, for PartitionedDataSet, partitions without the chosen CoordinateSystem are skipped.

VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds vtkm::cont::BoundsCompute ( const vtkm::cont::PartitionedDataSet pds,
const std::string &  coordinate_system_name 
)

Functions to compute bounds for a single dataSset or partition dataset.

These are utility functions that compute bounds for a single dataset or partitioned dataset. When VTK-m is operating in an distributed environment, these are bounds on the local process. To get global bounds across all ranks, use vtkm::cont::BoundsGlobalCompute instead.

Note that if the provided CoordinateSystem does not exists, empty bounds are returned. Likewise, for PartitionedDataSet, partitions without the chosen CoordinateSystem are skipped.

VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds vtkm::cont::BoundsGlobalCompute ( const vtkm::cont::DataSet dataset,
vtkm::Id  coordinate_system_index = 0 
)

Functions to compute bounds for a single dataset or partitioned dataset globally.

These are utility functions that compute bounds for a single dataset or partitioned dataset globally i.e. across all ranks when operating in a distributed environment. When VTK-m not operating in an distributed environment, these behave same as vtkm::cont::BoundsCompute.

Note that if the provided CoordinateSystem does not exists, empty bounds are returned. Likewise, for PartitionedDataSet, partitions without the chosen CoordinateSystem are skipped.

VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds vtkm::cont::BoundsGlobalCompute ( const vtkm::cont::PartitionedDataSet pds,
vtkm::Id  coordinate_system_index = 0 
)

Functions to compute bounds for a single dataset or partitioned dataset globally.

These are utility functions that compute bounds for a single dataset or partitioned dataset globally i.e. across all ranks when operating in a distributed environment. When VTK-m not operating in an distributed environment, these behave same as vtkm::cont::BoundsCompute.

Note that if the provided CoordinateSystem does not exists, empty bounds are returned. Likewise, for PartitionedDataSet, partitions without the chosen CoordinateSystem are skipped.

VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds vtkm::cont::BoundsGlobalCompute ( const vtkm::cont::DataSet dataset,
const std::string &  coordinate_system_name 
)

Functions to compute bounds for a single dataset or partitioned dataset globally.

These are utility functions that compute bounds for a single dataset or partitioned dataset globally i.e. across all ranks when operating in a distributed environment. When VTK-m not operating in an distributed environment, these behave same as vtkm::cont::BoundsCompute.

Note that if the provided CoordinateSystem does not exists, empty bounds are returned. Likewise, for PartitionedDataSet, partitions without the chosen CoordinateSystem are skipped.

VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds vtkm::cont::BoundsGlobalCompute ( const vtkm::cont::PartitionedDataSet pds,
const std::string &  coordinate_system_name 
)

Functions to compute bounds for a single dataset or partitioned dataset globally.

These are utility functions that compute bounds for a single dataset or partitioned dataset globally i.e. across all ranks when operating in a distributed environment. When VTK-m not operating in an distributed environment, these behave same as vtkm::cont::BoundsCompute.

Note that if the provided CoordinateSystem does not exists, empty bounds are returned. Likewise, for PartitionedDataSet, partitions without the chosen CoordinateSystem are skipped.

template<typename CellSetType , typename Ts >
VTKM_CONT CellSetType vtkm::cont::Cast ( const vtkm::cont::DynamicCellSetBase< Ts > &  dynamicCellSet)
inline

Returns dynamicCellSet cast to the given CellSet type.

Throws ErrorBadType if the cast does not work. Use IsType to check if the cast can happen.

template<typename ArrayHandleType , typename Ts >
VTKM_CONT ArrayHandleType vtkm::cont::Cast ( const vtkm::cont::VariantArrayHandleBase< Ts > &  variant)
inline

Returns variant cast to the given ArrayHandle type.

Throws ErrorBadType if the cast does not work. Use IsType to check if the cast can happen.

template<typename DynamicObject , typename Functor , typename... Args>
void vtkm::cont::CastAndCall ( const DynamicObject &  dynamicObject,
Functor &&  f,
Args &&...  args 
)

A Generic interface to CastAndCall.

The default implementation simply calls DynamicObject's CastAndCall, but specializations of this function exist for other classes (e.g. Field, CoordinateSystem, ArrayHandle).

template<typename Functor , typename... Args>
void vtkm::cont::CastAndCall ( const vtkm::cont::ArrayHandleVirtualCoordinates coords,
Functor &&  f,
Args &&...  args 
)
template<typename Functor , typename... Args>
void vtkm::cont::CastAndCall ( const CoordinateSystem coords,
Functor &&  f,
Args &&...  args 
)

A specialization of CastAndCall for basic CoordinateSystem to make it be treated just like any other dynamic object.

template<typename Functor , typename... Args>
void vtkm::cont::CastAndCall ( const vtkm::cont::Field field,
Functor &&  f,
Args &&...  args 
)

A specialization of CastAndCall for basic Field to make it be treated just like any other dynamic object.

template<typename T , typename U , typename Functor , typename... Args>
void vtkm::cont::CastAndCall ( const vtkm::cont::ArrayHandle< T, U > &  handle,
Functor &&  f,
Args &&...  args 
)

A specialization of CastAndCall for basic ArrayHandle types, Since the type is already known no deduction is needed.

This specialization is used to simplify numerous worklet algorithms

template<vtkm::IdComponent Dim, typename Functor , typename... Args>
void vtkm::cont::CastAndCall ( const vtkm::cont::CellSetStructured< Dim > &  cellset,
Functor &&  f,
Args &&...  args 
)

A specialization of CastAndCall for basic CellSetStructured types, Since the type is already known no deduction is needed.

This specialization is used to simplify numerous worklet algorithms

template<typename ConnectivityStorageTag , typename Functor , typename... Args>
void vtkm::cont::CastAndCall ( const vtkm::cont::CellSetSingleType< ConnectivityStorageTag > &  cellset,
Functor &&  f,
Args &&...  args 
)

A specialization of CastAndCall for basic CellSetSingleType types, Since the type is already known no deduction is needed.

This specialization is used to simplify numerous worklet algorithms

template<typename T , typename S , typename U , typename Functor , typename... Args>
void vtkm::cont::CastAndCall ( const vtkm::cont::CellSetExplicit< T, S, U > &  cellset,
Functor &&  f,
Args &&...  args 
)

A specialization of CastAndCall for basic CellSetExplicit types, Since the type is already known no deduction is needed.

This specialization is used to simplify numerous worklet algorithms

template<typename PermutationType , typename CellSetType , typename Functor , typename... Args>
void vtkm::cont::CastAndCall ( const vtkm::cont::CellSetPermutation< PermutationType, CellSetType > &  cellset,
Functor &&  f,
Args &&...  args 
)

A specialization of CastAndCall for basic CellSetPermutation types, Since the type is already known no deduction is needed.

This specialization is used to simplify numerous worklet algorithms

template<typename Functor , typename... Args>
void vtkm::cont::CastAndCall ( const vtkm::cont::CellSetExtrude cellset,
Functor &&  f,
Args &&...  args 
)

A specialization of CastAndCall for basic CellSetExtrude types, Since the type is already known no deduction is needed.

This specialization is used to simplify numerous worklet algorithms

template<typename... Args>
void vtkm::cont::ConditionalCastAndCall ( std::true_type  ,
Args &&...  args 
)

CastAndCall if the condition is true.

template<typename... Args>
void vtkm::cont::ConditionalCastAndCall ( std::false_type  ,
Args &&  ... 
)

No-op variant since the condition is false.

template<typename NumComponentsArrayType , typename OffsetsStorage >
VTKM_CONT void vtkm::cont::ConvertNumComponentsToOffsets ( const NumComponentsArrayType &  numComponentsArray,
vtkm::cont::ArrayHandle< vtkm::Id, OffsetsStorage > &  offsetsArray,
vtkm::Id sourceArraySize,
vtkm::cont::DeviceAdapterId  device = vtkm::cont::DeviceAdapterTagAny() 
)

ConvertNumComponentsToOffsets takes an array of Vec sizes (i.e.

the number of components in each Vec) and returns an array of offsets to a packed array of such Vecs. The resulting array can be used with ArrayHandleGroupVecVariable.

Parameters
numComponentsArraythe input array that specifies the number of components in each group Vec.
offsetsArray(optional) the output ArrayHandle, which must have a value type of vtkm::Id. If the output ArrayHandle is not given, it is returned.
sourceArraySize(optional) a reference to a vtkm::Id and is filled with the expected size of the source values array.
device(optional) specifies the device on which to run the conversion.
template<typename NumComponentsArrayType , typename OffsetsStorage >
VTKM_CONT void vtkm::cont::ConvertNumComponentsToOffsets ( const NumComponentsArrayType &  numComponentsArray,
vtkm::cont::ArrayHandle< vtkm::Id, OffsetsStorage > &  offsetsArray,
vtkm::cont::DeviceAdapterId  device = vtkm::cont::DeviceAdapterTagAny() 
)
template<typename NumComponentsArrayType >
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::ConvertNumComponentsToOffsets ( const NumComponentsArrayType &  numComponentsArray,
vtkm::Id sourceArraySize,
vtkm::cont::DeviceAdapterId  device = vtkm::cont::DeviceAdapterTagAny() 
)
template<typename NumComponentsArrayType >
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::ConvertNumComponentsToOffsets ( const NumComponentsArrayType &  numComponentsArray,
vtkm::cont::DeviceAdapterId  device = vtkm::cont::DeviceAdapterTagAny() 
)
template<typename S1 , typename S2 >
void vtkm::cont::ConvertNumIndicesToOffsets ( const vtkm::cont::ArrayHandle< vtkm::Id, S1 > &  numIndices,
vtkm::cont::ArrayHandle< vtkm::Id, S2 > &  offsets 
)
template<typename T , typename S1 , typename S2 >
void vtkm::cont::ConvertNumIndicesToOffsets ( const vtkm::cont::ArrayHandle< T, S1 > &  numIndices,
vtkm::cont::ArrayHandle< vtkm::Id, S2 > &  offsets 
)
template<typename T , typename S1 , typename S2 >
void vtkm::cont::ConvertNumIndicesToOffsets ( const vtkm::cont::ArrayHandle< T, S1 > &  numIndices,
vtkm::cont::ArrayHandle< vtkm::Id, S2 > &  offsets,
vtkm::Id connectivitySize 
)
template<typename T , typename S >
vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::ConvertNumIndicesToOffsets ( const vtkm::cont::ArrayHandle< T, S > &  numIndices)
template<typename T , typename S >
vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::ConvertNumIndicesToOffsets ( const vtkm::cont::ArrayHandle< T, S > &  numIndices,
vtkm::Id connectivityLength 
)
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::FieldRangeCompute ( const vtkm::cont::DataSet dataset,
const std::string &  name,
vtkm::cont::Field::Association  assoc = vtkm::cont::Field::Association::ANY 
)

Compute ranges for fields in a DataSet or PartitionedDataSet.

These methods to compute ranges for fields in a single dataset or a partitioned dataset. When using VTK-m in a hybrid-parallel environment with distributed processing, this class uses ranges for locally available data alone. Use FieldRangeGlobalCompute to compute ranges globally across all ranks even in distributed mode. Returns the range for a field from a dataset. If the field is not present, an empty ArrayHandle will be returned.

template<typename TypeList >
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::FieldRangeCompute ( const vtkm::cont::DataSet dataset,
const std::string &  name,
vtkm::cont::Field::Association  assoc,
TypeList   
)
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::FieldRangeCompute ( const vtkm::cont::PartitionedDataSet pds,
const std::string &  name,
vtkm::cont::Field::Association  assoc = vtkm::cont::Field::Association::ANY 
)

Returns the range for a field from a PartitionedDataSet.

If the field is not present on any of the partitions, an empty ArrayHandle will be returned. If the field is present on some partitions, but not all, those partitions without the field are skipped.

The returned array handle will have as many values as the maximum number of components for the selected field across all partitions.

template<typename TypeList >
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::FieldRangeCompute ( const vtkm::cont::PartitionedDataSet pds,
const std::string &  name,
vtkm::cont::Field::Association  assoc,
TypeList   
)
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::FieldRangeGlobalCompute ( const vtkm::cont::DataSet dataset,
const std::string &  name,
vtkm::cont::Field::Association  assoc = vtkm::cont::Field::Association::ANY 
)

utility functions to compute global ranges for dataset fields.

These functions compute global ranges for fields in a single DataSet or a PartitionedDataSet. In non-distributed environments, this is exactly same as FieldRangeCompute. In distributed environments, however, the range is computed locally on each rank and then a reduce-all collective is performed to reduces the ranges on all ranks. Returns the range for a field from a dataset. If the field is not present, an empty ArrayHandle will be returned.

template<typename TypeList >
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::FieldRangeGlobalCompute ( const vtkm::cont::DataSet dataset,
const std::string &  name,
vtkm::cont::Field::Association  assoc,
TypeList   
)
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::FieldRangeGlobalCompute ( const vtkm::cont::PartitionedDataSet pds,
const std::string &  name,
vtkm::cont::Field::Association  assoc = vtkm::cont::Field::Association::ANY 
)

Returns the range for a field from a PartitionedDataSet.

If the field is not present on any of the partitions, an empty ArrayHandle will be returned. If the field is present on some partitions, but not all, those partitions without the field are skipped.

The returned array handle will have as many values as the maximum number of components for the selected field across all partitions.

template<typename TypeList >
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::FieldRangeGlobalCompute ( const vtkm::cont::PartitionedDataSet pds,
const std::string &  name,
vtkm::cont::Field::Association  assoc,
TypeList   
)
VTKM_CONT_EXPORT VTKM_CONT std::string vtkm::cont::GetHumanReadableSize ( vtkm::UInt64  bytes,
int  prec = 2 
)

Convert a size in bytes to a human readable string (e.g.

"64 bytes", "1.44 MiB", "128 GiB", etc). prec controls the fixed point precision of the stringified number.

template<typename T >
VTKM_CONT std::string vtkm::cont::GetHumanReadableSize ( T &&  bytes,
int  prec = 2 
)
inline

Convert a size in bytes to a human readable string (e.g.

"64 bytes", "1.44 MiB", "128 GiB", etc). prec controls the fixed point precision of the stringified number.

VTKM_CONT_EXPORT VTKM_CONT std::string vtkm::cont::GetLogErrorContext ( )
VTKM_CONT_EXPORT VTKM_CONT std::string vtkm::cont::GetLogLevelName ( vtkm::cont::LogLevel  level)

Get a human readable name for the log level.

If a name has not been registered via InitLogging or SetLogLevelName, the returned string just contains the integer representation of the level.

VTKM_CONT_EXPORT VTKM_CONT std::string vtkm::cont::GetLogThreadName ( )

The name to identify the current thread in the log output.

VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::RuntimeDeviceTracker& vtkm::cont::GetRuntimeDeviceTracker ( )

Get the RuntimeDeviceTracker for the current thread.

Many features in VTK-m will attempt to run algorithms on the "best available device." This often is determined at runtime as failures in one device are recorded and that device is disabled. To prevent having to check over and over again, VTK-m uses per thread runtime device tracker so that these choices are marked and shared.

VTKM_CONT_EXPORT VTKM_CONT std::string vtkm::cont::GetSizeString ( vtkm::UInt64  bytes,
int  prec = 2 
)

Returns "%1 (%2 bytes)" where %1 is the result from GetHumanReadableSize and two is the exact number of bytes.

template<typename T >
VTKM_CONT std::string vtkm::cont::GetSizeString ( T &&  bytes,
int  prec = 2 
)
inline

Returns "%1 (%2 bytes)" where %1 is the result from GetHumanReadableSize and two is the exact number of bytes.

VTKM_CONT_EXPORT VTKM_CONT std::string vtkm::cont::GetStackTrace ( vtkm::Int32  skip = 0)

Returns a stacktrace on supported platforms.

Argument is the number of frames to skip (GetStackTrace and below are already skipped).

VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::LogLevel vtkm::cont::GetStderrLogLevel ( )

Get the active highest log level that will be printed to stderr.

VTKM_CONT_EXPORT VTKM_CONT InitializeResult vtkm::cont::Initialize ( int &  argc,
char *  argv[],
InitializeOptions  opts = InitializeOptions::None 
)

Initialize the VTKm library, parsing arguments when provided:

  • Sets log level names when logging is configured.
  • Sets the calling thread as the main thread for logging purposes.
  • Sets the default log level to the argument provided to -v.
  • Forces usage of the device name passed to -d or –device.
  • Prints usage when -h is passed.

The parameterless version only sets up log level names.

Additional options may be supplied via the opts argument, such as requiring the -d option.

Results are available in the returned InitializeResult.

Note
This method may call exit() on parse error.
VTKM_CONT_EXPORT VTKM_CONT InitializeResult vtkm::cont::Initialize ( )

Initialize the VTKm library, parsing arguments when provided:

  • Sets log level names when logging is configured.
  • Sets the calling thread as the main thread for logging purposes.
  • Sets the default log level to the argument provided to -v.
  • Forces usage of the device name passed to -d or –device.
  • Prints usage when -h is passed.

The parameterless version only sets up log level names.

Additional options may be supplied via the opts argument, such as requiring the -d option.

Results are available in the returned InitializeResult.

Note
This method may call exit() on parse error.
VTKM_CONT_EXPORT VTKM_CONT void vtkm::cont::InitLogging ( int &  argc,
char *  argv[] 
)

This shouldn't be called directly – prefer calling vtkm::cont::Initialize, which takes care of logging as well as other initializations.

Initializes logging. Sets up custom log level and thread names. Parses any "-v [LogLevel]" arguments to set the stderr log level. This argument may be either numeric, or the 4-character string printed in the output. Note that loguru will consume the "-v [LogLevel]" argument and shrink the arg list.

If the parameterless overload is used, the -v parsing is not used, but other functionality should still work.

Note
This function is not threadsafe and should only be called from a single thread (ideally the main thread).
VTKM_CONT_EXPORT VTKM_CONT void vtkm::cont::InitLogging ( )

This shouldn't be called directly – prefer calling vtkm::cont::Initialize, which takes care of logging as well as other initializations.

Initializes logging. Sets up custom log level and thread names. Parses any "-v [LogLevel]" arguments to set the stderr log level. This argument may be either numeric, or the 4-character string printed in the output. Note that loguru will consume the "-v [LogLevel]" argument and shrink the arg list.

If the parameterless overload is used, the -v parsing is not used, but other functionality should still work.

Note
This function is not threadsafe and should only be called from a single thread (ideally the main thread).
template<typename CellSetType , typename Ts >
VTKM_CONT bool vtkm::cont::IsType ( const vtkm::cont::DynamicCellSetBase< Ts > &  dynamicCellSet)
inline

Returns true if dynamicCellSet matches the type of CellSetType.

template<typename ArrayHandleType , typename Ts >
VTKM_CONT bool vtkm::cont::IsType ( const vtkm::cont::VariantArrayHandleBase< Ts > &  variant)
inline

Returns true if variant matches the type of ArrayHandleType.

template<typename T >
VTKM_CONT vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic> vtkm::cont::make_ArrayHandle ( const T *  array,
vtkm::Id  length,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)

A convenience function for creating an ArrayHandle from a standard C array.

template<typename T , typename Allocator >
VTKM_CONT vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic> vtkm::cont::make_ArrayHandle ( const std::vector< T, Allocator > &  array,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)

A convenience function for creating an ArrayHandle from an std::vector.

VTKM_CONT vtkm::cont::ArrayHandleBitField vtkm::cont::make_ArrayHandleBitField ( const vtkm::cont::BitField bitField)
inline
VTKM_CONT vtkm::cont::ArrayHandleBitField vtkm::cont::make_ArrayHandleBitField ( vtkm::cont::BitField &&  bitField)
inlinenoexcept
template<typename FirstHandleType , typename SecondHandleType , typename ThirdHandleType >
VTKM_CONT vtkm::cont::ArrayHandleCartesianProduct<FirstHandleType, SecondHandleType, ThirdHandleType> vtkm::cont::make_ArrayHandleCartesianProduct ( const FirstHandleType &  first,
const SecondHandleType &  second,
const ThirdHandleType &  third 
)

A convenience function for creating an ArrayHandleCartesianProduct.

It takes the two arrays to be zipped together.

template<typename T , typename ArrayType >
VTKM_CONT detail::MakeArrayHandleCastImpl<T, typename ArrayType::ValueType, ArrayType>::ReturnType vtkm::cont::make_ArrayHandleCast ( const ArrayType &  array,
const T &  = T() 
)

make_ArrayHandleCast is convenience function to generate an ArrayHandleCast.

template<typename... ArrayTs>
VTKM_CONT ArrayHandleCompositeVector<ArrayTs...> vtkm::cont::make_ArrayHandleCompositeVector ( const ArrayTs &...  arrays)

Create a composite vector array from other arrays.

template<typename ArrayHandleType1 , typename ArrayHandleType2 >
VTKM_CONT ArrayHandleConcatenate<ArrayHandleType1, ArrayHandleType2> vtkm::cont::make_ArrayHandleConcatenate ( const ArrayHandleType1 &  array1,
const ArrayHandleType2 &  array2 
)
template<typename T >
vtkm::cont::ArrayHandleConstant<T> vtkm::cont::make_ArrayHandleConstant ( value,
vtkm::Id  numberOfValues 
)

make_ArrayHandleConstant is convenience function to generate an ArrayHandleImplicit.

It takes a functor and the virtual length of the array.

template<typename CountingValueType >
VTKM_CONT vtkm::cont::ArrayHandleCounting<CountingValueType> vtkm::cont::make_ArrayHandleCounting ( CountingValueType  start,
CountingValueType  step,
vtkm::Id  length 
)

A convenience function for creating an ArrayHandleCounting.

It takes the value to start counting from and and the number of times to increment.

template<typename DecoratorImplT , typename... ArrayTs>
VTKM_CONT ArrayHandleDecorator<typename std::decay<DecoratorImplT>::type, typename std::decay<ArrayTs>::type...> vtkm::cont::make_ArrayHandleDecorator ( vtkm::Id  numValues,
DecoratorImplT &&  f,
ArrayTs &&...  arrays 
)

Create an ArrayHandleDecorator with the specified number of values that uses the provided DecoratorImplT and source ArrayHandles.

template<typename ArrayHandleType >
VTKM_CONT ArrayHandleExtractComponent<ArrayHandleType> vtkm::cont::make_ArrayHandleExtractComponent ( const ArrayHandleType &  array,
vtkm::IdComponent  component 
)

make_ArrayHandleExtractComponent is convenience function to generate an ArrayHandleExtractComponent.

template<typename T >
vtkm::cont::ArrayHandleExtrudeCoords<T> vtkm::cont::make_ArrayHandleExtrudeCoords ( const vtkm::cont::ArrayHandle< T >  arrHandle,
vtkm::Int32  numberOfPlanes,
bool  cylindrical 
)
template<typename T >
vtkm::cont::ArrayHandleExtrudeCoords<T> vtkm::cont::make_ArrayHandleExtrudeCoords ( const T *  array,
vtkm::Id  length,
vtkm::Int32  numberOfPlanes,
bool  cylindrical,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)
template<typename T >
vtkm::cont::ArrayHandleExtrudeCoords<T> vtkm::cont::make_ArrayHandleExtrudeCoords ( const std::vector< T > &  array,
vtkm::Int32  numberOfPlanes,
bool  cylindrical,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)
template<typename T >
vtkm::cont::ArrayHandleExtrudeField<T> vtkm::cont::make_ArrayHandleExtrudeField ( const vtkm::cont::ArrayHandle< T > &  array,
vtkm::Int32  numberOfPlanes,
bool  cylindrical 
)
template<typename T >
vtkm::cont::ArrayHandleExtrudeField<T> vtkm::cont::make_ArrayHandleExtrudeField ( const T *  array,
vtkm::Id  length,
vtkm::Int32  numberOfPlanes,
bool  cylindrical,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)
template<typename T >
vtkm::cont::ArrayHandleExtrudeField<T> vtkm::cont::make_ArrayHandleExtrudeField ( const std::vector< T > &  array,
vtkm::Int32  numberOfPlanes,
bool  cylindrical,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)
template<vtkm::IdComponent NUM_COMPONENTS, typename ArrayHandleType >
VTKM_CONT vtkm::cont::ArrayHandleGroupVec<ArrayHandleType, NUM_COMPONENTS> vtkm::cont::make_ArrayHandleGroupVec ( const ArrayHandleType &  array)

make_ArrayHandleGroupVec is convenience function to generate an ArrayHandleGroupVec.

It takes in an ArrayHandle and the number of components (as a specified template parameter), and returns an array handle with consecutive entries grouped in a Vec.

template<typename SourceArrayHandleType , typename OffsetsArrayHandleType >
VTKM_CONT vtkm::cont::ArrayHandleGroupVecVariable<SourceArrayHandleType, OffsetsArrayHandleType> vtkm::cont::make_ArrayHandleGroupVecVariable ( const SourceArrayHandleType &  sourceArray,
const OffsetsArrayHandleType &  offsetsArray 
)

make_ArrayHandleGroupVecVariable is convenience function to generate an ArrayHandleGroupVecVariable.

It takes in an ArrayHandle of values and an array handle of offsets and returns an array handle with consecutive entries grouped in a Vec.

template<typename FunctorType >
VTKM_CONT vtkm::cont::ArrayHandleImplicit<FunctorType> vtkm::cont::make_ArrayHandleImplicit ( FunctorType  functor,
vtkm::Id  length 
)

make_ArrayHandleImplicit is convenience function to generate an ArrayHandleImplicit.

It takes a functor and the virtual length of the arry.

template<typename IndexArrayHandleType , typename ValueArrayHandleType >
VTKM_CONT vtkm::cont::ArrayHandlePermutation<IndexArrayHandleType, ValueArrayHandleType> vtkm::cont::make_ArrayHandlePermutation ( IndexArrayHandleType  indexArray,
ValueArrayHandleType  valueArray 
)

make_ArrayHandleTransform is convenience function to generate an ArrayHandleTransform.

It takes in an ArrayHandle and a functor to apply to each element of the Handle.

template<typename HandleType >
VTKM_CONT ArrayHandleReverse<HandleType> vtkm::cont::make_ArrayHandleReverse ( const HandleType &  handle)

make_ArrayHandleReverse is convenience function to generate an ArrayHandleReverse.

template<typename ValueType >
VTKM_CONT ArrayHandleSOA<ValueType> vtkm::cont::make_ArrayHandleSOA ( std::initializer_list< vtkm::cont::ArrayHandle< typename vtkm::VecTraits< ValueType >::ComponentType, vtkm::cont::StorageTagBasic >> &&  componentArrays)
template<typename ComponentType , typename... RemainingArrays>
VTKM_CONT ArrayHandleSOA<vtkm::Vec<ComponentType, vtkm::IdComponent(sizeof...(RemainingArrays) + 1)> > vtkm::cont::make_ArrayHandleSOA ( const vtkm::cont::ArrayHandle< ComponentType, vtkm::cont::StorageTagBasic > &  componentArray0,
const RemainingArrays &...  componentArrays 
)
template<typename ValueType >
VTKM_CONT ArrayHandleSOA<ValueType> vtkm::cont::make_ArrayHandleSOA ( std::initializer_list< std::vector< typename vtkm::VecTraits< ValueType >::ComponentType >> &&  componentVectors)
template<typename ComponentType , typename... RemainingVectors>
VTKM_CONT ArrayHandleSOA<vtkm::Vec<ComponentType, vtkm::IdComponent(sizeof...(RemainingVectors) + 1)> > vtkm::cont::make_ArrayHandleSOA ( vtkm::CopyFlag  copy,
const std::vector< ComponentType > &  vector0,
const RemainingVectors &...  componentVectors 
)
template<typename ComponentType , typename... RemainingVectors>
VTKM_CONT ArrayHandleSOA<vtkm::Vec<ComponentType, vtkm::IdComponent(sizeof...(RemainingVectors) + 1)> > vtkm::cont::make_ArrayHandleSOA ( const std::vector< ComponentType > &  vector0,
const RemainingVectors &...  componentVectors 
)
template<typename ValueType >
VTKM_CONT ArrayHandleSOA<ValueType> vtkm::cont::make_ArrayHandleSOA ( std::initializer_list< const typename vtkm::VecTraits< ValueType >::ComponentType * > &&  componentVectors,
vtkm::Id  length,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)
template<typename ComponentType , typename... RemainingArrays>
VTKM_CONT ArrayHandleSOA<vtkm::Vec<ComponentType, vtkm::IdComponent(sizeof...(RemainingArrays) + 1)> > vtkm::cont::make_ArrayHandleSOA ( vtkm::Id  length,
vtkm::CopyFlag  copy,
const ComponentType *  array0,
const RemainingArrays *...  componentArrays 
)
template<typename ComponentType , typename... RemainingArrays>
VTKM_CONT ArrayHandleSOA<vtkm::Vec<ComponentType, vtkm::IdComponent(sizeof...(RemainingArrays) + 1)> > vtkm::cont::make_ArrayHandleSOA ( vtkm::Id  length,
const ComponentType *  array0,
const RemainingArrays *...  componentArrays 
)
template<typename ArrayHandleType , vtkm::IdComponent OutSize>
VTKM_CONT ArrayHandleSwizzle<ArrayHandleType, OutSize> vtkm::cont::make_ArrayHandleSwizzle ( const ArrayHandleType &  array,
const vtkm::Vec< vtkm::IdComponent, OutSize > &  map 
)
template<typename ArrayHandleType , typename... SwizzleIndexTypes>
VTKM_CONT ArrayHandleSwizzle<ArrayHandleType, vtkm::IdComponent(sizeof...(SwizzleIndexTypes) + 1)> vtkm::cont::make_ArrayHandleSwizzle ( const ArrayHandleType &  array,
vtkm::IdComponent  swizzleIndex0,
SwizzleIndexTypes...  swizzleIndices 
)
template<typename HandleType , typename FunctorType >
VTKM_CONT vtkm::cont::ArrayHandleTransform<HandleType, FunctorType> vtkm::cont::make_ArrayHandleTransform ( HandleType  handle,
FunctorType  functor 
)

make_ArrayHandleTransform is convenience function to generate an ArrayHandleTransform.

It takes in an ArrayHandle and a functor to apply to each element of the Handle.

template<typename HandleType , typename FunctorType , typename InverseFunctorType >
VTKM_CONT vtkm::cont::ArrayHandleTransform<HandleType, FunctorType, InverseFunctorType> vtkm::cont::make_ArrayHandleTransform ( HandleType  handle,
FunctorType  functor,
InverseFunctorType  inverseFunctor 
)
template<typename ArrayHandleType >
ArrayHandleView<ArrayHandleType> vtkm::cont::make_ArrayHandleView ( const ArrayHandleType &  array,
vtkm::Id  startIndex,
vtkm::Id  numValues 
)
template<typename FirstHandleType , typename SecondHandleType >
VTKM_CONT vtkm::cont::ArrayHandleZip<FirstHandleType, SecondHandleType> vtkm::cont::make_ArrayHandleZip ( const FirstHandleType &  first,
const SecondHandleType &  second 
)

A convenience function for creating an ArrayHandleZip.

It takes the two arrays to be zipped together.

template<typename T >
CellSetExtrude vtkm::cont::make_CellSetExtrude ( const vtkm::cont::ArrayHandle< vtkm::Int32 > &  conn,
const vtkm::cont::ArrayHandleExtrudeCoords< T > &  coords,
const vtkm::cont::ArrayHandle< vtkm::Int32 > &  nextNode,
bool  periodic = true 
)
template<typename T >
CellSetExtrude vtkm::cont::make_CellSetExtrude ( const std::vector< vtkm::Int32 > &  conn,
const vtkm::cont::ArrayHandleExtrudeCoords< T > &  coords,
const std::vector< vtkm::Int32 > &  nextNode,
bool  periodic = true 
)
template<typename OriginalCellSet , typename PermutationArrayHandleType >
vtkm::cont::CellSetPermutation<OriginalCellSet, PermutationArrayHandleType> vtkm::cont::make_CellSetPermutation ( const PermutationArrayHandleType &  cellIndexMap,
const OriginalCellSet &  cellSet 
)
template<typename T >
vtkm::cont::CoordinateSystem vtkm::cont::make_CoordinateSystem ( std::string  name,
const std::vector< T > &  data,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)
template<typename T >
vtkm::cont::CoordinateSystem vtkm::cont::make_CoordinateSystem ( std::string  name,
const T *  data,
vtkm::Id  numberOfValues,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)
VTKM_CONT_EXPORT DeviceAdapterId vtkm::cont::make_DeviceAdapterId ( const DeviceAdapterNameType name)

Construct a device adapter id from a runtime string The string is case-insensitive.

So CUDA will be selected with 'cuda', 'Cuda', or 'CUDA'.

DeviceAdapterId vtkm::cont::make_DeviceAdapterId ( vtkm::Int8  id)
inline

Construct a device adapter id a vtkm::Int8.

The mapping of integer value to devices are:

DeviceAdapterTagSerial == 1 DeviceAdapterTagCuda == 2 DeviceAdapterTagTBB == 3 DeviceAdapterTagOpenMP == 4

template<typename T >
vtkm::cont::Field vtkm::cont::make_Field ( std::string  name,
Field::Association  association,
const T *  data,
vtkm::Id  size,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)

Convenience functions to build fields from C style arrays and std::vector.

template<typename T >
vtkm::cont::Field vtkm::cont::make_Field ( std::string  name,
Field::Association  association,
const std::vector< T > &  data,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)

Convenience functions to build fields from C style arrays and std::vector.

template<typename T , typename S >
vtkm::cont::Field vtkm::cont::make_FieldCell ( std::string  name,
const vtkm::cont::ArrayHandle< T, S > &  data 
)

Convenience function to build cell fields from vtkm::cont::ArrayHandle.

vtkm::cont::Field vtkm::cont::make_FieldCell ( std::string  name,
const vtkm::cont::VariantArrayHandle data 
)
inline

Convenience function to build cell fields from vtkm::cont::VariantArrayHandle.

template<typename T , typename S >
vtkm::cont::Field vtkm::cont::make_FieldPoint ( std::string  name,
const vtkm::cont::ArrayHandle< T, S > &  data 
)

Convenience function to build point fields from vtkm::cont::ArrayHandle.

vtkm::cont::Field vtkm::cont::make_FieldPoint ( std::string  name,
const vtkm::cont::VariantArrayHandle data 
)
inline

Convenience function to build point fields from vtkm::cont::VariantArrayHandle.

template<typename ImplicitFunctionType , typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG>
VTKM_CONT ImplicitFunctionHandle vtkm::cont::make_ImplicitFunctionHandle ( ImplicitFunctionType &&  func,
DeviceAdapterList  devices = DeviceAdapterList() 
)
template<typename ImplicitFunctionType , typename... Args>
VTKM_CONT ImplicitFunctionHandle vtkm::cont::make_ImplicitFunctionHandle ( Args &&...  args)
template<typename ImplicitFunctionType , typename DeviceAdapterList , typename... Args>
VTKM_CONT ImplicitFunctionHandle vtkm::cont::make_ImplicitFunctionHandle ( Args &&...  args)
template<typename ImplicitFunctionType , typename DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG>
VTKM_CONT ImplicitFunctionValueHandle vtkm::cont::make_ImplicitFunctionValueHandle ( ImplicitFunctionType &&  func,
DeviceAdapterList  devices = DeviceAdapterList() 
)
template<typename ImplicitFunctionType , typename... Args>
VTKM_CONT ImplicitFunctionValueHandle vtkm::cont::make_ImplicitFunctionValueHandle ( Args &&...  args)
template<typename ImplicitFunctionType , typename DeviceAdapterList , typename... Args>
VTKM_CONT ImplicitFunctionValueHandle vtkm::cont::make_ImplicitFunctionValueHandle ( Args &&...  args)
InitializeOptions vtkm::cont::operator& ( const InitializeOptions lhs,
const InitializeOptions rhs 
)
inline
InitializeOptions vtkm::cont::operator| ( const InitializeOptions lhs,
const InitializeOptions rhs 
)
inline
template<typename T , typename StorageT >
VTKM_NEVER_EXPORT VTKM_CONT void vtkm::cont::printSummary_ArrayHandle ( const vtkm::cont::ArrayHandle< T, StorageT > &  array,
std::ostream &  out,
bool  full = false 
)
inline
VTKM_CONT_EXPORT VTKM_CONT void vtkm::cont::SetLogLevelName ( vtkm::cont::LogLevel  level,
const std::string &  name 
)

Register a custom name to identify a log level.

The name will be truncated to 4 characters internally.

Must not be called after InitLogging. Such calls will fail and log an error.

There is no need to call this for the default vtkm::cont::LogLevels. They are populated in InitLogging and will be overwritten.

VTKM_CONT_EXPORT VTKM_CONT void vtkm::cont::SetLogThreadName ( const std::string &  name)

The name to identify the current thread in the log output.

VTKM_CONT_EXPORT VTKM_CONT void vtkm::cont::SetStderrLogLevel ( vtkm::cont::LogLevel  level)

Set the range of log levels that will be printed to stderr.

All levels with an enum value less-than-or-equal-to level will be printed.

VTKM_CONT_EXPORT void vtkm::cont::ThrowArrayRangeComputeFailed ( )
VTKM_SILENCE_WEAK_VTABLE_WARNING_END VTKM_CONT_EXPORT void vtkm::cont::throwFailedDynamicCast ( const std::string &  baseType,
const std::string &  derivedType 
)

Throws an ErrorBadType exception with the following message: Cast failed: baseType –> derivedType".

This is generally caused by asking for a casting of a VariantArrayHandle with an insufficient type list.

VTKM_SILENCE_WEAK_VTABLE_WARNING_END VTKM_CONT_EXPORT void vtkm::cont::throwFailedRuntimeDeviceTransfer ( const std::string &  className,
vtkm::cont::DeviceAdapterId  device 
)

Throws an ErrorBadeDevice exception with the following message: "VTK-m was unable to transfer className to DeviceAdapter[id,name].

This is generally caused by asking for execution on a DeviceAdapter that isn't compiled into VTK-m. In the case of CUDA it can also be caused by accidentally compiling source files as C++ files instead of CUDA."

template<typename Functor , typename... Args>
VTKM_CONT bool vtkm::cont::TryExecute ( Functor &&  functor,
Args &&...  args 
)

Try to execute a functor on a set of devices until one succeeds.

This function takes a functor and optionally a set of devices to compile support. It then tries to run the functor for each device (in the order given in the list) until the execution succeeds.

The TryExecute is also able to perfectly forward arbitrary arguments onto the functor. These arguments must be placed after the optional device adapter list and will passed to the functor in the same order as listed.

The functor must implement the function call operator ( operator() ) with a return type of bool and that is true if the execution succeeds, false if it fails. If an exception is thrown from the functor, then the execution is assumed to have failed. The functor call operator must also take at least one argument being the required DeviceAdapterTag to use.

struct TryCallExample
{
template<typename DeviceList>
bool operator()(DeviceList tags, int) const
{
return true;
}
};
// Executing without a deviceId, or device list
vtkm::cont::TryExecute(TryCallExample(), int{42});
// Executing with a device list
vtkm::cont::TryExecute(TryCallExample(), DeviceList(), int{42});

This function returns true if the functor succeeded on a device, false otherwise.

If no device list is specified, then VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG is used.

template<typename Functor >
VTKM_CONT bool vtkm::cont::TryExecuteOnDevice ( vtkm::cont::DeviceAdapterId  devId,
Functor &&  functor 
)

Try to execute a functor on a specific device selected at runtime.

This function takes a functor and a DeviceAdapterId which represents a specific device to attempt to run on at runtime. It also optionally accepts a set of devices to compile support for.

It then iterates over the set of devices finding which one matches the provided adapter Id and is also enabled in the runtime. The function will return true only if the device adapter was valid, and the task was successfully run.

The TryExecuteOnDevice is also able to perfectly forward arbitrary arguments onto the functor. These arguments must be placed after the optional device adapter list and will passed to the functor in the same order as listed.

The functor must implement the function call operator ( operator() ) with a return type of bool and that is true if the execution succeeds, false if it fails. If an exception is thrown from the functor, then the execution is assumed to have failed. The functor call operator must also take at least one argument being the required DeviceAdapterTag to use.

struct TryCallExample
{
template<typename DeviceList>
bool operator()(DeviceList tags, int) const
{
return true;
}
};
// Execute only on the device which corresponds to devId
// Will not execute all if devId is
vtkm::cont::TryExecuteOnDevice(devId, TryCallExample(), int{42});

This function returns true if the functor succeeded on a device, false otherwise.

If no device list is specified, then VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG is used.

template<typename Functor , typename Arg1 , typename... Args>
VTKM_CONT bool vtkm::cont::TryExecuteOnDevice ( vtkm::cont::DeviceAdapterId  devId,
Functor &&  functor,
Arg1 &&  arg1,
Args &&...  args 
)

Try to execute a functor on a specific device selected at runtime.

This function takes a functor and a DeviceAdapterId which represents a specific device to attempt to run on at runtime. It also optionally accepts a set of devices to compile support for.

It then iterates over the set of devices finding which one matches the provided adapter Id and is also enabled in the runtime. The function will return true only if the device adapter was valid, and the task was successfully run.

The TryExecuteOnDevice is also able to perfectly forward arbitrary arguments onto the functor. These arguments must be placed after the optional device adapter list and will passed to the functor in the same order as listed.

The functor must implement the function call operator ( operator() ) with a return type of bool and that is true if the execution succeeds, false if it fails. If an exception is thrown from the functor, then the execution is assumed to have failed. The functor call operator must also take at least one argument being the required DeviceAdapterTag to use.

struct TryCallExample
{
template<typename DeviceList>
bool operator()(DeviceList tags, int) const
{
return true;
}
};
// Execute only on the device which corresponds to devId
// Will not execute all if devId is
vtkm::cont::TryExecuteOnDevice(devId, TryCallExample(), int{42});

This function returns true if the functor succeeded on a device, false otherwise.

If no device list is specified, then VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG is used.

Variable Documentation

template class VTKM_CONT_TEMPLATE_EXPORT vtkm::cont::CellSetStructured< 1 >
template class VTKM_CONT_TEMPLATE_EXPORT vtkm::cont::CellSetStructured< 2 >
template class VTKM_CONT_TEMPLATE_EXPORT vtkm::cont::CellSetStructured< 3 >