summaryrefslogtreecommitdiff
path: root/lib/Numeric/ContainerBoot.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2011-12-23 14:21:36 +0100
committerAlberto Ruiz <aruiz@um.es>2011-12-23 14:21:36 +0100
commitd0eb68801e7c8de0996f6799db5ea691588467fa (patch)
treee72251dc5013e316b89402685626be44a5f253e8 /lib/Numeric/ContainerBoot.hs
parent863fd69b44d6e65544973871043d89d1d6c50a9e (diff)
ok also with ghc-7.0
Diffstat (limited to 'lib/Numeric/ContainerBoot.hs')
-rw-r--r--lib/Numeric/ContainerBoot.hs20
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/Numeric/ContainerBoot.hs b/lib/Numeric/ContainerBoot.hs
index d913435..6ce4760 100644
--- a/lib/Numeric/ContainerBoot.hs
+++ b/lib/Numeric/ContainerBoot.hs
@@ -3,7 +3,9 @@
3{-# LANGUAGE FlexibleInstances #-} 3{-# LANGUAGE FlexibleInstances #-}
4{-# LANGUAGE MultiParamTypeClasses #-} 4{-# LANGUAGE MultiParamTypeClasses #-}
5{-# LANGUAGE UndecidableInstances #-} 5{-# LANGUAGE UndecidableInstances #-}
6#ifndef NOPOLYKINDS
6{-# LANGUAGE PolyKinds #-} 7{-# LANGUAGE PolyKinds #-}
8#endif
7 9
8----------------------------------------------------------------------------- 10-----------------------------------------------------------------------------
9-- | 11-- |
@@ -46,14 +48,11 @@ import Data.Packed.ST as ST
46import Numeric.Conversion 48import Numeric.Conversion
47import Data.Packed.Internal 49import Data.Packed.Internal
48import Numeric.GSL.Vector 50import Numeric.GSL.Vector
49import Foreign.C.Types(CInt(..))
50import Data.Complex 51import Data.Complex
51import Control.Monad(ap) 52import Control.Monad(ap)
52 53
53import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ) 54import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ)
54 55
55import System.IO.Unsafe
56
57------------------------------------------------------------------- 56-------------------------------------------------------------------
58 57
59type family IndexOf c 58type family IndexOf c
@@ -510,21 +509,6 @@ type instance ElementOf (Matrix a) = a
510 509
511------------------------------------------------------------ 510------------------------------------------------------------
512 511
513conjugateAux fun x = unsafePerformIO $ do
514 v <- createVector (dim x)
515 app2 fun vec x vec v "conjugateAux"
516 return v
517
518conjugateQ :: Vector (Complex Float) -> Vector (Complex Float)
519conjugateQ = conjugateAux c_conjugateQ
520foreign import ccall "conjugateQ" c_conjugateQ :: TQVQV
521
522conjugateC :: Vector (Complex Double) -> Vector (Complex Double)
523conjugateC = conjugateAux c_conjugateC
524foreign import ccall "conjugateC" c_conjugateC :: TCVCV
525
526-----------------------------------------------------
527
528class Build f where 512class Build f where
529 build' :: BoundsOf f -> f -> ContainerOf f 513 build' :: BoundsOf f -> f -> ContainerOf f
530 514