Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

atomic add of doubles

sngan
Beginner
7,891 Views
does anyone has a perf. implementation of an atomic add for double values
by using f.e. a union with double/long and interlockedcompareexchange on top ???
or what will be the best way to do this atomic + fast ?
0 Kudos
21 Replies
jimdempseyatthecove
Honored Contributor III
1,256 Views

Dmitriy,

ICC 10.nn.dont.remember using /O2 or /O3. I haven't retried the problemcode with the current version. The problem was you debug with no optimizations. When that works you start increasing the optimization levels. When you optimize to the max and code works for a long time under rigorous testing you think everything is fine until some time later when the race condition is encountered. Then after a day or a few days of back tracking you come upon a new circumstance where the optimizer failed to produce the correct code. After that hits you a few times you tend to be a bit on the cautious side.

I will be using manual hoop jumping since I cannot rely on the problem creeping back as optimizations get more aggressive. (IOP is a bit too aggressive)

Jim


0 Kudos
Reply