Array Refactoring: Difference between revisions
From ParaQ Wiki
Jump to navigationJump to search
m (→Action Items) |
m (→Action Items) |
||
Line 35: | Line 35: | ||
== Action Items == | == Action Items == | ||
* Performance comparisons between vtkDataArray & vtkDenseArray (Tim) | * Performance comparisons between vtkDataArray & vtkDenseArray (Tim Shead) | ||
* Modify vtkAbstractArray to provide access to an (optional) underlying vtkArray (Tim) | * Modify vtkAbstractArray to provide access to an (optional) underlying vtkArray (Tim Shead) | ||
* Modify vtkDataArray to use vtkDenseArray as an implementation ( | * Modify vtkDataArray to use vtkDenseArray as an implementation (Andy Bauer?) | ||
* Update vtkFieldData and vtkDataSetAttributes APIs to support vtkArray directly ( | * Update vtkFieldData and vtkDataSetAttributes APIs to support vtkArray directly (Andy Bauer?) | ||
* Deprecate vtkAbstractArray and its derivatives ( | * Deprecate vtkAbstractArray and its derivatives (Brian Wylie) |
Revision as of 14:19, 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, GetArray() is already taken by vtkDataArray.
- vtkAbstractArray derivatives HAVE-A vtkDenseArray to eliminate duplicate implementations.
- 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.
Action Items
- Performance comparisons between vtkDataArray & vtkDenseArray (Tim Shead)
- Modify vtkAbstractArray to provide access to an (optional) underlying vtkArray (Tim Shead)
- Modify vtkDataArray to use vtkDenseArray as an implementation (Andy Bauer?)
- Update vtkFieldData and vtkDataSetAttributes APIs to support vtkArray directly (Andy Bauer?)
- Deprecate vtkAbstractArray and its derivatives (Brian Wylie)