diff --git a/cuburn/code/mwc.py b/cuburn/code/mwc.py index 206f290..5b07d92 100644 --- a/cuburn/code/mwc.py +++ b/cuburn/code/mwc.py @@ -2,6 +2,8 @@ The multiply-with-carry random number generator. """ +import os +import warnings import numpy as np from util import * @@ -41,20 +43,34 @@ __device__ float mwc_next_11(mwc_st &st) { """ @staticmethod - def make_seeds(nthreads, host_seed=None): + def load_mults(): + pfpath = os.path.join(os.path.dirname(__file__), 'primes.bin') + if os.path.isfile(pfpath): + with open(pfpath) as fp: + return np.frombuffer(fp.read(), dtype='