VTK-m  2.0
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.
 
 kokkos
 
 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  ArrayHandleBasic
 
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  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  ArrayHandleOffsetsToNumComponents
 An ArrayHandle that converts an array of offsets to an array of Vec sizes. More...
 
class  ArrayHandlePermutation
 Implicitly permutes the values in an array. More...
 
class  ArrayHandleRandomStandardNormal
 
class  ArrayHandleRandomUniformBits
 An ArrayHandle that provides a source of random bits. More...
 
class  ArrayHandleRandomUniformReal
 
class  ArrayHandleRecombineVec
 A grouping of ArrayHandleStrides into an ArrayHandle of Vecs. 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  ArrayHandleStride
 An ArrayHandle that accesses a basic array with strides and offsets. More...
 
class  ArrayHandleSwizzle
 Swizzle the components of the values in an ArrayHandle. More...
 
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  ArrayHandleXGCCoordinates
 
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
 
class  ArrayPortalToIterators< PortalType, std::false_type >
 Convert an ArrayPortal to STL iterators. More...
 
class  ArrayPortalToIterators< PortalType, std::true_type >
 
class  AssignerPartitionedDataSet
 Assigner for PartitionedDataSet partitions. More...
 
class  AtomicArray
 A type list containing types that can be used with an AtomicArray. More...
 
class  BitField
 
class  CellInterpolationHelper
 
class  CellLocatorBoundingIntervalHierarchy
 
class  CellLocatorGeneral
 A CellLocator that works generally well for any supported cell set. More...
 
class  CellLocatorPartitioned
 
class  CellLocatorRectilinearGrid
 
class  CellLocatorTwoLevel
 A locator that uses 2 nested levels of grids. More...
 
class  CellLocatorUniformBins
 A locator that uses a uniform grid. More...
 
class  CellLocatorUniformGrid
 
class  CellSet
 
class  CellSetExplicit
 
class  CellSetExtrude
 
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  DataSetBuilderCurvilinear
 
class  DataSetBuilderExplicit
 
class  DataSetBuilderExplicitIterative
 
class  DataSetBuilderRectilinear
 
class  DataSetBuilderUniform
 
struct  DeviceAdapterAlgorithm
 Struct containing device adapter algorithms. More...
 
struct  DeviceAdapterAlgorithm< vtkm::cont::DeviceAdapterTagCuda >
 
struct  DeviceAdapterAlgorithm< vtkm::cont::DeviceAdapterTagKokkos >
 
struct  DeviceAdapterAlgorithm< vtkm::cont::DeviceAdapterTagOpenMP >
 
struct  DeviceAdapterAlgorithm< vtkm::cont::DeviceAdapterTagSerial >
 
struct  DeviceAdapterAlgorithm< vtkm::cont::DeviceAdapterTagTBB >
 
struct  DeviceAdapterId
 
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::DeviceAdapterTagKokkos >
 Determine if this machine supports Kokkos backend. 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::DeviceAdapterTagKokkos >
 
class  DeviceTaskTypes< vtkm::cont::DeviceAdapterTagOpenMP >
 
class  DeviceTaskTypes< vtkm::cont::DeviceAdapterTagSerial >
 
class  DeviceTaskTypes< vtkm::cont::DeviceAdapterTagTBB >
 
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...
 
class  ErrorUserAbort
 This class is thrown when vtk-m detects a request for aborting execution in the current thread. 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  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...
 
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  PointLocatorSparseGrid
 A locator that bins points in a sparsely stored grid. More...
 
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
 
struct  StorageTag___
 A tag specifying client memory allocation. More...
 
struct  StorageTagBasic
 A tag for the basic implementation of a Storage object. More...
 
struct  StorageTagCartesianProduct
 
struct  StorageTagCast
 
struct  StorageTagCompositeVec
 
class  StorageTagConcatenate
 
struct  StorageTagConstant
 
struct  StorageTagCounting
 
class  StorageTagExtractComponent
 
struct  StorageTagGroupVec
 
struct  StorageTagGroupVecVariable
 
struct  StorageTagImplicit
 An implementation for read-only implicit arrays. More...
 
struct  StorageTagIndex
 
struct  StorageTagMultiplexer
 
struct  StorageTagOffsetsToNumComponents
 
struct  StorageTagPermutation
 
class  StorageTagReverse
 
struct  StorageTagSOA
 
struct  StorageTagStride
 
struct  StorageTagUniformPoints
 
struct  StorageTagView
 
struct  StorageTagXGCCoordinates
 
struct  StorageTagZip
 
class  Timer
 A class that can be used to time operations in VTK-m that might be occuring in parallel. More...
 
class  Token
 A token to hold the scope of an ArrayHandle or other object. More...
 
class  UncertainArrayHandle
 An ArrayHandle of an uncertain value type and storage. More...
 
class  UncertainCellSet
 A CellSet of an uncertain type. More...
 
class  UnknownArrayHandle
 An ArrayHandle of an unknown value type and storage. More...
 
class  UnknownCellSet
 A CellSet of an unknown type. More...
 

Typedefs

template<typename List >
using ArrayHandleMultiplexerFromList = vtkm::ListApply< List, ArrayHandleMultiplexer >
 Converts avtkm::List to an ArrayHandleMultiplexer More...
 
template<typename CellSetType , typename CoordinateSystemArrayType >
using CellLocatorChooser = typename detail::CellLocatorChooserImpl< CellSetType, CoordinateSystemArrayType >::type
 A template to select an appropriate CellLocator based on CellSet type. More...
 
using CellSetListStructured1D = vtkm::List< vtkm::cont::CellSetStructured< 1 > >
 
using CellSetListStructured2D = vtkm::List< vtkm::cont::CellSetStructured< 2 > >
 
using CellSetListStructured3D = vtkm::List< vtkm::cont::CellSetStructured< 3 > >
 
template<typename ShapesStorageTag = VTKM_DEFAULT_SHAPES_STORAGE_TAG, typename ConnectivityStorageTag = VTKM_DEFAULT_CONNECTIVITY_STORAGE_TAG, typename OffsetsStorageTag = VTKM_DEFAULT_OFFSETS_STORAGE_TAG>
using CellSetListExplicit = vtkm::List< vtkm::cont::CellSetExplicit< ShapesStorageTag, ConnectivityStorageTag, OffsetsStorageTag > >
 
using CellSetListExplicitDefault = CellSetListExplicit<>
 
using CellSetListCommon = vtkm::List< vtkm::cont::CellSetStructured< 2 >, vtkm::cont::CellSetStructured< 3 >, vtkm::cont::CellSetExplicit<>, vtkm::cont::CellSetSingleType<> >
 
using CellSetListStructured = vtkm::List< vtkm::cont::CellSetStructured< 2 >, vtkm::cont::CellSetStructured< 3 > >
 
using CellSetListUnstructured = vtkm::List< vtkm::cont::CellSetExplicit<>, vtkm::cont::CellSetSingleType<> >
 
using DeviceAdapterListCommon = vtkm::List< vtkm::cont::DeviceAdapterTagCuda, vtkm::cont::DeviceAdapterTagTBB, vtkm::cont::DeviceAdapterTagOpenMP, vtkm::cont::DeviceAdapterTagKokkos, vtkm::cont::DeviceAdapterTagSerial >
 
using DeviceAdapterNameType = std::string
 
using StorageListBasic = vtkm::List< vtkm::cont::StorageTagBasic >
 
using StorageListCommon = vtkm::List< vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagSOA, vtkm::cont::StorageTagUniformPoints, vtkm::cont::StorageTagCartesianProduct< vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic > >
 

Enumerations

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 T , typename S >
VTKM_CONT void ArrayCopyShallowIfPossible (const vtkm::cont::UnknownArrayHandle source, vtkm::cont::ArrayHandle< T, S > &destination)
 Copies from an unknown to a known array type. More...
 
template<typename T , typename S >
vtkm::cont::ArrayHandleStride< typename vtkm::internal::SafeVecTraits< T >::BaseComponentType > ArrayExtractComponent (const vtkm::cont::ArrayHandle< T, S > &src, vtkm::IdComponent componentIndex, vtkm::CopyFlag allowCopy=vtkm::CopyFlag::On)
 Pulls a component out of an ArrayHandle. 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)
 
template<typename T >
VTKM_CONT vtkm::cont::ArrayHandleBasic< T > make_ArrayHandle (const T *array, vtkm::Id numberOfValues, vtkm::CopyFlag copy)
 A convenience function for creating an ArrayHandle from a standard C array. More...
 
template<typename T >
VTKM_CONT vtkm::cont::ArrayHandleBasic< T > make_ArrayHandleMove (T *&array, vtkm::Id numberOfValues, vtkm::cont::internal::BufferInfo::Deleter deleter=internal::SimpleArrayDeleter< T >, vtkm::cont::internal::BufferInfo::Reallocater reallocater=internal::SimpleArrayReallocater< T >)
 A convenience function to move a user-allocated array into an ArrayHandle. More...
 
template<typename T , typename Allocator >
VTKM_CONT vtkm::cont::ArrayHandleBasic< T > make_ArrayHandle (const std::vector< T, Allocator > &array, vtkm::CopyFlag copy)
 A convenience function for creating an ArrayHandle from an std::vector. More...
 
template<typename T , typename Allocator >
VTKM_CONT vtkm::cont::ArrayHandleBasic< T > make_ArrayHandleMove (std::vector< T, Allocator > &&array)
 Move an std::vector into an ArrayHandle. More...
 
template<typename T , typename Allocator >
VTKM_CONT vtkm::cont::ArrayHandleBasic< T > make_ArrayHandle (std::vector< T, Allocator > &&array, vtkm::CopyFlag vtkmNotUsed(copy))
 
template<typename T >
VTKM_CONT vtkm::cont::ArrayHandleBasic< T > make_ArrayHandle (std::initializer_list< T > &&values)
 Create an ArrayHandle directly from an initializer list of values. More...
 
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<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 ComponentsArrayHandleType , typename OffsetsArrayHandleType >
VTKM_CONT vtkm::cont::ArrayHandleGroupVecVariable< ComponentsArrayHandleType, OffsetsArrayHandleType > make_ArrayHandleGroupVecVariable (const ComponentsArrayHandleType &componentsArray, const OffsetsArrayHandleType &offsetsArray)
 make_ArrayHandleGroupVecVariable is convenience function to generate an ArrayHandleGroupVecVariable. More...
 
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...
 
VTKM_CONT vtkm::cont::ArrayHandleIndex make_ArrayHandleIndex (vtkm::Id length)
 A convenience function for creating an ArrayHandleIndex. More...
 
template<typename OffsetsStorageTag >
VTKM_CONT vtkm::cont::ArrayHandleOffsetsToNumComponents< vtkm::cont::ArrayHandle< vtkm::Id, OffsetsStorageTag > > make_ArrayHandleOffsetsToNumComponents (const vtkm::cont::ArrayHandle< vtkm::Id, OffsetsStorageTag > &array)
 
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, RemainingVectors &&... componentVectors)
 
template<typename ComponentType , typename... RemainingVectors>
VTKM_CONT ArrayHandleSOA< vtkm::Vec< ComponentType, vtkm::IdComponent(sizeof...(RemainingVectors)+1)> > make_ArrayHandleSOA (vtkm::CopyFlag copy, std::vector< ComponentType > &&vector0, RemainingVectors &&... componentVectors)
 
template<typename ComponentType , typename... RemainingVectors>
VTKM_CONT ArrayHandleSOA< vtkm::Vec< ComponentType, vtkm::IdComponent(sizeof...(RemainingVectors)+1)> > make_ArrayHandleSOAMove (std::vector< ComponentType > &&vector0, 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)
 
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 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 T >
vtkm::cont::ArrayHandleXGCCoordinates< T > make_ArrayHandleXGCCoordinates (const vtkm::cont::ArrayHandle< T > &arrHandle, vtkm::Id numberOfPlanesOwned, bool cylindrical, vtkm::Id numberOfPlanes=-1, vtkm::Id planeStartId=0)
 
template<typename T >
vtkm::cont::ArrayHandleXGCCoordinates< T > make_ArrayHandleXGCCoordinates (const T *array, vtkm::Id length, vtkm::Id numberOfPlanesOwned, bool cylindrical, vtkm::Id numberOfPlanes=-1, vtkm::Id planeStartId=0, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 
template<typename T >
vtkm::cont::ArrayHandleXGCCoordinates< T > make_ArrayHandleXGCCoordinates (const std::vector< T > &array, vtkm::Id numberOfPlanesOwned, bool cylindrical, vtkm::Id numberOfPlanes=-1, vtkm::Id planeStartId=0, vtkm::CopyFlag copy=vtkm::CopyFlag::Off)
 
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...
 
VTKM_CONT_EXPORT void ThrowArrayRangeComputeFailed ()
 
template<typename ArrayHandleType >
vtkm::cont::ArrayHandle< vtkm::RangeArrayRangeCompute (const ArrayHandleType &input, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny{})
 
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)
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsCompute (const vtkm::cont::DataSet &dataset, const std::string &coordinate_system_name)
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsCompute (const vtkm::cont::PartitionedDataSet &pds, const std::string &coordinate_system_name)
 
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)
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsGlobalCompute (const vtkm::cont::DataSet &dataset, const std::string &coordinate_system_name)
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::Bounds BoundsGlobalCompute (const vtkm::cont::PartitionedDataSet &pds, const std::string &coordinate_system_name)
 
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 Functor , typename... Args>
void CastAndCall (const vtkm::cont::UnknownCellSet &cellSet, Functor &&f, Args &&... args)
 A specialization of CastAndCall for unknown cell sets. 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<typename Functor , typename... Args>
void CastAndCall (const UnknownArrayHandle &handle, Functor &&f, Args &&... args)
 A specialization of CastAndCall for UnknownArrayHandle. 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 CellSetType , typename Functor , typename... Args>
VTKM_CONT void CastAndCallCellLocatorChooser (const CellSetType &cellSet, const vtkm::cont::CoordinateSystem &coordinateSystem, Functor &&functor, Args &&... args)
 Calls a functor with the appropriate type of CellLocator. More...
 
template<typename Functor , typename... Args>
VTKM_CONT void CastAndCallCellLocatorChooser (const vtkm::cont::DataSet &dataSet, Functor &&functor, Args &&... args)
 Calls a functor with the appropriate type of CellLocator. More...
 
template<typename T >
CellSetExtrude make_CellSetExtrude (const vtkm::cont::ArrayHandle< vtkm::Int32 > &conn, const vtkm::cont::ArrayHandleXGCCoordinates< 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::ArrayHandleXGCCoordinates< T > &coords, const std::vector< vtkm::Int32 > &nextNode, bool periodic=true)
 
template<typename T >
CellSetExtrude make_CellSetExtrude (std::vector< vtkm::Int32 > &&conn, const vtkm::cont::ArrayHandleXGCCoordinates< T > &coords, 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 , typename S >
bool ColorTableMap (const vtkm::cont::ArrayHandle< T, S > &values, const vtkm::cont::ColorTableSamplesRGBA &samples, vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &rgbaOut)
 Sample each value through an intermediate lookup/sample table to generate RGBA colors. More...
 
template<typename T , typename S >
bool ColorTableMap (const vtkm::cont::ArrayHandle< T, S > &values, const vtkm::cont::ColorTableSamplesRGB &samples, vtkm::cont::ArrayHandle< vtkm::Vec3ui_8 > &rgbOut)
 Sample each value through an intermediate lookup/sample table to generate RGB colors. More...
 
template<typename T , int N, typename S >
bool ColorTableMapMagnitude (const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &values, const vtkm::cont::ColorTableSamplesRGBA &samples, vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &rgbaOut)
 Use magnitude of a vector with a sample table to generate RGBA colors. More...
 
template<typename T , int N, typename S >
bool ColorTableMapMagnitude (const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &values, const vtkm::cont::ColorTableSamplesRGB &samples, vtkm::cont::ArrayHandle< vtkm::Vec3ui_8 > &rgbOut)
 Use magnitude of a vector with a sample table to generate RGB colors. More...
 
template<typename T , int N, typename S >
bool ColorTableMapComponent (const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &values, vtkm::IdComponent comp, const vtkm::cont::ColorTableSamplesRGBA &samples, vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &rgbaOut)
 Use a single component of a vector with a sample table to generate RGBA colors. More...
 
template<typename T , int N, typename S >
bool ColorTableMapComponent (const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &values, vtkm::IdComponent comp, const vtkm::cont::ColorTableSamplesRGB &samples, vtkm::cont::ArrayHandle< vtkm::Vec3ui_8 > &rgbOut)
 Use a single component of a vector with a sample table to generate RGB colors. More...
 
template<typename T , typename S >
bool ColorTableMap (const vtkm::cont::ArrayHandle< T, S > &values, const vtkm::cont::ColorTable &table, vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &rgbaOut)
 Interpolate each value through the color table to generate RGBA colors. More...
 
template<typename T , int N, typename S >
bool ColorTableMapMagnitude (const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &values, const vtkm::cont::ColorTable &table, vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &rgbaOut)
 Use magnitude of a vector to generate RGBA colors. More...
 
template<typename T , int N, typename S >
bool ColorTableMapComponent (const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &values, vtkm::IdComponent comp, const vtkm::cont::ColorTable &table, vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &rgbaOut)
 Use a single component of a vector to generate RGBA colors. More...
 
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 VTKM_CONT std::string & GlobalGhostCellFieldName () noexcept
 
VTKM_CONT_EXPORT const VTKM_CONT std::string & GetGlobalGhostCellFieldName () noexcept
 
VTKM_CONT_EXPORT VTKM_CONT void SetGlobalGhostCellFieldName (const std::string &name) noexcept
 
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...
 
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 >
vtkm::cont::Field make_Field (std::string name, Field::Association association, const T *data, vtkm::Id size, vtkm::CopyFlag copy)
 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)
 
template<typename T >
vtkm::cont::Field make_FieldMove (std::string name, Field::Association association, std::vector< T > &&data)
 
template<typename T >
vtkm::cont::Field make_Field (std::string name, Field::Association association, std::vector< T > &&data, vtkm::CopyFlag vtkmNotUsed(copy))
 
template<typename T >
vtkm::cont::Field make_Field (std::string name, Field::Association association, std::initializer_list< T > &&data)
 
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::UnknownArrayHandle &data)
 Convenience function to build point fields from vtkm::cont::UnknownArrayHandle. 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::UnknownArrayHandle &data)
 Convenience function to build cell fields from vtkm::cont::UnknownArrayHandle. 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...
 
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...
 
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...
 
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...
 
InitializeOptions operator| (const InitializeOptions &lhs, const InitializeOptions &rhs)
 
InitializeOptions operator& (const InitializeOptions &lhs, const InitializeOptions &rhs)
 
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 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)
 
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)
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::DataSet MergePartitionedDataSet (const vtkm::cont::PartitionedDataSet &partitionedDataSet)
 Functions to compute bounds for a single dataSset or partition dataset. More...
 
template<typename ParticleType >
VTKM_ALWAYS_EXPORT void ParticleArrayCopy (const vtkm::cont::ArrayHandle< ParticleType, vtkm::cont::StorageTagBasic > &inP, vtkm::cont::ArrayHandle< vtkm::Vec3f, vtkm::cont::StorageTagBasic > &outPos, bool CopyTerminatedOnly=false)
 Copy fields in vtkm::Particle to standard types. More...
 
template<typename ParticleType >
VTKM_ALWAYS_EXPORT void ParticleArrayCopy (const std::vector< vtkm::cont::ArrayHandle< ParticleType, vtkm::cont::StorageTagBasic >> &inputs, vtkm::cont::ArrayHandle< vtkm::Vec3f, vtkm::cont::StorageTagBasic > &outPos)
 Copy fields in vtkm::Particle to standard types. More...
 
template<typename ParticleType >
VTKM_ALWAYS_EXPORT void ParticleArrayCopy (const vtkm::cont::ArrayHandle< ParticleType, vtkm::cont::StorageTagBasic > &inP, vtkm::cont::ArrayHandle< vtkm::Vec3f, vtkm::cont::StorageTagBasic > &outPos, vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagBasic > &outID, vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagBasic > &outSteps, vtkm::cont::ArrayHandle< vtkm::ParticleStatus, vtkm::cont::StorageTagBasic > &outStatus, vtkm::cont::ArrayHandle< vtkm::FloatDefault, vtkm::cont::StorageTagBasic > &outTime)
 Copy all fields in vtkm::Particle to standard types. More...
 
VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::RuntimeDeviceTrackerGetRuntimeDeviceTracker ()
 Get the RuntimeDeviceTracker for the current thread. More...
 
VTKM_CONT bool operator== (const vtkm::cont::Token &token, vtkm::cont::Token::Reference ref)
 
VTKM_CONT bool operator!= (const vtkm::cont::Token &token, vtkm::cont::Token::Reference ref)
 
VTKM_CONT bool operator== (vtkm::cont::Token::Reference ref, const vtkm::cont::Token &token)
 
VTKM_CONT bool operator!= (vtkm::cont::Token::Reference ref, const vtkm::cont::Token &token)
 
template<typename ArrayHandleType >
VTKM_CONT bool IsType (const vtkm::cont::UnknownArrayHandle &array)
 Returns true if variant matches the type of ArrayHandleType. More...
 
template<typename ArrayHandleType >
VTKM_CONT ArrayHandleType Cast (const vtkm::cont::UnknownArrayHandle &array)
 Returns variant cast to the given ArrayHandle type. More...
 
template<typename CellSetType >
VTKM_CONT bool IsType (const vtkm::cont::UnknownCellSet &unknownCellSet)
 Returns true if unknownCellSet matches the type of CellSetType. More...
 
template<typename CellSetType >
VTKM_CONT CellSetType Cast (const vtkm::cont::UnknownCellSet &unknownCellSet)
 Returns unknownCellSet cast to the given CellSet type. 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

◆ ArrayHandleMultiplexerFromList

Converts avtkm::List to an ArrayHandleMultiplexer

The argument of this template must be a vtkm::List 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.

◆ CellLocatorChooser

template<typename CellSetType , typename CoordinateSystemArrayType >
using vtkm::cont::CellLocatorChooser = typedef typename detail::CellLocatorChooserImpl<CellSetType, CoordinateSystemArrayType>::type

A template to select an appropriate CellLocator based on CellSet type.

Given a concrete type for a CellSet subclass and a type of ArrayHandle for the coordinate system, CellLocatorChooser picks an appropriate CellLocator for that type of grid. It is a convenient class to use when you can resolve your templates to discover the type of data set being used for location.

◆ CellSetListCommon

◆ CellSetListExplicit

template<typename ShapesStorageTag = VTKM_DEFAULT_SHAPES_STORAGE_TAG, typename ConnectivityStorageTag = VTKM_DEFAULT_CONNECTIVITY_STORAGE_TAG, typename OffsetsStorageTag = VTKM_DEFAULT_OFFSETS_STORAGE_TAG>
using vtkm::cont::CellSetListExplicit = typedef vtkm::List< vtkm::cont::CellSetExplicit<ShapesStorageTag, ConnectivityStorageTag, OffsetsStorageTag> >

◆ CellSetListExplicitDefault

◆ CellSetListStructured

◆ CellSetListStructured1D

◆ CellSetListStructured2D

◆ CellSetListStructured3D

◆ CellSetListUnstructured

◆ DeviceAdapterListCommon

using vtkm::cont::DeviceAdapterListCommon = typedef vtkm::List<vtkm::cont::DeviceAdapterTagCuda, vtkm::cont::DeviceAdapterTagTBB, vtkm::cont::DeviceAdapterTagOpenMP, vtkm::cont::DeviceAdapterTagKokkos, vtkm::cont::DeviceAdapterTagSerial>

◆ DeviceAdapterNameType

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

◆ StorageListBasic

◆ StorageListCommon

Enumeration Type Documentation

◆ InitializeOptions

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 –vtkm-device=Any.

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

AddHelp 

Add a help argument.

If -h or –vtkm-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.

◆ LogLevel

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.

◆ RuntimeDeviceTrackerMode

Enumerator
Force 
Enable 
Disable 

Function Documentation

◆ ArrayCopy() [1/3]

template<typename SourceArrayType , typename DestArrayType >
void vtkm::cont::ArrayCopy ( const SourceArrayType &  source,
DestArrayType &  destination 
)
inline

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.

This version of array copy uses a precompiled version of copy that is efficient for most standard memory layouts. However, there are some types of fancy ArrayHandle that cannot be handled directly, and the fallback for these arrays can be slow. If you see a warning in the log about an inefficient memory copy when extracting a component, pay heed and look for a different way to copy the data (perhaps using ArrayCopyDevice).

◆ ArrayCopy() [2/3]

template<typename SourceArrayType >
void vtkm::cont::ArrayCopy ( const SourceArrayType &  source,
vtkm::cont::UnknownArrayHandle destination 
)
inline

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.

This version of array copy uses a precompiled version of copy that is efficient for most standard memory layouts. However, there are some types of fancy ArrayHandle that cannot be handled directly, and the fallback for these arrays can be slow. If you see a warning in the log about an inefficient memory copy when extracting a component, pay heed and look for a different way to copy the data (perhaps using ArrayCopyDevice).

◆ ArrayCopy() [3/3]

template<typename T , typename S >
void vtkm::cont::ArrayCopy ( const vtkm::cont::UnknownArrayHandle ,
const vtkm::cont::ArrayHandle< T, S > &   
)

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.

This version of array copy uses a precompiled version of copy that is efficient for most standard memory layouts. However, there are some types of fancy ArrayHandle that cannot be handled directly, and the fallback for these arrays can be slow. If you see a warning in the log about an inefficient memory copy when extracting a component, pay heed and look for a different way to copy the data (perhaps using ArrayCopyDevice).

◆ ArrayCopyDevice()

template<typename InValueType , typename InStorage , typename OutValueType , typename OutStorage >
VTKM_CONT void vtkm::cont::ArrayCopyDevice ( 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.

This version of array copy is templated to create custom code for the particular types of ArrayHandles that you are copying. This will ensure that you get the best possible copy, but requires a device compiler and tends to bloat the code.

◆ ArrayCopyShallowIfPossible()

template<typename T , typename S >
VTKM_CONT void vtkm::cont::ArrayCopyShallowIfPossible ( const vtkm::cont::UnknownArrayHandle  source,
vtkm::cont::ArrayHandle< T, S > &  destination 
)

Copies from an unknown to a known array type.

Often times you have an array of an unknown type (likely from a data set), and you need it to be of a particular type (or can make a reasonable but uncertain assumption about it being a particular type). You really just want a shallow copy (a reference in a concrete ArrayHandle) if that is possible.

ArrayCopyShallowIfPossible pulls an array of a specific type from an UnknownArrayHandle. If the type is compatible, it will perform a shallow copy. If it is not possible, a deep copy is performed to get it to the correct type.

◆ ArrayExtractComponent()

template<typename T , typename S >
vtkm::cont::ArrayHandleStride<typename vtkm::internal::SafeVecTraits<T>::BaseComponentType> vtkm::cont::ArrayExtractComponent ( const vtkm::cont::ArrayHandle< T, S > &  src,
vtkm::IdComponent  componentIndex,
vtkm::CopyFlag  allowCopy = vtkm::CopyFlag::On 
)

Pulls a component out of an ArrayHandle.

Given an ArrayHandle of any type, ArrayExtractComponent returns an ArrayHandleStride of the base component type that contains the data for the specified array component. This function can be used to apply an operation on an ArrayHandle one component at a time. Because the array type is always ArrayHandleStride, you can drastically cut down on the number of templates to instantiate (at a possible cost to performance).

Note that ArrayExtractComponent will flatten out the indices of any vec value type and return an ArrayExtractComponent of the base component type. For example, if you call ArrayExtractComponent on an ArrayHandle with a value type of vtkm::Vec<vtkm::Vec<vtkm::Float32, 2>, 3>, you will get an ArrayExtractComponent<vtkm::Float32> returned. The componentIndex provided will be applied to the nested vector in depth first order. So in the previous example, a componentIndex of 0 gets the values at [0][0], componentIndex of 1 gets [0][1], componentIndex of 2 gets [1][0], and so on.

Some ArrayHandles allow this method to return an ArrayHandleStride that shares the same memory as the the original ArrayHandle. This form will be used if possible. In this case, if data are written into the ArrayHandleStride, they are also written into the original ArrayHandle. However, other forms will require copies into a new array. In this case, writes into ArrayHandleStride will not affect the original ArrayHandle.

For some operations, such as writing into an output array, this behavior of shared arrays is necessary. For this case, the optional argument allowCopy can be set to vtkm::CopyFlag::Off to prevent the copying behavior into the return ArrayHandleStride. If this is the case, an ErrorBadValue is thrown. If the arrays can be shared, they always will be regardless of the value of allowCopy.

Many forms of ArrayHandle have optimized versions to pull out a component. Some, however, do not. In these cases, a fallback array copy, done in serial, will be performed. A warning will be logged to alert users of this likely performance bottleneck.

As an implementation note, this function should not be overloaded directly. Instead, ArrayHandle implementations should provide a specialization of vtkm::cont::internal::ArrayExtractComponentImpl.

◆ ArrayGetValue() [1/2]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValue() [2/2]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [1/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [2/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [3/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [4/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [5/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [6/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [7/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [8/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [9/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [10/13]

template<typename SIds , typename TIn , typename SData , typename TOut , typename SOut >
VTKM_CONT void vtkm::cont::ArrayGetValues ( const vtkm::cont::ArrayHandle< vtkm::Id, SIds > &  ids,
const vtkm::cont::ArrayHandle< TOut, vtkm::cont::StorageTagCast< TIn, SData >> &  data,
vtkm::cont::ArrayHandle< TOut, SOut > &  output 
)

We need a specialization for ArrayHandleCasts to avoid runtime type missmatch errors inside ArrayGetValuesImpl.

◆ ArrayGetValues() [11/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [12/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayGetValues() [13/13]

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::WritePortal() and ArrayHandle::ReadPortal()).

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);

◆ ArrayPortalToIteratorBegin()

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.

◆ ArrayPortalToIteratorEnd()

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.

◆ ArrayRangeCompute() [1/7]

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

◆ ArrayRangeCompute() [2/7]

template<typename T >
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeCompute ( const vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagConstant > &  input,
vtkm::cont::DeviceAdapterId   vtkmNotUseddevice = vtkm::cont::DeviceAdapterTagAny{} 
)
inline

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.

Note that the ArrayRangeCompute.h header file contains only precompiled overloads of ArrayRangeCompute. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. If you need to compute array ranges for arbitrary ArrayHandles not in this precompiled list, you need to include ArrayRangeComputeTemplate.h. This contains a templated version of ArrayRangeCompute that will compile for any ArrayHandle type not already handled.

◆ ArrayRangeCompute() [3/7]

template<typename T >
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeCompute ( const vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagCounting > &  input,
vtkm::cont::DeviceAdapterId   vtkmNotUseddevice = vtkm::cont::DeviceAdapterTagAny{} 
)
inline

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.

Note that the ArrayRangeCompute.h header file contains only precompiled overloads of ArrayRangeCompute. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. If you need to compute array ranges for arbitrary ArrayHandles not in this precompiled list, you need to include ArrayRangeComputeTemplate.h. This contains a templated version of ArrayRangeCompute that will compile for any ArrayHandle type not already handled.

◆ ArrayRangeCompute() [4/7]

VTKM_CONT_EXPORT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeCompute ( const vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagIndex > &  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.

Note that the ArrayRangeCompute.h header file contains only precompiled overloads of ArrayRangeCompute. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. If you need to compute array ranges for arbitrary ArrayHandles not in this precompiled list, you need to include ArrayRangeComputeTemplate.h. This contains a templated version of ArrayRangeCompute that will compile for any ArrayHandle type not already handled.

◆ ArrayRangeCompute() [5/7]

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() 
)

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.

Note that the ArrayRangeCompute.h header file contains only precompiled overloads of ArrayRangeCompute. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. If you need to compute array ranges for arbitrary ArrayHandles not in this precompiled list, you need to include ArrayRangeComputeTemplate.h. This contains a templated version of ArrayRangeCompute that will compile for any ArrayHandle type not already handled.

◆ ArrayRangeCompute() [6/7]

template<typename T , typename ST1 , typename ST2 , typename ST3 >
VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeCompute ( const vtkm::cont::ArrayHandle< vtkm::Vec< T, 3 >, vtkm::cont::StorageTagCartesianProduct< ST1, ST2, ST3 >> &  input_,
vtkm::cont::DeviceAdapterId  device = vtkm::cont::DeviceAdapterTagAny() 
)
inline

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.

Note that the ArrayRangeCompute.h header file contains only precompiled overloads of ArrayRangeCompute. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. If you need to compute array ranges for arbitrary ArrayHandles not in this precompiled list, you need to include ArrayRangeComputeTemplate.h. This contains a templated version of ArrayRangeCompute that will compile for any ArrayHandle type not already handled.

◆ ArrayRangeCompute() [7/7]

VTKM_CONT_EXPORT vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeCompute ( const vtkm::cont::UnknownArrayHandle array,
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.

Note that the ArrayRangeCompute.h header file contains only precompiled overloads of ArrayRangeCompute. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. If you need to compute array ranges for arbitrary ArrayHandles not in this precompiled list, you need to include ArrayRangeComputeTemplate.h. This contains a templated version of ArrayRangeCompute that will compile for any ArrayHandle type not already handled.

◆ BoundsCompute() [1/4]

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

◆ BoundsCompute() [2/4]

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.

◆ BoundsCompute() [3/4]

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

◆ BoundsCompute() [4/4]

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

◆ BoundsGlobalCompute() [1/4]

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

◆ BoundsGlobalCompute() [2/4]

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.

◆ BoundsGlobalCompute() [3/4]

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

◆ BoundsGlobalCompute() [4/4]

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

◆ Cast() [1/2]

template<typename ArrayHandleType >
VTKM_CONT ArrayHandleType vtkm::cont::Cast ( const vtkm::cont::UnknownArrayHandle array)
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.

◆ Cast() [2/2]

template<typename CellSetType >
VTKM_CONT CellSetType vtkm::cont::Cast ( const vtkm::cont::UnknownCellSet unknownCellSet)
inline

Returns unknownCellSet cast to the given CellSet type.

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

◆ CastAndCall() [1/11]

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.

◆ CastAndCall() [2/11]

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).

◆ CastAndCall() [3/11]

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

A specialization of CastAndCall for UnknownArrayHandle.

Since we have no hints on the types, use VTKM_DEFAULT_TYPE_LIST and VTKM_DEFAULT_STORAGE_LIST.

◆ CastAndCall() [4/11]

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

◆ CastAndCall() [5/11]

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

◆ CastAndCall() [6/11]

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

◆ CastAndCall() [7/11]

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

◆ CastAndCall() [8/11]

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

◆ CastAndCall() [9/11]

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

◆ CastAndCall() [10/11]

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.

◆ CastAndCall() [11/11]

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

A specialization of CastAndCall for unknown cell sets.

A specialization of CastAndCall for UnknownCellSet.

Since we have no hints on the types, use VTKM_DEFAULT_CELL_SET_LIST.

◆ CastAndCallCellLocatorChooser() [1/2]

template<typename CellSetType , typename Functor , typename... Args>
VTKM_CONT void vtkm::cont::CastAndCallCellLocatorChooser ( const CellSetType &  cellSet,
const vtkm::cont::CoordinateSystem coordinateSystem,
Functor &&  functor,
Args &&...  args 
)

Calls a functor with the appropriate type of CellLocator.

Given a cell set and a coordinate system of unknown types, calls a functor with an appropriate CellLocator of the given type. The CellLocator is populated with the provided cell set and coordinate system.

Any additional args are passed to the functor.

◆ CastAndCallCellLocatorChooser() [2/2]

template<typename Functor , typename... Args>
VTKM_CONT void vtkm::cont::CastAndCallCellLocatorChooser ( const vtkm::cont::DataSet dataSet,
Functor &&  functor,
Args &&...  args 
)

Calls a functor with the appropriate type of CellLocator.

Given a DataSet, calls a functor with an appropriate CellLocator of the given type. The CellLocator is populated with the provided cell set and coordinate system.

Any additional args are passed to the functor.

◆ ColorTableMap() [1/3]

template<typename T , typename S >
bool vtkm::cont::ColorTableMap ( const vtkm::cont::ArrayHandle< T, S > &  values,
const vtkm::cont::ColorTable table,
vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &  rgbaOut 
)

Interpolate each value through the color table to generate RGBA colors.

Interpolate each value through the color table to generate RGB colors.

Each value in values will be sampled through the entire color table to determine a color.

Note: This is more costly than using Sample/Map with the generated intermediate lookup table

◆ ColorTableMap() [2/3]

template<typename T , typename S >
bool vtkm::cont::ColorTableMap ( const vtkm::cont::ArrayHandle< T, S > &  values,
const vtkm::cont::ColorTableSamplesRGB samples,
vtkm::cont::ArrayHandle< vtkm::Vec3ui_8 > &  rgbOut 
)

Sample each value through an intermediate lookup/sample table to generate RGB colors.

Each value in values is binned based on its value in relationship to the range of the color table and will use the color value at that bin from the samples. To generate the lookup table use Sample .

Here is a simple example.

vtkm::cont::ColorTable table("black-body radiation");
table.Sample(256, samples);
vtkm::cont::ColorTableMap(input, samples, colors);

◆ ColorTableMap() [3/3]

template<typename T , typename S >
bool vtkm::cont::ColorTableMap ( const vtkm::cont::ArrayHandle< T, S > &  values,
const vtkm::cont::ColorTableSamplesRGBA samples,
vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &  rgbaOut 
)

Sample each value through an intermediate lookup/sample table to generate RGBA colors.

Each value in values is binned based on its value in relationship to the range of the color table and will use the color value at that bin from the samples. To generate the lookup table use Sample .

Here is a simple example.

vtkm::cont::ColorTable table("black-body radiation");
table.Sample(256, samples);
vtkm::cont::ColorTableMap(input, samples, colors);

◆ ColorTableMapComponent() [1/3]

template<typename T , int N, typename S >
bool vtkm::cont::ColorTableMapComponent ( const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &  values,
vtkm::IdComponent  comp,
const vtkm::cont::ColorTable table,
vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &  rgbaOut 
)

Use a single component of a vector to generate RGBA colors.

Use a single component of a vector to generate RGB colors.

◆ ColorTableMapComponent() [2/3]

template<typename T , int N, typename S >
bool vtkm::cont::ColorTableMapComponent ( const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &  values,
vtkm::IdComponent  comp,
const vtkm::cont::ColorTableSamplesRGB samples,
vtkm::cont::ArrayHandle< vtkm::Vec3ui_8 > &  rgbOut 
)

Use a single component of a vector with a sample table to generate RGB colors.

◆ ColorTableMapComponent() [3/3]

template<typename T , int N, typename S >
bool vtkm::cont::ColorTableMapComponent ( const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &  values,
vtkm::IdComponent  comp,
const vtkm::cont::ColorTableSamplesRGBA samples,
vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &  rgbaOut 
)

Use a single component of a vector with a sample table to generate RGBA colors.

◆ ColorTableMapMagnitude() [1/3]

template<typename T , int N, typename S >
bool vtkm::cont::ColorTableMapMagnitude ( const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &  values,
const vtkm::cont::ColorTable table,
vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &  rgbaOut 
)

Use magnitude of a vector to generate RGBA colors.

Use magnitude of a vector to generate RGB colors.

◆ ColorTableMapMagnitude() [2/3]

template<typename T , int N, typename S >
bool vtkm::cont::ColorTableMapMagnitude ( const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &  values,
const vtkm::cont::ColorTableSamplesRGB samples,
vtkm::cont::ArrayHandle< vtkm::Vec3ui_8 > &  rgbOut 
)

Use magnitude of a vector with a sample table to generate RGB colors.

◆ ColorTableMapMagnitude() [3/3]

template<typename T , int N, typename S >
bool vtkm::cont::ColorTableMapMagnitude ( const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &  values,
const vtkm::cont::ColorTableSamplesRGBA samples,
vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &  rgbaOut 
)

Use magnitude of a vector with a sample table to generate RGBA colors.

◆ ConditionalCastAndCall() [1/2]

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

No-op variant since the condition is false.

◆ ConditionalCastAndCall() [2/2]

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

CastAndCall if the condition is true.

◆ ConvertNumComponentsToOffsets() [1/4]

VTKM_CONT_EXPORT void vtkm::cont::ConvertNumComponentsToOffsets ( const vtkm::cont::UnknownArrayHandle numComponentsArray,
vtkm::cont::ArrayHandle< vtkm::Id > &  offsetsArray,
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.
componentsArraySize(optional) a reference to a vtkm::Id and is filled with the expected size of the component values array.
device(optional) specifies the device on which to run the conversion.

Note that this function is pre-compiled for some set of ArrayHandle types. If you get a warning about an inefficient conversion (or the operation fails outright), you might need to use vtkm::cont::internal::ConvertNumComponentsToOffsetsTemplate.

◆ ConvertNumComponentsToOffsets() [2/4]

VTKM_CONT_EXPORT void vtkm::cont::ConvertNumComponentsToOffsets ( const vtkm::cont::UnknownArrayHandle numComponentsArray,
vtkm::cont::ArrayHandle< vtkm::Id > &  offsetsArray,
vtkm::Id componentsArraySize,
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.
componentsArraySize(optional) a reference to a vtkm::Id and is filled with the expected size of the component values array.
device(optional) specifies the device on which to run the conversion.

Note that this function is pre-compiled for some set of ArrayHandle types. If you get a warning about an inefficient conversion (or the operation fails outright), you might need to use vtkm::cont::internal::ConvertNumComponentsToOffsetsTemplate.

◆ ConvertNumComponentsToOffsets() [3/4]

VTKM_CONT_EXPORT vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::ConvertNumComponentsToOffsets ( const vtkm::cont::UnknownArrayHandle numComponentsArray,
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.
componentsArraySize(optional) a reference to a vtkm::Id and is filled with the expected size of the component values array.
device(optional) specifies the device on which to run the conversion.

Note that this function is pre-compiled for some set of ArrayHandle types. If you get a warning about an inefficient conversion (or the operation fails outright), you might need to use vtkm::cont::internal::ConvertNumComponentsToOffsetsTemplate.

◆ ConvertNumComponentsToOffsets() [4/4]

VTKM_CONT_EXPORT vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::ConvertNumComponentsToOffsets ( const vtkm::cont::UnknownArrayHandle numComponentsArray,
vtkm::Id componentsArraySize,
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.
componentsArraySize(optional) a reference to a vtkm::Id and is filled with the expected size of the component values array.
device(optional) specifies the device on which to run the conversion.

Note that this function is pre-compiled for some set of ArrayHandle types. If you get a warning about an inefficient conversion (or the operation fails outright), you might need to use vtkm::cont::internal::ConvertNumComponentsToOffsetsTemplate.

◆ FieldRangeCompute() [1/2]

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.

◆ FieldRangeCompute() [2/2]

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.

◆ FieldRangeGlobalCompute() [1/2]

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.

◆ FieldRangeGlobalCompute() [2/2]

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.

◆ GetGlobalGhostCellFieldName()

VTKM_CONT_EXPORT const VTKM_CONT std::string& vtkm::cont::GetGlobalGhostCellFieldName ( )
noexcept

◆ GetHumanReadableSize() [1/2]

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

◆ GetHumanReadableSize() [2/2]

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.

◆ GetLogErrorContext()

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

◆ GetLogLevelName()

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.

◆ GetLogThreadName()

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

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

◆ GetRuntimeDeviceTracker()

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.

◆ GetSizeString() [1/2]

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

◆ GetSizeString() [2/2]

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.

◆ GetStackTrace()

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).

◆ GetStderrLogLevel()

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

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

◆ GlobalGhostCellFieldName()

VTKM_CONT_EXPORT VTKM_CONT std::string& vtkm::cont::GlobalGhostCellFieldName ( )
noexcept

◆ Initialize() [1/2]

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 –vtkm-log-level.
  • Forces usage of the device name passed to –vtkm-device.
  • Prints usage when -h or –vtkm-help is passed.

The parameterless version only sets up log level names.

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

Results are available in the returned InitializeResult.

Note
This method may call exit() on parse error.

◆ Initialize() [2/2]

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 –vtkm-log-level.
  • Forces usage of the device name passed to –vtkm-device.
  • Prints usage when -h or –vtkm-help is passed.

The parameterless version only sets up log level names.

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

Results are available in the returned InitializeResult.

Note
This method may call exit() on parse error.

◆ InitLogging() [1/2]

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 "--vtkm-log-level [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 "--vtkm-log-level [LogLevel]" argument and shrink the arg list.

If the parameterless overload is used, the --vtkm-log-level 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).

◆ InitLogging() [2/2]

VTKM_CONT_EXPORT VTKM_CONT void vtkm::cont::InitLogging ( int &  argc,
char *  argv[],
const std::string &  loggingFlag = "--vtkm-log-level" 
)

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 "--vtkm-log-level [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 "--vtkm-log-level [LogLevel]" argument and shrink the arg list.

If the parameterless overload is used, the --vtkm-log-level 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).

◆ IsType() [1/2]

template<typename ArrayHandleType >
VTKM_CONT bool vtkm::cont::IsType ( const vtkm::cont::UnknownArrayHandle array)
inline

Returns true if variant matches the type of ArrayHandleType.

◆ IsType() [2/2]

template<typename CellSetType >
VTKM_CONT bool vtkm::cont::IsType ( const vtkm::cont::UnknownCellSet unknownCellSet)
inline

Returns true if unknownCellSet matches the type of CellSetType.

◆ make_ArrayHandle() [1/4]

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

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

◆ make_ArrayHandle() [2/4]

template<typename T >
VTKM_CONT vtkm::cont::ArrayHandleBasic<T> vtkm::cont::make_ArrayHandle ( const T *  array,
vtkm::Id  numberOfValues,
vtkm::CopyFlag  copy 
)

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

◆ make_ArrayHandle() [3/4]

template<typename T >
VTKM_CONT vtkm::cont::ArrayHandleBasic<T> vtkm::cont::make_ArrayHandle ( std::initializer_list< T > &&  values)

Create an ArrayHandle directly from an initializer list of values.

◆ make_ArrayHandle() [4/4]

template<typename T , typename Allocator >
VTKM_CONT vtkm::cont::ArrayHandleBasic<T> vtkm::cont::make_ArrayHandle ( std::vector< T, Allocator > &&  array,
vtkm::CopyFlag   vtkmNotUsedcopy 
)

◆ make_ArrayHandleBitField() [1/2]

VTKM_CONT vtkm::cont::ArrayHandleBitField vtkm::cont::make_ArrayHandleBitField ( const vtkm::cont::BitField bitField)
inline

◆ make_ArrayHandleBitField() [2/2]

VTKM_CONT vtkm::cont::ArrayHandleBitField vtkm::cont::make_ArrayHandleBitField ( vtkm::cont::BitField &&  bitField)
inlinenoexcept

◆ make_ArrayHandleCartesianProduct()

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.

◆ make_ArrayHandleCast()

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.

◆ make_ArrayHandleCompositeVector()

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

Create a composite vector array from other arrays.

◆ make_ArrayHandleConcatenate()

template<typename ArrayHandleType1 , typename ArrayHandleType2 >
VTKM_CONT ArrayHandleConcatenate<ArrayHandleType1, ArrayHandleType2> vtkm::cont::make_ArrayHandleConcatenate ( const ArrayHandleType1 &  array1,
const ArrayHandleType2 &  array2 
)

◆ make_ArrayHandleConstant()

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.

◆ make_ArrayHandleCounting()

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.

◆ make_ArrayHandleDecorator()

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.

◆ make_ArrayHandleExtractComponent()

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.

◆ make_ArrayHandleGroupVec()

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.

◆ make_ArrayHandleGroupVecVariable()

template<typename ComponentsArrayHandleType , typename OffsetsArrayHandleType >
VTKM_CONT vtkm::cont::ArrayHandleGroupVecVariable<ComponentsArrayHandleType, OffsetsArrayHandleType> vtkm::cont::make_ArrayHandleGroupVecVariable ( const ComponentsArrayHandleType &  componentsArray,
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.

◆ make_ArrayHandleImplicit()

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.

◆ make_ArrayHandleIndex()

VTKM_CONT vtkm::cont::ArrayHandleIndex vtkm::cont::make_ArrayHandleIndex ( vtkm::Id  length)
inline

A convenience function for creating an ArrayHandleIndex.

It takes the size of the array and generates an array holding vtkm::Id from [0, size - 1]

◆ make_ArrayHandleMove() [1/2]

template<typename T , typename Allocator >
VTKM_CONT vtkm::cont::ArrayHandleBasic<T> vtkm::cont::make_ArrayHandleMove ( std::vector< T, Allocator > &&  array)

Move an std::vector into an ArrayHandle.

◆ make_ArrayHandleMove() [2/2]

template<typename T >
VTKM_CONT vtkm::cont::ArrayHandleBasic<T> vtkm::cont::make_ArrayHandleMove ( T *&  array,
vtkm::Id  numberOfValues,
vtkm::cont::internal::BufferInfo::Deleter  deleter = internal::SimpleArrayDeleter<T>,
vtkm::cont::internal::BufferInfo::Reallocater  reallocater = internal::SimpleArrayReallocater<T> 
)

A convenience function to move a user-allocated array into an ArrayHandle.

The provided array pointer will be reset to nullptr. If the array was not allocated with the new[] operator, then deleter and reallocater functions must be provided.

◆ make_ArrayHandleOffsetsToNumComponents()

template<typename OffsetsStorageTag >
VTKM_CONT vtkm::cont::ArrayHandleOffsetsToNumComponents< vtkm::cont::ArrayHandle<vtkm::Id, OffsetsStorageTag> > vtkm::cont::make_ArrayHandleOffsetsToNumComponents ( const vtkm::cont::ArrayHandle< vtkm::Id, OffsetsStorageTag > &  array)

◆ make_ArrayHandlePermutation()

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.

◆ make_ArrayHandleReverse()

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

make_ArrayHandleReverse is convenience function to generate an ArrayHandleReverse.

◆ make_ArrayHandleSOA() [1/7]

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 
)

◆ make_ArrayHandleSOA() [2/7]

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 
)

◆ make_ArrayHandleSOA() [3/7]

template<typename ValueType >
VTKM_CONT ArrayHandleSOA<ValueType> vtkm::cont::make_ArrayHandleSOA ( std::initializer_list< std::vector< typename vtkm::VecTraits< ValueType >::ComponentType >> &&  componentVectors)

◆ make_ArrayHandleSOA() [4/7]

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)

◆ make_ArrayHandleSOA() [5/7]

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,
RemainingVectors &&...  componentVectors 
)

◆ make_ArrayHandleSOA() [6/7]

template<typename ComponentType , typename... RemainingVectors>
VTKM_CONT ArrayHandleSOA<vtkm::Vec<ComponentType, vtkm::IdComponent(sizeof...(RemainingVectors) + 1)> > vtkm::cont::make_ArrayHandleSOA ( vtkm::CopyFlag  copy,
std::vector< ComponentType > &&  vector0,
RemainingVectors &&...  componentVectors 
)

◆ make_ArrayHandleSOA() [7/7]

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 
)

◆ make_ArrayHandleSOAMove()

template<typename ComponentType , typename... RemainingVectors>
VTKM_CONT ArrayHandleSOA<vtkm::Vec<ComponentType, vtkm::IdComponent(sizeof...(RemainingVectors) + 1)> > vtkm::cont::make_ArrayHandleSOAMove ( std::vector< ComponentType > &&  vector0,
RemainingVectors &&...  componentVectors 
)

◆ make_ArrayHandleSwizzle() [1/2]

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 
)

◆ make_ArrayHandleSwizzle() [2/2]

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 
)

◆ make_ArrayHandleTransform() [1/2]

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.

◆ make_ArrayHandleTransform() [2/2]

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 
)

◆ make_ArrayHandleView()

template<typename ArrayHandleType >
ArrayHandleView<ArrayHandleType> vtkm::cont::make_ArrayHandleView ( const ArrayHandleType &  array,
vtkm::Id  startIndex,
vtkm::Id  numValues 
)

◆ make_ArrayHandleXGCCoordinates() [1/3]

template<typename T >
vtkm::cont::ArrayHandleXGCCoordinates<T> vtkm::cont::make_ArrayHandleXGCCoordinates ( const std::vector< T > &  array,
vtkm::Id  numberOfPlanesOwned,
bool  cylindrical,
vtkm::Id  numberOfPlanes = -1,
vtkm::Id  planeStartId = 0,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)

◆ make_ArrayHandleXGCCoordinates() [2/3]

template<typename T >
vtkm::cont::ArrayHandleXGCCoordinates<T> vtkm::cont::make_ArrayHandleXGCCoordinates ( const T *  array,
vtkm::Id  length,
vtkm::Id  numberOfPlanesOwned,
bool  cylindrical,
vtkm::Id  numberOfPlanes = -1,
vtkm::Id  planeStartId = 0,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)

◆ make_ArrayHandleXGCCoordinates() [3/3]

template<typename T >
vtkm::cont::ArrayHandleXGCCoordinates<T> vtkm::cont::make_ArrayHandleXGCCoordinates ( const vtkm::cont::ArrayHandle< T > &  arrHandle,
vtkm::Id  numberOfPlanesOwned,
bool  cylindrical,
vtkm::Id  numberOfPlanes = -1,
vtkm::Id  planeStartId = 0 
)

◆ make_ArrayHandleZip()

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.

◆ make_CellSetExtrude() [1/3]

template<typename T >
CellSetExtrude vtkm::cont::make_CellSetExtrude ( const std::vector< vtkm::Int32 > &  conn,
const vtkm::cont::ArrayHandleXGCCoordinates< T > &  coords,
const std::vector< vtkm::Int32 > &  nextNode,
bool  periodic = true 
)

◆ make_CellSetExtrude() [2/3]

template<typename T >
CellSetExtrude vtkm::cont::make_CellSetExtrude ( const vtkm::cont::ArrayHandle< vtkm::Int32 > &  conn,
const vtkm::cont::ArrayHandleXGCCoordinates< T > &  coords,
const vtkm::cont::ArrayHandle< vtkm::Int32 > &  nextNode,
bool  periodic = true 
)

◆ make_CellSetExtrude() [3/3]

template<typename T >
CellSetExtrude vtkm::cont::make_CellSetExtrude ( std::vector< vtkm::Int32 > &&  conn,
const vtkm::cont::ArrayHandleXGCCoordinates< T > &  coords,
std::vector< vtkm::Int32 > &&  nextNode,
bool  periodic = true 
)

◆ make_CellSetPermutation()

template<typename OriginalCellSet , typename PermutationArrayHandleType >
vtkm::cont::CellSetPermutation<OriginalCellSet, PermutationArrayHandleType> vtkm::cont::make_CellSetPermutation ( const PermutationArrayHandleType &  cellIndexMap,
const OriginalCellSet &  cellSet 
)

◆ make_CoordinateSystem() [1/2]

template<typename T >
vtkm::cont::CoordinateSystem vtkm::cont::make_CoordinateSystem ( std::string  name,
const std::vector< T > &  data,
vtkm::CopyFlag  copy = vtkm::CopyFlag::Off 
)

◆ make_CoordinateSystem() [2/2]

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 
)

◆ make_DeviceAdapterId() [1/2]

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'.

◆ make_DeviceAdapterId() [2/2]

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 DeviceAdapterTagKokkos == 5

◆ make_Field() [1/4]

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

◆ make_Field() [2/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 
)

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

◆ make_Field() [3/4]

template<typename T >
vtkm::cont::Field vtkm::cont::make_Field ( std::string  name,
Field::Association  association,
std::initializer_list< T > &&  data 
)

◆ make_Field() [4/4]

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

◆ make_FieldCell() [1/2]

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.

◆ make_FieldCell() [2/2]

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

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

◆ make_FieldMove()

template<typename T >
vtkm::cont::Field vtkm::cont::make_FieldMove ( std::string  name,
Field::Association  association,
std::vector< T > &&  data 
)

◆ make_FieldPoint() [1/2]

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.

◆ make_FieldPoint() [2/2]

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

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

◆ MergePartitionedDataSet()

VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::DataSet vtkm::cont::MergePartitionedDataSet ( const vtkm::cont::PartitionedDataSet partitionedDataSet)

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.

◆ operator!=() [1/2]

VTKM_CONT bool vtkm::cont::operator!= ( const vtkm::cont::Token token,
vtkm::cont::Token::Reference  ref 
)
inline

◆ operator!=() [2/2]

VTKM_CONT bool vtkm::cont::operator!= ( vtkm::cont::Token::Reference  ref,
const vtkm::cont::Token token 
)
inline

◆ operator&()

InitializeOptions vtkm::cont::operator& ( const InitializeOptions lhs,
const InitializeOptions rhs 
)
inline

◆ operator==() [1/2]

VTKM_CONT bool vtkm::cont::operator== ( const vtkm::cont::Token token,
vtkm::cont::Token::Reference  ref 
)
inline

◆ operator==() [2/2]

VTKM_CONT bool vtkm::cont::operator== ( vtkm::cont::Token::Reference  ref,
const vtkm::cont::Token token 
)
inline

◆ operator|()

InitializeOptions vtkm::cont::operator| ( const InitializeOptions lhs,
const InitializeOptions rhs 
)
inline

◆ ParticleArrayCopy() [1/3]

template<typename ParticleType >
VTKM_ALWAYS_EXPORT void vtkm::cont::ParticleArrayCopy ( const std::vector< vtkm::cont::ArrayHandle< ParticleType, vtkm::cont::StorageTagBasic >> &  inputs,
vtkm::cont::ArrayHandle< vtkm::Vec3f, vtkm::cont::StorageTagBasic > &  outPos 
)
inline

Copy fields in vtkm::Particle to standard types.

Given a std::vector of ArrayHandle of vtkm::Particle, this function copies the position field into an ArrayHandle of Vec3f objects.

◆ ParticleArrayCopy() [2/3]

template<typename ParticleType >
VTKM_ALWAYS_EXPORT void vtkm::cont::ParticleArrayCopy ( const vtkm::cont::ArrayHandle< ParticleType, vtkm::cont::StorageTagBasic > &  inP,
vtkm::cont::ArrayHandle< vtkm::Vec3f, vtkm::cont::StorageTagBasic > &  outPos,
bool  CopyTerminatedOnly = false 
)
inline

Copy fields in vtkm::Particle to standard types.

Given an ArrayHandle of vtkm::Particle, this function copies the position field into an ArrayHandle of Vec3f objects.

◆ ParticleArrayCopy() [3/3]

Copy all fields in vtkm::Particle to standard types.

Given an ArrayHandle of vtkm::Particle, this function copies the position, ID, number of steps, status and time into a separate ArrayHandle.

◆ printSummary_ArrayHandle()

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

◆ SetGlobalGhostCellFieldName()

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

◆ SetLogLevelName()

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.

◆ SetLogThreadName()

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

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

◆ SetStderrLogLevel() [1/2]

VTKM_CONT_EXPORT VTKM_CONT void vtkm::cont::SetStderrLogLevel ( const char *  verbosity)

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.

◆ SetStderrLogLevel() [2/2]

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.

◆ ThrowArrayRangeComputeFailed()

VTKM_CONT_EXPORT void vtkm::cont::ThrowArrayRangeComputeFailed ( )

◆ throwFailedDynamicCast()

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 UnknownArrayHandle or UncertainArrayhandle with an insufficient type list.

◆ throwFailedRuntimeDeviceTransfer()

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."

◆ TryExecute()

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 is used.

◆ TryExecuteOnDevice() [1/2]

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 is used.

◆ TryExecuteOnDevice() [2/2]

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 is used.

◆ TypeToString() [1/4]

template<typename T >
VTKM_CONT std::string vtkm::cont::TypeToString ( )
inline

Use RTTI information to retrieve the name of the type T.

If logging is enabled and the platform supports it, the type name will also be demangled.

◆ TypeToString() [2/4]

VTKM_CONT_EXPORT VTKM_CONT std::string vtkm::cont::TypeToString ( const std::type_index &  t)

Use RTTI information to retrieve the name of the type T.

If logging is enabled and the platform supports it, the type name will also be demangled.

◆ TypeToString() [3/4]

VTKM_CONT_EXPORT VTKM_CONT std::string vtkm::cont::TypeToString ( const std::type_info &  t)

Use RTTI information to retrieve the name of the type T.

If logging is enabled and the platform supports it, the type name will also be demangled.

◆ TypeToString() [4/4]

template<typename T >
VTKM_CONT std::string vtkm::cont::TypeToString ( const T &  )
inline

Use RTTI information to retrieve the name of the type T.

If logging is enabled and the platform supports it, the type name will also be demangled.

Variable Documentation

◆ CellSetStructured< 1 >

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

◆ CellSetStructured< 2 >

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

◆ CellSetStructured< 3 >

template class VTKM_CONT_TEMPLATE_EXPORT vtkm::cont::CellSetStructured< 3 >
vtkm::cont::ArrayHandle::GetNumberOfValues
VTKM_CONT vtkm::Id GetNumberOfValues() const
Returns the number of entries in the array.
Definition: ArrayHandle.h:448
vtkm::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:283
vtkm::cont::ColorTable
Color Table for coloring arbitrary fields.
Definition: cont/ColorTable.h:89
vtkm::cont::ArrayGetValues
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.
Definition: ArrayGetValues.h:119
vtkm::cont::ArrayGetValue
VTKM_CONT T ArrayGetValue(vtkm::Id id, const vtkm::cont::ArrayHandle< T, S > &data)
Obtain a small set of values from an ArrayHandle with minimal device transfers.
Definition: ArrayGetValues.h:264
vtkm::cont::TryExecuteOnDevice
VTKM_CONT bool TryExecuteOnDevice(vtkm::cont::DeviceAdapterId devId, Functor &&functor)
Try to execute a functor on a specific device selected at runtime.
Definition: TryExecute.h:178
vtkm::cont::ColorTableSamplesRGBA
Color Sample Table used with vtkm::cont::ColorTable for fast coloring.
Definition: ColorTableSamples.h:32
vtkm::cont::ColorTableMap
bool ColorTableMap(const vtkm::cont::ArrayHandle< T, S > &values, const vtkm::cont::ColorTableSamplesRGBA &samples, vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &rgbaOut)
Sample each value through an intermediate lookup/sample table to generate RGBA colors.
Definition: ColorTableMap.h:47
vtkm::cont::ColorTableSamplesRGB
Color Sample Table used with vtkm::cont::ColorTable for fast coloring.
Definition: ColorTableSamples.h:51
vtkm::List
Definition: List.h:34
vtkm::cont::TryExecute
VTKM_CONT bool TryExecute(Functor &&functor, Args &&... args)
Try to execute a functor on a set of devices until one succeeds.
Definition: TryExecute.h:244