17 #ifndef vtkToDax_Allocators_h
18 #define vtkToDax_Allocators_h
20 #include <dax/VectorTraits.h>
37 template<
typename _T,
55 pointer p = value_type::New();
56 p->SetNumberOfComponents(NUM_COMPONENTS);
57 p->SetNumberOfTuples(n);
67 template<
int NUM_COMPONENTS>
82 pointer
allocate(size_type n, const_pointer hint = 0)
84 #ifdef DAX_USE_DOUBLE_PRECISION
100 template<
int NUM_COMPONENTS>
116 pointer
allocate(size_type n, const_pointer hint = 0)
118 pointer p = value_type::New();
119 const size_type numCells = n/NUM_COMPONENTS;
132 #endif //vtkToDax_Allocators_h
void deallocate(self::pointer p, self::size_type)
pointer allocate(size_type n, self::const_pointer hint=0)
void deallocate(pointer p, size_type)
ptrdiff_t difference_type
const T & const_reference
const T & const_reference
pointer allocate(size_type n, const_pointer hint=0)
void SetNumberOfPoints(vtkIdType numPoints)
Specify the number of points for this object to hold.
void deallocate(pointer p, size_type)
ptrdiff_t difference_type
virtual void SetNumberOfCells(vtkIdType)
Set the number of cells in the array.
object to represent cell connectivity
const T & const_reference
vtkIdTypeArray * GetData()
Return the underlying data as a data array.
pointer allocate(size_type n, const_pointer hint=0)
virtual void SetNumberOfTuples(vtkIdType numTuples)=0
Set the number of tuples (a component group) in the array.
represent and manipulate 3D points
virtual void Delete()
Delete a VTK object.
ptrdiff_t difference_type