Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
parallel_for_omp.cpp
Go to the documentation of this file.
1#ifndef NO_MULTITHREADING
2#ifdef OMP_MULTITHREADING
3#include <cstddef>
4#include <functional>
5
6namespace bb {
7void parallel_for_omp(size_t num_iterations, const std::function<void(size_t)>& func)
8{
9#pragma omp parallel for
10 for (size_t i = 0; i < num_iterations; ++i) {
11 func(i);
12 }
13}
14} // namespace bb
15#endif
16#endif
Entry point for Barretenberg command-line interface.
void parallel_for_omp(size_t num_iterations, const std::function< void(size_t)> &func)