VTK-m
2.2
|
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 |
Basic array storage for an array handle. More... | |
class | ArrayHandleBitField |
The ArrayHandleBitField class is a boolean-valued ArrayHandle that is backed by a BitField. More... | |
class | ArrayHandleCartesianProduct |
ArrayHandleCartesianProduct is a specialization of ArrayHandle. More... | |
class | ArrayHandleCast |
Cast the values of an array to the specified type, on demand. More... | |
class | ArrayHandleCompositeVector |
An ArrayHandle that combines components from other arrays. More... | |
class | ArrayHandleConcatenate |
class | ArrayHandleConstant |
An array handle with a constant value. More... | |
class | ArrayHandleCounting |
ArrayHandleCounting is a specialization of ArrayHandle. More... | |
class | ArrayHandleDecorator |
A fancy ArrayHandle that can be used to modify the results from one or more source ArrayHandle. More... | |
class | ArrayHandleDiscard |
ArrayHandleDiscard is a write-only array that discards all data written to it. More... | |
class | ArrayHandleExtractComponent |
A fancy ArrayHandle that turns a vector array into a scalar array by slicing out a single component of each vector. More... | |
class | 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 |
An ArrayHandle that provides a source of random numbers with a standard normal distribution. More... | |
class | ArrayHandleRandomUniformBits |
An ArrayHandle that provides a source of random bits. More... | |
class | ArrayHandleRandomUniformReal |
An ArrayHandle that provides a source of random numbers with uniform distribution. More... | |
class | ArrayHandleRecombineVec |
A grouping of ArrayHandleStride s into an ArrayHandle of vtkm::Vec s. More... | |
class | ArrayHandleReverse |
Reverse the order of an array, on demand. More... | |
class | ArrayHandleRuntimeVec |
Fancy array handle for a basic array with runtime selected vec size. 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 |
Provided a windowed view into a vtkm::cont::ArrayHandle . More... | |
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 | CellLocatorBase |
Base class for all CellLocator classes. More... | |
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 |
Defines the topological structure of the data in a DataSet . More... | |
class | CellSetExplicit |
Defines an irregular collection of cells. More... | |
class | CellSetExtrude |
Defines a 3-dimensional extruded mesh representation. More... | |
class | CellSetPermutation |
Rearranges the cells of one cell set to create another cell set. More... | |
class | CellSetPermutation< CellSetPermutation< CellSetType, PermutationArrayHandleType1 >, PermutationArrayHandleType2 > |
class | CellSetSingleType |
An explicit cell set with all cells of the same shape. More... | |
class | CellSetStructured |
Defines a 1-, 2-, or 3-dimensional structured grid of points. More... | |
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 |
Manages a coordinate system for a DataSet . More... | |
class | DataSet |
Contains and manages the geometric data structures that VTK-m operates on. More... | |
class | DataSetBuilderCurvilinear |
class | DataSetBuilderExplicit |
class | DataSetBuilderExplicitIterative |
Helper class to build a DataSet by iteratively adding points and cells. More... | |
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 |
An object used to specify a device. More... | |
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... | |
struct | DeviceAdapterTagAny |
Tag for a device adapter used to specify that any device may be used for an operation. More... | |
struct | DeviceAdapterTagCuda |
Tag for a device adapter that uses a CUDA capable GPU device. More... | |
struct | DeviceAdapterTagKokkos |
Tag for a device adapter that uses the Kokkos library to run algorithms in parallel. More... | |
struct | DeviceAdapterTagOpenMP |
Tag for a device adapter that uses OpenMP compiler extensions to run algorithms on multiple threads. More... | |
struct | DeviceAdapterTagSerial |
Tag for a device adapter that performs all computation on the same single thread as the control environment. More... | |
struct | DeviceAdapterTagTBB |
Tag for a device adapter that uses the Intel Threading Building Blocks library to run algorithms on multiple threads. More... | |
struct | DeviceAdapterTagUndefined |
Tag for a device adapter used to avoid specifying a device. 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 |
struct | DeviceAdapterTraits< vtkm::cont::DeviceAdapterTagAny > |
struct | DeviceAdapterTraits< vtkm::cont::DeviceAdapterTagCuda > |
struct | DeviceAdapterTraits< vtkm::cont::DeviceAdapterTagKokkos > |
struct | DeviceAdapterTraits< vtkm::cont::DeviceAdapterTagOpenMP > |
struct | DeviceAdapterTraits< vtkm::cont::DeviceAdapterTagSerial > |
struct | DeviceAdapterTraits< vtkm::cont::DeviceAdapterTagTBB > |
struct | DeviceAdapterTraits< vtkm::cont::DeviceAdapterTagUndefined > |
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 > > |
struct | LogCondStream |
Conditionally logs a message with a stream-like interface. More... | |
class | PartitionedDataSet |
Comprises a set of vtkm::cont::DataSet objects. More... | |
class | PointLocatorBase |
Base class for all PointLocator classes. More... | |
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... | |
class | ScopedRuntimeDeviceTracker |
A class to create a scoped runtime device tracker object. More... | |
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 | StorageTagRuntimeVec |
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... | |
Functions | |
template<typename SourceArrayType , typename DestArrayType > | |
void | ArrayCopy (const SourceArrayType &source, DestArrayType &destination) |
Does a deep copy from one array to another array. More... | |
template<typename SourceArrayType > | |
void | ArrayCopy (const SourceArrayType &source, vtkm::cont::UnknownArrayHandle &destination) |
Does a deep copy from one array to another array. More... | |
template<typename T , typename S > | |
void | ArrayCopy (const vtkm::cont::UnknownArrayHandle &, const vtkm::cont::ArrayHandle< T, S > &) |
template<typename T , typename S > | |
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::VecTraits< 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 > | |
void | printSummary_ArrayHandle (const vtkm::cont::ArrayHandle< T, StorageT > &array, std::ostream &out, bool full=false) |
template<typename T > | |
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::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::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::ArrayHandleBasic< T > | make_ArrayHandleMove (std::vector< T, Allocator > &&array) |
Move an std::vector into an ArrayHandle. More... | |
template<typename T , typename Allocator > | |
vtkm::cont::ArrayHandleBasic< T > | make_ArrayHandle (std::vector< T, Allocator > &&array, vtkm::CopyFlag) |
Move an std::vector into an ArrayHandle. More... | |
template<typename T > | |
vtkm::cont::ArrayHandleBasic< T > | make_ArrayHandle (std::initializer_list< T > &&values) |
Create an ArrayHandle directly from an initializer list of values. More... | |
vtkm::cont::ArrayHandleBitField | make_ArrayHandleBitField (const vtkm::cont::BitField &bitField) |
vtkm::cont::ArrayHandleBitField | make_ArrayHandleBitField (vtkm::cont::BitField &&bitField) noexcept |
template<typename FirstHandleType , typename SecondHandleType , typename ThirdHandleType > | |
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 > | |
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> | |
ArrayHandleCompositeVector< ArrayTs... > | make_ArrayHandleCompositeVector (const ArrayTs &... arrays) |
Create a composite vector array from other arrays. More... | |
template<typename ArrayHandleType1 , typename ArrayHandleType2 > | |
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::ArrayHandleCounting< CountingValueType > | make_ArrayHandleCounting (CountingValueType start, CountingValueType step, vtkm::Id length) |
A convenience function for creating an ArrayHandleCounting. More... | |
template<typename DecoratorImplT , typename... ArrayTs> | |
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 > | |
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::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::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::ArrayHandleImplicit< FunctorType > | make_ArrayHandleImplicit (FunctorType functor, vtkm::Id length) |
make_ArrayHandleImplicit is convenience function to generate an ArrayHandleImplicit. More... | |
vtkm::cont::ArrayHandleIndex | make_ArrayHandleIndex (vtkm::Id length) |
A convenience function for creating an ArrayHandleIndex. More... | |
template<typename OffsetsStorageTag > | |
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::ArrayHandlePermutation< IndexArrayHandleType, ValueArrayHandleType > | make_ArrayHandlePermutation (IndexArrayHandleType indexArray, ValueArrayHandleType valueArray) |
make_ArrayHandleTransform is convenience function to generate an ArrayHandleTransform. More... | |
template<typename HandleType > | |
ArrayHandleReverse< HandleType > | make_ArrayHandleReverse (const HandleType &handle) |
make_ArrayHandleReverse is convenience function to generate an ArrayHandleReverse. More... | |
template<typename T > | |
auto | make_ArrayHandleRuntimeVec (vtkm::IdComponent numComponents, const vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagBasic > &componentsArray=vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagBasic >{}) |
make_ArrayHandleRuntimeVec is convenience function to generate an ArrayHandleRuntimeVec . More... | |
template<typename T > | |
auto | make_ArrayHandleRuntimeVec (const vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagBasic > &componentsArray) |
Converts a basic array handle into an ArrayHandleRuntimeVec with 1 component. More... | |
template<typename T > | |
auto | make_ArrayHandleRuntimeVec (vtkm::IdComponent numComponents, const T *array, vtkm::Id numberOfValues, vtkm::CopyFlag copy) |
A convenience function for creating an ArrayHandleRuntimeVec from a standard C array. More... | |
template<typename T > | |
auto | make_ArrayHandleRuntimeVecMove (vtkm::IdComponent numComponents, 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 ArrayHandleRuntimeVec . More... | |
template<typename T , typename Allocator > | |
auto | make_ArrayHandleRuntimeVec (vtkm::IdComponent numComponents, const std::vector< T, Allocator > &array, vtkm::CopyFlag copy) |
A convenience function for creating an ArrayHandleRuntimeVec from an std::vector . More... | |
template<typename T , typename Allocator > | |
auto | make_ArrayHandleRuntimeVecMove (vtkm::IdComponent numComponents, std::vector< T, Allocator > &&array) |
Move an std::vector into an ArrayHandleRuntimeVec . More... | |
template<typename T , typename Allocator > | |
auto | make_ArrayHandleRuntimeVec (vtkm::IdComponent numComponents, std::vector< T, Allocator > &&array, vtkm::CopyFlag) |
template<typename ValueType > | |
ArrayHandleSOA< ValueType > | make_ArrayHandleSOA (std::initializer_list< vtkm::cont::ArrayHandle< typename vtkm::VecTraits< ValueType >::ComponentType, vtkm::cont::StorageTagBasic >> &&componentArrays) |
Create a vtkm::cont::ArrayHandleSOA with an initializer list of array handles. More... | |
template<typename ComponentType , typename... RemainingArrays> | |
ArrayHandleSOA< vtkm::Vec< ComponentType, internal::VecSizeFromRemaining< RemainingArrays... >::value > > | make_ArrayHandleSOA (const vtkm::cont::ArrayHandle< ComponentType, vtkm::cont::StorageTagBasic > &componentArray0, const RemainingArrays &... componentArrays) |
Create a vtkm::cont::ArrayHandleSOA with a number of array handles. More... | |
template<typename ValueType > | |
ArrayHandleSOA< ValueType > | make_ArrayHandleSOA (std::initializer_list< std::vector< typename vtkm::VecTraits< ValueType >::ComponentType >> &&componentVectors) |
Create a vtkm::cont::ArrayHandleSOA with an initializer list of std::vector . More... | |
template<typename ComponentType , typename... RemainingVectors> | |
ArrayHandleSOA< vtkm::Vec< ComponentType, internal::VecSizeFromRemaining< RemainingVectors... >::value > > | make_ArrayHandleSOA (vtkm::CopyFlag copy, const std::vector< ComponentType > &vector0, RemainingVectors &&... componentVectors) |
Create a vtkm::cont::ArrayHandleSOA with a number of std::vector . More... | |
template<typename ComponentType , typename... RemainingVectors> | |
ArrayHandleSOA< vtkm::Vec< ComponentType, internal::VecSizeFromRemaining< RemainingVectors... >::value > > | make_ArrayHandleSOA (vtkm::CopyFlag copy, std::vector< ComponentType > &&vector0, RemainingVectors &&... componentVectors) |
Create a vtkm::cont::ArrayHandleSOA with a number of std::vector . More... | |
template<typename ComponentType , typename... RemainingVectors> | |
ArrayHandleSOA< vtkm::Vec< ComponentType, internal::VecSizeFromRemaining< RemainingVectors... >::value > > | make_ArrayHandleSOAMove (std::vector< ComponentType > &&vector0, RemainingVectors &&... componentVectors) |
Create a vtkm::cont::ArrayHandleSOA with a number of std::vector . More... | |
template<typename ValueType > | |
ArrayHandleSOA< ValueType > | make_ArrayHandleSOA (std::initializer_list< const typename vtkm::VecTraits< ValueType >::ComponentType * > &&componentVectors, vtkm::Id length, vtkm::CopyFlag copy) |
Create a vtkm::cont::ArrayHandleSOA with an initializer list of C arrays. More... | |
template<typename ComponentType , typename... RemainingArrays> | |
ArrayHandleSOA< vtkm::Vec< ComponentType, internal::VecSizeFromRemaining< RemainingArrays... >::value > > | make_ArrayHandleSOA (vtkm::Id length, vtkm::CopyFlag copy, const ComponentType *array0, const RemainingArrays *... componentArrays) |
Create a vtkm::cont::ArrayHandleSOA with a number of C arrays. More... | |
template<typename T > | |
vtkm::cont::ArrayHandleStride< T > | make_ArrayHandleStride (const vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagBasic > &array, vtkm::Id numValues, vtkm::Id stride, vtkm::Id offset, vtkm::Id modulo=0, vtkm::Id divisor=1) |
Create an array by adding a stride to a basic array. More... | |
template<typename ArrayHandleType , vtkm::IdComponent OutSize> | |
ArrayHandleSwizzle< ArrayHandleType, OutSize > | make_ArrayHandleSwizzle (const ArrayHandleType &array, const vtkm::Vec< vtkm::IdComponent, OutSize > &map) |
Construct an ArrayHandleSwizzle from a provided array and swizzle map. More... | |
template<typename ArrayHandleType , typename... SwizzleIndexTypes> | |
auto | make_ArrayHandleSwizzle (const ArrayHandleType &array, vtkm::IdComponent swizzleIndex0, SwizzleIndexTypes... swizzleIndices) |
Construct an ArrayHandleSwizzle from a provided array and swizzle map. More... | |
template<typename HandleType , typename FunctorType > | |
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::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) |
Construct a vtkm::cont::ArrayHandleView from a source array. More... | |
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::ArrayHandleZip< FirstHandleType, SecondHandleType > | make_ArrayHandleZip (const FirstHandleType &first, const SecondHandleType &second) |
A convenience function for creating an ArrayHandleZip. More... | |
template<typename PortalType > | |
vtkm::cont::ArrayPortalToIterators< PortalType >::IteratorType | ArrayPortalToIteratorBegin (const PortalType &portal) |
Convenience function for converting an ArrayPortal to a begin iterator. More... | |
template<typename PortalType > | |
vtkm::cont::ArrayPortalToIterators< PortalType >::IteratorType | ArrayPortalToIteratorEnd (const PortalType &portal) |
Convenience function for converting an ArrayPortal to an end iterator. More... | |
void | ThrowArrayRangeComputeFailed () |
template<typename ArrayHandleType > | |
vtkm::cont::ArrayHandle< vtkm::Range > | ArrayRangeCompute (const ArrayHandleType &input, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny{}) |
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::Bounds | BoundsCompute (const vtkm::cont::PartitionedDataSet &pds, vtkm::Id coordinate_system_index=0) |
vtkm::Bounds | BoundsCompute (const vtkm::cont::DataSet &dataset, const std::string &coordinate_system_name) |
vtkm::Bounds | BoundsCompute (const vtkm::cont::PartitionedDataSet &pds, const std::string &coordinate_system_name) |
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::Bounds | BoundsGlobalCompute (const vtkm::cont::PartitionedDataSet &pds, vtkm::Id coordinate_system_index=0) |
vtkm::Bounds | BoundsGlobalCompute (const vtkm::cont::DataSet &dataset, const std::string &coordinate_system_name) |
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> | |
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> | |
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 , typename S > | |
bool | ColorTableMap (const vtkm::cont::ArrayHandle< T, S > &values, const vtkm::cont::ColorTable &table, vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::UInt8, 3 >> &rgbOut) |
Interpolate each value through the color 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::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 | ColorTableMapMagnitude (const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > &values, const vtkm::cont::ColorTable &table, vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::UInt8, 3 >> &rgbOut) |
Use magnitude of a vector 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::ColorTable &table, vtkm::cont::ArrayHandle< vtkm::Vec4ui_8 > &rgbaOut) |
Use a single component 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::Vec< vtkm::UInt8, 3 >> &rgbOut) |
Use a single component of a vector to generate RGB colors. More... | |
void | 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. More... | |
void | ConvertNumComponentsToOffsets (const vtkm::cont::UnknownArrayHandle &numComponentsArray, vtkm::cont::ArrayHandle< vtkm::Id > &offsetsArray, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny{}) |
vtkm::cont::ArrayHandle< vtkm::Id > | ConvertNumComponentsToOffsets (const vtkm::cont::UnknownArrayHandle &numComponentsArray, vtkm::Id &componentsArraySize, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny{}) |
vtkm::cont::ArrayHandle< vtkm::Id > | ConvertNumComponentsToOffsets (const vtkm::cont::UnknownArrayHandle &numComponentsArray, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny{}) |
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) |
std::string & | GlobalGhostCellFieldName () noexcept |
const std::string & | GetGlobalGhostCellFieldName () noexcept |
void | SetGlobalGhostCellFieldName (const std::string &name) noexcept |
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::cont::DeviceAdapterId | GetDIYDeviceAdapter () |
void | DIYMasterExchange (vtkmdiy::Master &master, bool remote=false) |
Wraps vtkmdiy::Master::exchange by setting its appropiate vtkmdiy::MemoryManagement. More... | |
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... | |
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) |
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::ArrayHandle< vtkm::Range > | 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. More... | |
vtkm::cont::ArrayHandle< vtkm::Range > | 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. More... | |
vtkm::cont::ArrayHandle< vtkm::Range > | 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. More... | |
vtkm::cont::ArrayHandle< vtkm::Range > | 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. More... | |
InitializeOptions | operator| (const InitializeOptions &lhs, const InitializeOptions &rhs) |
InitializeOptions | operator& (const InitializeOptions &lhs, const InitializeOptions &rhs) |
vtkm::cont::LogLevel | GetStderrLogLevel () |
Get the active highest log level that will be printed to stderr. More... | |
void | SetLogLevelName (vtkm::cont::LogLevel level, const std::string &name) |
Register a custom name to identify a log level. More... | |
std::string | GetLogLevelName (vtkm::cont::LogLevel level) |
Get a human readable name for the log level. More... | |
std::string | GetLogErrorContext () |
std::string | GetStackTrace (vtkm::Int32 skip=0) |
Returns a stacktrace on supported platforms. More... | |
std::string | GetHumanReadableSize (vtkm::UInt64 bytes, int prec=2) |
Convert a size in bytes to a human readable string (such as "64 bytes", "1.44 MiB", "128 GiB", etc). More... | |
template<typename T > | |
std::string | GetHumanReadableSize (T &&bytes, int prec=2) |
std::string | GetSizeString (vtkm::UInt64 bytes, int prec=2) |
Returns "%1 (%2 bytes)" where %1 is the result from GetHumanReadableSize and %2 is the exact number of bytes. More... | |
template<typename T > | |
std::string | GetSizeString (T &&bytes, int prec=2) |
void | LogCond (LogLevel level, bool cond, const char *file, unsigned line, const char *format...) |
Conditionally logs a message with a printf-like format. More... | |
vtkm::cont::DataSet | MergePartitionedDataSet (const vtkm::cont::PartitionedDataSet &partitionedDataSet, vtkm::Float64 invalidValue=vtkm::Nan64()) |
This function can merge multiple data sets into on data set. More... | |
template<typename ParticleType > | |
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 > | |
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 > | |
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::RuntimeDeviceTracker & | GetRuntimeDeviceTracker () |
Get the RuntimeDeviceTracker for the current thread. More... | |
bool | operator== (const vtkm::cont::Token &token, vtkm::cont::Token::Reference ref) |
bool | operator!= (const vtkm::cont::Token &token, vtkm::cont::Token::Reference ref) |
bool | operator== (vtkm::cont::Token::Reference ref, const vtkm::cont::Token &token) |
bool | operator!= (vtkm::cont::Token::Reference ref, const vtkm::cont::Token &token) |
template<typename ArrayHandleType > | |
bool | IsType (const vtkm::cont::UnknownArrayHandle &array) |
Returns true if variant matches the type of ArrayHandleType. More... | |
template<typename ArrayHandleType > | |
ArrayHandleType | Cast (const vtkm::cont::UnknownArrayHandle &array) |
Returns variant cast to the given ArrayHandle type. More... | |
template<typename CellSetType > | |
bool | IsType (const vtkm::cont::UnknownCellSet &unknownCellSet) |
Returns true if unknownCellSet matches the type of CellSetType . More... | |
template<typename CellSetType > | |
CellSetType | Cast (const vtkm::cont::UnknownCellSet &unknownCellSet) |
Returns unknownCellSet cast to the given CellSet type. More... | |
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.
using vtkm::cont::ArrayHandleMultiplexerFromList = typedef vtkm::ListApply<List, ArrayHandleMultiplexer> |
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.
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.
using vtkm::cont::CellSetListCommon = typedef vtkm::List<vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3>, vtkm::cont::CellSetExplicit<>, vtkm::cont::CellSetSingleType<> > |
using vtkm::cont::CellSetListExplicit = typedef vtkm::List< vtkm::cont::CellSetExplicit<ShapesStorageTag, ConnectivityStorageTag, OffsetsStorageTag> > |
using vtkm::cont::CellSetListExplicitDefault = typedef CellSetListExplicit<> |
using vtkm::cont::CellSetListStructured = typedef vtkm::List<vtkm::cont::CellSetStructured<2>, vtkm::cont::CellSetStructured<3> > |
using vtkm::cont::CellSetListStructured1D = typedef vtkm::List<vtkm::cont::CellSetStructured<1> > |
using vtkm::cont::CellSetListStructured2D = typedef vtkm::List<vtkm::cont::CellSetStructured<2> > |
using vtkm::cont::CellSetListStructured3D = typedef vtkm::List<vtkm::cont::CellSetStructured<3> > |
using vtkm::cont::CellSetListUnstructured = typedef vtkm::List<vtkm::cont::CellSetExplicit<>, vtkm::cont::CellSetSingleType<> > |
using vtkm::cont::DeviceAdapterNameType = typedef std::string |
using vtkm::cont::StorageListBasic = typedef vtkm::List<vtkm::cont::StorageTagBasic> |
|
strong |
Enumerator | |
---|---|
None | Placeholder used when no options are enabled. This is the value used when the third argument to |
RequireDevice | Issue an error if the device argument is not specified. |
DefaultAnyDevice | If no device is specified, treat it as if the user gave This means that |
AddHelp | Add a help argument. If |
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 |
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 |
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 |
|
strong |
Log levels for use with the logging macros.
Enumerator | |
---|---|
Off | A placeholder used to silence all logging. 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 first in a range of logging levels reserved for code that uses VTK-m. Internal VTK-m code will not log on these levels but will report these logs. |
UserLast | The last in a range of logging levels reserved for code that uses VTK-m. |
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 | Transferring of data between a host and device. |
KernelLaunches | Details on device-side kernel launches. |
Cast | Reports when a dynamic object is (or is not) resolved via a CastAndCall or other casting method. |
UserVerboseFirst | The first in a range of logging levels reserved for code that uses VTK-m. Internal VTK-m code will not log on these levels but will report these logs. These are used similarly to those in the UserFirst range but are at a lower precedence that also includes more verbose reporting from VTK-m. |
UserVerboseLast | The last in a range of logging levels reserved for code that uses VTK-m. |
|
strong |
Identifier used to specify whether to enable or disable a particular device.
Enumerator | |
---|---|
Force | Replaces the current list of devices to try with the device specified. This has the effect of forcing VTK-m to use the provided device. This is the default behavior for |
Enable | Adds the provided device adapter to the list of devices to try. |
Disable | Removes the provided device adapter from the list of devices to try. |
|
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
).
|
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
).
void vtkm::cont::ArrayCopy | ( | const vtkm::cont::UnknownArrayHandle & | , |
const vtkm::cont::ArrayHandle< T, S > & | |||
) |
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 ArrayHandle
s 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.
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.
vtkm::cont::ArrayHandleStride<typename vtkm::VecTraits<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 ArrayHandle
s 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
.
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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
.
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:
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:
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:
vtkm::cont::ArrayPortalToIterators<PortalType>::IteratorType vtkm::cont::ArrayPortalToIteratorBegin | ( | const PortalType & | portal | ) |
Convenience function for converting an ArrayPortal to a begin iterator.
vtkm::cont::ArrayPortalToIterators<PortalType>::IteratorType vtkm::cont::ArrayPortalToIteratorEnd | ( | const PortalType & | portal | ) |
Convenience function for converting an ArrayPortal to an end iterator.
|
inline |
vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeCompute | ( | const vtkm::cont::UnknownArrayHandle & | array, |
bool | computeFiniteRange = false , |
||
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, and in the case of nested Vecs, ranges are computed for each of the leaf components.
The array
parameter is the input array as a vtkm::cont::UnknownArrayHandle
.
The optional maskArray
parameter supports selectively choosing which entries to include in the range. It is an array handle of type vtkm::cont::ArrayHandle<vtkm::UInt8>
. This array should have the same number of elements as the input array with each value representing the masking status of the corresponding value in the input array (masked if 0 else unmasked). Ignored if empty.
The optional computeFiniteRange
parameter specifies whether if non-finite values in the array should be ignored to compute the finite range of the array. For Vec types, individual component values are considered independantly.
The optional device
parameter can be used to specify a device to run the range computation on. The default value is vtkm::cont::DeviceAdapterTagAny{}
.
ArrayHandle
of Range
objects. There is one value in the returned array for every component of the input's value type. For nested Vecs the results are stored in depth-first order.ArrayRangeCompute
takes an UnknownArrayHandle as the input. The implementation uses precompiled and specicialized code for several of the most commonly used value and storage types, with a fallback for other cases. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. This should be sufficient for most cases, but if you need to compute the range for an array type that is not explicitly handled by ArrayRangeCompute
and the fallback code is not performant, use the templated version ArrayRangeComputeTemplate
. Specializations can be implemented by specializing the template class ArrayRangeComputeImpl
. Please refer to ArrayRangeComputeTemplate.h for detailsvtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeCompute | ( | const vtkm::cont::UnknownArrayHandle & | array, |
const vtkm::cont::ArrayHandle< vtkm::UInt8 > & | maskArray, | ||
bool | computeFiniteRange = false , |
||
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, and in the case of nested Vecs, ranges are computed for each of the leaf components.
The array
parameter is the input array as a vtkm::cont::UnknownArrayHandle
.
The optional maskArray
parameter supports selectively choosing which entries to include in the range. It is an array handle of type vtkm::cont::ArrayHandle<vtkm::UInt8>
. This array should have the same number of elements as the input array with each value representing the masking status of the corresponding value in the input array (masked if 0 else unmasked). Ignored if empty.
The optional computeFiniteRange
parameter specifies whether if non-finite values in the array should be ignored to compute the finite range of the array. For Vec types, individual component values are considered independantly.
The optional device
parameter can be used to specify a device to run the range computation on. The default value is vtkm::cont::DeviceAdapterTagAny{}
.
ArrayHandle
of Range
objects. There is one value in the returned array for every component of the input's value type. For nested Vecs the results are stored in depth-first order.ArrayRangeCompute
takes an UnknownArrayHandle as the input. The implementation uses precompiled and specicialized code for several of the most commonly used value and storage types, with a fallback for other cases. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. This should be sufficient for most cases, but if you need to compute the range for an array type that is not explicitly handled by ArrayRangeCompute
and the fallback code is not performant, use the templated version ArrayRangeComputeTemplate
. Specializations can be implemented by specializing the template class ArrayRangeComputeImpl
. Please refer to ArrayRangeComputeTemplate.h for details
|
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, and in the case of nested Vecs, ranges are computed for each of the leaf components.
The array
parameter is the input array as a vtkm::cont::UnknownArrayHandle
.
The optional maskArray
parameter supports selectively choosing which entries to include in the range. It is an array handle of type vtkm::cont::ArrayHandle<vtkm::UInt8>
. This array should have the same number of elements as the input array with each value representing the masking status of the corresponding value in the input array (masked if 0 else unmasked). Ignored if empty.
The optional computeFiniteRange
parameter specifies whether if non-finite values in the array should be ignored to compute the finite range of the array. For Vec types, individual component values are considered independantly.
The optional device
parameter can be used to specify a device to run the range computation on. The default value is vtkm::cont::DeviceAdapterTagAny{}
.
ArrayHandle
of Range
objects. There is one value in the returned array for every component of the input's value type. For nested Vecs the results are stored in depth-first order.ArrayRangeCompute
takes an UnknownArrayHandle as the input. The implementation uses precompiled and specicialized code for several of the most commonly used value and storage types, with a fallback for other cases. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. This should be sufficient for most cases, but if you need to compute the range for an array type that is not explicitly handled by ArrayRangeCompute
and the fallback code is not performant, use the templated version ArrayRangeComputeTemplate
. Specializations can be implemented by specializing the template class ArrayRangeComputeImpl
. Please refer to ArrayRangeComputeTemplate.h for detailsvtkm::Range vtkm::cont::ArrayRangeComputeMagnitude | ( | const vtkm::cont::UnknownArrayHandle & | array, |
bool | computeFiniteRange = false , |
||
vtkm::cont::DeviceAdapterId | device = vtkm::cont::DeviceAdapterTagAny{} |
||
) |
Compute the range of the magnitude of the Vec data in an array handle.
Given an ArrayHandle
, this function computes the range (min and max) of the magnitude of the values in the array.
The array
parameter is the input array as a vtkm::cont::UnknownArrayHandle
.
The optional maskArray
parameter supports selectively choosing which entries to include in the range. It is an array handle of type vtkm::cont::ArrayHandle<vtkm::UInt8>
. This array should have the same number of elements as the input array with each value representing the masking status of the corresponding value in the input array (masked if 0 else unmasked). Ignored if empty.
The optional computeFiniteRange
parameter specifies whether if non-finite values in the array should be ignored to compute the finite range of the array. A Vec with any non-finite component will be ignored.
The optional device
parameter can be used to specify a device to run the range computation on. The default value is vtkm::cont::DeviceAdapterTagAny{}
.
Range
objects.ArrayRangeComputeMagnitude
takes an UnknownArrayHandle as the input. The implementation uses precompiled and specicialized code for several of the most commonly used value and storage types, with a fallback for other cases. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. This should be sufficient for most cases, but if you need to compute the range for an array type that is not explicitly handled by ArrayRangeComputeMagnitude
and the fallback code is not performant, use the templated version ArrayRangeComputeMagnitudeTemplate
. Specializations can be implemented by specializing the template class ArrayRangeComputeMagnitudeImpl
. Please refer to ArrayRangeComputeTemplate.h for detailsvtkm::Range vtkm::cont::ArrayRangeComputeMagnitude | ( | const vtkm::cont::UnknownArrayHandle & | array, |
const vtkm::cont::ArrayHandle< vtkm::UInt8 > & | maskArray, | ||
bool | computeFiniteRange = false , |
||
vtkm::cont::DeviceAdapterId | device = vtkm::cont::DeviceAdapterTagAny{} |
||
) |
Compute the range of the magnitude of the Vec data in an array handle.
Given an ArrayHandle
, this function computes the range (min and max) of the magnitude of the values in the array.
The array
parameter is the input array as a vtkm::cont::UnknownArrayHandle
.
The optional maskArray
parameter supports selectively choosing which entries to include in the range. It is an array handle of type vtkm::cont::ArrayHandle<vtkm::UInt8>
. This array should have the same number of elements as the input array with each value representing the masking status of the corresponding value in the input array (masked if 0 else unmasked). Ignored if empty.
The optional computeFiniteRange
parameter specifies whether if non-finite values in the array should be ignored to compute the finite range of the array. A Vec with any non-finite component will be ignored.
The optional device
parameter can be used to specify a device to run the range computation on. The default value is vtkm::cont::DeviceAdapterTagAny{}
.
Range
objects.ArrayRangeComputeMagnitude
takes an UnknownArrayHandle as the input. The implementation uses precompiled and specicialized code for several of the most commonly used value and storage types, with a fallback for other cases. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. This should be sufficient for most cases, but if you need to compute the range for an array type that is not explicitly handled by ArrayRangeComputeMagnitude
and the fallback code is not performant, use the templated version ArrayRangeComputeMagnitudeTemplate
. Specializations can be implemented by specializing the template class ArrayRangeComputeMagnitudeImpl
. Please refer to ArrayRangeComputeTemplate.h for details
|
inline |
Compute the range of the magnitude of the Vec data in an array handle.
Given an ArrayHandle
, this function computes the range (min and max) of the magnitude of the values in the array.
The array
parameter is the input array as a vtkm::cont::UnknownArrayHandle
.
The optional maskArray
parameter supports selectively choosing which entries to include in the range. It is an array handle of type vtkm::cont::ArrayHandle<vtkm::UInt8>
. This array should have the same number of elements as the input array with each value representing the masking status of the corresponding value in the input array (masked if 0 else unmasked). Ignored if empty.
The optional computeFiniteRange
parameter specifies whether if non-finite values in the array should be ignored to compute the finite range of the array. A Vec with any non-finite component will be ignored.
The optional device
parameter can be used to specify a device to run the range computation on. The default value is vtkm::cont::DeviceAdapterTagAny{}
.
Range
objects.ArrayRangeComputeMagnitude
takes an UnknownArrayHandle as the input. The implementation uses precompiled and specicialized code for several of the most commonly used value and storage types, with a fallback for other cases. This is so that ArrayRangeCompute.h can be included in code that does not use a device compiler. This should be sufficient for most cases, but if you need to compute the range for an array type that is not explicitly handled by ArrayRangeComputeMagnitude
and the fallback code is not performant, use the templated version ArrayRangeComputeMagnitudeTemplate
. Specializations can be implemented by specializing the template class ArrayRangeComputeMagnitudeImpl
. Please refer to ArrayRangeComputeTemplate.h for details
|
inline |
Templated version of ArrayRangeComputeMagnitude.
vtkm::Range vtkm::cont::ArrayRangeComputeMagnitudeTemplate | ( | const vtkm::cont::ArrayHandle< T, S > & | input, |
const vtkm::cont::ArrayHandle< vtkm::UInt8 > & | maskArray, | ||
bool | computeFiniteRange = false , |
||
vtkm::cont::DeviceAdapterId | device = vtkm::cont::DeviceAdapterTagAny{} |
||
) |
Templated version of ArrayRangeComputeMagnitude.
|
inline |
Templated version of ArrayRangeComputeMagnitude.
|
inline |
Templated version of ArrayRangeCompute.
vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::ArrayRangeComputeTemplate | ( | const vtkm::cont::ArrayHandle< T, S > & | input, |
const vtkm::cont::ArrayHandle< vtkm::UInt8 > & | maskArray, | ||
bool | computeFiniteRange = false , |
||
vtkm::cont::DeviceAdapterId | device = vtkm::cont::DeviceAdapterTagAny{} |
||
) |
Templated version of ArrayRangeCompute.
|
inline |
Templated version of ArrayRangeCompute.
vtkm::Bounds vtkm::cont::BoundsCompute | ( | const vtkm::cont::DataSet & | dataset, |
const std::string & | coordinate_system_name | ||
) |
vtkm::Bounds vtkm::cont::BoundsCompute | ( | const vtkm::cont::DataSet & | dataset, |
vtkm::Id | coordinate_system_index = 0 |
||
) |
Functions to compute bounds for a single dataSset or partition dataset.
These are utility functions that compute bounds for a single dataset or partitioned dataset. When VTK-m is operating in an distributed environment, these are bounds on the local process. To get global bounds across all ranks, use vtkm::cont::BoundsGlobalCompute
instead.
Note that if the provided CoordinateSystem does not exists, empty bounds are returned. Likewise, for PartitionedDataSet, partitions without the chosen CoordinateSystem are skipped.
vtkm::Bounds vtkm::cont::BoundsCompute | ( | const vtkm::cont::PartitionedDataSet & | pds, |
const std::string & | coordinate_system_name | ||
) |
vtkm::Bounds vtkm::cont::BoundsCompute | ( | const vtkm::cont::PartitionedDataSet & | pds, |
vtkm::Id | coordinate_system_index = 0 |
||
) |
vtkm::Bounds vtkm::cont::BoundsGlobalCompute | ( | const vtkm::cont::DataSet & | dataset, |
const std::string & | coordinate_system_name | ||
) |
vtkm::Bounds vtkm::cont::BoundsGlobalCompute | ( | const vtkm::cont::DataSet & | dataset, |
vtkm::Id | coordinate_system_index = 0 |
||
) |
Functions to compute bounds for a single dataset or partitioned dataset globally.
These are utility functions that compute bounds for a single dataset or partitioned dataset globally i.e. across all ranks when operating in a distributed environment. When VTK-m not operating in an distributed environment, these behave same as vtkm::cont::BoundsCompute
.
Note that if the provided CoordinateSystem does not exists, empty bounds are returned. Likewise, for PartitionedDataSet, partitions without the chosen CoordinateSystem are skipped.
vtkm::Bounds vtkm::cont::BoundsGlobalCompute | ( | const vtkm::cont::PartitionedDataSet & | pds, |
const std::string & | coordinate_system_name | ||
) |
vtkm::Bounds vtkm::cont::BoundsGlobalCompute | ( | const vtkm::cont::PartitionedDataSet & | pds, |
vtkm::Id | coordinate_system_index = 0 |
||
) |
|
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.
|
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.
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.
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).
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.
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
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
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
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
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
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
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.
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
.
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.
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.
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.
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
bool vtkm::cont::ColorTableMap | ( | const vtkm::cont::ArrayHandle< T, S > & | values, |
const vtkm::cont::ColorTable & | table, | ||
vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::UInt8, 3 >> & | rgbOut | ||
) |
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
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.
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.
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.
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::Vec< vtkm::UInt8, 3 >> & | rgbOut | ||
) |
Use a single component of a vector to generate RGB colors.
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.
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.
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.
bool vtkm::cont::ColorTableMapMagnitude | ( | const vtkm::cont::ArrayHandle< vtkm::Vec< T, N >, S > & | values, |
const vtkm::cont::ColorTable & | table, | ||
vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::UInt8, 3 >> & | rgbOut | ||
) |
Use magnitude of a vector to generate RGB colors.
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.
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.
void vtkm::cont::ConditionalCastAndCall | ( | std::false_type | , |
Args && | ... | ||
) |
No-op variant since the condition is false.
void vtkm::cont::ConditionalCastAndCall | ( | std::true_type | , |
Args &&... | args | ||
) |
CastAndCall if the condition is true.
void vtkm::cont::ConvertNumComponentsToOffsets | ( | const vtkm::cont::UnknownArrayHandle & | numComponentsArray, |
vtkm::cont::ArrayHandle< vtkm::Id > & | offsetsArray, | ||
vtkm::cont::DeviceAdapterId | device = vtkm::cont::DeviceAdapterTagAny{} |
||
) |
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 Vec
s. The resulting array can be used with ArrayHandleGroupVecVariable
.
[in] | numComponentsArray | the input array that specifies the number of components in each group Vec. |
[out] | offsetsArray | (optional) the output ArrayHandle , which must have a value type of vtkm::Id . If the output ArrayHandle is not given, it is returned. |
[in] | componentsArraySize | (optional) a reference to a vtkm::Id and is filled with the expected size of the component values array. |
[in] | 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
.
vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::ConvertNumComponentsToOffsets | ( | const vtkm::cont::UnknownArrayHandle & | numComponentsArray, |
vtkm::cont::DeviceAdapterId | device = vtkm::cont::DeviceAdapterTagAny{} |
||
) |
vtkm::cont::ArrayHandle<vtkm::Id> vtkm::cont::ConvertNumComponentsToOffsets | ( | const vtkm::cont::UnknownArrayHandle & | numComponentsArray, |
vtkm::Id & | componentsArraySize, | ||
vtkm::cont::DeviceAdapterId | device = vtkm::cont::DeviceAdapterTagAny{} |
||
) |
void vtkm::cont::DIYMasterExchange | ( | vtkmdiy::Master & | master, |
bool | remote = false |
||
) |
Wraps vtkmdiy::Master::exchange by setting its appropiate vtkmdiy::MemoryManagement.
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.
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.
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.
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.
vtkm::cont::DeviceAdapterId vtkm::cont::GetDIYDeviceAdapter | ( | ) |
|
noexcept |
|
inline |
std::string vtkm::cont::GetHumanReadableSize | ( | vtkm::UInt64 | bytes, |
int | prec = 2 |
||
) |
Convert a size in bytes to a human readable string (such as "64 bytes", "1.44 MiB", "128 GiB", etc).
prec controls the fixed point precision of the stringified number.
std::string vtkm::cont::GetLogErrorContext | ( | ) |
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.
std::string vtkm::cont::GetLogThreadName | ( | ) |
Specifies a humman-readable name to identify the current thread in the log output.
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.
|
inline |
std::string vtkm::cont::GetSizeString | ( | vtkm::UInt64 | bytes, |
int | prec = 2 |
||
) |
Returns "%1 (%2 bytes)" where %1 is the result from GetHumanReadableSize and %2 is the exact number of bytes.
std::string vtkm::cont::GetStackTrace | ( | vtkm::Int32 | skip = 0 | ) |
Returns a stacktrace on supported platforms.
Argument is the number of frames to skip (GetStackTrace and below are already skipped).
vtkm::cont::LogLevel vtkm::cont::GetStderrLogLevel | ( | ) |
Get the active highest log level that will be printed to stderr.
|
noexcept |
InitializeResult vtkm::cont::Initialize | ( | ) |
Initialize the VTKm library, parsing arguments when provided:
--vtkm-log-level
.--vtkm-device
.-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.
InitializeResult vtkm::cont::Initialize | ( | int & | argc, |
char * | argv[], | ||
InitializeOptions | opts = InitializeOptions::None |
||
) |
Initialize the VTKm library, parsing arguments when provided:
--vtkm-log-level
.--vtkm-device
.-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.
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.
void vtkm::cont::InitLogging | ( | int & | argc, |
char * | argv[], | ||
const std::string & | loggingFlag = "--vtkm-log-level" , |
||
const std::string & | loggingEnv = "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.
|
inline |
Returns true if variant
matches the type of ArrayHandleType.
|
inline |
Returns true if unknownCellSet
matches the type of CellSetType
.
void vtkm::cont::LogCond | ( | LogLevel | level, |
bool | cond, | ||
const char * | file, | ||
unsigned | line, | ||
const char * | format... | ||
) |
Conditionally logs a message with a printf-like format.
level | Desired LogLevel value for the log message. |
cond | When false this function is no-op. |
file | The source file where the log entry was genearted. |
line | The line in the source file where the log entry was generated. |
format | Printf like format string. |
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.
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.
vtkm::cont::ArrayHandleBasic<T> vtkm::cont::make_ArrayHandle | ( | std::initializer_list< T > && | values | ) |
Create an ArrayHandle directly from an initializer list of values.
vtkm::cont::ArrayHandleBasic<T> vtkm::cont::make_ArrayHandle | ( | std::vector< T, Allocator > && | array, |
vtkm::CopyFlag | |||
) |
Move an std::vector into an ArrayHandle.
|
inline |
|
inlinenoexcept |
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.
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.
ArrayHandleCompositeVector<ArrayTs...> vtkm::cont::make_ArrayHandleCompositeVector | ( | const ArrayTs &... | arrays | ) |
Create a composite vector array from other arrays.
ArrayHandleConcatenate<ArrayHandleType1, ArrayHandleType2> vtkm::cont::make_ArrayHandleConcatenate | ( | const ArrayHandleType1 & | array1, |
const ArrayHandleType2 & | array2 | ||
) |
vtkm::cont::ArrayHandleConstant<T> vtkm::cont::make_ArrayHandleConstant | ( | T | value, |
vtkm::Id | numberOfValues | ||
) |
make_ArrayHandleConstant
is convenience function to generate an ArrayHandleImplicit.
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.
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.
ArrayHandleExtractComponent<ArrayHandleType> vtkm::cont::make_ArrayHandleExtractComponent | ( | const ArrayHandleType & | array, |
vtkm::IdComponent | component | ||
) |
make_ArrayHandleExtractComponent
is convenience function to generate an ArrayHandleExtractComponent
.
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.
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.
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.
|
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]
vtkm::cont::ArrayHandleBasic<T> vtkm::cont::make_ArrayHandleMove | ( | std::vector< T, Allocator > && | array | ) |
Move an std::vector into an ArrayHandle.
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.
vtkm::cont::ArrayHandleOffsetsToNumComponents< vtkm::cont::ArrayHandle<vtkm::Id, OffsetsStorageTag> > vtkm::cont::make_ArrayHandleOffsetsToNumComponents | ( | const vtkm::cont::ArrayHandle< vtkm::Id, OffsetsStorageTag > & | array | ) |
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.
ArrayHandleReverse<HandleType> vtkm::cont::make_ArrayHandleReverse | ( | const HandleType & | handle | ) |
make_ArrayHandleReverse is convenience function to generate an ArrayHandleReverse.
auto vtkm::cont::make_ArrayHandleRuntimeVec | ( | const vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagBasic > & | componentsArray | ) |
Converts a basic array handle into an ArrayHandleRuntimeVec
with 1 component.
The constructed array is essentially equivalent but of a different type.
auto vtkm::cont::make_ArrayHandleRuntimeVec | ( | vtkm::IdComponent | numComponents, |
const std::vector< T, Allocator > & | array, | ||
vtkm::CopyFlag | copy | ||
) |
A convenience function for creating an ArrayHandleRuntimeVec
from an std::vector
.
auto vtkm::cont::make_ArrayHandleRuntimeVec | ( | vtkm::IdComponent | numComponents, |
const T * | array, | ||
vtkm::Id | numberOfValues, | ||
vtkm::CopyFlag | copy | ||
) |
A convenience function for creating an ArrayHandleRuntimeVec
from a standard C array.
auto vtkm::cont::make_ArrayHandleRuntimeVec | ( | vtkm::IdComponent | numComponents, |
const vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagBasic > & | componentsArray = vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic>{} |
||
) |
make_ArrayHandleRuntimeVec
is convenience function to generate an ArrayHandleRuntimeVec
.
It takes the number of components stored in each value's Vec
, which must be specified on the construction of the ArrayHandleRuntimeVec
. If not specified, the number of components is set to 1. make_ArrayHandleRuntimeVec
can also optionally take an existing array of components, which will be grouped into Vec
values based on the specified number of components.
auto vtkm::cont::make_ArrayHandleRuntimeVec | ( | vtkm::IdComponent | numComponents, |
std::vector< T, Allocator > && | array, | ||
vtkm::CopyFlag | |||
) |
auto vtkm::cont::make_ArrayHandleRuntimeVecMove | ( | vtkm::IdComponent | numComponents, |
std::vector< T, Allocator > && | array | ||
) |
Move an std::vector
into an ArrayHandleRuntimeVec
.
auto vtkm::cont::make_ArrayHandleRuntimeVecMove | ( | vtkm::IdComponent | numComponents, |
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 ArrayHandleRuntimeVec
.
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.
ArrayHandleSOA< vtkm::Vec<ComponentType, internal::VecSizeFromRemaining<RemainingArrays...>::value> > vtkm::cont::make_ArrayHandleSOA | ( | const vtkm::cont::ArrayHandle< ComponentType, vtkm::cont::StorageTagBasic > & | componentArray0, |
const RemainingArrays &... | componentArrays | ||
) |
Create a vtkm::cont::ArrayHandleSOA
with a number of array handles.
This only works if all the templated arguments are of type vtkm::cont::ArrayHandle<ComponentType>
.
ArrayHandleSOA<ValueType> vtkm::cont::make_ArrayHandleSOA | ( | std::initializer_list< const typename vtkm::VecTraits< ValueType >::ComponentType * > && | componentVectors, |
vtkm::Id | length, | ||
vtkm::CopyFlag | copy | ||
) |
Create a vtkm::cont::ArrayHandleSOA
with an initializer list of C arrays.
ArrayHandleSOA<ValueType> vtkm::cont::make_ArrayHandleSOA | ( | std::initializer_list< std::vector< typename vtkm::VecTraits< ValueType >::ComponentType >> && | componentVectors | ) |
Create a vtkm::cont::ArrayHandleSOA
with an initializer list of std::vector
.
The data is copied from the std::vector
s to the array handle.
ArrayHandleSOA<ValueType> vtkm::cont::make_ArrayHandleSOA | ( | std::initializer_list< vtkm::cont::ArrayHandle< typename vtkm::VecTraits< ValueType >::ComponentType, vtkm::cont::StorageTagBasic >> && | componentArrays | ) |
Create a vtkm::cont::ArrayHandleSOA
with an initializer list of array handles.
ArrayHandleSOA< vtkm::Vec<ComponentType, internal::VecSizeFromRemaining<RemainingVectors...>::value> > vtkm::cont::make_ArrayHandleSOA | ( | vtkm::CopyFlag | copy, |
const std::vector< ComponentType > & | vector0, | ||
RemainingVectors &&... | componentVectors | ||
) |
Create a vtkm::cont::ArrayHandleSOA
with a number of std::vector
.
The first argument is a vtkm::CopyFlag
to determine whether the input arrays should be copied. The component arrays are listed as arguments. This only works if all the templated arguments are of type std::vector<ComponentType>
.
ArrayHandleSOA< vtkm::Vec<ComponentType, internal::VecSizeFromRemaining<RemainingVectors...>::value> > vtkm::cont::make_ArrayHandleSOA | ( | vtkm::CopyFlag | copy, |
std::vector< ComponentType > && | vector0, | ||
RemainingVectors &&... | componentVectors | ||
) |
Create a vtkm::cont::ArrayHandleSOA
with a number of std::vector
.
The first argument is a vtkm::CopyFlag
to determine whether the input arrays should be copied. The component arrays are listed as arguments. This only works if all the templated arguments are rvalues of type std::vector<ComponentType>
.
ArrayHandleSOA< vtkm::Vec<ComponentType, internal::VecSizeFromRemaining<RemainingArrays...>::value> > vtkm::cont::make_ArrayHandleSOA | ( | vtkm::Id | length, |
vtkm::CopyFlag | copy, | ||
const ComponentType * | array0, | ||
const RemainingArrays *... | componentArrays | ||
) |
Create a vtkm::cont::ArrayHandleSOA
with a number of C arrays.
This only works if all the templated arguments are of type ComponentType*
.
ArrayHandleSOA< vtkm::Vec<ComponentType, internal::VecSizeFromRemaining<RemainingVectors...>::value> > vtkm::cont::make_ArrayHandleSOAMove | ( | std::vector< ComponentType > && | vector0, |
RemainingVectors &&... | componentVectors | ||
) |
Create a vtkm::cont::ArrayHandleSOA
with a number of std::vector
.
This only works if all the templated arguments are rvalues of type std::vector<ComponentType>
.
vtkm::cont::ArrayHandleStride<T> vtkm::cont::make_ArrayHandleStride | ( | const vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagBasic > & | array, |
vtkm::Id | numValues, | ||
vtkm::Id | stride, | ||
vtkm::Id | offset, | ||
vtkm::Id | modulo = 0 , |
||
vtkm::Id | divisor = 1 |
||
) |
Create an array by adding a stride to a basic array.
ArrayHandleSwizzle<ArrayHandleType, OutSize> vtkm::cont::make_ArrayHandleSwizzle | ( | const ArrayHandleType & | array, |
const vtkm::Vec< vtkm::IdComponent, OutSize > & | map | ||
) |
Construct an ArrayHandleSwizzle
from a provided array and swizzle map.
The swizzle map is a vtkm::Vec
containing vtkm::IdComponent
components and sized to the number of components in the array. Each value in the map specifies from which component of the input the corresponding component of the output should come from.
auto vtkm::cont::make_ArrayHandleSwizzle | ( | const ArrayHandleType & | array, |
vtkm::IdComponent | swizzleIndex0, | ||
SwizzleIndexTypes... | swizzleIndices | ||
) |
Construct an ArrayHandleSwizzle
from a provided array and swizzle map.
The swizzle map is specified as independent function parameters after the array. Each value in the map specifies from which component of the input the corresponding component of the output should come from.
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.
vtkm::cont::ArrayHandleTransform<HandleType, FunctorType, InverseFunctorType> vtkm::cont::make_ArrayHandleTransform | ( | HandleType | handle, |
FunctorType | functor, | ||
InverseFunctorType | inverseFunctor | ||
) |
ArrayHandleView<ArrayHandleType> vtkm::cont::make_ArrayHandleView | ( | const ArrayHandleType & | array, |
vtkm::Id | startIndex, | ||
vtkm::Id | numValues | ||
) |
Construct a vtkm::cont::ArrayHandleView
from a source array.
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 |
||
) |
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 |
||
) |
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 |
||
) |
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.
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 |
||
) |
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 |
||
) |
CellSetExtrude vtkm::cont::make_CellSetExtrude | ( | std::vector< vtkm::Int32 > && | conn, |
const vtkm::cont::ArrayHandleXGCCoordinates< T > & | coords, | ||
std::vector< vtkm::Int32 > && | nextNode, | ||
bool | periodic = true |
||
) |
vtkm::cont::CellSetPermutation<OriginalCellSet, PermutationArrayHandleType> vtkm::cont::make_CellSetPermutation | ( | const PermutationArrayHandleType & | cellIndexMap, |
const OriginalCellSet & | cellSet | ||
) |
vtkm::cont::CoordinateSystem vtkm::cont::make_CoordinateSystem | ( | std::string | name, |
const std::vector< T > & | data, | ||
vtkm::CopyFlag | copy = vtkm::CopyFlag::Off |
||
) |
vtkm::cont::CoordinateSystem vtkm::cont::make_CoordinateSystem | ( | std::string | name, |
const T * | data, | ||
vtkm::Id | numberOfValues, | ||
vtkm::CopyFlag | copy = vtkm::CopyFlag::Off |
||
) |
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'.
|
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
vtkm::cont::Field vtkm::cont::make_Field | ( | std::string | name, |
Field::Association | association, | ||
const std::vector< T > & | data, | ||
vtkm::CopyFlag | copy | ||
) |
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.
vtkm::cont::Field vtkm::cont::make_Field | ( | std::string | name, |
Field::Association | association, | ||
std::initializer_list< T > && | data | ||
) |
vtkm::cont::Field vtkm::cont::make_Field | ( | std::string | name, |
Field::Association | association, | ||
std::vector< T > && | data, | ||
vtkm::CopyFlag | |||
) |
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.
|
inline |
Convenience function to build cell fields from vtkm::cont::UnknownArrayHandle.
vtkm::cont::Field vtkm::cont::make_FieldMove | ( | std::string | name, |
Field::Association | association, | ||
std::vector< T > && | data | ||
) |
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.
|
inline |
Convenience function to build point fields from vtkm::cont::UnknownArrayHandle.
vtkm::cont::DataSet vtkm::cont::MergePartitionedDataSet | ( | const vtkm::cont::PartitionedDataSet & | partitionedDataSet, |
vtkm::Float64 | invalidValue = vtkm::Nan64() |
||
) |
This function can merge multiple data sets into on data set.
This function assume all input partitions have the same coordinates systems. If a field does not exist in a specific partition but exists in other partitions, the invalide value will be used to fill the coresponding region of that field in the merged data set.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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.
|
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.
|
inline |
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
.
|
inline |
|
noexcept |
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.
void vtkm::cont::SetLogThreadName | ( | const std::string & | name | ) |
Specifies a humman-readable name to identify the current thread in the log output.
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.
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.
|
inline |
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.
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."
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.
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.
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.
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.
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.
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.
|
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.
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.
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.
|
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.