随笔分类 -  C++

摘要:交叉编译 gperftools 及使用 sudo apt-get install kcachegrind # 导出为 callgrind 格式时需要 sudo apt install doxygen-latex sudo apt install graphviz # 编译 pprof go inst 阅读全文
posted @ 2022-04-24 20:13 山岚2013 阅读(2040) 评论(0) 推荐(0) 编辑
摘要:// based on https://gist.github.com/martin-kallman/5049614 // float32 // Martin Kallman // // Fast half-precision to single-precision floating point c 阅读全文
posted @ 2022-03-18 15:04 山岚2013 阅读(2342) 评论(0) 推荐(0) 编辑
摘要:项目代码根目录下添加一个cmake文件git_version.cmake,内容如下: # get git hash macro(get_git_hash _git_hash) set(ENV{GIT_DIR} ${PROJECT_SOURCE_DIR}/.git) execute_process( 阅读全文
posted @ 2022-01-26 16:13 山岚2013 阅读(410) 评论(0) 推荐(0) 编辑
摘要:### 1. 预先安装 ```bash sudo apt install ninja-build sudo apt install llvm clang # 第一次编译需要 sudo apt install doxygen sudo apt install libncurses5 sudo apt 阅读全文
posted @ 2022-01-18 14:12 山岚2013 阅读(1223) 评论(0) 推荐(0) 编辑
摘要:调试时查看依赖DSO pidof tvm_rpc_server cat /proc/<pid_of_tvm_rpc_server>/maps 子进程调试 1.vscode -- launch.json "setupCommands": [ { "description": "为 gdb 启用整齐打印 阅读全文
posted @ 2022-01-17 21:01 山岚2013 阅读(374) 评论(0) 推荐(0) 编辑
摘要:在调用C++ template函数时,有时候语法会存在歧义。 调用函数时,使用 obj.template func<...>() 形式的语法,避免歧义; 调用类型时,使用嵌入子类型时,使用 a_type::typename sub_type形式的语法,避免歧义。 typename关键字 例如temp 阅读全文
posted @ 2022-01-17 16:56 山岚2013 阅读(315) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示