[opencv] 19/89: core: update CV_XADD

Nobuhiro Iwamatsu iwamatsu at moszumanska.debian.org
Sat May 13 09:57:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

iwamatsu pushed a commit to annotated tag 2.4.13.2
in repository opencv.

commit c585d3890e50d8b8fceabc5d486704501fa79c83
Author: Alexander Alekhin <alexander.alekhin at intel.com>
Date:   Thu Oct 27 13:22:13 2016 +0300

    core: update CV_XADD
    
    Allow to use custom implementations of CV_XADD (passed via -D of CXXFLAGS)
---
 modules/core/include/opencv2/core/operations.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/core/include/opencv2/core/operations.hpp b/modules/core/include/opencv2/core/operations.hpp
index 0177d8d..1b7484a 100644
--- a/modules/core/include/opencv2/core/operations.hpp
+++ b/modules/core/include/opencv2/core/operations.hpp
@@ -52,8 +52,8 @@
 #ifdef __cplusplus
 
 /////// exchange-add operation for atomic operations on reference counters ///////
-#if defined __INTEL_COMPILER && !(defined WIN32 || defined _WIN32)   // atomic increment on the linux version of the Intel(tm) compiler
-  #define CV_XADD(addr,delta) _InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(addr)), delta)
+#ifdef CV_XADD
+  // allow to use user-defined macro
 #elif defined __GNUC__
 
   #if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ && !defined __EMSCRIPTEN__  && !defined(__CUDACC__)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list