diff options
Diffstat (limited to 'packages/base/src/Internal/Conversion.hs')
-rw-r--r-- | packages/base/src/Internal/Conversion.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/base/src/Internal/Conversion.hs b/packages/base/src/Internal/Conversion.hs index 4541ec4..7eb8ec7 100644 --- a/packages/base/src/Internal/Conversion.hs +++ b/packages/base/src/Internal/Conversion.hs | |||
@@ -28,11 +28,12 @@ import Internal.Matrix | |||
28 | import Internal.Vectorized | 28 | import Internal.Vectorized |
29 | import Data.Complex | 29 | import Data.Complex |
30 | import Control.Arrow((***)) | 30 | import Control.Arrow((***)) |
31 | import Foreign.Storable | ||
31 | 32 | ||
32 | ------------------------------------------------------------------- | 33 | ------------------------------------------------------------------- |
33 | 34 | ||
34 | -- | Supported single-double precision type pairs | 35 | -- | Supported single-double precision type pairs |
35 | class (Element s, Element d) => Precision s d | s -> d, d -> s where | 36 | class (Storable s, Storable d) => Precision s d | s -> d, d -> s where |
36 | double2FloatG :: Vector d -> Vector s | 37 | double2FloatG :: Vector d -> Vector s |
37 | float2DoubleG :: Vector s -> Vector d | 38 | float2DoubleG :: Vector s -> Vector d |
38 | 39 | ||
@@ -50,7 +51,7 @@ instance Precision I Z where | |||
50 | 51 | ||
51 | 52 | ||
52 | -- | Supported real types | 53 | -- | Supported real types |
53 | class (Element t, Element (Complex t), RealFloat t) | 54 | class (Storable t, Storable (Complex t), RealFloat t) |
54 | => RealElement t | 55 | => RealElement t |
55 | 56 | ||
56 | instance RealElement Double | 57 | instance RealElement Double |
@@ -69,7 +70,7 @@ class Complexable c where | |||
69 | instance Complexable Vector where | 70 | instance Complexable Vector where |
70 | toComplex' = toComplexV | 71 | toComplex' = toComplexV |
71 | fromComplex' = fromComplexV | 72 | fromComplex' = fromComplexV |
72 | comp' v = toComplex' (v,constantD 0 (dim v)) | 73 | comp' v = toComplex' (v,constantAux 0 (dim v)) |
73 | single' = double2FloatG | 74 | single' = double2FloatG |
74 | double' = float2DoubleG | 75 | double' = float2DoubleG |
75 | 76 | ||