这是一个二维矩阵相乘的代码,你看看,原理是一样的: // includes, system #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #define BLOCK_SIZE 2 typedef struct { size_t widt……
对了 ,for(int i=0; i<N; i++) d_C[i] = 0.0f;好像不对的,设备端不需要初始化,只要开辟空间就好了~
231
社区成员
424
社区内容
加载中
试试用AI创作助手写篇文章吧