有没有办法用 vscode-cpptools 抑制“<<< >>>”错误。
我在 setting.json
中将“*.cu”与“cpp”相关联。
// use normal c++ syntax highlighting for CUDA files
"files.associations": {"*.cu": "cpp"},
并且工作正常,除了一个问题, kernel execution configuration parameters surrounded by <<< and >>>
误认为错误 expected an expression
dim3 dimGrid(2, 2, 1);
dim3 dimBlock(width / 2, width / 2, 1);
MatrixMulKernel<<<dimGrid, dimBlock>>>(d_M, d_N, d_P, width);
任何建议
原文由 BugKiller 发布,翻译遵循 CC BY-SA 4.0 许可协议
谷歌搜索几个小时,没有找到完美的解决方案,但有一些解决方法。
我在这里总结一下:
setting.json
对 CUDA 文件使用普通的 c++ 语法高亮显示贝娄是一个具体的例子
”`
有用的链接: