packages feed

linear-accelerate 0.1 → 0.2

raw patch · 2 files changed

+3/−35 lines, 2 filesdep ~accelerate

Dependency ranges changed: accelerate

Files

linear-accelerate.cabal view
@@ -1,6 +1,6 @@ name:          linear-accelerate category:      Math, Algebra, Compilers/Interpreters, Concurrency, Data, Parallelism-version:       0.1+version:       0.2 license:       BSD3 cabal-version: >= 1.8 license-file:  LICENSE@@ -26,7 +26,7 @@  library   build-depends:-    accelerate           >= 0.14  && < 0.15,+    accelerate           >= 0.15  && < 0.16,     base                 >= 4.5   && < 5,     lens                 >= 4     && < 5,     linear               >= 1.10  && < 2
src/Linear/Accelerate.hs view
@@ -12,7 +12,7 @@ import Data.Array.Accelerate.Smart import Data.Array.Accelerate.Tuple import Data.Array.Accelerate.Array.Sugar-import Data.Complex+import Data.Array.Accelerate.Data.Complex () import qualified Data.Foldable as F import Linear --import Linear.Plucker (Plucker(..))@@ -215,38 +215,6 @@                 (Exp $ SuccTupIdx (SuccTupIdx ZeroTupIdx) `Prj` t)                 (Exp $ SuccTupIdx ZeroTupIdx `Prj` t)                 (Exp $ ZeroTupIdx `Prj` t)------------------------------------------------------------------------------------- * Complex-----------------------------------------------------------------------------------type instance EltRepr (Complex a)  = EltRepr (a, a)-type instance EltRepr' (Complex a) = EltRepr' (a, a)--instance Elt a => Elt (Complex a) where-  eltType _ = eltType (undefined :: (a,a))-  toElt p = case toElt p of-     (x, y) -> x :+ y-  fromElt (x :+ y) = fromElt (x, y)--  eltType' _ = eltType' (undefined :: (a,a))-  toElt' p = case toElt' p of-     (x, y) -> x :+ y-  fromElt' (x :+ y) = fromElt' (x, y)--instance IsTuple (Complex a) where-  type TupleRepr (Complex a) = TupleRepr (a,a)-  fromTuple (x :+ y) = fromTuple (x,y)-  toTuple t = case toTuple t of-     (x, y) -> x :+ y--instance (Lift Exp a, Elt (Plain a)) => Lift Exp (Complex a) where-  type Plain (Complex a) = Complex (Plain a)---  lift = Exp . Tuple . F.foldl SnocTup NilTup-  lift (x :+ y) = Exp $ Tuple $ NilTup `SnocTup` lift x `SnocTup` lift y--instance (Elt a, e ~ Exp a) => Unlift Exp (Complex e) where-  unlift t = (Exp $ SuccTupIdx ZeroTupIdx `Prj` t) :+ (Exp $ ZeroTupIdx `Prj` t)  -------------------------------------------------------------------------------- -- * Quaternion