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.
let A = 0 let B = 1 let C = 2 ....and
let lut = ['A', 'B', 'C']