/normxcorr/trunk

To get this branch, use:
bzr branch http://suren.me/webbzr/normxcorr/trunk

« back to all changes in this revision

Viewing changes to dict_hw/src/dict_hw.cu

  • Committer: Suren A. Chilingaryan
  • Date: 2009-12-17 13:31:12 UTC
  • Revision ID: csa@dside.dyndns.org-20091217133112-zw8j5636ln8ec0cf
Fixes of few minor bugs

Show diffs side-by-side

added added

removed removed

Lines of Context:
402
402
 
403
403
#ifdef DICT_HW_MEASURE_TIMINGS
404
404
    gettimeofday(&tv2, NULL);
405
 
    time[2] = (tv2.tv_sec - tv1.tv_sec) * 1000000 + (tv2.tv_usec - tv1.tv_usec) - time[1];
 
405
    time[2] = (tv2.tv_sec - tv1.tv_sec) * 1000000 + (tv2.tv_usec - tv1.tv_usec);
406
406
#endif /* DICT_HW_MEASURE_TIMINGS */
407
407
 
408
408
        err = fftPreprocessFragment(ps, icp, min2(CP_BLOCK, ps->ncp - icp), stream);
410
410
 
411
411
#ifdef DICT_HW_MEASURE_TIMINGS
412
412
    gettimeofday(&tv2, NULL);
413
 
    time[3] = (tv2.tv_sec - tv1.tv_sec) * 1000000 + (tv2.tv_usec - tv1.tv_usec) - time[2];
 
413
    time[3] = (tv2.tv_sec - tv1.tv_sec) * 1000000 + (tv2.tv_usec - tv1.tv_usec);
414
414
#endif /* DICT_HW_MEASURE_TIMINGS */
415
415
 
416
416
        err = fftProcessFragment(ps, icp, min2(CP_BLOCK, ps->ncp - icp), stream);
418
418
 
419
419
#ifdef DICT_HW_MEASURE_TIMINGS
420
420
    gettimeofday(&tv2, NULL);
421
 
    time[4] = (tv2.tv_sec - tv1.tv_sec) * 1000000 + (tv2.tv_usec - tv1.tv_usec) - time[3];
 
421
    time[4] = (tv2.tv_sec - tv1.tv_sec) * 1000000 + (tv2.tv_usec - tv1.tv_usec);
422
422
#endif /* DICT_HW_MEASURE_TIMINGS */
423
423
 
424
424
        err = fftPostprocessFragment(ps, icp, min2(CP_BLOCK, ps->ncp - icp), stream);
426
426
 
427
427
#ifdef DICT_HW_MEASURE_TIMINGS
428
428
    gettimeofday(&tv2, NULL);
429
 
    time[5] = (tv2.tv_sec - tv1.tv_sec) * 1000000 + (tv2.tv_usec - tv1.tv_usec) - time[4];
 
429
    time[5] = (tv2.tv_sec - tv1.tv_sec) * 1000000 + (tv2.tv_usec - tv1.tv_usec);
 
430
    
 
431
    time[0] = 0;
 
432
    for (int i=5;i>0;i--) {
 
433
        time[i] -= time[i-1];
 
434
    }
 
435
    
430
436
    time[0] = (tv2.tv_sec - tv1.tv_sec) * 1000000 + (tv2.tv_usec - tv1.tv_usec);
431
437
    
432
438
    for (int i = 0; i < 6; i++) {