Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:48:50

0001 #!/usr/bin/env python
0002 """
0003 
0004 
0005   1.00M :    1000000 : QCurandState_1000000_0_0.bin 
0006   3.00M :    3000000 : QCurandState_3000000_0_0.bin 
0007 
0008 
0009 
0010 cuRANDWrapper_100000000_0_0.bin
0011 cuRANDWrapper_10000000_0_0.bin
0012 cuRANDWrapper_1000000_0_0.bin
0013 cuRANDWrapper_10240_0_0.bin
0014 cuRANDWrapper_200000000_0_0.bin
0015 cuRANDWrapper_2000000_0_0.bin
0016 cuRANDWrapper_3000000_0_0.bin
0017 """
0018 
0019 import os, logging, re
0020 log = logging.getLogger(__name__)
0021 
0022 #pfx = "cuRANDWrapper"
0023 pfx = "QCurandState"
0024 _ptn = "^%s_(?P<num>\d*)_(?P<a>\d*)_(?P<b>\d*).bin$" % pfx
0025 ptn = re.compile(_ptn)
0026 
0027 if __name__ == '__main__':
0028     logging.basicConfig(level=logging.INFO)
0029 
0030     rngdir = os.path.expanduser("~/.opticks/rngcache/RNG")
0031     
0032     #lines = filter(None,__doc__.split("\n")) 
0033     lines = os.listdir(rngdir)  
0034     
0035     for line in lines:
0036         if not line.startswith(pfx): continue 
0037         m = ptn.match(line)
0038         if not m:
0039             log.info("failed to match %s " % line)
0040         else:
0041             d = m.groupdict()
0042             num = d['num']
0043             millions = float(d['num'])/float(1e6)
0044             #print(d)
0045             print("%6.2fM : %10d : %s " % (millions, int(num), line ))
0046         pass
0047     pass
0048 
0049 
0050