- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm looking to utilize the atomic
In order to make sure I can use atomic
Is this achievable? Are there compiler settings I need to be aware of that could throw off this assertion (e.g., alignment and/or padding settings)? I'm using gcc on the Mac and MSVC on Windows. Any help here would be greatly appreciated. Thanks in advance!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A "fixed binary representation" as in "two-complement, little-endian integer?" I'm not sure I get the gist of your question. If you haven't already, you might take a look at the TBBopen source release of include/tbb/atomic.h. You'll find the base type for atomic
templatestruct atomic_base { I my_value; };
There are template specializations for various word sizes and for void * and bool, plus a bunch of hair to play nice with various compilers, so atomic
Is this an answer to your question?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On all current commercially supported platforms, atomic
There's no guarantee of this property for future platforms, because we are at the mercy of whatever the C++ compiler does, but I would beamazed if a production C++ compiler had a different layout for an atomic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Blessings,
Foster

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page