- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have a library which has abilities on doing multi-precision operations. Our demand is to provide parallelizm on current serial algorithms of our library. Therefore, Intel's OpenMP library is selected for this aim. However some problems occured when we use multi-precision or unsigned integers in the code that we want to parallelize.
We know that OpenMP does not support unsigned variables in loop parallelizations (for loops), the question we want to ask is if this condition is valid all parts of OpenMP library or not, in other words can we put a multi-precision or unsigned operand between the paranthesis of shared or private clauses?
Thanks for your interest...
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pending a more expert reply, my take would be:
Signed or unsigned of the same storage size would not make a difference to OpenMP, except, as you noticed, for counting loop chunks. Multi-precision operands would have to be recognized as an appropriate sized array object.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can certainly place arrays in shared and private clauses.
A multi-precision integer (int 64, int 128, int 256, ...) and depending on processor you can perform an interlockedcompare and exchange on up to 16 bytes / 128 bits(see CMPXCHG16B). For anything larger than that you would require mutexes or special wait free programming style.
As long as your library does not use global (static) buffers, and as long as your callers do not assume atomic operations then you should not require special programming considerations.
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page