我是利用事件管理来测试时间的 //创建时间 cudaEventCreate(&start);
cudaEventCreate(&stop);
cudaEventRecord(start,0);
//调用kernel函数
dim3 DimBlock(16,16,1);
dim3 DimGrid((width+DimBlock.x-1)/DimBlock.x,(height+DimBlock.y-1)/DimBlock.y,1);
SquaresKernel<<<DimGrid,DimBlock>>>(dev_Icols,dev_colorM,width,height,dev_dest);
//结束计时开始统计时间
cudaEventRecord(stop,0);
cudaEventSynchronize(stop);
cudaEventElapsedTime(&time,start,stop);
printf("kernel take time:%fms\n",time);
但这测试的只是内核函数的时间,那个数据分配内存,由内存写入显存,由显存写入内存的事件该怎么测,
具体的测试函数是什么啊