Commit 689cf796 authored by Erich Keane's avatar Erich Keane

Correct cast for _InterlockedExchangeAdd on ICC

A bug in ICC improperly identified the first parameter as "void*"
rather than the proper "volatile long*".  This is scheduled to be
fixed in ICC in a future release.

This patch casts only to a "long*" to preserve backwards compatibility
with the ICC 16 and ICC 17 releases.
parent dc9602ee
......@@ -420,7 +420,7 @@ Cv64suf;
#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<void*>(reinterpret_cast<volatile void*>(addr)), delta)
# define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd(const_cast<long*>(reinterpret_cast<volatile long*>(addr)), delta)
#elif defined __GNUC__
# if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ && !defined __EMSCRIPTEN__ && !defined(__CUDACC__)
# ifdef __ATOMIC_ACQ_REL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment