diff --git a/pyopencl/clrandom.py b/pyopencl/clrandom.py index 916d34a92d169638750a791e0d5cccbedcd9c26a..d0c2a2a001eb79c90ccd95b0f2f332bcb4b847a6 100644 --- a/pyopencl/clrandom.py +++ b/pyopencl/clrandom.py @@ -11,7 +11,7 @@ import numpy as np class RanluxGenerator(object): def __init__(self, queue, num_work_items, luxury=None, seed=None, no_warmup=False, - use_legacy_init=False, max_work_items=None): + use_legacy_init=True, max_work_items=None): if luxury is None: luxury = 4 diff --git a/src/cl/pyopencl-ranluxcl.cl b/src/cl/pyopencl-ranluxcl.cl index 1a1a0e53b0f5d4d1a2036c7f86bd86c691d50ac9..71606a15c1a0123c0d52d1b8ac90110c811051a4 100644 --- a/src/cl/pyopencl-ranluxcl.cl +++ b/src/cl/pyopencl-ranluxcl.cl @@ -551,11 +551,11 @@ void ranluxcl_initialization(uint ins, global ranluxcl_state_t *ranluxcltab) //allows us to use ins = 0. int k, maxWorkitems; - #ifdef RANLUXCL_USE_LEGACY_INITIALIZATION - maxWorkitems = RANLUXCL_USE_LEGACY_INITIALIZATION; + #ifdef RANLUXCL_MAXWORKITEMS + maxWorkitems = RANLUXCL_MAXWORKITEMS; #else maxWorkitems = RANLUXCL_NUMWORKITEMS; - #endif //RANLUXCL_USE_LEGACY_INITIALIZATION + #endif //RANLUXCL_MAXWORKITEMS int scaledins = ins * maxWorkitems + 1;