X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fconcurrent%2FParallel.lhs;h=4a6eacba3b84c3809f5c386b8090f1455a9c25c4;hb=24bb1c55a108781a022dae1f8412d62ae55a08b5;hp=2c068e64627603ef677d5c84ad971664cfc5c084;hpb=5d9278289bd6886f552951e3ee85200a4ef74f7c;p=ghc-hetmet.git diff --git a/ghc/lib/concurrent/Parallel.lhs b/ghc/lib/concurrent/Parallel.lhs index 2c068e6..4a6eacb 100644 --- a/ghc/lib/concurrent/Parallel.lhs +++ b/ghc/lib/concurrent/Parallel.lhs @@ -6,7 +6,7 @@ \begin{code} module Parallel (par, seq -- re-exported #if defined(__GRANSIM__) - , parGlobal, parLocal, parAt, parAtForNow + , parGlobal, parLocal, parAt, parAtAbs, parAtRel, parAtForNow #endif ) where @@ -15,18 +15,27 @@ import ConcBase ( par ) #if defined(__GRANSIM__) import PrelBase import GHCerr ( parError ) -import GHC ( parGlobal#, parLocal#, parAt#, parAtForNow# ) +import GHC ( parGlobal#, parLocal#, parAt#, parAtAbs#, parAtRel#, parAtForNow# ) {-# INLINE parGlobal #-} +{-# INLINE parLocal #-} +{-# INLINE parAt #-} +{-# INLINE parAtAbs #-} +{-# INLINE parAtRel #-} +{-# INLINE parAtForNow #-} parGlobal :: Int -> Int -> Int -> Int -> a -> b -> b parLocal :: Int -> Int -> Int -> Int -> a -> b -> b parAt :: Int -> Int -> Int -> Int -> a -> b -> c -> c +parAtAbs :: Int -> Int -> Int -> Int -> Int -> a -> b -> b +parAtRel :: Int -> Int -> Int -> Int -> Int -> a -> b -> b parAtForNow :: Int -> Int -> Int -> Int -> a -> b -> c -> c parGlobal (I# w) (I# g) (I# s) (I# p) x y = case (parGlobal# x w g s p y) of { 0# -> parError; _ -> y } parLocal (I# w) (I# g) (I# s) (I# p) x y = case (parLocal# x w g s p y) of { 0# -> parError; _ -> y } parAt (I# w) (I# g) (I# s) (I# p) v x y = case (parAt# x v w g s p y) of { 0# -> parError; _ -> y } +parAtAbs (I# w) (I# g) (I# s) (I# p) (I# q) x y = case (parAtAbs# x q w g s p y) of { 0# -> parError; _ -> y } +parAtRel (I# w) (I# g) (I# s) (I# p) (I# q) x y = case (parAtRel# x q w g s p y) of { 0# -> parError; _ -> y } parAtForNow (I# w) (I# g) (I# s) (I# p) v x y = case (parAtForNow# x v w g s p y) of { 0# -> parError; _ -> y } #endif