 : vmerge-transpose ( a b c d -- ac bd ac bd )
     [ (vmerge) ] bi-curry@ bi* ; inline
 
+: fold-rgba-planes ( r g b a -- rgba )
+    [ vmerge-transpose vmerge-transpose ]
+    data-map( uchar-16 uchar-16 uchar-16 uchar-16 -- uchar-16[4] ) ;
+
 [
     B{
          1  10  11  15

! (c)Joe Groff bsd license
USING: alien.data.map generalizations kernel math.vectors
math.vectors.conversion math.vectors.simd
specialized-arrays tools.test ;
FROM: alien.c-types => uchar short int float ;
SIMDS: float int short uchar ;

    B{  10  20  30  40  50  60  70  80  90 100 110 120 130 140 150 160 }
    B{  11  22  33  44  55  66  77  88  99 110 121 132 143 154 165 176 }
    B{  15  25  35  45  55  65  75  85  95 105 115 125 135 145 155 165 }
    fold-rgba-planes
] unit-test
