Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
e20f7014
Commit
e20f7014
authored
Nov 26, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Nov 26, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1835 from SpecLad:windows-xadd
parents
05e22ee8
4cfbee70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
cvdef.h
modules/core/include/opencv2/core/cvdef.h
+2
-9
No files found.
modules/core/include/opencv2/core/cvdef.h
View file @
e20f7014
...
...
@@ -458,15 +458,8 @@ CV_INLINE int cvIsInf( double value )
# 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)
# if !defined(_M_AMD64) && !defined(_M_IA64) && !defined(_M_ARM)
CV_EXTERN_C
__declspec
(
dllimport
)
long
__stdcall
InterlockedExchangeAdd
(
long
volatile
*
Addend
,
long
Value
);
# define CV_XADD(addr, delta) (int)InterlockedExchangeAdd((long volatile*)addr, delta)
# else
CV_EXTERN_C
long
_InterlockedExchangeAdd
(
long
volatile
*
Addend
,
long
Value
);
# pragma intrinsic(_InterlockedExchangeAdd)
# define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd((long volatile*)addr, delta)
# endif
#elif defined _MSC_VER && !defined RC_INVOKED
# define CV_XADD(addr, delta) (int)_InterlockedExchangeAdd((long volatile*)addr, delta)
#else
CV_INLINE
CV_XADD
(
int
*
addr
,
int
delta
)
{
int
tmp
=
*
addr
;
*
addr
+=
delta
;
return
tmp
;
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment