/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: 2010-04-27 09:35:57 UTC
  • Revision ID: csa@dside.dyndns.org-20100427093557-gxvt9b1n68tpig03
Enchanced error checking and timings measurements, Windows-related fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    int deviceCount;
45
45
    cudaDeviceProp deviceProp;
46
46
 
 
47
    if (device_number) return device_number;
 
48
    
47
49
#ifdef DICT_HW_MEASURE_TIMINGS
48
50
    struct timeval tv1, tv2;
49
51
    gettimeofday(&tv1, NULL);
53
55
    cudaGetDeviceCount(&deviceCount);
54
56
    if (!deviceCount) return -1;
55
57
 
56
 
    device_number = 0;
57
58
    for (int i = 0; i < deviceCount; i++) {
58
59
        cudaGetDeviceProperties(&deviceProp, i);
59
60
        if ((deviceProp.major > 1)||((deviceProp.major == 1)&&(deviceProp.minor > 2))) {