Skip to content

Simplify ArrayHandleSwizzle

Kenneth Moreland requested to merge kmorel/vtk-m:swizzle-uses-transform into master

As we update the ArrayHandles to the new buffer style, simplify ArrayHandleSwizzle by implementing it on top of ArrayHandleTransform. Also, introduce some C++11 template concepts to handle variable arguments better.

In this conversion, some features have been removed. Previously if the swizzle dropped some components, you were still allowed to write to the array. This would be an in place write that would only update the passed components. This feature has been removed and if any components are dropped, the array becomes read only. If all components are swizzled, then the array becomes writable (through templating).

Another lost feature is that the swizzle map is no longer checked for correctness. The array handle just assumes that the indices are correct.

It should be noted that it does not look like ArrayHandleSwizzle is actually used anywhere. If it is not used by any customers, we may want to consider deprecating the class.

Merge request reports

Loading