Highlight settings for Cuda code

Source: Internet
Author: User

Syntax highlighting in addition to the look comfortable, you can use F11 to find functions, variable definitions, hitting the function will also have a corresponding hint.

The following is a set of code highlighting.

In the Helloworldcuda.cu file above, the Cuda C + + keyword __global__ and so on are not highlighted, and there is a stroke curve. The following syntax highlighting of Cuda C + + keywords and functions, configuring visual Assistx function highlighting, code hinting and other functions.

The following is a set of code highlighting. A total of three settings
1. C + + keyword highlighting in. cu files
This setting is for VS2010 to edit the. cu file, highlighting the C + + syntax in the. cu file. The other vs2012 and vs2013 are the same.
Setup method: Click on the VS2010 menu: "tools| options...| Text editor| File Extension ", in this interface:" Editor "drop-down box select" Microsoft Visual C + + "in the" Extension "text box to enter. CU Click on the" Add "button and repeat work to add the. Cuh to the VC + + type, click the OK button. Close all. cu files and open them, and the. cu file C + + keyword is highlighted. If not, restart VS2010. But Cuda's keyword is still black, the next step is to highlight the Cuda key self.

Highlight settings for Cuda code

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.