aboutsummaryrefslogtreecommitdiff
path: root/src/falsesharing.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-03-05 14:27:35 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-03-05 14:27:35 +0100
commit043598070d4cb62facfedf59a87adb9e2a3cb7da (patch)
tree509876954e31be678b3a687af6317765dd002a3b /src/falsesharing.py
parent12922d12c20a9a80f191b37e5571c7563e993ddc (diff)
downloadallocbench-043598070d4cb62facfedf59a87adb9e2a3cb7da.tar.gz
allocbench-043598070d4cb62facfedf59a87adb9e2a3cb7da.zip
add function to scale thread to available cpus
Diffstat (limited to 'src/falsesharing.py')
-rw-r--r--src/falsesharing.py3
1 files changed, 1 insertions, 2 deletions
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"]