proxygen
|
#include <algorithm>
#include <atomic>
#include <thread>
#include <vector>
#include <folly/Benchmark.h>
#include <folly/gen/Base.h>
#include <folly/gen/ParallelMap.h>
#include <folly/portability/Unistd.h>
Go to the source code of this file.
Functions | |
DEFINE_int32 (threads, std::max(1,(int32_t) sysconf(_SC_NPROCESSORS_CONF)/2),"Num threads.") | |
size_t | fib (int n) |
BENCHMARK (FibSumMap, n) | |
BENCHMARK_RELATIVE (FibSumPmap, n) | |
BENCHMARK_RELATIVE (FibSumThreads, n) | |
int | main (int argc, char *argv[]) |
Variables | |
constexpr int | kFib = 35 |
BENCHMARK | ( | FibSumMap | , |
n | |||
) |
Definition at line 39 of file ParallelMapBenchmark.cpp.
References folly::doNotOptimizeAway(), fib(), folly::gen::map(), folly::gen::seq(), and folly::gen::sum.
BENCHMARK_RELATIVE | ( | FibSumPmap | , |
n | |||
) |
Definition at line 44 of file ParallelMapBenchmark.cpp.
References folly::doNotOptimizeAway(), fib(), kNumThreads, folly::gen::pmap(), folly::gen::seq(), and folly::gen::sum.
BENCHMARK_RELATIVE | ( | FibSumThreads | , |
n | |||
) |
Definition at line 57 of file ParallelMapBenchmark.cpp.
References folly::doNotOptimizeAway(), fib(), i, kNumThreads, folly::gen::map(), folly::gen::seq(), and folly::gen::sum.
size_t fib | ( | int | n | ) |
Definition at line 35 of file ParallelMapBenchmark.cpp.
Referenced by BENCHMARK(), and BENCHMARK_RELATIVE().
int main | ( | int | argc, |
char * | argv[] | ||
) |
constexpr int kFib = 35 |
Definition at line 34 of file ParallelMapBenchmark.cpp.