Skip to content

Commit

Permalink
Update to dsfmt v2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Viral B. Shah committed Sep 22, 2012
1 parent 448fc7a commit 05b6bbd
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ LLVM_VER = 3.1
READLINE_VER = 6.2
PCRE_VER = 8.30
GRISU_VER = 1.1.1
DSFMT_VER = 2.1
DSFMT_VER = 2.2
OPENBLAS_VER = v0.2.3
LAPACK_VER = 3.4.1
ARPACK_VER = 3.1.2
Expand Down
94 changes: 47 additions & 47 deletions deps/random/dSFMT.h.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
--- dSFMT.h 2012-01-01 11:56:06.000000000 +0530
+++ dSFMT-julia.h 2012-01-01 11:55:19.000000000 +0530
@@ -1,3 +1,7 @@
+/* NOTE: Make all function declarations "extern" instead of
+ "inline static" so that they are callable from julia.
+*/
+
/**
* @file dSFMT.h
*
@@ -182,8 +186,8 @@
--- dSFMT.h 2012-06-29 12:54:27.000000000 +0530
+++ dSFMT-julia.h 2012-09-22 23:02:26.000000000 +0530
@@ -188,6 +188,7 @@
const char *dsfmt_get_idstring(void);
int dsfmt_get_min_array_size(void);

+/*
#if defined(__GNUC__)
-# define DSFMT_PRE_INLINE inline static
-# define DSFMT_PST_INLINE __attribute__((always_inline))
+# define DSFMT_PRE_INLINE
+# define DSFMT_PST_INLINE
#elif defined(_MSC_VER) && _MSC_VER >= 1200
# define DSFMT_PRE_INLINE __forceinline static
# define DSFMT_PRE_INLINE inline static
# define DSFMT_PST_INLINE __attribute__((always_inline))
@@ -198,6 +199,10 @@
# define DSFMT_PRE_INLINE inline static
# define DSFMT_PST_INLINE
@@ -229,7 +233,7 @@
#endif
+*/
+#define DSFMT_PRE_INLINE
+#define DSFMT_PST_INLINE
+
DSFMT_PRE_INLINE uint32_t dsfmt_genrand_uint32(dsfmt_t *dsfmt) DSFMT_PST_INLINE;
DSFMT_PRE_INLINE double dsfmt_genrand_close1_open2(dsfmt_t *dsfmt)
DSFMT_PST_INLINE;
@@ -236,7 +241,7 @@
* @param dsfmt dsfmt internal state date
* @return double precision floating point pseudorandom number
*/
Expand All @@ -28,7 +28,7 @@
uint32_t r;
uint64_t *psfmt64 = &dsfmt->status[0].u[0];

@@ -250,7 +254,7 @@
@@ -257,7 +262,7 @@
* @param dsfmt dsfmt internal state date
* @return double precision floating point pseudorandom number
*/
Expand All @@ -37,7 +37,7 @@
double r;
double *psfmt64 = &dsfmt->status[0].d[0];

@@ -269,7 +273,7 @@
@@ -276,7 +281,7 @@
* before this function. This function uses \b global variables.
* @return double precision floating point pseudorandom number
*/
Expand All @@ -46,7 +46,7 @@
return dsfmt_genrand_uint32(&dsfmt_global_data);
}

@@ -280,7 +284,7 @@
@@ -287,7 +292,7 @@
* before this function. This function uses \b global variables.
* @return double precision floating point pseudorandom number
*/
Expand All @@ -55,7 +55,7 @@
return dsfmt_genrand_close1_open2(&dsfmt_global_data);
}

@@ -292,7 +296,7 @@
@@ -299,7 +304,7 @@
* @param dsfmt dsfmt internal state date
* @return double precision floating point pseudorandom number
*/
Expand All @@ -64,7 +64,7 @@
return dsfmt_genrand_close1_open2(dsfmt) - 1.0;
}

@@ -303,7 +307,7 @@
@@ -310,7 +315,7 @@
* before this function. This function uses \b global variables.
* @return double precision floating point pseudorandom number
*/
Expand All @@ -73,7 +73,7 @@
return dsfmt_gv_genrand_close1_open2() - 1.0;
}

@@ -315,7 +319,7 @@
@@ -322,7 +327,7 @@
* @param dsfmt dsfmt internal state date
* @return double precision floating point pseudorandom number
*/
Expand All @@ -82,7 +82,7 @@
return 2.0 - dsfmt_genrand_close1_open2(dsfmt);
}

@@ -326,7 +330,7 @@
@@ -333,7 +338,7 @@
* before this function. This function uses \b global variables.
* @return double precision floating point pseudorandom number
*/
Expand All @@ -91,7 +91,7 @@
return 2.0 - dsfmt_gv_genrand_close1_open2();
}

@@ -338,7 +342,7 @@
@@ -345,7 +350,7 @@
* @param dsfmt dsfmt internal state date
* @return double precision floating point pseudorandom number
*/
Expand All @@ -100,7 +100,7 @@
double *dsfmt64 = &dsfmt->status[0].d[0];
union {
double d;
@@ -361,7 +365,7 @@
@@ -368,7 +373,7 @@
* before this function. This function uses \b global variables.
* @return double precision floating point pseudorandom number
*/
Expand All @@ -109,7 +109,7 @@
return dsfmt_genrand_open_open(&dsfmt_global_data);
}

@@ -376,7 +380,7 @@
@@ -383,7 +388,7 @@
* @param size the number of pseudorandom numbers to be generated.
* see also \sa dsfmt_fill_array_close1_open2()
*/
Expand All @@ -118,7 +118,7 @@
dsfmt_fill_array_close1_open2(&dsfmt_global_data, array, size);
}

@@ -392,7 +396,7 @@
@@ -399,7 +404,7 @@
* see also \sa dsfmt_fill_array_close1_open2() and \sa
* dsfmt_gv_fill_array_close1_open2()
*/
Expand All @@ -127,7 +127,7 @@
dsfmt_fill_array_open_close(&dsfmt_global_data, array, size);
}

@@ -408,7 +412,7 @@
@@ -415,7 +420,7 @@
* see also \sa dsfmt_fill_array_close1_open2() \sa
* dsfmt_gv_fill_array_close1_open2()
*/
Expand All @@ -136,7 +136,7 @@
dsfmt_fill_array_close_open(&dsfmt_global_data, array, size);
}

@@ -424,7 +428,7 @@
@@ -431,7 +436,7 @@
* see also \sa dsfmt_fill_array_close1_open2() \sa
* dsfmt_gv_fill_array_close1_open2()
*/
Expand All @@ -145,7 +145,7 @@
dsfmt_fill_array_open_open(&dsfmt_global_data, array, size);
}

@@ -434,7 +438,7 @@
@@ -441,7 +446,7 @@
* @param dsfmt dsfmt state vector.
* @param seed a 32-bit integer used as the seed.
*/
Expand All @@ -154,7 +154,7 @@
dsfmt_chk_init_gen_rand(dsfmt, seed, DSFMT_MEXP);
}

@@ -444,7 +448,7 @@
@@ -451,7 +456,7 @@
* @param seed a 32-bit integer used as the seed.
* see also \sa dsfmt_init_gen_rand()
*/
Expand All @@ -163,7 +163,7 @@
dsfmt_init_gen_rand(&dsfmt_global_data, seed);
}

@@ -455,7 +459,7 @@
@@ -462,7 +467,7 @@
* @param init_key the array of 32-bit integers, used as a seed.
* @param key_length the length of init_key.
*/
Expand All @@ -172,7 +172,7 @@
int key_length) {
dsfmt_chk_init_by_array(dsfmt, init_key, key_length, DSFMT_MEXP);
}
@@ -468,7 +472,7 @@
@@ -475,7 +480,7 @@
* @param key_length the length of init_key.
* see also \sa dsfmt_init_by_array()
*/
Expand All @@ -181,7 +181,7 @@
dsfmt_init_by_array(&dsfmt_global_data, init_key, key_length);
}

@@ -496,7 +500,7 @@
@@ -503,7 +508,7 @@
* @return id string.
* see also \sa dsfmt_get_idstring()
*/
Expand All @@ -190,7 +190,7 @@
return dsfmt_get_idstring();
}

@@ -505,7 +509,7 @@
@@ -512,7 +517,7 @@
* @return minimum size of array used for fill_array functions.
* see also \sa dsfmt_get_min_array_size()
*/
Expand All @@ -199,7 +199,7 @@
return dsfmt_get_min_array_size();
}

@@ -514,7 +518,7 @@
@@ -521,7 +526,7 @@
* @param seed a 32-bit integer used as the seed.
* see also \sa dsfmt_gv_init_gen_rand(), \sa dsfmt_init_gen_rand().
*/
Expand All @@ -208,7 +208,7 @@
dsfmt_gv_init_gen_rand(seed);
}

@@ -524,7 +528,7 @@
@@ -531,7 +536,7 @@
* @param key_length the length of init_key.
* see also \sa dsfmt_gv_init_by_array(), \sa dsfmt_init_by_array().
*/
Expand All @@ -217,7 +217,7 @@
dsfmt_gv_init_by_array(init_key, key_length);
}

@@ -534,7 +538,7 @@
@@ -541,7 +546,7 @@
* see also \sa dsfmt_genrand_close1_open2() \sa
* dsfmt_gv_genrand_close1_open2()
*/
Expand All @@ -226,7 +226,7 @@
return dsfmt_gv_genrand_close1_open2();
}

@@ -544,7 +548,7 @@
@@ -551,7 +556,7 @@
* see also \sa dsfmt_genrand_close_open() \sa
* dsfmt_gv_genrand_close_open()
*/
Expand All @@ -235,7 +235,7 @@
return dsfmt_gv_genrand_close_open();
}

@@ -554,7 +558,7 @@
@@ -561,7 +566,7 @@
* see also \sa dsfmt_genrand_open_close() \sa
* dsfmt_gv_genrand_open_close()
*/
Expand All @@ -244,7 +244,7 @@
return dsfmt_gv_genrand_open_close();
}

@@ -564,7 +568,7 @@
@@ -571,7 +576,7 @@
* see also \sa dsfmt_genrand_open_open() \sa
* dsfmt_gv_genrand_open_open()
*/
Expand All @@ -253,7 +253,7 @@
return dsfmt_gv_genrand_open_open();
}

@@ -577,7 +581,7 @@
@@ -584,7 +589,7 @@
* dsfmt_fill_array_close1_open2(), \sa
* dsfmt_gv_fill_array_close1_open2()
*/
Expand All @@ -262,7 +262,7 @@
dsfmt_gv_fill_array_open_close(array, size);
}

@@ -590,7 +594,7 @@
@@ -597,7 +602,7 @@
* dsfmt_fill_array_close1_open2(), \sa
* dsfmt_gv_fill_array_close1_open2()
*/
Expand All @@ -271,7 +271,7 @@
dsfmt_gv_fill_array_close_open(array, size);
}

@@ -603,7 +607,7 @@
@@ -610,7 +615,7 @@
* dsfmt_fill_array_close1_open2(), \sa
* dsfmt_gv_fill_array_close1_open2()
*/
Expand All @@ -280,7 +280,7 @@
dsfmt_gv_fill_array_open_open(array, size);
}

@@ -615,7 +619,7 @@
@@ -622,7 +627,7 @@
* see also \sa dsfmt_fill_array_close1_open2(), \sa
* dsfmt_gv_fill_array_close1_open2()
*/
Expand Down
2 changes: 1 addition & 1 deletion deps/random/jl_random.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
random numbers
*/

#include "dsfmt-2.1/dSFMT.c"
#include "dsfmt-2.2/dSFMT.c"
#include "randmtzig.c"
2 changes: 1 addition & 1 deletion test/sparse.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cd("../extras") do
require("linalg_suitesparse.jl")
require("suitesparse.jl")

# check matrix operations
se33 = speye(3)
Expand Down

0 comments on commit 05b6bbd

Please sign in to comment.