|
| UncertainArrayHandle ()=default |
|
template<typename T , typename S > |
| UncertainArrayHandle (const vtkm::cont::ArrayHandle< T, S > &array) |
|
| UncertainArrayHandle (const vtkm::cont::UnknownArrayHandle &src) |
|
template<typename OtherValues , typename OtherStorage > |
| UncertainArrayHandle (const UncertainArrayHandle< OtherValues, OtherStorage > &src) |
|
Thisclass | NewInstance () const |
| Create a new array of the same type as this array. More...
|
|
template<typename NewValueTypeList > |
UncertainArrayHandle< NewValueTypeList, StorageTypeList > | ResetValueTypes (NewValueTypeList=NewValueTypeList{}) const |
| Like ResetTypes except it only resets the value types. More...
|
|
template<typename NewStorageTypeList > |
UncertainArrayHandle< ValueTypeList, NewStorageTypeList > | ResetStorageTypes (NewStorageTypeList=NewStorageTypeList{}) const |
| Like ResetTypes except it only resets the storage types. More...
|
|
template<typename Functor , typename... Args> |
void | CastAndCall (Functor &&functor, Args &&... args) const |
| Call a functor using the underlying array type. More...
|
|
template<typename Functor , typename... Args> |
void | CastAndCallWithFloatFallback (Functor &&functor, Args &&... args) const |
| Call a functor using the underlying array type with a float cast fallback. More...
|
|
Public Member Functions inherited from vtkm::cont::UnknownArrayHandle |
| UnknownArrayHandle ()=default |
|
template<typename T , typename S > |
| UnknownArrayHandle (const vtkm::cont::ArrayHandle< T, S > &array) |
|
bool | IsValid () const |
| Returns whether an array is stored in this UnknownArrayHandle . More...
|
|
UnknownArrayHandle | NewInstance () const |
| Create a new array of the same type as this array. More...
|
|
UnknownArrayHandle | NewInstanceBasic () const |
| Create a new ArrayHandleBasic with the same ValueType as this array. More...
|
|
UnknownArrayHandle | NewInstanceFloatBasic () const |
| Create a new ArrayHandleBasic with the base component of vtkm::FloatDefault More...
|
|
std::string | GetValueTypeName () const |
| Returns the name of the value type stored in the array. More...
|
|
std::string | GetBaseComponentTypeName () const |
| Returns the name of the base component of the value type stored in the array. More...
|
|
std::string | GetStorageTypeName () const |
| Returns the name of the storage tag for the array. More...
|
|
std::string | GetArrayTypeName () const |
| Returns a string representation of the underlying data type. More...
|
|
template<typename ValueType > |
bool | IsValueType () const |
| Returns true if this array matches the ValueType template argument. More...
|
|
template<typename StorageType > |
bool | IsStorageType () const |
| Returns true if this array matches the StorageType template argument. More...
|
|
template<typename BaseComponentType > |
bool | IsBaseComponentType () const |
| Returns true if this array's ValueType has the provided base component type. More...
|
|
template<typename ArrayHandleType > |
bool | IsType () const |
| Returns true if this array matches the ArrayHandleType template argument. More...
|
|
template<typename NewValueTypeList , typename NewStorageTypeList > |
vtkm::cont::UncertainArrayHandle< NewValueTypeList, NewStorageTypeList > | ResetTypes (NewValueTypeList=NewValueTypeList{}, NewStorageTypeList=NewStorageTypeList{}) const |
| Assigns potential value and storage types. More...
|
|
vtkm::Id | GetNumberOfValues () const |
| Returns the number of values in the array. More...
|
|
vtkm::IdComponent | GetNumberOfComponents () const |
| Returns the number of components for each value in the array. More...
|
|
vtkm::IdComponent | GetNumberOfComponentsFlat () const |
| Returns the total number of components for each value in the array. More...
|
|
void | Allocate (vtkm::Id numValues, vtkm::CopyFlag preserve, vtkm::cont::Token &token) const |
| Reallocate the data in the array. More...
|
|
void | Allocate (vtkm::Id numValues, vtkm::CopyFlag preserve=vtkm::CopyFlag::Off) const |
| Reallocate the data in the array. More...
|
|
template<typename ArrayHandleType > |
bool | CanConvert () const |
| Determine if the contained array can be passed to the given array type. More...
|
|
template<typename T , typename S > |
void | AsArrayHandle (vtkm::cont::ArrayHandle< T, S > &array) const |
| Returns this array cast appropriately and stored in the given ArrayHandle type. More...
|
|
template<typename T > |
void | AsArrayHandle (vtkm::cont::ArrayHandle< T > &array) const |
| Returns this array cast appropriately and stored in the given ArrayHandle type. More...
|
|
template<typename T , typename... Ss> |
void | AsArrayHandle (vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagMultiplexer< Ss... >> &array) const |
| Returns this array cast appropriately and stored in the given ArrayHandle type. More...
|
|
template<typename TargetT , typename SourceT , typename SourceS > |
void | AsArrayHandle (vtkm::cont::ArrayHandle< TargetT, vtkm::cont::StorageTagCast< SourceT, SourceS >> &array) const |
| Returns this array cast appropriately and stored in the given ArrayHandle type. More...
|
|
template<typename T > |
void | AsArrayHandle (vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagRuntimeVec > &array) const |
| Returns this array cast appropriately and stored in the given ArrayHandle type. More...
|
|
template<typename ArrayType > |
ArrayType | AsArrayHandle () const |
| Returns this array cast appropriately and stored in the given ArrayHandle type. More...
|
|
void | DeepCopyFrom (const vtkm::cont::UnknownArrayHandle &source) |
| Deep copies data from another UnknownArrayHandle . More...
|
|
void | DeepCopyFrom (const vtkm::cont::UnknownArrayHandle &source) const |
| Deep copies data from another UnknownArrayHandle . More...
|
|
void | CopyShallowIfPossible (const vtkm::cont::UnknownArrayHandle &source) |
| Attempts a shallow copy of an array or a deep copy if that is not possible. More...
|
|
void | CopyShallowIfPossible (const vtkm::cont::UnknownArrayHandle &source) const |
| Attempts a shallow copy of an array or a deep copy if that is not possible. More...
|
|
template<typename BaseComponentType > |
vtkm::cont::ArrayHandleStride< BaseComponentType > | ExtractComponent (vtkm::IdComponent componentIndex, vtkm::CopyFlag allowCopy=vtkm::CopyFlag::On) const |
| Extract a component of the array. More...
|
|
template<typename BaseComponentType > |
vtkm::cont::ArrayHandleRecombineVec< BaseComponentType > | ExtractArrayFromComponents (vtkm::CopyFlag allowCopy=vtkm::CopyFlag::On) const |
| Extract the array knowing only the component type of the array. More...
|
|
template<typename TypeList , typename StorageList , typename Functor , typename... Args> |
void | CastAndCallForTypes (Functor &&functor, Args &&... args) const |
| Call a functor using the underlying array type. More...
|
|
template<typename TypeList , typename StorageList , typename Functor , typename... Args> |
void | CastAndCallForTypesWithFloatFallback (Functor &&functor, Args &&... args) const |
| Call a functor using the underlying array type with a float cast fallback. More...
|
|
template<typename Functor , typename... Args> |
void | CastAndCallWithExtractedArray (Functor &&functor, Args &&... args) const |
| Call a functor on an array extracted from the components. More...
|
|
void | ReleaseResourcesExecution () const |
| Releases any resources being used in the execution environment (that are not being shared by the control environment). More...
|
|
void | ReleaseResources () const |
| Releases all resources in both the control and execution environments. More...
|
|
void | PrintSummary (std::ostream &out, bool full=false) const |
| Prints a summary of the array's type, size, and contents. More...
|
|
template<typename ValueTypeList, typename StorageTypeList>
class vtkm::cont::UncertainArrayHandle< ValueTypeList, StorageTypeList >
An ArrayHandle of an uncertain value type and storage.
UncertainArrayHandle
holds an ArrayHandle
object using runtime polymorphism to manage different value and storage types. It behaves like its superclass, UnknownArrayHandle
, except that it also contains two template parameters that provide vtkm::List
s of potential value and storage types, respectively.
These potential value and storage types come into play when the CastAndCall
method is called (or the UncertainArrayHandle
is used in the vtkm::cont::CastAndCall
function). In this case, the CastAndCall
will search for ArrayHandle
s of types that match these two lists.
Both UncertainArrayHandle
and UnknownArrayHandle
have a method named ResetTypes
that redefine the lists of potential value and storage types by returning a new UncertainArrayHandle
containing the same ArrayHandle
but with the new value and storage type lists.