let arr_shaped = R.reshape shape arr_swapped
dbl_data <- R.computeUnboxedP $ R.map fromIntegral arr_shaped
raw_output <- zoom dbl_data zoom_factor
- word16_output <- R.computeUnboxedP $ round_array raw_output
- write_word16s output word16_output
+ let word16_output = round_array raw_output
+ -- Switch the bytes order back to what it was. This lets us use the
+ -- same program to view the input/output data.
+ swapped_output <- R.computeUnboxedP $ swap_bytes word16_output
+ write_word16s output swapped_output
main2d :: Args -> R.DIM3 -> IO ()