I am trying to use CUDA with TBB on VS 2008, Vista. I got a compilation error saying "__alignof__" is undefined. I wrote a small sample program to reproduce the error. The following code gives an error when I compile it with nvcc. For some reasons, after the compilation by cudafe++, the __alignof operator inside the template function gets converted to __alignof__ and I am getting an error since __alignof__ is not defined. This problem doesn't happen if I don't use a template b'coz the __alignof operator gets evaluated before it reaches cudafe++. Has anyone else faced this problem or have a solution for it? (I tried to go through all possible header files to find where __alignof would be defined as __alignof__. But I could not find any.)
Thanks in advance :)
(PS: I have created a thread in the CUDA forum too. I thought may be someone here could have faced this issue.)
int a;double b;
I cannot answer for your specific problem (as I cannot reproduce it) however a related problem occured and was reported elsewhere on this forum which may be the cause for your problem.
What was happening was a problem in the template token parsing.
The solution was to add white space between your tokens.
As to if this fixes your problem you will have to run a simple experiment.