tags:

views:

42

answers:

1

The template and cppIntegration examples in the CUDA SDK (version 3.1) use Externs to link function calls from the host code to the device code.

However, Tom's comment at http://stackoverflow.com/questions/2090974/how-to-separate-cuda-code-into-multiple-files#comment-2024913 indicates that the usage of extern is deprecated.

If this the case, what's the correct structure for a CUDA project such as the template example or cppIntegration example?

A: 

Depends what your host code is. If you end up mixing C and C++ you still need the externs. Fore details see this guide.

pszilard
All of my code is C++.
Richard