CUDA and C++ simple project

前端 未结 1 1799
隐瞒了意图╮
隐瞒了意图╮ 2021-01-16 12:19

I am trying to create a CUDA + C++ project. Basically a .cpp project that calls for some CUDA kernel. So I simply followed the example here, which basically adds two vectors

相关标签:
1条回答
  • 2021-01-16 13:09

    In the context menu for your project, click Build Customizations. Turn on the CUDA 5.5 target.

    In the context menu for your .cpp file, click Rename and rename it to .cu.

    In the context menu for your .cu file (that you just renamed), select Properties. Then go to General and make sure Item Type is set to CUDA C/C++.

    Rebuild.

    When you start a new CUDA project, you can select Templates > NVIDIA > CUDA 5.5 > CUDA 5.5 Runtime to get a project that should compile without any modifications.

    0 讨论(0)
提交回复
热议问题