From 9adf5ded237339dbe41db6c486993c4547396a22 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Mon, 15 Oct 2007 10:31:45 +0000 Subject: some windows support --- examples/parallel.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'examples/parallel.hs') diff --git a/examples/parallel.hs b/examples/parallel.hs index 8f67863..7256fb6 100644 --- a/examples/parallel.hs +++ b/examples/parallel.hs @@ -5,11 +5,9 @@ import System.Time inParallel = parMap rwhnf id -parMul x y = fromBlocks [[ay],[by]] - where p = rows x `div` 2 - a = takeRows p x - b = dropRows p x - [ay,by] = inParallel [a<>y,b<>y] +parMul x y = fromBlocks [inParallel[x <> y1, x <> y2]] + where p = cols y `div` 2 + (y1,y2) = splitColumnsAt p y main = do n <- (read . head) `fmap` getArgs @@ -20,6 +18,9 @@ main = do a = (2><3) [1..6::Double] b = (3><4) [1..12::Double] +splitRowsAt p m = (takeRows p m, dropRows p m) +splitColumnsAt p m = (takeColumns p m, dropColumns p m) + time act = do t0 <- getClockTime act -- cgit v1.2.3