Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void deinterleave_mm(int *a, int len)
- {
- for (int i = 1; i < len/2; i++)
- {
- // move a left int into place
- int t = a[i*2];
- memmove(&a[i+1], &a[i], i * sizeof(int));
- a[i] = t;
- }
- }
- void interleave_mm(int *a, int len)
- {
- for (int i = len/2-1; i > 0; i--)
- {
- // move a left int into place
- int t = a[i];
- memmove(&a[i], &a[i+1], i * sizeof(int));
- a[i*2] = t;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement