GPU programming-produced by goodoo

Source: Internet
Author: User
Tags windows visual cuda toolkit
Cuda Development Environment configuration-Windows Visual Studio 2005

The following is the configuration of vs2005, and vs2003 and vs2008 are similar.

1. Install the Visual Studio 2005 environment.

2. Install the Development Assistant visual assist X.

3. Download Cuda software from the http://www.nvidia.cn/object/cuda_get_cn.html and install it in order.

Cuda driver --> Cuda toolkit --> Cuda SDK

4. syntax highlighting:

Set the usertype in NVIDIA Cuda SDK/doc/syntax_highlighting/visual_studio_8. copy the DAT file to the Microsoft Visual Studio 8/common7/ide directory (if it already exists, append it to the end of the original directory ).

5. Set the vs2005 environment:

Go to tools | options | projects and solutions | VC ++ directories to add:

Include files: D:/programming/Cuda/TOOLKIT/include and D:/programming/Cuda/SDK/common/INC

Library files: D:/programming/Cuda/TOOLKIT/lib and D:/programming/Cuda/SDK/common/lib

Source files: D:/programming/Cuda/SDK/common/src

Go to VC ++ Project Settings: C/C ++ file extensions: Add *. cu. In text editor-File Extension: Add Cu to Microsoft Vc ++ editor.

6. Visual assist x settings:

Close all open Visual Studio, and then go to the Registry Editor: HKEY_CURRENT_USER/software/whole tomato/vanet8 to find the extsource item on the right and add its value. cu ;. cuh; Then close it. Open vs2005 again.

7. Add Cuda to the common directory of the Cuda SDK installation directory in the Rules file search path in tools | options | projects and solutions | VC ++ project setting. path of the rules file.

8. Create a project. Right-click the project name and choose Custom Build rules... -> Select the newly added rule file.

9. Add in the project. cu file, right-click the Cu file and choose Properties> Configuration Properties> General> tool from the drop-down list. Select the name of the build rule selected in the previous step, for example, "Cuda build rule v2.1.1"-> OK.

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/booksky508/archive/2009/06/27/4301232.aspx

Cuda2.3 compiling environment settings for Visual Studio 2008 + visual assist x

SlaveHttp://www.nvidia.cn/object/cuda_get_cn.htmlDownloadCuda ToolkitAndCuda SDK, Pay attention to the corresponding system version. Then installTookitAndSDK(I did not change the default path, directly installCDisk ). Recommended installation at the same timeCudaOfWizzard,ReferenceOpenheroOf

Some examples of running the SDK in vc2008 are installed, but programming is inconvenient and there is no syntax highlighting, which is similar to a text editor, next, we need to set the assist so that we can compile it. write Cu files. the CPP file is the same.

(1) syntax highlighting:

Copy the usertype. dat file in the NVIDIA Cuda SDK/doc/syntax_highlighting/visual_studio_8 to the Microsoft Visual Studio 8/common7/ide directory.

(2) set the vc2008 Environment

Go to tools | options | projects and solutions | VC ++ directories to add:

Include files: Cuda/SDK/common/INC

Library files: Cuda/SDK/common/lib

Source files: Cuda/SDK/common/src

Go to VC ++ Project Settings: C/C ++ file extensions: Add *. cu. In text editor-File Extension: Add Cu to Microsoft Vc ++ editor.

(3) Assist associated with the. Cu File

Close Visual Studio and go to the Registry Editor: HKEY_CURRENT_USER/software/whole tomato/visual assist x/vanet9/find the extsource item on the right and add its value. cu ;. cuh; then close.

(4) add Cuda in the common directory of the Cuda SDK installation directory to the Rules file search path in vs tools | options | projects and solutions | VC ++ project setting. the path of the Rules file is C:/programdata/NVIDIA Corporation/NVIDIA Cuda SDK/common /.

(5) create a project. Right-click the project name and choose Custom Build rules... -> Select the newly added rule files, such as Cuda build rule 2.3.0. Add. cu file, right-click the Cu file and choose Properties> Configuration Properties> General> tool from the drop-down list. Select the name of the build rule selected in the previous step, for example, "Cuda build rule v2.2.0"-> OK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.