]> AND Private Git Repository - book_gpu.git/blob - BookGPU/Chapters/chapter3/code/exChronos.cu
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
ajout bib ch 14
[book_gpu.git] / BookGPU / Chapters / chapter3 / code / exChronos.cu
1 unsigned int timer ;
2 cutilCheckError( cutCreateTimer(&timer));
3 cutilCheckError( cutResetTimer(timer)  );
4 cutilCheckError( cutStartTimer(timer)  );
5 for (int ct=0; ct<1000 ; ct++)
6   kernel_ident<<< dimGrid, dimBlock, 0>>>(d_out, W);
7 cudaThreadSynchronize() ;
8 cutilCheckError( cutStopTimer(timer) );
9 cutilCheckError( cutStopTimer(timer) );
10 printf("Mean runtime: %f ms,\n", cutGetTimerValue(timer)/1000);