1. cuda配置代码提示
cuda代码提示配置
ctrl + shift + p , 搜setting.json, 找到服务器的那个配置,我用的是linux服务器。
{"C_Cpp.errorSquiggles": "enabled","files.associations": {"*.cu": "cuda-cpp",// 把cu文件当做cpp文件,只是显示作用"*.cuh": "cuda-cpp"//},"C_Cpp.default.includePath": ["/usr/local/cuda/include",// cuda头文件位于的地址"${workspaceFolder}/**"// 给该用户所有目录下使用],"C_Cpp.default.defines": ["__CUDACC__"],"[cuda-cpp]": {"editor.defaultFormatter": "nvidia.nsight-vscode-edition" //在 CUDA C/C++ 文件里,使用 NVIDIA Nsight 的内置格式化器来格式化代码,而不使用默认 C++ 格式化器。}
}