Array Refactoring: Difference between revisions
From ParaQ Wiki
Jump to navigationJump to search
mNo edit summary |
m (→Recent Work) |
||
Line 5: | Line 5: | ||
== Recent Work == | == Recent Work == | ||
* Added vtkArray::GetName() and vtkArray::SetName() | * Merged vtkFactoredArrayData / vtkFactoredArrayDataAlgorithm into vtkArrayData / vtkArrayDataAlgorithm. | ||
* Added vtkArray::GetName() and vtkArray::SetName(). | |||
* vtkDenseArray memory management. | * vtkDenseArray memory management. | ||
** vtkDenseArray::MemoryBlock | ** vtkDenseArray::MemoryBlock. | ||
** vtkDenseArray::StaticMemoryBlock | ** vtkDenseArray::StaticMemoryBlock. | ||
** vtkDenseArray::HeapMemoryBlock | ** vtkDenseArray::HeapMemoryBlock. | ||
* vtkSparseICSArray | * vtkSparseICSArray. | ||
** Changes the way coordinates are stored, one contiguous array of coordinates per dimension, instead of a single contiguous array for all dimensions. | ** Changes the way coordinates are stored, one contiguous array of coordinates per dimension, instead of a single contiguous array for all dimensions. | ||
** Implements value sorting. | ** Implements value sorting. |
Revision as of 11:10, 8 April 2009
Overview
Now that we have N-Way Array Data Structures, it would be ideal if we could use them as attributes in data objects. This will likely involve some tricky work to somehow merge the vtkAbstractArray- and vtkArray- hierarchies.
Recent Work
- Merged vtkFactoredArrayData / vtkFactoredArrayDataAlgorithm into vtkArrayData / vtkArrayDataAlgorithm.
- Added vtkArray::GetName() and vtkArray::SetName().
- vtkDenseArray memory management.
- vtkDenseArray::MemoryBlock.
- vtkDenseArray::StaticMemoryBlock.
- vtkDenseArray::HeapMemoryBlock.
- vtkSparseICSArray.
- Changes the way coordinates are stored, one contiguous array of coordinates per dimension, instead of a single contiguous array for all dimensions.
- Implements value sorting.
- Could probably replace the current vtkSparseArray implementation.
Proposed Work
- Provide iterators, memory layout functionality in vtkDenseArray to support in-situ work.
- Support vtkArray as attributes. Some different approaches:
- vtkArray derives from vtkAbstractArray.
- Worst possible approach, there are methods in vtkAbstractArray (GetVoidPointer()) that are totally incompatible with sparse arrays.
- vtkArray and vtkAbstractArray remain apart.
- vtkFieldData would store vtkArray as a distinct type. Unfortunately, this GetArray() is already taken by vtkDataArray.
- Wouldn't work with Get/SetInputArrayToProcess().
- vtkAbstractArray derives from vtkArray.
- Implementing vtkArray in current vtkAbstractArray implementations should be straightforward.
- vtkFieldData would have to provide methods that return vtkArray. Same problems with GetArray().
- Implies changes to Get/SetInputArrayToProcess().
- vtkArray derives from vtkAbstractArray.