Commit 361b24a6 authored by Christoph Ruegge's avatar Christoph Ruegge
Browse files

add hintInterleave to mandelbrot example

parent ffd5e06d
......@@ -21,6 +21,7 @@ and show what the threads are doing
import Data.Array.Repa as R
import Data.Array.Repa.Algorithms.Complex
import Data.Array.Repa.Repr.HintInterleave
import Data.List (findIndex)
import Data.Packed.Repa
import Numeric.Container (saveMatrix)
......@@ -49,7 +50,8 @@ main = do
let size = (1024,1024)
!coord <- computeP $ fromFunction (grid size) ( calcView view size) :: IO (Array U DIM2 Complex)
!zmat <- computeP $ R.map ( maybe 0 fromIntegral . isMandel 35 3) coord :: IO (Array U DIM2 Double)
let z = R.map ( maybe 0 fromIntegral . isMandel 35 3) coord :: Array D DIM2 Double
!zmat <- computeP $ hintInterleave z :: IO (Array U DIM2 Double)
print "finished"
-- write out matrices to visualize with python
let xmat = copyS $ R.map fst coord
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment