packages feed

Paraiso 0.3.1.1 → 0.3.1.2

raw patch · 7 files changed

+76/−58 lines, 7 filesdep ~ListLikedep ~QuickCheckdep ~arrayPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: ListLike, QuickCheck, array, containers, control-monad-failure, directory, fgl, filepath, listlike-instances, mtl, numeric-prelude, random, text, vector

API changes (from Hackage documentation)

+ Language.Paraiso.Prelude: (&&, ||) :: Boolean b => b -> b -> b
+ Language.Paraiso.Prelude: (++) :: ListLike full item => full -> full -> full
+ Language.Paraiso.Prelude: class Boolean b
+ Language.Paraiso.Prelude: instance Boolean Bool
+ Language.Paraiso.Prelude: not :: Boolean b => b -> b
+ Language.Paraiso.Prelude: showT :: Show a => a -> Text
+ Language.Paraiso.Prelude: true, false :: Boolean b => b
+ Language.Paraiso.Prelude: type Text = Text

Files

Language/Paraiso.hs view
@@ -3,6 +3,19 @@ -- | Paraiso main module. -- This module will export a starter-kit modules and functions in the future, -- but is useless right now.+-- The building-blocks of Paraiso programs are in +-- the module 'Language.Paraiso.OM.Builder.Builder'.+--+-- A series of intoduction is being written in Japanese+-- <http://d.hatena.ne.jp/nushio/searchdiary?word=*%5BICFDP%5D>+-- and English+-- <http://nushisblogger.blogspot.jp/search/label/ICFDP>.+--+-- Also refer to the wiki+-- <http://www.paraiso-lang.org/wiki/> and the paper+-- <http://arxiv.org/abs/1204.4779> for more detail.++  module Language.Paraiso (run) where 
Language/Paraiso/OM/Builder.hs view
@@ -12,9 +12,11 @@      buildKernel,            bind,-     load, store, imm,-     reduce, broadcast, shift, -     loadIndex, loadSize, cast,+     load, store, +     reduce, broadcast, +     loadIndex, loadSize, +     shift, imm, +     cast,      annotate, (<?>),      withAnnotation     ) where
Language/Paraiso/OM/Builder/Boolean.hs view
@@ -13,8 +13,9 @@ import Language.Paraiso.OM.Graph import Language.Paraiso.OM.Realm as Realm import Language.Paraiso.OM.Value as Val-import NumericPrelude  ++infix 4 `eq`, `ne`, `lt`, `le`, `gt`, `ge`  -- | generate a binary operator that returns Bool results. mkOp2B :: (TRealm r, Typeable c) => 
Language/Paraiso/OM/Builder/Internal.hs view
@@ -16,7 +16,8 @@      bind,      load, store,      reduce, broadcast,-     shift, loadIndex,loadSize,+     loadIndex,loadSize,+     shift,       imm, mkOp1, mkOp2, cast,      annotate, (<?>),      withAnnotation@@ -225,20 +226,6 @@   n3 <- addNodeE [n2] $ NValue type2    return (FromNode TArray c1 n3) --- | Shift a 'TArray' 'Value' with a constant vector.-shift :: (Typeable c)-  => v g                            -- ^ The amount of shift  -  -> Builder v g a (Value TArray c) -- ^ The 'TArray' Value to be shifted-  -> Builder v g a (Value TArray c) -- ^ The shifted 'TArray' 'Value' as a result.-shift vec builder1 = do-  val1 <- builder1-  let -    type1 = toDyn val1-    c1 = Val.content val1-  n1 <- valueToNode val1-  n2 <- addNodeE [n1] $ NInst $ Shift vec-  n3 <- addNodeE [n2] $ NValue type1 -  return (FromNode TArray c1 n3)  -- | Load the 'Axis' component of the mesh address, to a 'TArray' 'Value'. loadIndex :: (Typeable g) @@ -265,6 +252,21 @@   n0 <- addNodeE []   $ NInst (LoadSize axis)   n1 <- addNodeE [n0] $ NValue type0    return (FromNode TScalar c0 n1)++-- | Shift a 'TArray' 'Value' with a constant vector.+shift :: (Typeable c)+  => v g                            -- ^ The amount of shift  +  -> Builder v g a (Value TArray c) -- ^ The 'TArray' Value to be shifted+  -> Builder v g a (Value TArray c) -- ^ The shifted 'TArray' 'Value' as a result.+shift vec builder1 = do+  val1 <- builder1+  let +    type1 = toDyn val1+    c1 = Val.content val1+  n1 <- valueToNode val1+  n2 <- addNodeE [n1] $ NInst $ Shift vec+  n3 <- addNodeE [n2] $ NValue type1 +  return (FromNode TArray c1 n3)   -- | Create an immediate 'Value' from a Haskell concrete value. 
Language/Paraiso/OM/Graph.hs view
@@ -111,27 +111,27 @@   show (StaticIdx x) = "static[" ++ show x ++ "]"  data Inst vector gauge -  = Imm Dynamic -  | Load StaticIdx+  = Load StaticIdx   | Store StaticIdx   | Reduce R.Operator    | Broadcast -  | Shift (vector gauge)    | LoadIndex (Axis vector)    | LoadSize (Axis vector) +  | Shift (vector gauge) +  | Imm Dynamic    | Arith A.Operator    deriving (Show)  instance Arity (Inst vector gauge) where   arity a = case a of-    Imm _     -> (0,1)     Load _    -> (0,1)     Store _   -> (1,0)     Reduce _  -> (1,1)     Broadcast -> (1,1)-    Shift _   -> (1,1)     LoadIndex _ -> (0,1)     LoadSize _ -> (0,1)    +    Shift _   -> (1,1)+    Imm _     -> (0,1)     Arith op  -> arity op  
Language/Paraiso/Prelude.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE CPP, NoImplicitPrelude, NoMonomorphismRestriction, RankNTypes #-} {-# OPTIONS -Wall #-}-{-# OPTIONS_HADDOCK hide #-} -- | an extension of the standard Prelude for paraiso.  module Language.Paraiso.Prelude
Paraiso.cabal view
@@ -15,7 +15,7 @@ -- The package version. See the Haskell package versioning policy
 -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
 -- standards guiding when and how versions should be incremented.
-Version:             0.3.1.1
+Version:             0.3.1.2
 Tested-With:         GHC==7.4.1
 
 -- A short (one-line) description of the package.
@@ -53,7 +53,8 @@ 	     @Vector@s. With @Axis@ you can refer to the components of
 	     @Vector@s, compose them, or contract them. See the wiki
              <http://www.paraiso-lang.org/wiki/> and the paper
-             <http://arxiv.org/abs/1204.4779> for more detail.
+             <http://arxiv.org/abs/1204.4779> for more detail. Examples
+             are in <https://github.com/nushio3/Paraiso/tree/master/examples>.
              .
              * 0.3.0.0 /Doughnut/ : refined interface and support for cyclic boundary conditions.
              .
@@ -145,21 +146,21 @@                        Language.Paraiso.Tuning.Genetic
 
   -- Packages needed in order to build this package.
-  Build-depends:       array                 >= 0.2    && < 0.5,
-                       base                  == 4.*,
-                       containers            >= 0.4.0  && < 0.5,
-                       control-monad-failure >= 0.7.0  && < 0.8,
-                       directory             >= 1.0    && < 1.2,
-                       filepath              >= 1.2.0  && < 1.4,
-                       fgl                   >= 5.4.2  && < 5.5,
-                       ListLike              >= 3.1.1  && < 3.3,
-                       listlike-instances    >= 0.1    && < 0.3,
-                       mtl                   >= 2.0.1  && < 2.1,
-                       numeric-prelude       >= 0.2    && < 0.4,
-                       random                >= 1.0.0  && < 1.1,
-                       text                  >= 0.11.1 && < 0.12,
-                       typelevel-tensor      >= 0.1,
-                       vector                >= 0.7.1  && < 0.10
+  Build-depends:       array                 >= 0.2    ,    
+                       base                  == 4.*    ,
+                       containers            >= 0.4.0  ,
+                       control-monad-failure >= 0.7.0  ,
+                       directory             >= 1.0    ,
+                       filepath              >= 1.2.0  ,
+                       fgl                   >= 5.4.2  ,
+                       ListLike              >= 3.1.1  ,
+                       listlike-instances    >= 0.1    ,
+                       mtl                   >= 2.0.1  ,
+                       numeric-prelude       >= 0.2    ,
+                       random                >= 1.0.0  ,
+                       text                  >= 0.11.1 ,
+                       typelevel-tensor      >= 0.1    ,
+                       vector                >= 0.7.1  
   -- Modules not exported by this package.
   -- Other-modules:       
   
@@ -177,27 +178,27 @@ 
 test-suite runtests
   type: exitcode-stdio-1.0
-  Build-depends:     array                 >= 0.2    && < 0.5,
-                     base                  == 4.*,
-                     containers            >= 0.4.0  && < 0.5,
-                     control-monad-failure >= 0.7.0  && < 0.8,
-                     directory             >= 1.0    && < 1.2,
-                     filepath              >= 1.2.0  && < 1.4,
-                     fgl                   >= 5.4.2  && < 5.5,
-                     ListLike              >= 3.1.1  && < 3.3,
-                     listlike-instances    >= 0.1    && < 0.3,
-                     mtl                   >= 2.0.1  && < 2.1,
-                     numeric-prelude       >= 0.2    && < 0.4,
-                     random                >= 1.0.0  && < 1.1,
-                     text                  >= 0.11.1 && < 0.12,
-                     typelevel-tensor      >= 0.1,
-                     vector                >= 0.7.1  && < 0.10,
+  Build-depends:     array                 >= 0.2    ,
+                     base                  == 4.*    ,
+                     containers            >= 0.4.0  ,
+                     control-monad-failure >= 0.7.0  ,
+                     directory             >= 1.0    ,
+                     filepath              >= 1.2.0  ,
+                     fgl                   >= 5.4.2  ,
+                     ListLike              >= 3.1.1  ,
+                     listlike-instances    >= 0.1    ,
+                     mtl                   >= 2.0.1  ,
+                     numeric-prelude       >= 0.2    ,
+                     random                >= 1.0.0  ,
+                     text                  >= 0.11.1 ,
+                     typelevel-tensor      >= 0.1    ,
+                     vector                >= 0.7.1  ,
 
                      test-framework,
                      test-framework-quickcheck2,
                      test-framework-hunit,
                      HUnit,
-                     QuickCheck >= 2 && < 3
+                     QuickCheck >= 2 
   main-is: runtests.hs
   ghc-options:     -Wall -O3  -fspec-constr-count=25
   Default-Language: Haskell2010