summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hmatrix.cabal39
-rw-r--r--lib/Numeric/GSL/Special/Internal.hsc2
-rw-r--r--lib/Numeric/LinearAlgebra.hs1
-rw-r--r--lib/Numeric/LinearAlgebra/Instances.hs3
-rw-r--r--lib/Numeric/LinearAlgebra/Linear.hs2
5 files changed, 29 insertions, 18 deletions
diff --git a/hmatrix.cabal b/hmatrix.cabal
index c8b307b..06fc12b 100644
--- a/hmatrix.cabal
+++ b/hmatrix.cabal
@@ -1,5 +1,5 @@
1Name: hmatrix 1Name: hmatrix
2Version: 0.4.1.0 2Version: 0.5.0.0
3License: GPL 3License: GPL
4License-file: LICENSE 4License-file: LICENSE
5Author: Alberto Ruiz 5Author: Alberto Ruiz
@@ -25,14 +25,14 @@ flag mkl
25 description: Link with Intel's MKL optimized libraries. 25 description: Link with Intel's MKL optimized libraries.
26 default: False 26 default: False
27 27
28flag gsl
29 description: Link with GSL unoptimized blas.
30 default: False
31
32flag unsafe 28flag unsafe
33 description: Compile the library with bound checking disabled. 29 description: Compile the library with bound checking disabled.
34 default: False 30 default: False
35 31
32flag no-workaround
33 description: Expose the NaN problem
34 default: False
35
36library 36library
37 if flag(splitBase) 37 if flag(splitBase)
38 build-depends: base >= 3, array, QuickCheck, HUnit, storable-complex 38 build-depends: base >= 3, array, QuickCheck, HUnit, storable-complex
@@ -101,21 +101,32 @@ library
101 C-sources: lib/Data/Packed/Internal/auxi.c, 101 C-sources: lib/Data/Packed/Internal/auxi.c,
102 lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c, 102 lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c,
103 lib/Numeric/GSL/gsl-aux.c 103 lib/Numeric/GSL/gsl-aux.c
104
105 ghc-prof-options: -auto-all
106
107 if flag(unsafe)
108 cpp-options: -DUNSAFE
109
110 if arch(i386) && !flag(no-workaround) && !flag(mkl)
111 cpp-options: -DWORKAROUND
112
104 if flag(mkl) 113 if flag(mkl)
105 if arch(x86_64) 114 if arch(x86_64)
106 extra-libraries: gsl mkl_lapack mkl_intel_lp64 mkl_sequential mkl_core 115 extra-libraries: gsl mkl_lapack mkl_intel_lp64 mkl_sequential mkl_core
107 else 116 else
108 extra-libraries: gsl mkl_lapack mkl_intel mkl_sequential mkl_core 117 extra-libraries: gsl mkl_lapack mkl_intel mkl_sequential mkl_core
109 else 118 else
110 if flag(gsl)
111 extra-libraries: gsl gslcblas lapack
112 else
113 extra-libraries: gsl lapack
114 119
115 ghc-prof-options: -auto-all 120 extra-libraries: gsl lapack
116 121
117 if flag(unsafe) 122 -- Include here additional libraries if they are
118 cpp-options: -DUNSAFE 123 -- required by your system to link -lgsl -llapack
124 -- Examples:
119 125
120 if arch(i386) 126 -- blas -- (cblas included in blas), not required in ubuntu/debian,
121 cpp-options: -DWORKAROUND 127 -- automatically linked by lapack
128
129 -- gslcblas -- nonoptimized cblas in gsl
130
131 -- f77blas cblas atlas gcc_s -- for atlas-lapack in Arch Linux
132 -- blas gslcblas gfortran -- for normal blas and lapack in Arch Linux
diff --git a/lib/Numeric/GSL/Special/Internal.hsc b/lib/Numeric/GSL/Special/Internal.hsc
index e0744d7..96c1f40 100644
--- a/lib/Numeric/GSL/Special/Internal.hsc
+++ b/lib/Numeric/GSL/Special/Internal.hsc
@@ -1,4 +1,4 @@
1{-# OPTIONS -ffi #-} 1 {-# LANGUAGE ForeignFunctionInterface #-}
2----------------------------------------------------------------------------- 2-----------------------------------------------------------------------------
3{- | 3{- |
4Module : Numeric.GSL.Special.Internal 4Module : Numeric.GSL.Special.Internal
diff --git a/lib/Numeric/LinearAlgebra.hs b/lib/Numeric/LinearAlgebra.hs
index c14d4e4..cc2c1d3 100644
--- a/lib/Numeric/LinearAlgebra.hs
+++ b/lib/Numeric/LinearAlgebra.hs
@@ -16,7 +16,6 @@ module Numeric.LinearAlgebra (
16 module Data.Packed, 16 module Data.Packed,
17 module Numeric.LinearAlgebra.Linear, 17 module Numeric.LinearAlgebra.Linear,
18 module Numeric.LinearAlgebra.Algorithms, 18 module Numeric.LinearAlgebra.Algorithms,
19 module Numeric.LinearAlgebra.Instances,
20 module Numeric.LinearAlgebra.Interface 19 module Numeric.LinearAlgebra.Interface
21) where 20) where
22 21
diff --git a/lib/Numeric/LinearAlgebra/Instances.hs b/lib/Numeric/LinearAlgebra/Instances.hs
index 91467ad..147537d 100644
--- a/lib/Numeric/LinearAlgebra/Instances.hs
+++ b/lib/Numeric/LinearAlgebra/Instances.hs
@@ -1,4 +1,4 @@
1{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-} 1{-# LANGUAGE UndecidableInstances, FlexibleInstances #-}
2----------------------------------------------------------------------------- 2-----------------------------------------------------------------------------
3{- | 3{- |
4Module : Numeric.LinearAlgebra.Instances 4Module : Numeric.LinearAlgebra.Instances
@@ -188,3 +188,4 @@ instance (Storable a) => Monoid (Vector a) where
188 mconcat = j . filter ((>0).dim) 188 mconcat = j . filter ((>0).dim)
189 where j [] = mempty 189 where j [] = mempty
190 j l = join l 190 j l = join l
191
diff --git a/lib/Numeric/LinearAlgebra/Linear.hs b/lib/Numeric/LinearAlgebra/Linear.hs
index 1bf8b04..3af9960 100644
--- a/lib/Numeric/LinearAlgebra/Linear.hs
+++ b/lib/Numeric/LinearAlgebra/Linear.hs
@@ -1,4 +1,4 @@
1{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-} 1{-# LANGUAGE UndecidableInstances, MultiParamTypeClasses, FlexibleInstances #-}
2----------------------------------------------------------------------------- 2-----------------------------------------------------------------------------
3{- | 3{- |
4Module : Numeric.LinearAlgebra.Linear 4Module : Numeric.LinearAlgebra.Linear