[commit: packages/dph] master: Follow changes in comparison primops (see #6135) (a3286e6)

git at git.haskell.org git at git.haskell.org
Wed Sep 18 17:27:52 CEST 2013


Repository : ssh://git@git.haskell.org/dph

On branch  : master
Link       : http://git.haskell.org/packages/dph.git/commitdiff/a3286e689cf98d2656175f94a8da50ff733d6d58

>---------------------------------------------------------------

commit a3286e689cf98d2656175f94a8da50ff733d6d58
Author: Jan Stolarek <jan.stolarek at p.lodz.pl>
Date:   Mon Sep 16 15:17:17 2013 +0100

    Follow changes in comparison primops (see #6135)


>---------------------------------------------------------------

a3286e689cf98d2656175f94a8da50ff733d6d58
 dph-lifted-vseg/Data/Array/Parallel/PArray.hs                 |    3 ++-
 .../Data/Array/Parallel/Unlifted/Parallel/Segmented.hs        |    9 +++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/dph-lifted-vseg/Data/Array/Parallel/PArray.hs b/dph-lifted-vseg/Data/Array/Parallel/PArray.hs
index 6b71991..26610fe 100644
--- a/dph-lifted-vseg/Data/Array/Parallel/PArray.hs
+++ b/dph-lifted-vseg/Data/Array/Parallel/PArray.hs
@@ -74,6 +74,7 @@ import Data.Array.Parallel.PArray.PRepr
 import Data.Array.Parallel.PArray.Scalar
 import Data.Array.Parallel.PArray.Reference.Convert
 import GHC.Exts (Int(I#), (==#), (+#))
+import GHC.Base ( isTrue# )
 import Data.Vector                              (Vector)
 import Data.Array.Parallel.Base                 (Tag)
 import qualified Data.Array.Parallel.Pretty			as T
@@ -216,7 +217,7 @@ replicatel reps arr@(PArray n# pdata)
 
 replicatel_ :: PA a => PArray Int -> PArray a -> PArray (PArray a)
 replicatel_ (PArray n# (PInt lens)) (PArray _ pdata)
- = if n# ==# 0# then empty else 
+ = if isTrue# (n# ==# 0#) then empty else
     let !segd    = U.lengthsToSegd lens
         !vsegd   = U.promoteSegdToVSegd segd
         !pdata'  = replicatesPA segd pdata
diff --git a/dph-prim-par/Data/Array/Parallel/Unlifted/Parallel/Segmented.hs b/dph-prim-par/Data/Array/Parallel/Unlifted/Parallel/Segmented.hs
index 8214d36..b8b0a60 100644
--- a/dph-prim-par/Data/Array/Parallel/Unlifted/Parallel/Segmented.hs
+++ b/dph-prim-par/Data/Array/Parallel/Unlifted/Parallel/Segmented.hs
@@ -28,6 +28,7 @@ import Data.Vector.Fusion.Stream.Size    ( Size(..) )
 import qualified Data.Vector.Fusion.Stream                              as S
 
 import GHC.Exts -- for unboxed primops
+import GHC.Base ( isTrue# )
 
 here :: String -> String
 here s = "Data.Array.Parallel.Unlifted.Parallel.Segmented." Prelude.++ s
@@ -145,7 +146,7 @@ appendSegS !xd !xs !yd !ys !n seg_off el_off
     -- Reading from xs
     next s at ASDo{as_takefrom=0#}
       -- Done reading xs, so read the rest of this segment from ys.
-      | as_next_swap s  ==# 0#
+      | isTrue# (as_next_swap s  ==# 0#)
       = return $ Skip (s{as_takefrom=1#, as_next_swap= unbox (ylens `index1` I# (as_seg_off s))})
 
       -- Grab a value from xs
@@ -154,7 +155,7 @@ appendSegS !xd !xs !yd !ys !n seg_off el_off
     -- Reading from ys; takefrom nonzero
     next s
       -- Done reading ys, so we need to look at the next segment's xs
-      | as_next_swap s  ==# 0#
+      | isTrue# (as_next_swap s  ==# 0#)
       = let seg' = as_seg_off s +# 1#
         in  return $ Skip (s {as_takefrom=0#, as_seg_off=seg', as_next_swap= unbox (xlens `index1` I# seg')})
 
@@ -319,7 +320,7 @@ appendUPVSegS !xd !xs !yd !ys !n seg_off el_off
     -- Reading from xs
     next s at ASUPVDo{avs_takefrom=0#}
       -- Done reading xs, so read the rest of this segment from ys.
-      | avs_next_swap s  ==# 0#  =
+      | isTrue# (avs_next_swap s  ==# 0#)  =
         let     seg'            = I# (avs_seg_off s)
                 (src,strt)      = getscatter ypseg ysrc ystrt seg'
         in      return $ Skip $
@@ -335,7 +336,7 @@ appendUPVSegS !xd !xs !yd !ys !n seg_off el_off
     -- Reading from ys, so avs_takefrom=1#
     next s
       -- Done reading ys, so we need to look at the next segment's xs
-      | avs_next_swap s  ==# 0#
+      | isTrue# (avs_next_swap s  ==# 0#)
       = let     seg'            = I# (avs_seg_off s +# 1#)
                 (src,strt)      = getscatter xpseg xsrc xstrt seg'
         in      return $ Skip $




More information about the ghc-commits mailing list