packages feed

yarr 1.3.3.2 → 1.3.3.3

raw patch · 14 files changed

+44/−55 lines, 14 filesdep ~fixed-vectordep ~primitive

Dependency ranges changed: fixed-vector, primitive

Files

Data/Yarr.hs view
@@ -1,3 +1,9 @@+{-# OPTIONS_GHC -Wall                     #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing  #-}+{-# OPTIONS_GHC -fno-warn-type-defaults   #-}+{-# OPTIONS_GHC -fno-warn-unused-do-bind  #-}+{-# OPTIONS_GHC -fno-warn-missing-methods #-}+{-# OPTIONS_GHC -fno-warn-orphans         #-}  {- | /Type system intro:/ @@ -166,7 +172,7 @@     Dim1, Dim2, Dim3,      -- ** Fixed Vector-    Fun(..), Vector(..), VecList(VecList),+    Fun(..), Vector(..),     N1, N2, N3, N4,  @@ -190,7 +196,7 @@  ) where -import Data.Yarr.Base hiding (Fusion(..))+import Data.Yarr.Base import Data.Yarr.Eval import Data.Yarr.Flow hiding (D, delay, SE) import Data.Yarr.Shape
Data/Yarr/Base.hs view
@@ -29,7 +29,7 @@ import Control.DeepSeq  import Data.Yarr.Shape as S-import Data.Yarr.Utils.FixedVector as V+import Data.Yarr.Utils.FixedVector as V hiding ( index )  import Data.Yarr.Utils.Primitive 
Data/Yarr/Convolution/StaticStencils.hs view
@@ -21,7 +21,7 @@ import Data.Yarr.Shape import Data.Yarr.Repr.Delayed import Data.Yarr.Convolution.Repr-import Data.Yarr.Utils.FixedVector as V+import Data.Yarr.Utils.FixedVector as V hiding ( index ) import Data.Yarr.Utils.Primitive  -- | Generalized static 'Dim1' stencil.@@ -61,7 +61,7 @@         size = P.length values             sizeType = P.foldr appT [t|Z|] (P.replicate size [t|S|])         sz = [| undefined :: $sizeType |]-        vecList = [| VecList |] `appE` (listE (P.map justNonZero values))+        vecList = (P.foldr (\x xs -> [|Cons|] `appE` x `appE` xs) [|Nil|]) (P.map justNonZero values)     in [| Dim1Stencil $sz $vecList (\acc a reduce -> reduce acc a) (return 0) |]  @@ -123,10 +123,9 @@         sizeTypeY = P.foldr appT [t|Z|] (P.replicate sizeY [t|S|])         sy = [| undefined :: $sizeTypeY |] -        vl = [| VecList |]         innerLists =-            P.map (\vs -> vl `appE` (listE (P.map justNonZero vs))) values-        outerList = vl `appE` (listE innerLists)+            P.map (\vs -> (P.foldr (\x xs -> [|Cons|] `appE` x `appE` xs) [|Nil|]) (P.map justNonZero vs)) values+        outerList =(P.foldr (\x xs -> [|Cons|] `appE` x `appE` xs) [|Nil|]) innerLists      in [| Dim2Stencil $sx $sy $outerList (\acc a reduce -> reduce acc a) (return 0) |] 
Data/Yarr/Eval.hs view
@@ -166,7 +166,7 @@         force tarr         !ts <- threads         parallel_ ts $-            makeFork ts start end (fill (index arr) (write tarr))+            makeFork ts start end (fill (B.index arr) (write tarr))         touchArray arr         touchArray tarr @@ -181,7 +181,7 @@     rangeLoadS fill arr tarr start end = do         force arr         force tarr-        fill (index arr) (write tarr) start end+        fill (B.index arr) (write tarr) start end         touchArray arr         touchArray tarr @@ -294,7 +294,7 @@             makeForkSlicesOnce                 ts (V.replicate (start, end))                 (V.zipWith-                    (\sl tsl -> fill (index sl) (write tsl))+                    (\sl tsl -> fill (B.index sl) (write tsl))                     (slices arr) (slices tarr))         touchArray arr         touchArray tarr
Data/Yarr/Flow.hs view
@@ -25,7 +25,8 @@ import Data.Yarr.Fusion import Data.Yarr.Repr.Delayed import Data.Yarr.Repr.Separate-import Data.Yarr.Utils.FixedVector as V+import Data.Yarr.Utils.FixedVector as V hiding ( index, traverse )+import Data.Vector.Fixed.Cont ( Fn )  -- | /O(1)/ Function from @repa@. traverse
Data/Yarr/Repr/Delayed.hs view
@@ -27,7 +27,7 @@ import Data.Yarr.Fusion as F import Data.Yarr.Eval import Data.Yarr.Shape-import Data.Yarr.Utils.FixedVector as V+import Data.Yarr.Utils.FixedVector as V hiding ( index )  -- | Delayed representation is a wrapper for arbitrary indexing function. --
Data/Yarr/Repr/Separate.hs view
@@ -30,7 +30,7 @@ import Data.Yarr.Fusion import Data.Yarr.Shape import Data.Yarr.Repr.Delayed-import Data.Yarr.Utils.FixedVector as V+import Data.Yarr.Utils.FixedVector as V hiding ( index )  -- | SEparate meta array representation. Internally SEparate arrays -- hold vector of it's slices (so, 'slices' is just getter for them).
Data/Yarr/Utils/FixedVector.hs view
@@ -1,24 +1,17 @@-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE ScopedTypeVariables #-}--        -- TypeFamilies, MultiParamTypeClasses, FunctionalDependencies,-        -- FlexibleContexts,-        -- EmptyDataDecls,-        -- FlexibleInstances, TypeSynonymInstances,-        -- UndecidableInstances, OverlappingInstances,-        -- GeneralizedNewtypeDeriving, StandaloneDeriving,-        -- RankNTypes, ScopedTypeVariables,-        -- MagicHash, BangPatterns, UnboxedTuples,-        -- TemplateHaskell, CPP+{-# OPTIONS_GHC -Wall                     #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing  #-}+{-# OPTIONS_GHC -fno-warn-type-defaults   #-}+{-# OPTIONS_GHC -fno-warn-unused-do-bind  #-}+{-# OPTIONS_GHC -fno-warn-missing-methods #-}+{-# OPTIONS_GHC -fno-warn-orphans         #-}  module Data.Yarr.Utils.FixedVector (     -- * Fixed Vector       module Data.Vector.Fixed,-    Fn, arity,+    arity,          -- * Missed utility-    zipWith3, zipWithM_, apply, all, any, zero,+    zipWith3, zipWithM_, apply, zero,     iifoldl, iifoldM,      -- * Aliases and shortcuts@@ -47,7 +40,7 @@ import Control.DeepSeq  import Data.Vector.Fixed-import Data.Vector.Fixed.Internal hiding (apply)+import Data.Vector.Fixed.Cont ( accum, arity )  import Data.Yarr.Utils.FixedVector.Arity @@ -55,24 +48,23 @@ import Data.Yarr.Utils.FixedVector.VecTupleInstances  import Data.Yarr.Utils.FixedVector.InlinableArity-import Data.Yarr.Utils.FixedVector.InlinableArityInstances   vl_1 :: a -> VecList N1 a {-# INLINE vl_1 #-}-vl_1 a = VecList [a]+vl_1 a = a `Cons` Nil  vl_2 :: a -> a -> VecList N2 a {-# INLINE vl_2 #-}-vl_2 a b = VecList [a, b]+vl_2 a b = a `Cons` (b `Cons` Nil)  vl_3 :: a -> a -> a -> VecList N3 a {-# INLINE vl_3 #-}-vl_3 a b c = VecList [a, b, c]+vl_3 a b c = a `Cons` (b `Cons` (c `Cons` Nil))  vl_4 :: a -> a -> a -> a -> VecList N4 a {-# INLINE vl_4 #-}-vl_4 a b c d = VecList [a, b, c, d]+vl_4 a b c d = a `Cons` (b `Cons` (c `Cons` (d `Cons` Nil)))   instance (Arity n, NFData e) => NFData (VecList n e) where@@ -100,14 +92,6 @@ {-# INLINE apply #-} apply = zipWith ($) -all :: Vector v a => (a -> Bool) -> v a -> Bool-{-# INLINE all #-}-all p = foldl (\a x -> a && (p x)) True--any :: Vector v a => (a -> Bool) -> v a -> Bool-{-# INLINE any #-}-any p = foldl (\a x -> a || (p x)) False- zero :: (Vector v a, Num a) => v a {-# INLINE zero #-} zero = replicate 0@@ -118,7 +102,7 @@     => ix -> (ix -> ix)     -> (b -> ix -> a -> b) -> b -> v a -> b {-# INLINE iifoldl #-}-iifoldl st sc f z v = inspectV v $ gifoldlF st sc f z+iifoldl st sc f z v = inspect v $ gifoldlF st sc f z  iifoldM     :: (Vector v a, Monad m)
Data/Yarr/Utils/FixedVector/InlinableArity.hs view
@@ -4,7 +4,7 @@ import Language.Haskell.TH hiding (Arity)  import Data.Vector.Fixed (Dim(..), Arity(..), Fun(..), Vector(..), (!), VecList(..), convert)-import Data.Vector.Fixed.Internal (arity)+import Data.Vector.Fixed.Mutable ( arity )  -- | Workaround for slice-wise currined filling functions inlining issues. -- See comment to 'Data.Yarr.Convolution.CVL' for details.@@ -36,7 +36,7 @@         bs = varE bsN          construct' vs =-            [| convert $ VecList $(listE vs) |]+            [| convert $(foldr (\x xs -> [|Cons|] `appE` x `appE` xs) [|Nil|] vs) |]          zipF = funD'             'inlinableZipWith
Data/Yarr/Utils/FixedVector/VecTuple.hs view
@@ -6,8 +6,7 @@ import Language.Haskell.TH  import Data.Vector.Fixed (Dim(..), Arity(..), Fun(..), Vector(..))-import Data.Vector.Fixed.Internal (arity)-+import Data.Vector.Fixed.Mutable ( arity )  data family VecTuple n e 
Data/Yarr/Utils/Fork.hs view
@@ -47,7 +47,7 @@                     let (start, end) = ranges V.! currSlice                     in if (currSlice > endSlice) ||                           (currSlice == endSlice && endPos == start)-                        then return $ reverse results+                        then return $ P.reverse results                         else                             let endInSl = if currSlice == endSlice                                                 then endPos
Data/Yarr/Walk/Internal.hs view
@@ -146,6 +146,6 @@                 (V.map (\sl -> fold mz (gindex sl)) sls)     touchArray arr -    let rsBySlices = P.map (P.map snd) $ groupBy ((==) `on` fst) $ concat trs+    let rsBySlices = P.map (P.map snd) $ groupBy ((==) `on` fst) $ P.concat trs     rs <- M.mapM (\(r:rs) -> M.foldM join r rs) rsBySlices-    return (VecList rs)+    return (fromList' rs)
Debug/Yarr.hs view
@@ -18,7 +18,7 @@  import Data.Yarr.Base hiding (fmap) import Data.Yarr.Shape-import Data.Yarr.Utils.FixedVector as V hiding (zero)+import Data.Yarr.Utils.FixedVector as V hiding ( zero, index )  -- | Yarr something to stderr. yarr :: String -> IO ()
yarr.cabal view
@@ -1,5 +1,5 @@ Name:                yarr-Version:             1.3.3.2+Version:             1.3.3.3 Synopsis:            Yet another array library Description:     Yarr is a new blazing fast dataflow framework (array library),@@ -59,9 +59,9 @@         base >=4.6 && <4.8,         ghc-prim         == 0.3.*,         deepseq          == 1.3.*,-        fixed-vector     == 0.1.2.1,+        fixed-vector     >= 0.7 && < 0.8,         primitive        >= 0.2 && < 0.6,-        template-haskell >=2.8 && <2.10,+        template-haskell >= 2.8 && < 2.10,         missing-foreign  == 0.1.1      extensions: