Split into dph-base and dph
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>
Wed, 28 May 2008 05:08:17 +0000 (05:08 +0000)
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Wed, 28 May 2008 05:08:17 +0000 (05:08 +0000)
87 files changed:
dph-base/Data/Array/Parallel/Arr.hs [moved from Data/Array/Parallel/Arr.hs with 100% similarity]
dph-base/Data/Array/Parallel/Arr/BBArr.hs [moved from Data/Array/Parallel/Arr/BBArr.hs with 100% similarity]
dph-base/Data/Array/Parallel/Arr/BUArr.hs [moved from Data/Array/Parallel/Arr/BUArr.hs with 100% similarity]
dph-base/Data/Array/Parallel/Base.hs [moved from Data/Array/Parallel/Base.hs with 100% similarity]
dph-base/Data/Array/Parallel/Base/Config.hs [moved from Data/Array/Parallel/Base/Config.hs with 100% similarity]
dph-base/Data/Array/Parallel/Base/Debug.hs [moved from Data/Array/Parallel/Base/Debug.hs with 100% similarity]
dph-base/Data/Array/Parallel/Base/Hyperstrict.hs [moved from Data/Array/Parallel/Base/Hyperstrict.hs with 100% similarity]
dph-base/Data/Array/Parallel/Base/Rebox.hs [moved from Data/Array/Parallel/Base/Rebox.hs with 100% similarity]
dph-base/Data/Array/Parallel/Base/Text.hs [moved from Data/Array/Parallel/Base/Text.hs with 100% similarity]
dph-base/Data/Array/Parallel/Stream.hs [moved from Data/Array/Parallel/Stream.hs with 100% similarity]
dph-base/Data/Array/Parallel/Stream/Flat.hs [moved from Data/Array/Parallel/Stream/Flat.hs with 100% similarity]
dph-base/Data/Array/Parallel/Stream/Flat/Basics.hs [moved from Data/Array/Parallel/Stream/Flat/Basics.hs with 100% similarity]
dph-base/Data/Array/Parallel/Stream/Flat/Combinators.hs [moved from Data/Array/Parallel/Stream/Flat/Combinators.hs with 100% similarity]
dph-base/Data/Array/Parallel/Stream/Flat/Enum.hs [moved from Data/Array/Parallel/Stream/Flat/Enum.hs with 100% similarity]
dph-base/Data/Array/Parallel/Stream/Flat/Random.hs [moved from Data/Array/Parallel/Stream/Flat/Random.hs with 100% similarity]
dph-base/Data/Array/Parallel/Stream/Flat/Search.hs [moved from Data/Array/Parallel/Stream/Flat/Search.hs with 100% similarity]
dph-base/Data/Array/Parallel/Stream/Flat/Stream.hs [moved from Data/Array/Parallel/Stream/Flat/Stream.hs with 100% similarity]
dph-base/Data/Array/Parallel/Stream/Segmented.hs [moved from Data/Array/Parallel/Stream/Segmented.hs with 100% similarity]
dph-base/LICENSE [moved from LICENSE with 100% similarity]
dph-base/Setup.hs [moved from Setup.hs with 100% similarity]
dph-base/dph-base.cabal [new file with mode: 0644]
dph-base/include/fusion-phases.h [moved from include/fusion-phases.h with 100% similarity]
dph/Data/Array/Parallel.hs [moved from Data/Array/Parallel.hs with 100% similarity]
dph/Data/Array/Parallel/Lifted.hs [moved from Data/Array/Parallel/Lifted.hs with 100% similarity]
dph/Data/Array/Parallel/Lifted/Closure.hs [moved from Data/Array/Parallel/Lifted/Closure.hs with 100% similarity]
dph/Data/Array/Parallel/Lifted/Combinators.hs [moved from Data/Array/Parallel/Lifted/Combinators.hs with 100% similarity]
dph/Data/Array/Parallel/Lifted/Instances.hs [moved from Data/Array/Parallel/Lifted/Instances.hs with 100% similarity]
dph/Data/Array/Parallel/Lifted/PArray.hs [moved from Data/Array/Parallel/Lifted/PArray.hs with 100% similarity]
dph/Data/Array/Parallel/Lifted/Prim.hs [moved from Data/Array/Parallel/Lifted/Prim.hs with 96% similarity]
dph/Data/Array/Parallel/Lifted/Repr.hs [moved from Data/Array/Parallel/Lifted/Repr.hs with 99% similarity]
dph/Data/Array/Parallel/Lifted/Unboxed.hs [moved from Data/Array/Parallel/Lifted/Unboxed.hs with 100% similarity]
dph/Data/Array/Parallel/Prelude.hs [moved from Data/Array/Parallel/Prelude.hs with 100% similarity]
dph/Data/Array/Parallel/Prelude/Base.hs [moved from Data/Array/Parallel/Prelude/Base.hs with 100% similarity]
dph/Data/Array/Parallel/Prelude/Base/Bool.hs [moved from Data/Array/Parallel/Prelude/Base/Bool.hs with 100% similarity]
dph/Data/Array/Parallel/Prelude/Base/Double.hs [moved from Data/Array/Parallel/Prelude/Base/Double.hs with 100% similarity]
dph/Data/Array/Parallel/Prelude/Base/Int.hs [moved from Data/Array/Parallel/Prelude/Base/Int.hs with 100% similarity]
dph/Data/Array/Parallel/Prelude/Base/PArr.hs [moved from Data/Array/Parallel/Prelude/Base/PArr.hs with 100% similarity]
dph/Data/Array/Parallel/Prelude/Base/Tuple.hs [moved from Data/Array/Parallel/Prelude/Base/Tuple.hs with 100% similarity]
dph/Data/Array/Parallel/Prelude/Bool.hs [moved from Data/Array/Parallel/Prelude/Bool.hs with 100% similarity]
dph/Data/Array/Parallel/Prelude/Double.hs [moved from Data/Array/Parallel/Prelude/Double.hs with 100% similarity]
dph/Data/Array/Parallel/Prelude/Int.hs [moved from Data/Array/Parallel/Prelude/Int.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted.hs [moved from Data/Array/Parallel/Unlifted.hs with 96% similarity]
dph/Data/Array/Parallel/Unlifted/Distributed.hs [moved from Data/Array/Parallel/Unlifted/Distributed.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Distributed/Arrays.hs [moved from Data/Array/Parallel/Unlifted/Distributed/Arrays.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Distributed/Basics.hs [moved from Data/Array/Parallel/Unlifted/Distributed/Basics.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Distributed/Combinators.hs [moved from Data/Array/Parallel/Unlifted/Distributed/Combinators.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Distributed/DistST.hs [moved from Data/Array/Parallel/Unlifted/Distributed/DistST.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Distributed/Gang.hs [moved from Data/Array/Parallel/Unlifted/Distributed/Gang.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Distributed/Scalars.hs [moved from Data/Array/Parallel/Unlifted/Distributed/Scalars.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Distributed/TheGang.hs [moved from Data/Array/Parallel/Unlifted/Distributed/TheGang.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Distributed/Types.hs [moved from Data/Array/Parallel/Unlifted/Distributed/Types.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat.hs [moved from Data/Array/Parallel/Unlifted/Flat.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat/Basics.hs [moved from Data/Array/Parallel/Unlifted/Flat/Basics.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat/Combinators.hs [moved from Data/Array/Parallel/Unlifted/Flat/Combinators.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat/Enum.hs [moved from Data/Array/Parallel/Unlifted/Flat/Enum.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat/Permute.hs [moved from Data/Array/Parallel/Unlifted/Flat/Permute.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat/Random.hs [moved from Data/Array/Parallel/Unlifted/Flat/Random.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat/Search.hs [moved from Data/Array/Parallel/Unlifted/Flat/Search.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat/Stream.hs [moved from Data/Array/Parallel/Unlifted/Flat/Stream.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat/Subarrays.hs [moved from Data/Array/Parallel/Unlifted/Flat/Subarrays.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat/Sums.hs [moved from Data/Array/Parallel/Unlifted/Flat/Sums.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat/Text.hs [moved from Data/Array/Parallel/Unlifted/Flat/Text.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Flat/UArr.hs [moved from Data/Array/Parallel/Unlifted/Flat/UArr.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Parallel.hs [moved from Data/Array/Parallel/Unlifted/Parallel.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Parallel/Basics.hs [moved from Data/Array/Parallel/Unlifted/Parallel/Basics.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Parallel/Combinators.hs [moved from Data/Array/Parallel/Unlifted/Parallel/Combinators.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Parallel/Enum.hs [moved from Data/Array/Parallel/Unlifted/Parallel/Enum.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Parallel/Permute.hs [moved from Data/Array/Parallel/Unlifted/Parallel/Permute.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Parallel/Segmented.hs [moved from Data/Array/Parallel/Unlifted/Parallel/Segmented.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Parallel/Subarrays.hs [moved from Data/Array/Parallel/Unlifted/Parallel/Subarrays.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Parallel/Sums.hs [moved from Data/Array/Parallel/Unlifted/Parallel/Sums.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Parallel/UPArr.hs [moved from Data/Array/Parallel/Unlifted/Parallel/UPArr.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Segmented.hs [moved from Data/Array/Parallel/Unlifted/Segmented.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Segmented/Basics.hs [moved from Data/Array/Parallel/Unlifted/Segmented/Basics.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Segmented/Combinators.hs [moved from Data/Array/Parallel/Unlifted/Segmented/Combinators.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Segmented/Permute.hs [moved from Data/Array/Parallel/Unlifted/Segmented/Permute.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Segmented/SUArr.hs [moved from Data/Array/Parallel/Unlifted/Segmented/SUArr.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Segmented/Stream.hs [moved from Data/Array/Parallel/Unlifted/Segmented/Stream.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Segmented/Subarrays.hs [moved from Data/Array/Parallel/Unlifted/Segmented/Subarrays.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Segmented/Sums.hs [moved from Data/Array/Parallel/Unlifted/Segmented/Sums.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Segmented/Text.hs [moved from Data/Array/Parallel/Unlifted/Segmented/Text.hs with 100% similarity]
dph/Data/Array/Parallel/Unlifted/Segmented/USegd.hs [moved from Data/Array/Parallel/Unlifted/Segmented/USegd.hs with 100% similarity]
dph/LICENSE [new file with mode: 0644]
dph/README [moved from README with 100% similarity]
dph/Setup.hs [new file with mode: 0644]
dph/dph.cabal [moved from dph.cabal with 82% similarity]
dph/include/fusion-phases.h [new file with mode: 0644]

similarity index 100%
rename from LICENSE
rename to dph-base/LICENSE
similarity index 100%
rename from Setup.hs
rename to dph-base/Setup.hs
diff --git a/dph-base/dph-base.cabal b/dph-base/dph-base.cabal
new file mode 100644 (file)
index 0000000..714f96a
--- /dev/null
@@ -0,0 +1,37 @@
+name:           dph-base
+version:        0.3
+license:        BSD3
+author:         Manuel M T Chakravarty, Gabriele Keller, Roman Leshchinskiy
+maintainer:     Roman Leshchinskiy <rl@cse.unsw.edu.au>
+homepage:       http://www.cse.unsw.edu.au/~chak/project/dph/
+category:       Data Structures
+build-depends:  base, array, random, ghc-prim
+synopsis:       Basic Definitions for Data-Parallel Haskell.
+exposed-modules:
+        Data.Array.Parallel.Base
+        Data.Array.Parallel.Arr
+        Data.Array.Parallel.Stream
+other-modules:
+       Data.Array.Parallel.Base.Config
+       Data.Array.Parallel.Base.Debug
+       Data.Array.Parallel.Base.Hyperstrict
+        Data.Array.Parallel.Base.Text
+        Data.Array.Parallel.Base.Rebox
+        Data.Array.Parallel.Stream.Flat.Stream
+        Data.Array.Parallel.Stream.Flat.Basics
+        Data.Array.Parallel.Stream.Flat.Combinators
+        Data.Array.Parallel.Stream.Flat.Enum
+        Data.Array.Parallel.Stream.Flat.Random
+        Data.Array.Parallel.Stream.Flat.Search
+        Data.Array.Parallel.Stream.Flat
+        Data.Array.Parallel.Stream.Segmented
+       Data.Array.Parallel.Arr.BUArr
+       Data.Array.Parallel.Arr.BBArr
+extra-source-files:
+        include/fusion-phases.h
+include-dirs:
+        include
+extensions: TypeFamilies, GADTs, RankNTypes,
+            BangPatterns, MagicHash, UnboxedTuples, TypeOperators
+ghc-options: -Odph -funbox-strict-fields -haddock -fcpr-off
+
similarity index 96%
rename from Data/Array/Parallel/Lifted/Prim.hs
rename to dph/Data/Array/Parallel/Lifted/Prim.hs
index 3f0ab8f..095ff42 100644 (file)
@@ -11,7 +11,7 @@ import Data.Array.Parallel.Lifted.Unboxed
 import Data.Array.Parallel.Lifted.Repr
 import Data.Array.Parallel.Lifted.Instances
 
-import Data.Array.Parallel.Base.Hyperstrict (pairS, unpairS)
+import Data.Array.Parallel.Base (fstS, pairS, unpairS)
 
 unsafe_map :: (PrimPA a, PrimPA b) => (a -> b) -> PArray a -> PArray b
 {-# INLINE_PA unsafe_map #-}
@@ -77,4 +77,4 @@ unsafe_enumFromTos:: PArray Int -> PArray Int -> PArray (PArray Int)
 unsafe_enumFromTos ss es = fromSUArrPA  flatLen nestedLen  $ enumFromToSU (toUArrPA ss) (toUArrPA es)
   where
     flatLen   = prim_lengthPA ss
-    nestedLen = unsafe_fold (+) 0 (unsafe_map (\x -> max (x+1) 0) $  unsafe_zipWith (-) es ss)
\ No newline at end of file
+    nestedLen = unsafe_fold (+) 0 (unsafe_map (\x -> max (x+1) 0) $  unsafe_zipWith (-) es ss)
similarity index 99%
rename from Data/Array/Parallel/Lifted/Repr.hs
rename to dph/Data/Array/Parallel/Lifted/Repr.hs
index 4745313..c02cbe5 100644 (file)
@@ -26,6 +26,8 @@ import Data.Array.Parallel.Lifted.PArray
 import Data.Array.Parallel.Lifted.Unboxed
 import Data.Array.Parallel.Unlifted
 
+import Data.Array.Parallel.Base ((:*:)(..))
+
 import GHC.Exts  (Int#, Int(..), (+#), (-#), (*#))
 import Debug.Trace
 
similarity index 96%
rename from Data/Array/Parallel/Unlifted.hs
rename to dph/Data/Array/Parallel/Unlifted.hs
index 1ee354f..3a70081 100644 (file)
@@ -24,9 +24,6 @@ module Data.Array.Parallel.Unlifted (
   -- * Array types
   UArr, USegd, SUArr,
 
-  -- * Strict pairs and sums (reexported)
-  (:*:)(..), fstS, sndS, uncurryS, curryS,
-
   -- * Basic operations
   lengthU, nullU, emptyU, singletonU, consU, unitsU,
   replicateU, replicateEachU, (!:), (+:+),
@@ -142,7 +139,7 @@ module Data.Array.Parallel.Unlifted (
 
 ) where
 
-import Data.Array.Parallel.Base.Hyperstrict
+import Data.Array.Parallel.Base ((:*:)(..))
 import Data.Array.Parallel.Unlifted.Flat
 import Data.Array.Parallel.Unlifted.Segmented
 
diff --git a/dph/LICENSE b/dph/LICENSE
new file mode 100644 (file)
index 0000000..5187a3c
--- /dev/null
@@ -0,0 +1,31 @@
+Copyright (c) 2001-2002, Manuel M T Chakravarty & Gabriele Keller
+Copyright (c) 2006-2007, Manuel M T Chakravarty & Roman Leshchinskiy
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+- Neither name of the University nor the names of its contributors may be
+used to endorse or promote products derived from this software without
+specific prior written permission. 
+
+THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
+GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
similarity index 100%
rename from README
rename to dph/README
diff --git a/dph/Setup.hs b/dph/Setup.hs
new file mode 100644 (file)
index 0000000..b9f80ab
--- /dev/null
@@ -0,0 +1,9 @@
+import Distribution.Simple
+import System.IO
+main = defaultMainWithHooks
+     $ defaultUserHooks {
+         haddockHook = \_ _ _ _ -> warn
+     }
+  where
+    warn = hPutStrLn stderr "WARNING: ndp not supported by hadock"
+
similarity index 82%
rename from dph.cabal
rename to dph/dph.cabal
index d996000..73fe575 100644 (file)
--- a/dph.cabal
@@ -5,7 +5,7 @@ author:         Manuel M T Chakravarty, Gabriele Keller, Roman Leshchinskiy
 maintainer:     Roman Leshchinskiy <rl@cse.unsw.edu.au>
 homepage:       http://www.cse.unsw.edu.au/~chak/project/dph/
 category:       Data Structures
-build-depends:  base, array, random, ghc-prim
+build-depends:  base, array, random, ghc-prim, dph-base
 synopsis:       Data structures for Nested Data-Parallel Haskell.
 exposed-modules:
        Data.Array.Parallel
@@ -17,24 +17,6 @@ exposed-modules:
         Data.Array.Parallel.Prelude.Int
         Data.Array.Parallel.Prelude.Double
 other-modules:
-       Data.Array.Parallel.Base.Config
-       Data.Array.Parallel.Base.Debug
-       Data.Array.Parallel.Base.Hyperstrict
-        Data.Array.Parallel.Base.Text
-        Data.Array.Parallel.Base.Rebox
-        Data.Array.Parallel.Base
-        Data.Array.Parallel.Stream.Flat.Stream
-        Data.Array.Parallel.Stream.Flat.Basics
-        Data.Array.Parallel.Stream.Flat.Combinators
-        Data.Array.Parallel.Stream.Flat.Enum
-        Data.Array.Parallel.Stream.Flat.Random
-        Data.Array.Parallel.Stream.Flat.Search
-        Data.Array.Parallel.Stream.Flat
-        Data.Array.Parallel.Stream.Segmented
-        Data.Array.Parallel.Stream
-       Data.Array.Parallel.Arr.BUArr
-       Data.Array.Parallel.Arr.BBArr
-        Data.Array.Parallel.Arr
         Data.Array.Parallel.Unlifted.Distributed.Gang
         Data.Array.Parallel.Unlifted.Distributed.TheGang
         Data.Array.Parallel.Unlifted.Distributed.DistST
@@ -93,5 +75,5 @@ include-dirs:
         include
 extensions: TypeFamilies, GADTs, RankNTypes,
             BangPatterns, MagicHash, UnboxedTuples, TypeOperators
-ghc-options: -Odph -funbox-strict-fields -haddock -fcpr-off -package-name ndp
+ghc-options: -Odph -funbox-strict-fields -haddock -fcpr-off -package-name dph
 
diff --git a/dph/include/fusion-phases.h b/dph/include/fusion-phases.h
new file mode 100644 (file)
index 0000000..b94638e
--- /dev/null
@@ -0,0 +1,5 @@
+#define INLINE_U       INLINE
+#define INLINE_STREAM  INLINE [1]
+#define INLINE_DIST    INLINE [1]
+#define INLINE_PA      INLINE [2]
+