More cleanup of `general_` functions

Merged Peter Bell requested to merge general_cleanup into cleanup2

This extracts as much of the common logic from the nd-transforms as possible into generic functions. With the transform-specific logic handled by the exec functor. I've also tried to abstract all of the data movement and vector-type reordering into overloads of the various copy_ functions.

This does currently keep r2c and c2r as their own special cases since they are subtly different in a few ways.

Edited by Peter Bell

Merge request reports