VTK/Supporting Arrays With Arbitrary Memory Layouts: Difference between revisions

From KitwarePublic
< VTK
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
=Background=
=Background=


Not too long ago, the notion of [[VTK/InSituDataStructures|Mapped Arrays]] was introduced in VTK. The main objective behind these was to add support to handle data arrays with arbitrary memory layouts in VTK. This motivation was to support in-situ data processing use-cases without having to ''deep-copy'' arrays from simulation datastructures to VTK's memory layout when the simulation used different memory layout that VTK's.
Not too long ago, the notion of [[VTK/InSituDataStructures|Mapped Arrays]] was introduced in VTK. The main objective behind these was to add support to handle data arrays with arbitrary memory layouts in VTK. This motivation was to support in-situ data processing use-cases without having to ''deep-copy'' arrays from simulation datastructures to VTK's memory layout when the simulation used different memory layout than VTK's. While mapped arrays enabled supporting arbitrary memory layouts in VTK for the the first time, they started to get used by a wider community, a few drawbacks come to light:
 
# Adding a new array layout required developers to implement a large number of pure-virtual methods defined in its superclass hierarchy. This list is discouragingly large especially for simulation developers, not too familiar with VTK. For veteran VTK developers, this was tedious at the least.
# Virtual API for accessing values in a generic way meant that the access was invariably slow and kept compilers from performing further optimizations.
 
This new design attempts to address both these issues.

Revision as of 18:09, 6 July 2015

Background

Not too long ago, the notion of Mapped Arrays was introduced in VTK. The main objective behind these was to add support to handle data arrays with arbitrary memory layouts in VTK. This motivation was to support in-situ data processing use-cases without having to deep-copy arrays from simulation datastructures to VTK's memory layout when the simulation used different memory layout than VTK's. While mapped arrays enabled supporting arbitrary memory layouts in VTK for the the first time, they started to get used by a wider community, a few drawbacks come to light:

  1. Adding a new array layout required developers to implement a large number of pure-virtual methods defined in its superclass hierarchy. This list is discouragingly large especially for simulation developers, not too familiar with VTK. For veteran VTK developers, this was tedious at the least.
  2. Virtual API for accessing values in a generic way meant that the access was invariably slow and kept compilers from performing further optimizations.

This new design attempts to address both these issues.