Repository : ssh://darcs.haskell.org//srv/darcs/nofib On branch : master
http://hackage.haskell.org/trac/ghc/changeset/621a7bdd0f54050c62613c04340721e8e3eb89dc >--------------------------------------------------------------- commit 621a7bdd0f54050c62613c04340721e8e3eb89dc Author: Simon Marlow <[email protected]> Date: Thu Oct 13 12:06:20 2011 +0100 update to work with the latest parallel package >--------------------------------------------------------------- parallel/coins/coins.hs | 2 +- parallel/gray/Illumination.hs | 6 +++--- parallel/mandel/Mandel.lhs | 2 +- parallel/minimax/Game.hs | 6 +++--- parallel/ray/Main.lhs | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/parallel/coins/coins.hs b/parallel/coins/coins.hs index a0796ef..33d04e6 100644 --- a/parallel/coins/coins.hs +++ b/parallel/coins/coins.hs @@ -78,7 +78,7 @@ payA_par depth val ((c,q):coins) acc | otherwise = res where - res = unEval $ pure append <*> rpar left <*> rwhnf right + res = runEval $ pure append <*> rpar left <*> rseq right left = payA_par (if q == 1 then (depth-1) else depth) (val - c) coins' (c:acc) right = payA_par (depth-1) val coins acc diff --git a/parallel/gray/Illumination.hs b/parallel/gray/Illumination.hs index 68ca1f2..3914b4e 100644 --- a/parallel/gray/Illumination.hs +++ b/parallel/gray/Illumination.hs @@ -14,7 +14,7 @@ module Illumination ) where import Control.Parallel -import Control.Parallel.Strategies (withStrategy, parBuffer, rwhnf) +import Control.Parallel.Strategies (withStrategy, parBuffer, rseq) import Data.Array import Data.Char(chr) @@ -38,9 +38,9 @@ render (m,m') amb ls obj dep fov wid ht file } where #ifdef STRATEGIES_2 - parallel = parBuffer 100 rwhnf . map (\x -> seqList x `pseq` x) + parallel = parBuffer 100 rseq . map (\x -> seqList x `pseq` x) #else - parallel = withStrategy (parBuffer 100 rwhnf) . map (\x -> seqList x `pseq` x) + parallel = withStrategy (parBuffer 100 rseq) . map (\x -> seqList x `pseq` x) #endif debugging = return () diff --git a/parallel/mandel/Mandel.lhs b/parallel/mandel/Mandel.lhs index 1e154fb..fdd0267 100644 --- a/parallel/mandel/Mandel.lhs +++ b/parallel/mandel/Mandel.lhs @@ -135,7 +135,7 @@ parallelMandel mat limit radius #ifdef STRATEGIES_2 parallel = parBuffer 70 rwhnf #else - parallel = withStrategy (parBuffer 70 rwhnf) + parallel = withStrategy (parBuffer 70 rseq) #endif seqList :: [a] -> () diff --git a/parallel/minimax/Game.hs b/parallel/minimax/Game.hs index eb12b1f..3e0ef04 100644 --- a/parallel/minimax/Game.hs +++ b/parallel/minimax/Game.hs @@ -1,4 +1,4 @@ --- Time-stamp: <2010-02-12 14:57:09 simonmar> +-- Time-stamp: <2011-10-07 11:36:17 simonmar> ----------------------------------------------------------------------------- module Game where @@ -20,7 +20,7 @@ alternate _ _ _ _ b | static b == OWin = [] alternate depth player f g board = move : alternate depth opponent g f board' where move@(board',eval) = best f possibles scores - scores = map (bestMove depth opponent g f) possibles `using` parList rwhnf + scores = map (bestMove depth opponent g f) possibles `using` parList rseq possibles = newPositions player board opponent = opposite player @@ -62,4 +62,4 @@ mise f g (Branch _ l) = foldr f (g OWin XWin) (map (mise g f) l) parMise :: Int -> Player -> Player -> (Tree Evaluation) -> Evaluation parMise 0 f g t = mise f g t parMise n f g (Branch a []) = a -parMise n f g (Branch _ l) = foldr f (g OWin XWin) (map (parMise (n-1) g f) l `using` parList rwhnf) +parMise n f g (Branch _ l) = foldr f (g OWin XWin) (map (parMise (n-1) g f) l `using` parList rseq) diff --git a/parallel/ray/Main.lhs b/parallel/ray/Main.lhs index 347acbd..a1a72e6 100644 --- a/parallel/ray/Main.lhs +++ b/parallel/ray/Main.lhs @@ -3,7 +3,7 @@ Michaelson for SML, converted to (parallel) Haskell by Kevin Hammond! > {-# LANGUAGE BangPatterns,CPP #-} > import Control.Parallel -> import Control.Parallel.Strategies (Strategy, withStrategy, rwhnf, parBuffer) +> import Control.Parallel.Strategies (Strategy, withStrategy, rseq, parBuffer) > import System.Environment > main = do @@ -144,7 +144,7 @@ in_poly_test (p,q,r) (A,B,C) Vs #ifdef STRATEGIES_2 > parallel = parBuffer 200 rwhnf #else -> parallel = withStrategy (parBuffer 200 rwhnf) +> parallel = withStrategy (parBuffer 200 rseq) #endif _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
