Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

icpc and atomic operations

BROQUEDIS__Francois
350 Views
Hello there,

I'm trying to compile a C++ application that contains "__sync_" atomic gcc built-in functions. The target computer is an AMD64 8*Dual-Core Opteron, running Mandriva2008.

I found in the icpc documentation that __sync_ functions are only available for IA64 architectures.

I also tried to replace the __sync_ calls by the corresponding AO_ calls from the libatomic_ops library, without success.

Are there any atomic functions defined for AMD64 that could be compiled by the intel C++ compiler suite? (I just need a "test_and_set like" function).

Thank you for your answer
0 Kudos
2 Replies
TimP
Honored Contributor III
350 Views
Evidently, the pthread atomic may be used directly, or implicitly under OpenMP.
0 Kudos
BROQUEDIS__Francois
350 Views
I'm not aware of any pthread_atomic structures or functions, and the atomic construct in OpenMP must be more expansive than assembly atomic instructions.
0 Kudos
Reply