37 namespace cpu_launcher {
42 static constexpr int64_t SMALL_OP_GRAIN_SIZE = 32767;
70 template <
typename func_t>
72 #pragma omp parallel for num_threads(utility::EstimateMaxThreads()) 73 for (int64_t i = 0; i < n; ++i) {
86 template <
typename func_t>
87 void ParallelFor(int64_t n, int64_t grain_size,
const func_t& func) {
88 #pragma omp parallel for schedule(static) if (n > grain_size) \ 89 num_threads(utility::EstimateMaxThreads()) 90 for (int64_t i = 0; i < n; ++i) {
Definition: PinholeCameraIntrinsic.cpp:35
void ParallelFor(int64_t n, const func_t &func)
Run a function in parallel on CPU.
Definition: CPULauncher.h:71