10 #include <benchmark/benchmark.h>
19 std::vector<float> input(
size);
20 std::vector<float> output(
size);
21 std::iota(input.begin(), input.end(), 0.0f);
32 for (
auto _ : state) {
42 std::vector<float> input(
size);
43 std::vector<float> output(
size);
44 std::iota(input.begin(), input.end(), 0.0f);
59 for (
auto _ : state) {
72 #define ENUM_BM_SIZE(FN) \
73 BENCHMARK_CAPTURE(FN, CPU##100, 100)->Unit(benchmark::kMicrosecond); \
74 BENCHMARK_CAPTURE(FN, CPU##1000, 1000)->Unit(benchmark::kMicrosecond); \
75 BENCHMARK_CAPTURE(FN, CPU##10000, 10000)->Unit(benchmark::kMicrosecond); \
76 BENCHMARK_CAPTURE(FN, CPU##100000, 100000)->Unit(benchmark::kMicrosecond); \
77 BENCHMARK_CAPTURE(FN, CPU##1000000, 1000000) \
78 ->Unit(benchmark::kMicrosecond); \
79 BENCHMARK_CAPTURE(FN, CPU##10000000, 10000000) \
80 ->Unit(benchmark::kMicrosecond); \
81 BENCHMARK_CAPTURE(FN, CPU##100000000, 100000000) \
82 ->Unit(benchmark::kMicrosecond);
#define CLOUDVIEWER_VECTORIZED(ISPCKernel,...)
void ParallelFor(const Device &device, int64_t n, const func_t &func)
void ParallelForScalar(benchmark::State &state, int size)
void ParallelForVectorized(benchmark::State &state, int size)
Generic file read and write utility for python interface.