Skip to content

Support `ArrayHandleSOA` as a "default" array

Kenneth Moreland requested to merge kmorel/vtk-m:soa-array-default into master

Many programs, particularly simulations, store fields of vectors in separate arrays for each component. This maps to the storage of ArrayHandleSOA. The VTK-m code tends to prefer the AOS storage (which is what is implemented in ArrayHandleBasic, and the behavior of which is inherited from VTK). However, we can better support SOA arrays by simply adding it to the list of "basic" arrays that operations should be built for.

Part of this change includes an intentional feature regression of ArrayHandleSOA to only support value types of Vec. Previously, scalar types were supported. However, the behavior of ArrayHandleSOA is exactly the same as ArrayHandleBasic, except a lot more template code has to be generated. That itself is not a huge deal, but because you have 2 types that essentially do the same thing, a lot of template code in VTK-m would unwind to create two separate code paths that do the same thing with the same data. To avoid creating those code paths, we simply make any use of ArrayHandleSOA without a Vec value invalid. This will prevent VTK-m from creating those code paths.

Edited by Kenneth Moreland

Merge request reports

Loading