即使kernel中不进行任何运算,当block_num=30,block_size=64时,执行时间就超过了15ms,不是数据传输造成的,这样没法提高串匹配算法的性能了,这个时间怎么降低啊,别人告诉我可能是是驱动造成的,想请教一下是怎么回事,谢谢啦
unsigned int timer = 0;
CUT_SAFE_CALL( cutCreateTimer( &timer));
CUT_SAFE_CALL( cutStartTimer( timer));
dim3 grid( block_num, 1, 1);
dim3 block(block_size, 1, 1);
kernel<<<block_num,block_size>>>(g_idata,g_odata);
CUT_CHECK_ERROR(“Kernel execution failed”);
CUT_SAFE_CALL( cutStopTimer( timer));
printf( “\nGPU string match time: %f (ms)\n”, cutGetTimerValue( timer));
CUT_SAFE_CALL( cutDeleteTimer( timer));
[ 本帖最后由 papalovely 于 2010-6-13 15:24 编辑 ]