OpenMP Parallel For Backend (backend/parallel_for.openmp.hpp)

opencv · modules/core/include/opencv2/core/parallel/backend/parallel_for.openmp.hpp · cpp · Apache-2.0
infra, lang:cpp, tag:opencv, tag:openmp, tag:parallelism, tag:multithreading

Implements OpenCV's ParallelForAPI using OpenMP, enabling multi-threaded execution of parallel_for_ loops via omp.h. Reuse when integrating OpenMP as the threading backend for OpenCV core parallelism.

// Source: https://github.com/opencv/opencv | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.

#ifndef OPENCV_CORE_PARALLEL_FOR_OPENMP_HPP
#define OPENCV_CORE_PARALLEL_FOR_OPENMP_HPP

#include "opencv2/core/parallel/parallel_backend.hpp"

#if !defined(_OPENMP) && !defined(OPENCV_SKIP_OPENMP_PRESENSE_CHECK)
#error "This file must be compiled with enabled OpenMP"
#endif

#include <omp.h>

namespace cv { namespace parallel { namespace openmp {

/** OpenMP parallel_for API implementation
 *
 * @s

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key