08 2023 档案
摘要:```c++ #include #include #include #include #include using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(
阅读全文
摘要:# 使用全局内存 [完整代码链接](https://github.com/brucefan1983/CUDA-Programming/blob/master/src/07-global-memory/matrix.cu) ## A合并访问、B非合并访问 ```c++ #ifdef USE_DP ty
阅读全文
摘要:[官方库](https://github.com/google/sanitizers) ## 应用场景 编译参数通过 -fsanitize 决定开启 sanitizer: - `-fsanitize=address` 开启AddressSanitizer(ASan),包括LeakSanitizer(
阅读全文
摘要:# coredump ## 修改coredump文件位置 查询文件位置 ```bash cat /proc/sys/kernel/core_pattern # 默认值是core,表示当前目录。否则就是在指定目录下。 ``` 更改 coredump 文件路径的方法分两种:临时更改方式与永久更改方式:
阅读全文
摘要:**只定义`void testFunc(int num, const std::function& functor)`就可以,其他的相当于这个函数的特化版本** ```c++ #include #include using namespace std; int func1(int num) { co
阅读全文