Hey Zenosparadox thanks for that.
I have always wondered if mine is configured properly (originally a copy of either an SDK one, or someone elses) and I have similarly had troubles with atomics. From what you say my .csproj is obviously inferior to the one you are using.
If I do what you say, in the “Custom Build Step” for the project in the describtion field it just says “Performing Custom Build Step” nothing else there or anywhere I can find.
However if I view the properties for a file that is part of that project and view the Custom Build Step for that file in the Command line field (if Debug mode) it has
“$(CUDA_BIN_PATH)\nvcc.exe” -ccbin “$(VCInstallDir)bin” -c -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/RTC1,/MTd -I"$(CUDA_INC_PATH)" -I./ -I…/…/common/inc -o $(ConfigurationName)$(InputName).obj $(InputFileName)
(NB /Wp64 is in there and that is causing a heap of “deprecated” warnings and -arch sm_… not visible anywhere)
—and for Release mode —
“$(CUDA_BIN_PATH)\nvcc.exe” -ccbin “$(VCInstallDir)bin” -c -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/O2,/Zi,/MT -I"$(CUDA_INC_PATH)" -I./ -I…/…/common/inc -o $(ConfigurationName)$(InputName).obj $(InputFileName)
– and different again for each of the Emus —
As this is for the file it means every .cu file has to have similaar entries for its Visual Studio properties. If I view the .csproj with UltraEdit it is quite lenghly and repetetive.
Also if I do the same for the simpleAtomicIntrinsics from the SDK then VisualStudio only allows me to view the CommandLine, I have to use UltraEdit to see that it is
-arch sm_11. So with that one ‘atomics’ work, but it also has layers of dependencies that have made it to painful to pick up a ‘project’ file and move it into our master solution :( and as a result I have had to avoid using atomics.
So its all a bit of a mess really.
Q: Is there a better way for the .csproj to be set up ?
Q: is there an example somewhere ?
I am using Cuda with C#, also sometimes with C++ or C
Thanks in advance
kbam