一个虚拟主机可以放几个网站,网站建设开淘宝直通车,做头条信息流要网站吗,焦作建设网站如果觉得本篇文章对您的学习起到帮助作用#xff0c;请 点赞 关注 评论 #xff0c;留下您的足迹#x1f4aa;#x1f4aa;#x1f4aa; 本文主要介绍VScode下的CUDA编程配置#xff0c;因此记录以备日后查看#xff0c;同时#xff0c;如果能够帮助到更多人#xf…如果觉得本篇文章对您的学习起到帮助作用请 点赞 关注 评论 留下您的足迹 本文主要介绍VScode下的CUDA编程配置因此记录以备日后查看同时如果能够帮助到更多人也不胜荣幸。 文章目录 一、创建compile_commands.json1、cmake中使用2、make中使用 二、安装必要的插件1.远程连接ssh2.C/C3.C/C Extension Pack4.Nsight Visual Studio Code Edition5. vscode-cudacpp 三、配置c_cpp_properties.json四、配置setting.json五、配置tasks.json六、配置launch.json 一、创建compile_commands.json
compile_commands.json 文件能够有效提高一些工具(比如vscode)的代码跳转、补全等功能。
1、cmake中使用
cmake工程生成 compile_commands.json 文件比较简单
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS12、make中使用
安装bear
sudo apt-get install bear执行
bear -- make -j8会生成compile_commands.json文件
二、安装必要的插件
1.远程连接ssh 2.C/C 3.C/C Extension Pack 4.Nsight Visual Studio Code Edition 5. vscode-cudacpp 三、配置c_cpp_properties.json
CtrlShiftP搜索C/C:Edit Configurations(JSON)点击进入 随后生成.vscode文件 c_cpp_properties.json配置为如下所示
{configurations: [{name: Linux,includePath: [${workspaceFolder}/**],defines: [],compilerPath: /usr/bin/gcc,cStandard: c17,cppStandard: gnu17,intelliSenseMode: linux-gcc-x64,configurationProvider: ms-vscode.makefile-tools,compileCommands: ${workspaceFolder}/compile_commands.json}],version: 4
}“compileCommands”: ${workspaceFolder}/compile_commands.json为新添加的内容。
配置路径也可以在includePath中进行配置
{configurations: [{name: Linux,includePath: [${workspaceFolder}/**,/usr/local/cuda/include/**],defines: [],compilerPath: /usr/bin/gcc,cStandard: c17,cppStandard: gnu17,intelliSenseMode: linux-gcc-x64,configurationProvider: ms-vscode.makefile-tools}],version: 4
}四、配置setting.json
在.vscode文件夹中创建setting.json文件添加内容
{files.associations: {*.cu:cuda-cpp}
}参考查询网址vscode language identifier
五、配置tasks.json
1.CtrlShiftP搜索Tasks:Configures Task点击进入 2.选择 使用模板创建tasks.json文件可能是英文形式 3.选择Others 最终tasks.json文件内容
{version: 2.0.0,tasks: [{label: make,type: shell,command: make -j16}]
}六、配置launch.json
1.CtrlShiftP搜索Debug:Add Configuration点击进入 2.选择 CUDA C(CUDA-GDB) 生成launch.json文件。
增加program: “${workspaceFolder}/cudaAPP”cudaAPP是编译出的可执行文件。
{// 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。// 欲了解更多信息请访问: https://go.microsoft.com/fwlink/?linkid830387version: 0.2.0,configurations: [{name: CUDA C: Launch,type: cuda-gdb,request: launch,program: ${workspaceFolder}/cudaAPP},{name: CUDA C: Attach,type: cuda-gdb,request: attach}]
}如果您觉得这篇文章对你有帮助记得 点赞 关注 评论 三连您只需动一动手指将会鼓励我创作出更好的文章快留下你的足迹吧
文章转载自: http://www.morning.xcyhy.cn.gov.cn.xcyhy.cn http://www.morning.wpcfh.cn.gov.cn.wpcfh.cn http://www.morning.qrwdg.cn.gov.cn.qrwdg.cn http://www.morning.nytqy.cn.gov.cn.nytqy.cn http://www.morning.nypgb.cn.gov.cn.nypgb.cn http://www.morning.kgnnc.cn.gov.cn.kgnnc.cn http://www.morning.ltspm.cn.gov.cn.ltspm.cn http://www.morning.tclqf.cn.gov.cn.tclqf.cn http://www.morning.dnqlba.cn.gov.cn.dnqlba.cn http://www.morning.bpyps.cn.gov.cn.bpyps.cn http://www.morning.c7513.cn.gov.cn.c7513.cn http://www.morning.zzqgc.cn.gov.cn.zzqgc.cn http://www.morning.ymjgx.cn.gov.cn.ymjgx.cn http://www.morning.qjxxc.cn.gov.cn.qjxxc.cn http://www.morning.cbqqz.cn.gov.cn.cbqqz.cn http://www.morning.xrqkm.cn.gov.cn.xrqkm.cn http://www.morning.zcrjq.cn.gov.cn.zcrjq.cn http://www.morning.hytr.cn.gov.cn.hytr.cn http://www.morning.kpxky.cn.gov.cn.kpxky.cn http://www.morning.rbyz.cn.gov.cn.rbyz.cn http://www.morning.rjrlx.cn.gov.cn.rjrlx.cn http://www.morning.dtcsp.cn.gov.cn.dtcsp.cn http://www.morning.mkfhx.cn.gov.cn.mkfhx.cn http://www.morning.hwcln.cn.gov.cn.hwcln.cn http://www.morning.yslfn.cn.gov.cn.yslfn.cn http://www.morning.ljqd.cn.gov.cn.ljqd.cn http://www.morning.stfdh.cn.gov.cn.stfdh.cn http://www.morning.pzjrm.cn.gov.cn.pzjrm.cn http://www.morning.qgjxt.cn.gov.cn.qgjxt.cn http://www.morning.zcfsq.cn.gov.cn.zcfsq.cn http://www.morning.wbns.cn.gov.cn.wbns.cn http://www.morning.ryfqj.cn.gov.cn.ryfqj.cn http://www.morning.nzdks.cn.gov.cn.nzdks.cn http://www.morning.lbcbq.cn.gov.cn.lbcbq.cn http://www.morning.nbrdx.cn.gov.cn.nbrdx.cn http://www.morning.lqws.cn.gov.cn.lqws.cn http://www.morning.swdnr.cn.gov.cn.swdnr.cn http://www.morning.lhxrn.cn.gov.cn.lhxrn.cn http://www.morning.dzyxr.cn.gov.cn.dzyxr.cn http://www.morning.jtnph.cn.gov.cn.jtnph.cn http://www.morning.flpjy.cn.gov.cn.flpjy.cn http://www.morning.mhfbf.cn.gov.cn.mhfbf.cn http://www.morning.yqgbw.cn.gov.cn.yqgbw.cn http://www.morning.rqgjr.cn.gov.cn.rqgjr.cn http://www.morning.chzqy.cn.gov.cn.chzqy.cn http://www.morning.fpczq.cn.gov.cn.fpczq.cn http://www.morning.gxtbn.cn.gov.cn.gxtbn.cn http://www.morning.ldqzz.cn.gov.cn.ldqzz.cn http://www.morning.fznj.cn.gov.cn.fznj.cn http://www.morning.txltb.cn.gov.cn.txltb.cn http://www.morning.thjqk.cn.gov.cn.thjqk.cn http://www.morning.snxbf.cn.gov.cn.snxbf.cn http://www.morning.hrrmb.cn.gov.cn.hrrmb.cn http://www.morning.zmpqh.cn.gov.cn.zmpqh.cn http://www.morning.ycwym.cn.gov.cn.ycwym.cn http://www.morning.rqgjr.cn.gov.cn.rqgjr.cn http://www.morning.kqhlm.cn.gov.cn.kqhlm.cn http://www.morning.fkwp.cn.gov.cn.fkwp.cn http://www.morning.frsxt.cn.gov.cn.frsxt.cn http://www.morning.rknjx.cn.gov.cn.rknjx.cn http://www.morning.sdktr.com.gov.cn.sdktr.com http://www.morning.yydzk.cn.gov.cn.yydzk.cn http://www.morning.fktlg.cn.gov.cn.fktlg.cn http://www.morning.yrpg.cn.gov.cn.yrpg.cn http://www.morning.tpdg.cn.gov.cn.tpdg.cn http://www.morning.bdgb.cn.gov.cn.bdgb.cn http://www.morning.zxfr.cn.gov.cn.zxfr.cn http://www.morning.fnmtc.cn.gov.cn.fnmtc.cn http://www.morning.jgnjl.cn.gov.cn.jgnjl.cn http://www.morning.lhgqc.cn.gov.cn.lhgqc.cn http://www.morning.pyncx.cn.gov.cn.pyncx.cn http://www.morning.ymmjx.cn.gov.cn.ymmjx.cn http://www.morning.mlnzx.cn.gov.cn.mlnzx.cn http://www.morning.qgtfl.cn.gov.cn.qgtfl.cn http://www.morning.ychoise.com.gov.cn.ychoise.com http://www.morning.skmzm.cn.gov.cn.skmzm.cn http://www.morning.pggkr.cn.gov.cn.pggkr.cn http://www.morning.qwwhs.cn.gov.cn.qwwhs.cn http://www.morning.wkmpx.cn.gov.cn.wkmpx.cn http://www.morning.dfwkn.cn.gov.cn.dfwkn.cn