diff options
author | Alberto Ruiz <aruiz@um.es> | 2015-09-12 19:09:01 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2015-09-12 19:09:01 +0200 |
commit | ef383cac7c61ff7d5d49b42223f546492f2c0ba3 (patch) | |
tree | 6b6e223db31857d9361f8dbc2fc8650d1210279d | |
parent | 16536606a820e2160818a7a34d102ae1debc4232 (diff) | |
parent | cc41aeae35b6f5b738daa457236176e3f6b63481 (diff) |
Merge pull request #148 from varosi/feature/windows_builds
Fixed #125 build under Windows
-rw-r--r-- | INSTALL.md | 7 | ||||
-rw-r--r-- | packages/base/hmatrix.cabal | 4 | ||||
-rw-r--r-- | packages/base/src/Internal/C/vector-aux.c | 5 |
3 files changed, 13 insertions, 3 deletions
@@ -56,9 +56,14 @@ using this method. | |||
56 | [winpack]: https://github.com/downloads/AlbertoRuiz/hmatrix/gsl-lapack-windows.zip | 56 | [winpack]: https://github.com/downloads/AlbertoRuiz/hmatrix/gsl-lapack-windows.zip |
57 | 57 | ||
58 | ### Alternative Windows build | 58 | ### Alternative Windows build |
59 | |||
59 | 1) > cabal update | 60 | 1) > cabal update |
61 | |||
60 | 2) Download and unzip somewhere OpenBLAS http://www.openblas.net/ | 62 | 2) Download and unzip somewhere OpenBLAS http://www.openblas.net/ |
61 | 3) > cabal install --flags=openblas --extra-lib-dirs=C:\...\OpenBLAS\lib --extra-include-dir=C:\...\OpenBLAS\include | 63 | |
64 | 3) In a normal Windows cmd: | ||
65 | |||
66 | > cabal install --flags=openblas --extra-lib-dirs=C:\...\OpenBLAS\lib --extra-include-dir=C:\...\OpenBLAS\include | ||
62 | 67 | ||
63 | ## Tests ############################################### | 68 | ## Tests ############################################### |
64 | 69 | ||
diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal index 3a11135..7bed0d3 100644 --- a/packages/base/hmatrix.cabal +++ b/packages/base/hmatrix.cabal | |||
@@ -1,5 +1,5 @@ | |||
1 | Name: hmatrix | 1 | Name: hmatrix |
2 | Version: 0.17.0.0 | 2 | Version: 0.17.0.1 |
3 | License: BSD3 | 3 | License: BSD3 |
4 | License-file: LICENSE | 4 | License-file: LICENSE |
5 | Author: Alberto Ruiz | 5 | Author: Alberto Ruiz |
@@ -74,7 +74,7 @@ library | |||
74 | Internal.Util | 74 | Internal.Util |
75 | Internal.Modular | 75 | Internal.Modular |
76 | Internal.Static | 76 | Internal.Static |
77 | 77 | ||
78 | C-sources: src/Internal/C/lapack-aux.c | 78 | C-sources: src/Internal/C/lapack-aux.c |
79 | src/Internal/C/vector-aux.c | 79 | src/Internal/C/vector-aux.c |
80 | 80 | ||
diff --git a/packages/base/src/Internal/C/vector-aux.c b/packages/base/src/Internal/C/vector-aux.c index a52b969..9dbf536 100644 --- a/packages/base/src/Internal/C/vector-aux.c +++ b/packages/base/src/Internal/C/vector-aux.c | |||
@@ -939,7 +939,12 @@ int vectorScan(char * file, int* n, double**pp){ | |||
939 | See: http://www.evanjones.ca/random-thread-safe.html | 939 | See: http://www.evanjones.ca/random-thread-safe.html |
940 | */ | 940 | */ |
941 | #pragma message "randomVector is not thread-safe in OSX and FreeBSD" | 941 | #pragma message "randomVector is not thread-safe in OSX and FreeBSD" |
942 | #endif | ||
942 | 943 | ||
944 | #if defined (__APPLE__) || (__FreeBSD__) || defined(_WIN32) || defined(WIN32) | ||
945 | /* Windows use thread-safe random | ||
946 | See: http://stackoverflow.com/questions/143108/is-windows-rand-s-thread-safe | ||
947 | */ | ||
943 | inline double urandom() { | 948 | inline double urandom() { |
944 | /* the probalility of matching will be theoretically p^3(in fact, it is not) | 949 | /* the probalility of matching will be theoretically p^3(in fact, it is not) |
945 | p is matching probalility of random(). | 950 | p is matching probalility of random(). |