示例#1
0
 def __init__(self,
              report_fun=None,
              num_thr=2,
              split_size=1000,
              ftemp_dir=''):
     self. async = Local.Local(num_thr)
     self. async .hooks['ftemp'] = FtempAsync()
     self.report_fun = report_fun
     self.split_size = split_size
示例#2
0
    def __init__(self, report_fun = None,
                 num_thr = 2, split_size = 1000, fdist_dir = '', ext = None):
        """Constructor.

           Parameters:
           report_fun - Function that is called when a single packet is
               run, it should have a single parameter: Fst.
           num_thr - Number of desired threads, typically the number
               of cores.
           split_size - Size that a full simulation will be split in.
           ext - Binary extension name (e.g. nothing on Unix, '.exe' on
               Windows).
        """
        self.async = Local.Local(num_thr)
        self.async.hooks['fdist'] = FDistAsync(fdist_dir, ext)
        self.report_fun = report_fun
        self.split_size = split_size