Hands-On GPU:Accelerated Computer Vision with OpenCV and CUDA
上QQ阅读APP看书,第一时间看更新

 Steps for creating a CUDA C program on Ubuntu

This section describes the steps to create and execute a basic CUDA C program on Ubuntu using the Nsight Eclipse plugin. The steps are as follows:

  1. Open Nsight by opening Terminal and typing nsight into it.
  2. Go to File | New |CUDA C/C++ Projects.
  3. Give your desired name to the project and click on OK.
  4. It will create a project with a sample file. Now open this file by double-clicking on it. 
  1. Delete the existing code from the file and write the given code earlier. 
  2. Run the code by pressing the play button. If everything works correctly, you will see Hello, CUDA! displayed on Terminal as shown here: