07 2023 档案
摘要:一维傅里叶功率谱的计算 #include <stdio.h> #include <math.h> #define pi 3.1415926 #define rows 3 #define colums 5 typedef struct { float re;// really float im;//
阅读全文
摘要:CUDA中threadldx、blockldx、blockDim和gridDim的全程 threadIdx是thread index 线程索引缩写 blockIdx是block index 块索引缩写 blockDim是block dimension 块维度缩写 gridDim是grid dimen
阅读全文
摘要:有三种方向可提高C++运行速度:语言、算法和硬件 1、语言方向:函数调用使用指针传递代替向量拷贝(节约数据拷贝时间) 皮尔逊相关系数函数调用指针传递版如下 #include <iostream> #include <iomanip> #include <vector> #include <cmath
阅读全文