Remove Intel Specific CV_XADD Definition

Intel supports __atomic_fetch_add, so it isn't necessary to use
a specific version otherwise.
pull/7553/head
Erich Keane 9 years ago
parent 689cf79625
commit ad6af6b9e4
  1. 5
      modules/core/include/opencv2/core/cvdef.h

@ -418,10 +418,7 @@ Cv64suf;
* 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) (int)_InterlockedExchangeAdd(const_cast<long*>(reinterpret_cast<volatile long*>(addr)), delta)
#elif defined __GNUC__
#if defined __GNUC__
# if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ && !defined __EMSCRIPTEN__ && !defined(__CUDACC__)
# ifdef __ATOMIC_ACQ_REL
# define CV_XADD(addr, delta) __c11_atomic_fetch_add((_Atomic(int)*)(addr), delta, __ATOMIC_ACQ_REL)

Loading…
Cancel
Save