Explorar el Código

port sobol to windows, thanks Jerome Robert

Samuel Thibault hace 11 años
padre
commit
053a595c8a

+ 4 - 0
examples/pi/SobolQRNG/sobol_gold.c

@@ -62,6 +62,10 @@
 
 #define k_2powneg32 2.3283064E-10F
 
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
+#define ffs(arg) _bit_scan_forward(arg)
+#endif
+
 /* Create the direction numbers, based on the primitive polynomials. */
 void initSobolDirectionVectors(int n_dimensions, unsigned int *directions)
 {

+ 1 - 1
examples/pi/SobolQRNG/sobol_primitives.c

@@ -66,7 +66,7 @@
 const struct primitive sobol_primitives[] =
 {
     /* First dimension is a special case so this entry is actually ignored */
-    {1, 0, 0, {}},
+    {1, 0, 0, 0},
     {2, 1, 0, {1}},
     {3, 2, 1, {1, 3}},
     {4, 3, 1, {1, 3, 1}},