- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I use gcc built-in function such as __sync_fetch_and_add in my program for atomic operations. Is it posibble to vectorize these atomic operations?
Thanks.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
__sync_fetch_and_add uses:
LOCK; XADD regValue, [location]
LOCK prefix is not supported for PADDB/PADDW/PADD
Additionally, the destination must be an XMM register.
You could use a CMPXCHG16B (or CMPXCHG8B) as a DCAS. This will get you partway to where you want to go.
Jim Dempsey
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page