mirror of
https://github.com/opencv/opencv.git
synced 2025-07-29 17:02:49 +08:00
core: update CV_XADD
Allow to use custom implementations of CV_XADD (passed via -D of CXXFLAGS)
This commit is contained in:
parent
422154dc97
commit
c585d3890e
@ -52,8 +52,8 @@
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
/////// exchange-add operation for atomic operations on reference counters ///////
|
/////// 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
|
#ifdef CV_XADD
|
||||||
#define CV_XADD(addr,delta) _InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(addr)), delta)
|
// allow to use user-defined macro
|
||||||
#elif defined __GNUC__
|
#elif defined __GNUC__
|
||||||
|
|
||||||
#if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ && !defined __EMSCRIPTEN__ && !defined(__CUDACC__)
|
#if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ && !defined __EMSCRIPTEN__ && !defined(__CUDACC__)
|
||||||
|
Loading…
Reference in New Issue
Block a user