i’m currently trying to find my way into accelerating my Maya Plugins with CUDA.
My setup is the following: I have a deformer plugin, in its deform method i would like to
execute a simple kernel to do some vector math.
I have set up VS2010 and the NVidia Toolkit and all the sample files compile correctly.
When i want to compile the CUDA version of my plugin, and i use the “CUDA Build Customization” to setup the compilation of .cu files i get the following error:
1> C:\Program Files\Autodesk\Maya2012\include\maya/MTypes.h(270): error : invalid redeclaration of type name “short2”
1> c:\program files
vidia gpu computing toolkit\cuda\v5.0\include\vector_types.h(145): here
Problem: The CUDA vector-types.h header redeclares the same basic types as MTypes.h does.
Solution from another thread: Use namespace for #include directive! (https://devtalk.nvidia.com/default/topic/487176/maya-plug-in-conflicts-with-cuda-namespace-conflict-between-60-vector-62-/)
But this does not work for me, since i dont even include any CUDA headers in my header file. The Build customization seems to set everything up in a way, so that this is not neccessary. (Even if i try to include CUDA headers in a namespace i get the same error…)
How do you get around this problem? Is there a way to specify everything manually to avoid the build customization?