diff options
author | Mike Ledger <eleventynine@gmail.com> | 2013-06-24 23:17:39 +1000 |
---|---|---|
committer | Mike Ledger <eleventynine@gmail.com> | 2013-06-24 23:17:39 +1000 |
commit | 027fa6391bc7b21a8aecbdc577ad485aee274333 (patch) | |
tree | 1a2a6780d40b04fde19c8b6a407ecec1542fee3d /lib/Data/Packed/Internal/Matrix.hs | |
parent | 29c622322ee14b10b2a73b40fb403bb7eaa2ec40 (diff) |
Revert "add CDouble/CFloat instances for Element"
This reverts commit d302e91710db7cccb32853cfd861b9f869eb4e31.
Diffstat (limited to 'lib/Data/Packed/Internal/Matrix.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Matrix.hs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs index 8158679..255009c 100644 --- a/lib/Data/Packed/Internal/Matrix.hs +++ b/lib/Data/Packed/Internal/Matrix.hs | |||
@@ -260,34 +260,18 @@ instance Element Float where | |||
260 | transdata = transdataAux ctransF | 260 | transdata = transdataAux ctransF |
261 | constantD = constantAux cconstantF | 261 | constantD = constantAux cconstantF |
262 | 262 | ||
263 | instance Element CFloat where | ||
264 | transdata = transdataAux ctransCF | ||
265 | constantD = constantAux cconstantCF | ||
266 | |||
267 | instance Element Double where | 263 | instance Element Double where |
268 | transdata = transdataAux ctransR | 264 | transdata = transdataAux ctransR |
269 | constantD = constantAux cconstantR | 265 | constantD = constantAux cconstantR |
270 | 266 | ||
271 | instance Element CDouble where | ||
272 | transdata = transdataAux ctransCR | ||
273 | constantD = constantAux cconstantCR | ||
274 | |||
275 | instance Element (Complex Float) where | 267 | instance Element (Complex Float) where |
276 | transdata = transdataAux ctransQ | 268 | transdata = transdataAux ctransQ |
277 | constantD = constantAux cconstantQ | 269 | constantD = constantAux cconstantQ |
278 | 270 | ||
279 | instance Element (Complex CFloat) where | ||
280 | transdata = transdataAux ctransCQ | ||
281 | constantD = constantAux cconstantCQ | ||
282 | |||
283 | instance Element (Complex Double) where | 271 | instance Element (Complex Double) where |
284 | transdata = transdataAux ctransC | 272 | transdata = transdataAux ctransC |
285 | constantD = constantAux cconstantC | 273 | constantD = constantAux cconstantC |
286 | 274 | ||
287 | instance Element (Complex CDouble) where | ||
288 | transdata = transdataAux ctransCC | ||
289 | constantD = constantAux cconstantCC | ||
290 | |||
291 | ------------------------------------------------------------------- | 275 | ------------------------------------------------------------------- |
292 | 276 | ||
293 | transdata' :: Storable a => Int -> Vector a -> Int -> Vector a | 277 | transdata' :: Storable a => Int -> Vector a -> Int -> Vector a |
@@ -347,17 +331,9 @@ transdataP c1 d c2 = | |||
347 | noneed = r1 == 1 || c1 == 1 | 331 | noneed = r1 == 1 || c1 == 1 |
348 | 332 | ||
349 | foreign import ccall unsafe "transF" ctransF :: TFMFM | 333 | foreign import ccall unsafe "transF" ctransF :: TFMFM |
350 | foreign import ccall unsafe "transF" ctransCF :: CInt -> CInt -> Ptr CFloat -> CInt -> CInt -> Ptr CFloat -> IO CInt | ||
351 | |||
352 | foreign import ccall unsafe "transR" ctransR :: TMM | 334 | foreign import ccall unsafe "transR" ctransR :: TMM |
353 | foreign import ccall unsafe "transR" ctransCR :: CInt -> CInt -> Ptr CDouble -> CInt -> CInt -> Ptr CDouble -> IO CInt | ||
354 | |||
355 | foreign import ccall unsafe "transQ" ctransQ :: TQMQM | 335 | foreign import ccall unsafe "transQ" ctransQ :: TQMQM |
356 | foreign import ccall unsafe "transQ" ctransCQ :: CInt -> CInt -> Ptr (Complex CFloat) -> CInt -> CInt -> Ptr (Complex CFloat) -> IO CInt | ||
357 | |||
358 | foreign import ccall unsafe "transC" ctransC :: TCMCM | 336 | foreign import ccall unsafe "transC" ctransC :: TCMCM |
359 | foreign import ccall unsafe "transC" ctransCC :: CInt -> CInt -> Ptr (Complex CDouble) -> CInt -> CInt -> Ptr (Complex CDouble) -> IO CInt | ||
360 | |||
361 | foreign import ccall unsafe "transP" ctransP :: CInt -> CInt -> Ptr () -> CInt -> CInt -> CInt -> Ptr () -> CInt -> IO CInt | 337 | foreign import ccall unsafe "transP" ctransP :: CInt -> CInt -> Ptr () -> CInt -> CInt -> CInt -> Ptr () -> CInt -> IO CInt |
362 | 338 | ||
363 | ---------------------------------------------------------------------- | 339 | ---------------------------------------------------------------------- |
@@ -382,22 +358,18 @@ constantAux fun x n = unsafePerformIO $ do | |||
382 | constantF :: Float -> Int -> Vector Float | 358 | constantF :: Float -> Int -> Vector Float |
383 | constantF = constantAux cconstantF | 359 | constantF = constantAux cconstantF |
384 | foreign import ccall unsafe "constantF" cconstantF :: Ptr Float -> TF | 360 | foreign import ccall unsafe "constantF" cconstantF :: Ptr Float -> TF |
385 | foreign import ccall unsafe "constantF" cconstantCF :: Ptr CFloat -> CInt -> Ptr CFloat -> IO CInt | ||
386 | 361 | ||
387 | constantR :: Double -> Int -> Vector Double | 362 | constantR :: Double -> Int -> Vector Double |
388 | constantR = constantAux cconstantR | 363 | constantR = constantAux cconstantR |
389 | foreign import ccall unsafe "constantR" cconstantR :: Ptr Double -> TV | 364 | foreign import ccall unsafe "constantR" cconstantR :: Ptr Double -> TV |
390 | foreign import ccall unsafe "constantR" cconstantCR :: Ptr CDouble -> CInt -> Ptr CDouble -> IO CInt | ||
391 | 365 | ||
392 | constantQ :: Complex Float -> Int -> Vector (Complex Float) | 366 | constantQ :: Complex Float -> Int -> Vector (Complex Float) |
393 | constantQ = constantAux cconstantQ | 367 | constantQ = constantAux cconstantQ |
394 | foreign import ccall unsafe "constantQ" cconstantQ :: Ptr (Complex Float) -> TQV | 368 | foreign import ccall unsafe "constantQ" cconstantQ :: Ptr (Complex Float) -> TQV |
395 | foreign import ccall unsafe "constantQ" cconstantCQ :: Ptr (Complex CFloat) -> CInt -> Ptr (Complex CFloat) -> IO CInt | ||
396 | 369 | ||
397 | constantC :: Complex Double -> Int -> Vector (Complex Double) | 370 | constantC :: Complex Double -> Int -> Vector (Complex Double) |
398 | constantC = constantAux cconstantC | 371 | constantC = constantAux cconstantC |
399 | foreign import ccall unsafe "constantC" cconstantC :: Ptr (Complex Double) -> TCV | 372 | foreign import ccall unsafe "constantC" cconstantC :: Ptr (Complex Double) -> TCV |
400 | foreign import ccall unsafe "constantC" cconstantCC :: Ptr (Complex CDouble) -> CInt -> Ptr (Complex CDouble) -> IO CInt | ||
401 | 373 | ||
402 | constantP :: Storable a => a -> Int -> Vector a | 374 | constantP :: Storable a => a -> Int -> Vector a |
403 | constantP a n = unsafePerformIO $ do | 375 | constantP a n = unsafePerformIO $ do |