mirror of https://github.com/google/benchmark.git
Really drop multithreading support
This commit is contained in:
parent
06c1fdbdb3
commit
15bf66750c
|
@ -345,7 +345,7 @@ class Benchmark {
|
|||
// of some piece of code.
|
||||
|
||||
// Run one instance of this benchmark concurrently in t threads.
|
||||
// TODO(dominic)
|
||||
// TODO(dominic): Allow multithreaded benchmarks
|
||||
//Benchmark* Threads(int t);
|
||||
|
||||
// Pick a set of values T from [min_threads,max_threads].
|
||||
|
@ -360,13 +360,12 @@ class Benchmark {
|
|||
// Foo in 4 threads
|
||||
// Foo in 8 threads
|
||||
// Foo in 16 threads
|
||||
Benchmark* ThreadRange(int min_threads, int max_threads);
|
||||
// Benchmark* ThreadRange(int min_threads, int max_threads);
|
||||
|
||||
// Equivalent to ThreadRange(NumCPUs(), NumCPUs())
|
||||
Benchmark* ThreadPerCpu();
|
||||
//Benchmark* ThreadPerCpu();
|
||||
|
||||
// TODO(dominic): Control whether or not real-time is used for this benchmark
|
||||
// TODO(dominic): Control the default number of iterations
|
||||
|
||||
// -------------------------------
|
||||
// Following methods are not useful for clients
|
||||
|
|
|
@ -647,7 +647,7 @@ Benchmark* Benchmark::Apply(void (*custom_arguments)(Benchmark* benchmark)) {
|
|||
custom_arguments(this);
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
Benchmark* Benchmark::Threads(int t) {
|
||||
CHECK_GT(t, 0);
|
||||
mutex_lock l(&benchmark_mutex);
|
||||
|
@ -669,7 +669,7 @@ Benchmark* Benchmark::ThreadPerCpu() {
|
|||
thread_counts_.push_back(kNumCpuMarker);
|
||||
return this;
|
||||
}
|
||||
|
||||
*/
|
||||
void Benchmark::AddRange(std::vector<int>* dst, int lo, int hi, int mult) {
|
||||
CHECK_GE(lo, 0);
|
||||
CHECK_GE(hi, lo);
|
||||
|
|
|
@ -57,7 +57,7 @@ static void BM_CalculatePiRange(benchmark::State& state) {
|
|||
state.SetLabel(ss.str());
|
||||
}
|
||||
BENCHMARK_RANGE(BM_CalculatePiRange, 1, 1024 * 1024);
|
||||
|
||||
/*
|
||||
static void BM_CalculatePi(benchmark::State& state) {
|
||||
static const int depth = 1024;
|
||||
double pi ATTRIBUTE_UNUSED = 0.0;
|
||||
|
@ -68,7 +68,7 @@ static void BM_CalculatePi(benchmark::State& state) {
|
|||
BENCHMARK(BM_CalculatePi)->Threads(8);
|
||||
BENCHMARK(BM_CalculatePi)->ThreadRange(1, 32);
|
||||
BENCHMARK(BM_CalculatePi)->ThreadPerCpu();
|
||||
|
||||
*/
|
||||
static void BM_SetInsert(benchmark::State& state) {
|
||||
while (state.KeepRunning()) {
|
||||
state.PauseTiming();
|
||||
|
|
Loading…
Reference in New Issue