Here a sample code with a makefile for linux and a visual studio project for windows. I have tested it on two computer, a desktop with a Radeon HD 7990 and a laptop with a FirePro M4000. On both computer I have tested the problem on Windows 7 and Fedora and I noticed my problem only appear on Fedora.
On normal circumstances the sample code output:
device name: Tahiti
0.840188 + 0.5 = 1.340188
0.394383 + 0.5 = 0.894383
0.783099 + 0.5 = 1.283099
0.798440 + 0.5 = 1.298440
0.911647 + 0.5 = 1.411647
0.197551 + 0.5 = 0.697551
0.335223 + 0.5 = 0.835223
0.768230 + 0.5 = 1.268230
0.277775 + 0.5 = 0.777775
0.553970 + 0.5 = 1.053970
Computed '10/10' correct values!
But when using the "Application timeline trace" tool of CodeXL on Linux the program output:
device name: Tahiti
0,840188 + 0.5 = 0,840188
0,394383 + 0.5 = 0,394383
0,783099 + 0.5 = 0,783099
0,798440 + 0.5 = 0,798440
0,911647 + 0.5 = 0,911647
0,197551 + 0.5 = 0,197551
0,335223 + 0.5 = 0,335223
0,768230 + 0.5 = 0,768230
0,277775 + 0.5 = 0,277775
0,553970 + 0.5 = 0,553970
Computed '0/10' correct values!