I need usage atomic function atomicAdd(float * adress, float value). My video card supports compute capability 2.1. I have read that to use atomicAdd for floating point operations in gpu with compute capability 2.1, we have to specify sm_20 arch. I'm using Visual Studio 2010. I have changed "compute_10,sm_10" to "compute_20,sm_20" in Project->Properties->Configuration Properties->CUDA C/C++->Device. But I have error:"no instance of overloaded function "atomicAdd" matches the argument list". I can see that during compilation still used arch sm_11. Where should I specify the architecture used. Please help me.
2 Answers
0
votes
0
votes
In the configuration properties, under CUDA C/C++->Device you have already set the Code Generation to compute_20,sm_20 (although you should probably set sm_21 if your GPU has capability 2.1) but you should also ensure that you untick the "Inherit from parent or project defaults".
Then check that the properties for the file in question have not overriden the project settings (basically repeat the above but this time the "Inherit from parent or project defaults" should be checked and there should be no additional entries).
float? Could you edit your question to show a simple piece of code which illustrates the problem? - talonmies