Fix for bug #3469 CV_XADD failing in clang+nvcc combination
This commit is contained in:
parent
5f9c117d78
commit
3f07655231
@ -444,7 +444,7 @@ CV_INLINE int cvIsInf( double value )
|
|||||||
// atomic increment on the linux version of the Intel(tm) compiler
|
// atomic increment on the linux version of the Intel(tm) compiler
|
||||||
# define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(addr)), delta)
|
# define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(addr)), delta)
|
||||||
#elif defined __GNUC__
|
#elif defined __GNUC__
|
||||||
# if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ && !defined __EMSCRIPTEN__
|
# if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ && !defined __EMSCRIPTEN__ && !defined(__CUDACC__)
|
||||||
# ifdef __ATOMIC_ACQ_REL
|
# ifdef __ATOMIC_ACQ_REL
|
||||||
# define CV_XADD(addr, delta) __c11_atomic_fetch_add((_Atomic(int)*)(addr), delta, __ATOMIC_ACQ_REL)
|
# define CV_XADD(addr, delta) __c11_atomic_fetch_add((_Atomic(int)*)(addr), delta, __ATOMIC_ACQ_REL)
|
||||||
# else
|
# else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user