packages feed

blas-ffi 0.0.2 → 0.1

raw patch · 6 files changed

+17/−16 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Numeric.BLAS.FFI.Complex: cabs1 :: Real a => Ptr (Complex a) -> IO a
- Numeric.BLAS.FFI.ComplexDouble: cabs1 :: Ptr (Complex Double) -> IO Double
- Numeric.BLAS.FFI.ComplexFloat: cabs1 :: Ptr (Complex Float) -> IO Float

Files

+ README.md view
@@ -0,0 +1,7 @@+## cabs1++The reference BLAS implementation provides the functions SCABS1 and DCABS1.+However, it is missing in some optimized alternative implementations+like OpenBLAS and ATLAS.+This caused linker errors in the past.+Since the function is pretty trivial, I removed its binding.
blas-ffi.cabal view
@@ -1,5 +1,5 @@ Name:             blas-ffi-Version:          0.0.2+Version:          0.1 License:          BSD3 License-File:     LICENSE Author:           Henning Thielemann <haskell@henning-thielemann.de>@@ -21,12 +21,15 @@ Cabal-Version:    1.14 Build-Type:       Simple +Extra-Source-Files:+  README.md+ Flag buildExamples   description: Build example executables   default:     False  Source-Repository this-  Tag:         0.0.2+  Tag:         0.1   Type:        darcs   Location:    http://hub.darcs.net/thielema/blas-ffi/ 
demo/Main.hs view
@@ -7,4 +7,8 @@   main :: IO ()-main = print =<< Foreign.with (2:+3) BlasComplexFloat.cabs1+main =+   Foreign.with 1 $ \nPtr ->+   Foreign.with (2:+3) $ \cxPtr ->+   Foreign.with 1 $ \incxPtr ->+   print =<< BlasComplexFloat.casum nPtr cxPtr incxPtr
src/Numeric/BLAS/FFI/Complex.hs view
@@ -1,7 +1,6 @@ -- Do not edit! Automatically generated by create-lapack-ffi. module Numeric.BLAS.FFI.Complex (    axpy,-   cabs1,    casum,    cnrm2,    copy,@@ -54,12 +53,6 @@  axpy :: Class.Real a => Ptr CInt -> Ptr (Complex a) -> Ptr (Complex a) -> Ptr CInt -> Ptr (Complex a) -> Ptr CInt -> IO () axpy = getAXPY $ Class.switchReal (AXPY C.axpy) (AXPY Z.axpy)---newtype CABS1 a = CABS1 {getCABS1 :: Ptr (Complex a) -> IO a}--cabs1 :: Class.Real a => Ptr (Complex a) -> IO a-cabs1 = getCABS1 $ Class.switchReal (CABS1 C.cabs1) (CABS1 Z.cabs1)   newtype CASUM a = CASUM {getCASUM :: Ptr CInt -> Ptr (Complex a) -> Ptr CInt -> IO a}
src/Numeric/BLAS/FFI/ComplexDouble.hs view
@@ -10,9 +10,6 @@ foreign import ccall "zaxpy_"    axpy :: Ptr CInt -> Ptr (Complex Double) -> Ptr (Complex Double) -> Ptr CInt -> Ptr (Complex Double) -> Ptr CInt -> IO () -foreign import ccall "dcabs1_"-   cabs1 :: Ptr (Complex Double) -> IO Double- foreign import ccall "dzasum_"    casum :: Ptr CInt -> Ptr (Complex Double) -> Ptr CInt -> IO Double 
src/Numeric/BLAS/FFI/ComplexFloat.hs view
@@ -10,9 +10,6 @@ foreign import ccall "caxpy_"    axpy :: Ptr CInt -> Ptr (Complex Float) -> Ptr (Complex Float) -> Ptr CInt -> Ptr (Complex Float) -> Ptr CInt -> IO () -foreign import ccall "scabs1_"-   cabs1 :: Ptr (Complex Float) -> IO Float- foreign import ccall "scasum_"    casum :: Ptr CInt -> Ptr (Complex Float) -> Ptr CInt -> IO Float