How do I enable syntax highlighting of CUDA .cu files in Visual Studio 2010?

后端 未结 4 1208
花落未央
花落未央 2020-12-31 06:51

When I edit a .cu file in Microsoft Visual Studio 2010, the editor treats it as a regular text file (there are no colors on keywords such as int, <

4条回答
  •  -上瘾入骨i
    2020-12-31 07:15

    In addition to what someone else has already said (adding cu extension in Tools -> Options -> Text Editor -> File Extension and Microsoft Visual C++ as editor), I also recommend you, in order to avoid the highlighting of CUDA keywords (like threadIdx.x etc), to include:

    #include
    

提交回复
热议问题