Custom Query (35 matches)
Results (25 - 27 of 35)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#19 | fixed | Parallelise sum and fold functions | ||
Description |
At the moment they just run sequentially, and use the Data.Vector versions. We should really do a parallel tree reduction. |
|||
#22 | fixed | Represent bitmaps as arrays of tuples | ||
Description |
Representing bitmaps as a 3D array isn't ideal because there's no way to perform a map over all the pixels. With this representation:
Suppose we want to convert the image to greyscale in a single operation. We'd really need a function like:
However, that doesn't work because we can't guarantee that the worker function always returns an array of the same length as the original. Because of this we can't guarantee that the result is rectangular, and Repa can only deal with rectangular arrays. If instead we represented Bitmaps as:
Then we could use the original map function and there'd be no problem.
Note that using triples is just as efficient as using a DIM3 array. Repa uses unboxed |
|||
#42 | fixed | Result of foldAllP isn't forced. | ||
Description |
Report from Chris Reade:
That is why I expected this code to work without the explicit writeHeatMapBMP :: String -> Array U DIM2 Double -> IO() writeHeatMapBMP filename arr = do maxVal <- foldAllP max 0.0 arr minVal <- foldAllP min 0.0 arr arrImageOut <- minVal `seq` maxVal `seq` computeP $ R.map rgb8OfDouble $ R.map (rampColorHotToCold minVal maxVal) arr writeImageToBMP filename arrImageOut The implementation of foldAllP should ensure that the result is evaluated before it returns. |