def __init__(self, log_name, experiments, cpu_limit=2**16):
"""
:param experiments: A list of pypuf.experiments.experiment.base.Experiment
:param log_name: A unique file path where to output should be logged.
:param cpu_limit: Maximum number of parallel processes that run experiments.
"""
# Store experiments list
self.experiments = experiments
# Store logger name
self.logger_name = log_name
# Setup parallel execution limit
self.cpu_limit = min(cpu_limit, multiprocessing.cpu_count())
self.semaphore = multiprocessing.BoundedSemaphore(self.cpu_limit)
评论列表
文章目录