29 #ifndef vtkmDataArray_h
30 #define vtkmDataArray_h
32 #include "vtkAcceleratorsVTKmCoreModule.h"
34 #include "vtkmConfigCore.h"
36 #include <vtkm/VecTraits.h>
37 #include <vtkm/cont/ArrayHandle.h>
38 #include <vtkm/cont/UnknownArrayHandle.h>
44 VTK_ABI_NAMESPACE_BEGIN
52 VTK_ABI_NAMESPACE_BEGIN
63 using typename Superclass::ValueType;
69 template <
typename V,
typename S>
82 using Superclass::ComputeScalarRange;
84 double* ranges,
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff)
override;
85 using Superclass::ComputeVectorRange;
87 double range[2],
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff)
override;
88 using Superclass::ComputeFiniteScalarRange;
90 double* ranges,
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff)
override;
91 using Superclass::ComputeFiniteVectorRange;
93 double range[2],
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff)
override;
106 bool AllocateTuples(
vtkIdType numberOfTuples);
107 bool ReallocateTuples(
vtkIdType numberOfTuples);
109 std::unique_ptr<internal::ArrayHandleHelperInterface<T>> Helper;
116 template <
typename T,
typename S>
118 const vtkm::cont::ArrayHandle<T, S>& ah)
121 ret->SetVtkmArrayHandle(ah);
126 #ifndef vtkmDataArray_cxx
142 VTK_ABI_NAMESPACE_END
145 #include "vtkmlib/vtkmDataArray.hxx"
Base interface for all typed vtkDataArray subclasses.
abstract base class for most VTK objects
Wraps a VTK-m ArrayHandle inside a sub-class of vtkGenericDataArray.
bool ComputeVectorRange(double range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff) override
Returns true if the range was computed.
bool ComputeFiniteVectorRange(double range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff) override
Returns true if the range was computed.
vtkm::cont::UnknownArrayHandle GetVtkmUnknownArrayHandle() const
Get the underlying ArrayHandle.
~vtkmDataArray() override
static vtkmDataArray * New()
void SetVtkmArrayHandle(const vtkm::cont::ArrayHandle< V, S > &ah)
Set the VTK-m ArrayHandle to be wrapped.
bool ComputeFiniteScalarRange(double *ranges, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff) override
Computes the range for each component of an array, the length of ranges must be two times the number ...
bool ComputeScalarRange(double *ranges, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff) override
Computes the range for each component of an array, the length of ranges must be two times the number ...
vtkmDataArray< typename vtkm::VecTraits< T >::BaseComponentType > * make_vtkmDataArray(const vtkm::cont::ArrayHandle< T, S > &ah)