#include <pls/pls.h> #include <pls/internal/helpers/profiler.h> #include <pls/internal/helpers/mini_benchmark.h> #include <iostream> #include <vector> #include <functional> static constexpr int INPUT_SIZE = 1000000; int main() { PROFILE_ENABLE std::vector<double> vec(INPUT_SIZE, 1); std::vector<double> out(INPUT_SIZE); for (int i = 0; i < INPUT_SIZE; i++) { vec[i] = i; } pls::internal::helpers::run_mini_benchmark([&] {
pls::scan(vec.begin(), vec.end(), out.begin(), std::plus<double>(), 0.0);
}, 8, 1000); PROFILE_SAVE("test_profile.prof") }