From 8e2258c494db6bc701aceab443278f1f10e6d867 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Sun, 19 Aug 2012 00:20:08 +0400 Subject: [PATCH] Fix Windows build after commit:41b6d25 --- modules/core/src/parallel.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp index c238f99..8072a11 100644 --- a/modules/core/src/parallel.cpp +++ b/modules/core/src/parallel.cpp @@ -116,7 +116,22 @@ namespace cv #elif defined HAVE_CONCURRENCY - Concurrency::parallel_for(range.start, range.end, body); + class ConcurrencyProxyLoopBody + { + public: + ConcurrencyProxyLoopBody(const ParallelLoopBody& body) : _body(body) {} + + void operator ()(int i) const + { + _body(Range(i, i + 1)); + } + + private: + const ParallelLoopBody& _body; + ConcurrencyProxyLoopBody& operator=(const ConcurrencyProxyLoopBody&) {return *this;} + } proxy(body); + + Concurrency::parallel_for(range.start, range.end, proxy); #elif defined HAVE_OPENMP -- 2.7.4