Shift Stream module from dph-base into dph-prim-seq
authorBen Lippmeier <benl@ouroborus.net>
Fri, 3 Feb 2012 02:28:43 +0000 (13:28 +1100)
committerBen Lippmeier <benl@ouroborus.net>
Fri, 3 Feb 2012 02:28:43 +0000 (13:28 +1100)
dph-base/dph-base.cabal
dph-prim-seq/Data/Array/Parallel/Unlifted/Sequential/Basics.hs
dph-prim-seq/Data/Array/Parallel/Unlifted/Sequential/Combinators.hs
dph-prim-seq/Data/Array/Parallel/Unlifted/Sequential/Vector.hs
dph-prim-seq/Data/Array/Parallel/Unlifted/Stream.hs
dph-prim-seq/Data/Array/Parallel/Unlifted/Stream/Segmented.hs [moved from dph-base/Data/Array/Parallel/Stream.hs with 98% similarity]
dph-prim-seq/dph-prim-seq.cabal

index 757e873..1c2b28d 100644 (file)
@@ -23,7 +23,6 @@ Library
         Data.Array.Parallel.Base.Text
         Data.Array.Parallel.Base.DTrace
         Data.Array.Parallel.Base.TracePrim
-        Data.Array.Parallel.Stream
         Data.Array.Parallel.Pretty
         Data.Array.Parallel.Array
 
@@ -31,7 +30,7 @@ Library
         Data.Array.Parallel.Base.Config
         Data.Array.Parallel.Base.Debug
         Data.Array.Parallel.Base.Tag
-        
+
   Include-Dirs:
         include
 
index 4731106..bc396b6 100644 (file)
@@ -7,7 +7,7 @@ module Data.Array.Parallel.Unlifted.Sequential.Basics
         , appendSU
         , indicesSU, indicesSU')
 where
-import Data.Array.Parallel.Stream
+import Data.Array.Parallel.Unlifted.Stream
 import Data.Array.Parallel.Unlifted.Sequential.Vector
 import Data.Array.Parallel.Unlifted.Sequential.USegd            (USegd)
 import qualified Data.Array.Parallel.Unlifted.Sequential.USegd  as USegd
index ff9fade..38410c0 100644 (file)
@@ -10,7 +10,6 @@ module Data.Array.Parallel.Unlifted.Sequential.Combinators
         , foldlRU
         , combineSU)
 where
-import Data.Array.Parallel.Stream
 import Data.Array.Parallel.Unlifted.Stream
 import Data.Array.Parallel.Unlifted.Vectors                     as US
 import Data.Array.Parallel.Unlifted.Sequential.Vector           as U
index e912bb8..4c10994 100644 (file)
@@ -95,7 +95,7 @@ module Data.Array.Parallel.Unlifted.Sequential.Vector (
   UIO(..)
 ) 
 where
-import Data.Array.Parallel.Stream
+import Data.Array.Parallel.Unlifted.Stream.Segmented
 import Data.Array.Parallel.Base ( Tag, checkEq, ST )
 import qualified Data.Array.Parallel.Base       as B
 import qualified Data.Vector.Unboxed            as V
index b60afa2..925abb6 100644 (file)
@@ -1,19 +1,11 @@
 
 module Data.Array.Parallel.Unlifted.Stream
-        ( -- * Index streamers.
-          streamSrcIxsThroughVSegids
-        , streamSrcIxsThroughUSSegd
-
-          -- * Element streamers.
-        , streamElemsFromVector
-        , streamElemsFromVectors
-        , streamElemsFromVectorsVSegd
-
-          -- * Segment streamers.
-        , streamSegsFromNestedUSSegd
-        , streamSegsFromVectorsUSSegd
-        , streamSegsFromVectorsUVSegd)
+        ( module Data.Array.Parallel.Unlifted.Stream.Segmented
+        , module Data.Array.Parallel.Unlifted.Stream.Ixs
+        , module Data.Array.Parallel.Unlifted.Stream.Elems
+        , module Data.Array.Parallel.Unlifted.Stream.Segments)
 where
+import Data.Array.Parallel.Unlifted.Stream.Segmented
 import Data.Array.Parallel.Unlifted.Stream.Ixs
 import Data.Array.Parallel.Unlifted.Stream.Elems
 import Data.Array.Parallel.Unlifted.Stream.Segments
@@ -1,7 +1,19 @@
--- | Stream functions not implemented in @Data.Vector@
+{-# LANGUAGE CPP #-}
+{-# OPTIONS -fno-warn-name-shadowing -fno-warn-unused-matches -fno-warn-incomplete-patterns #-}
 #include "fusion-phases.h"
 
-module Data.Array.Parallel.Stream 
+-- TODO: 
+--  The use of INLINE pragmas in some of these function isn't consistent.
+--  for indexedS and combine2ByTagS, there is an INLINE_INNER on the 'next'
+--  function, but replicateEachS uses a plain INLINE and fold1SS uses
+--  a hard INLINE [0]. Can we make a rule that all top-level stream functions
+--  in this module have INLINE_STREAM, and all 'next' functions have
+--  INLINE_INNER? If not we should document the reasons for the special cases.
+--
+--  Fix warnings in this module.
+
+-- | Stream functions not implemented in @Data.Vector@
+module Data.Array.Parallel.Unlifted.Stream.Segmented
         ( indexedS
         , replicateEachS
         , replicateEachRS
@@ -22,15 +34,6 @@ import Data.Vector.Fusion.Stream.Monadic        (Stream(..), Step(..))
 import Data.Vector.Fusion.Stream.Size           (Size(..))
 
 
--- TODO: 
---  The use of INLINE pragmas in some of these function isn't consistent.
---  for indexedS and combine2ByTagS, there is an INLINE_INNER on the 'next'
---  function, but replicateEachS uses a plain INLINE and fold1SS uses
---  a hard INLINE [0]. Can we make a rule that all top-level stream functions
---  in this module have INLINE_STREAM, and all 'next' functions have
---  INLINE_INNER? If not we should document the reasons for the special cases.
---
-
 -- Indexed --------------------------------------------------------------------
 -- | Tag each element of an stream with its index in that stream.
 --
index a4e22ba..1fd157d 100644 (file)
@@ -23,9 +23,6 @@ Library
         Data.Array.Parallel.Unlifted.Sequential.UVSegd
         Data.Array.Parallel.Unlifted.Sequential.Vector
         Data.Array.Parallel.Unlifted.Sequential
-        Data.Array.Parallel.Unlifted.Stream.Ixs
-        Data.Array.Parallel.Unlifted.Stream.Elems
-        Data.Array.Parallel.Unlifted.Stream.Segments
         Data.Array.Parallel.Unlifted.Stream
         Data.Array.Parallel.Unlifted.Vectors
         Data.Array.Parallel.Unlifted.ArrayArray
@@ -36,6 +33,10 @@ Library
         Data.Array.Parallel.Unlifted.Sequential.Combinators
         Data.Array.Parallel.Unlifted.Sequential.Sums
         Data.Array.Parallel.Unlifted.Sequential.Extracts
+        Data.Array.Parallel.Unlifted.Stream.Segmented
+        Data.Array.Parallel.Unlifted.Stream.Ixs
+        Data.Array.Parallel.Unlifted.Stream.Elems
+        Data.Array.Parallel.Unlifted.Stream.Segments
   
 
   Exposed: False