permute ( bytes width stride src-order dst-order -- new-bytes )


Vocabulary
images.normalization.private

Inputs
bytesan object
widthan object
stridean object
src-orderan object
dst-orderan object


Outputs
new-bytesan object


Definition


:: permute
( bytes width stride src-order dst-order -- new-bytes )
src-order name>> :> src dst-order name>> :> dst bytes stride
group [
src length group width head
[ pad4 src dst permutation shuffle dst length head ] map
concat
] map concat ;