Skip to content

Commit c585d38

Browse files
committed
core: update CV_XADD
Allow to use custom implementations of CV_XADD (passed via -D of CXXFLAGS)
1 parent 422154d commit c585d38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/core/include/opencv2/core/operations.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
#ifdef __cplusplus
5353

5454
/////// exchange-add operation for atomic operations on reference counters ///////
55-
#if defined __INTEL_COMPILER && !(defined WIN32 || defined _WIN32) // atomic increment on the linux version of the Intel(tm) compiler
56-
#define CV_XADD(addr,delta) _InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(addr)), delta)
55+
#ifdef CV_XADD
56+
// allow to use user-defined macro
5757
#elif defined __GNUC__
5858

5959
#if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ && !defined __EMSCRIPTEN__ && !defined(__CUDACC__)

0 commit comments

Comments
 (0)