summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hmatrix.cabal3
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs5
2 files changed, 7 insertions, 1 deletions
diff --git a/hmatrix.cabal b/hmatrix.cabal
index 93238a0..111b251 100644
--- a/hmatrix.cabal
+++ b/hmatrix.cabal
@@ -160,6 +160,9 @@ library
160 if impl(ghc < 6.10.2) 160 if impl(ghc < 6.10.2)
161 cpp-options: -DFINIT 161 cpp-options: -DFINIT
162 162
163 if impl(ghc == 7.0.1)
164 cpp-options: -DNONORMVTEST
165
163 if flag(mkl) 166 if flag(mkl)
164 if arch(x86_64) 167 if arch(x86_64)
165 extra-libraries: gsl mkl_lapack mkl_intel_lp64 mkl_sequential mkl_core 168 extra-libraries: gsl mkl_lapack mkl_intel_lp64 mkl_sequential mkl_core
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
index 32cd39d..2b5869d 100644
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -232,9 +232,10 @@ offsetTest = y == y' where
232normsVTest = TestList [ 232normsVTest = TestList [
233 utest "normv2CD" $ norm2PropC v 233 utest "normv2CD" $ norm2PropC v
234 , utest "normv2CF" $ norm2PropC (single v) 234 , utest "normv2CF" $ norm2PropC (single v)
235#ifndef NONORMVTEST
235 , utest "normv2D" $ norm2PropR x 236 , utest "normv2D" $ norm2PropR x
236 , utest "normv2F" $ norm2PropR (single x) 237 , utest "normv2F" $ norm2PropR (single x)
237 238#endif
238 , utest "normv1CD" $ norm1 v == 8 239 , utest "normv1CD" $ norm1 v == 8
239 , utest "normv1CF" $ norm1 (single v) == 8 240 , utest "normv1CF" $ norm1 (single v) == 8
240 , utest "normv1D" $ norm1 x == 6 241 , utest "normv1D" $ norm1 x == 6
@@ -247,7 +248,9 @@ normsVTest = TestList [
247 248
248 ] where v = fromList [1,-2,3:+4] :: Vector (Complex Double) 249 ] where v = fromList [1,-2,3:+4] :: Vector (Complex Double)
249 x = fromList [1,2,-3] :: Vector Double 250 x = fromList [1,2,-3] :: Vector Double
251#ifndef NONORMVTEST
250 norm2PropR a = norm2 a =~= sqrt (dot a a) 252 norm2PropR a = norm2 a =~= sqrt (dot a a)
253#endif
251 norm2PropC a = norm2 a =~= realPart (sqrt (dot a (conj a))) 254 norm2PropC a = norm2 a =~= realPart (sqrt (dot a (conj a)))
252 a =~= b = fromList [a] |~| fromList [b] 255 a =~= b = fromList [a] |~| fromList [b]
253 256