(\bit index -> i32.get_bit values[index])
'tof radix_sort to any signed type due to the use of index as an array index
i64in the core language, there would be trouble if you passed a a huge unsigned number that could not be represented as an
let f32greyscale min max v = let r = u32.f32 <| trace <| f32.round (255 * (v - min) / (max - min)) let g = r let b = r let a = 255 in r << 24 ^ g << 16 ^ b << 8 ^ a entry testImg a b = tabulate_2d a b (\i j -> f32.sin (f32.from_fraction i 100) * f32.sin (f32.from_fraction j 100)) |> map (map (f32greyscale (-1) 1)) -- > :img testImg 1000 500
$ futhark literate redtest.fut Internal compiler error (unhandled IO exception). Please report this at https://github.com/diku-dk/futhark/issues After sending command ["restore","/tmp/futhark-server-write3472946-1","const0","i32"] to server process:fd:330: hGetLine: end of file Server process exited unexpectedly with exit code: 1 Server stderr: ./redtest: Unknown type i32
futhark script) that is only about the side effects of directives (reading and writing images), not about the generation of a document.