Cast to unsigned inside CV_XADD to quiet nvcc

This commit is contained in:
Andrey Kamaev 2013-04-08 18:15:10 +04:00
parent 54511b4198
commit 3107f79cea

View File

@ -443,9 +443,9 @@ CV_INLINE int cvIsInf( double value )
# else
# if defined __ATOMIC_ACQ_REL && !defined __clang__
// version for gcc >= 4.7
# define CV_XADD(addr, delta) __atomic_fetch_add(addr, delta, __ATOMIC_ACQ_REL)
# define CV_XADD(addr, delta) (int)__atomic_fetch_add((unsigned*)(addr), (unsigned)(delta), __ATOMIC_ACQ_REL)
# else
# define CV_XADD(addr, delta) __sync_fetch_and_add(addr, delta)
# define CV_XADD(addr, delta) (int)__sync_fetch_and_add((unsigned*)(addr), (unsigned)(delta))
# endif
# endif
#elif (defined WIN32 || defined _WIN32 || defined WINCE) && (!defined RC_INVOKED)