diff options
Diffstat (limited to 'lib/Data/Packed/Internal/Matrix.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Matrix.hs | 22 |
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 | ||
334 | foreign import ccall "transF" ctransF :: TFMFM | 334 | foreign import ccall unsafe "transF" ctransF :: TFMFM |
335 | foreign import ccall "transR" ctransR :: TMM | 335 | foreign import ccall unsafe "transR" ctransR :: TMM |
336 | foreign import ccall "transQ" ctransQ :: TQMQM | 336 | foreign import ccall unsafe "transQ" ctransQ :: TQMQM |
337 | foreign import ccall "transC" ctransC :: TCMCM | 337 | foreign import ccall unsafe "transC" ctransC :: TCMCM |
338 | foreign import ccall "transP" ctransP :: CInt -> CInt -> Ptr () -> CInt -> CInt -> CInt -> Ptr () -> CInt -> IO CInt | 338 | foreign 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 | ||
359 | constantF :: Float -> Int -> Vector Float | 359 | constantF :: Float -> Int -> Vector Float |
360 | constantF = constantAux cconstantF | 360 | constantF = constantAux cconstantF |
361 | foreign import ccall "constantF" cconstantF :: Ptr Float -> TF | 361 | foreign import ccall unsafe "constantF" cconstantF :: Ptr Float -> TF |
362 | 362 | ||
363 | constantR :: Double -> Int -> Vector Double | 363 | constantR :: Double -> Int -> Vector Double |
364 | constantR = constantAux cconstantR | 364 | constantR = constantAux cconstantR |
365 | foreign import ccall "constantR" cconstantR :: Ptr Double -> TV | 365 | foreign import ccall unsafe "constantR" cconstantR :: Ptr Double -> TV |
366 | 366 | ||
367 | constantQ :: Complex Float -> Int -> Vector (Complex Float) | 367 | constantQ :: Complex Float -> Int -> Vector (Complex Float) |
368 | constantQ = constantAux cconstantQ | 368 | constantQ = constantAux cconstantQ |
369 | foreign import ccall "constantQ" cconstantQ :: Ptr (Complex Float) -> TQV | 369 | foreign import ccall unsafe "constantQ" cconstantQ :: Ptr (Complex Float) -> TQV |
370 | 370 | ||
371 | constantC :: Complex Double -> Int -> Vector (Complex Double) | 371 | constantC :: Complex Double -> Int -> Vector (Complex Double) |
372 | constantC = constantAux cconstantC | 372 | constantC = constantAux cconstantC |
373 | foreign import ccall "constantC" cconstantC :: Ptr (Complex Double) -> TCV | 373 | foreign import ccall unsafe "constantC" cconstantC :: Ptr (Complex Double) -> TCV |
374 | 374 | ||
375 | constantP :: Storable a => a -> Int -> Vector a | 375 | constantP :: Storable a => a -> Int -> Vector a |
376 | constantP a n = unsafePerformIO $ do | 376 | constantP 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 |
384 | foreign import ccall "constantP" cconstantP :: Ptr () -> CInt -> Ptr () -> CInt -> IO CInt | 384 | foreign 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 | ||
430 | foreign import ccall "matrix_fprintf" matrix_fprintf :: Ptr CChar -> Ptr CChar -> CInt -> TM | 430 | foreign import ccall unsafe "matrix_fprintf" matrix_fprintf :: Ptr CChar -> Ptr CChar -> CInt -> TM |
431 | 431 | ||
432 | ---------------------------------------------------------------------- | 432 | ---------------------------------------------------------------------- |
433 | 433 | ||