From 043598070d4cb62facfedf59a87adb9e2a3cb7da Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 5 Mar 2019 14:27:35 +0100 Subject: add function to scale thread to available cpus --- src/falsesharing.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/falsesharing.py') diff --git a/src/falsesharing.py b/src/falsesharing.py index 859db03..f6375a6 100644 --- a/src/falsesharing.py +++ b/src/falsesharing.py @@ -1,5 +1,4 @@ import matplotlib.pyplot as plt -import multiprocessing import numpy as np import re @@ -20,7 +19,7 @@ class Benchmark_Falsesharing(Benchmark): self.args = { "bench": ["thrash", "scratch"], - "threads": range(1, multiprocessing.cpu_count() * 2 + 1) + "threads": Benchmark.scale_threads_for_cpus(2) } self.requirements = ["cache-thrash", "cache-scratch"] -- cgit v1.2.3