summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Internal/Matrix.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Data/Packed/Internal/Matrix.hs')
-rw-r--r--lib/Data/Packed/Internal/Matrix.hs22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs
index 257e4fc..b8ed18d 100644
--- a/lib/Data/Packed/Internal/Matrix.hs
+++ b/lib/Data/Packed/Internal/Matrix.hs
@@ -331,11 +331,11 @@ transdataP c1 d c2 =
331 sz = sizeOf (d @> 0) 331 sz = sizeOf (d @> 0)
332 noneed = r1 == 1 || c1 == 1 332 noneed = r1 == 1 || c1 == 1
333 333
334foreign import ccall "transF" ctransF :: TFMFM 334foreign import ccall unsafe "transF" ctransF :: TFMFM
335foreign import ccall "transR" ctransR :: TMM 335foreign import ccall unsafe "transR" ctransR :: TMM
336foreign import ccall "transQ" ctransQ :: TQMQM 336foreign import ccall unsafe "transQ" ctransQ :: TQMQM
337foreign import ccall "transC" ctransC :: TCMCM 337foreign import ccall unsafe "transC" ctransC :: TCMCM
338foreign import ccall "transP" ctransP :: CInt -> CInt -> Ptr () -> CInt -> CInt -> CInt -> Ptr () -> CInt -> IO CInt 338foreign import ccall unsafe "transP" ctransP :: CInt -> CInt -> Ptr () -> CInt -> CInt -> CInt -> Ptr () -> CInt -> IO CInt
339 339
340---------------------------------------------------------------------- 340----------------------------------------------------------------------
341 341
@@ -358,19 +358,19 @@ constantAux fun x n = unsafePerformIO $ do
358 358
359constantF :: Float -> Int -> Vector Float 359constantF :: Float -> Int -> Vector Float
360constantF = constantAux cconstantF 360constantF = constantAux cconstantF
361foreign import ccall "constantF" cconstantF :: Ptr Float -> TF 361foreign import ccall unsafe "constantF" cconstantF :: Ptr Float -> TF
362 362
363constantR :: Double -> Int -> Vector Double 363constantR :: Double -> Int -> Vector Double
364constantR = constantAux cconstantR 364constantR = constantAux cconstantR
365foreign import ccall "constantR" cconstantR :: Ptr Double -> TV 365foreign import ccall unsafe "constantR" cconstantR :: Ptr Double -> TV
366 366
367constantQ :: Complex Float -> Int -> Vector (Complex Float) 367constantQ :: Complex Float -> Int -> Vector (Complex Float)
368constantQ = constantAux cconstantQ 368constantQ = constantAux cconstantQ
369foreign import ccall "constantQ" cconstantQ :: Ptr (Complex Float) -> TQV 369foreign import ccall unsafe "constantQ" cconstantQ :: Ptr (Complex Float) -> TQV
370 370
371constantC :: Complex Double -> Int -> Vector (Complex Double) 371constantC :: Complex Double -> Int -> Vector (Complex Double)
372constantC = constantAux cconstantC 372constantC = constantAux cconstantC
373foreign import ccall "constantC" cconstantC :: Ptr (Complex Double) -> TCV 373foreign import ccall unsafe "constantC" cconstantC :: Ptr (Complex Double) -> TCV
374 374
375constantP :: Storable a => a -> Int -> Vector a 375constantP :: Storable a => a -> Int -> Vector a
376constantP a n = unsafePerformIO $ do 376constantP a n = unsafePerformIO $ do
@@ -381,7 +381,7 @@ constantP a n = unsafePerformIO $ do
381 poke k a 381 poke k a
382 cconstantP (castPtr k) (fi n) (castPtr p) (fi sz) // check "constantP" 382 cconstantP (castPtr k) (fi n) (castPtr p) (fi sz) // check "constantP"
383 return v 383 return v
384foreign import ccall "constantP" cconstantP :: Ptr () -> CInt -> Ptr () -> CInt -> IO CInt 384foreign import ccall unsafe "constantP" cconstantP :: Ptr () -> CInt -> Ptr () -> CInt -> IO CInt
385 385
386---------------------------------------------------------------------- 386----------------------------------------------------------------------
387 387
@@ -427,7 +427,7 @@ saveMatrix filename fmt m = do
427 free charname 427 free charname
428 free charfmt 428 free charfmt
429 429
430foreign import ccall "matrix_fprintf" matrix_fprintf :: Ptr CChar -> Ptr CChar -> CInt -> TM 430foreign import ccall unsafe "matrix_fprintf" matrix_fprintf :: Ptr CChar -> Ptr CChar -> CInt -> TM
431 431
432---------------------------------------------------------------------- 432----------------------------------------------------------------------
433 433