http://hpcbbs.it168.com/forum.php?mod=viewthread&tid=1643
根据上面链接的帖子研究了下三维数组,就像他自己说的一样是有问题的,我自己修改了下,结果终于正确了。大家有兴趣的可以对照着看看。
整个过程关键参考了这篇文章http://www.xuebuyuan.com/685353.html
1 #include <stdio.h> 2 //#include <cutil.h> 3 #include <helper_cuda.h>//替代cutil.h 4 #include <cuda_runtime.h> 5 6 #define Width 2 7 #define Height 2 8 #define Depth 2 9 int bmp1[Width][Height][Depth]={ 11,22,