/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/normxcorr_hw.cu.h

  • Committer: Suren A. Chilingaryan
  • Date: 2010-04-26 03:58:12 UTC
  • Revision ID: csa@dside.dyndns.org-20100426035812-st93op9yj551wi3b
Multipass mode and re-initialization fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
        4 * lsum_alloc_size2  * sizeof(float) +                         // cuda_lsum_temp
146
146
        ps->ncp * ps->fft_alloc_size * (2 * sizeof(float) + sizeof(cufftComplex));      // caches
147
147
 
148
 
/*
 
148
#ifdef DICT_HW_VERBOSE_OUTPUT
149
149
    printf("Temp buffer : %i\n", size/1024/1024);
150
150
    printf("Points      : %i\n", 2 * ps->ncp_alloc_size * sizeof(float) / 1024 / 1024);
151
151
    printf("Input buffer: %i\n", CP_BLOCK * side_alloc_size2 * sizeof(uint8_t) / 1024 / 1024);
152
 
    printf("Data buffer : 2x %i\n", CP_BLOCK * ps->fft_alloc_size * sizeof(cufftReal) / 1024 / 1024);
 
152
    printf("Data buffer : 2 x %i\n", CP_BLOCK * ps->fft_alloc_size * sizeof(cufftReal) / 1024 / 1024);
153
153
    printf("Lsum temp   : %i\n", 4 * lsum_alloc_size2  * sizeof(float) / 1024 / 1024);
154
154
    printf("Cache       : %i\n", ps->ncp * ps->fft_alloc_size * (2 * sizeof(float) + sizeof(cufftComplex)) / 1024 / 1024);
155
155
    printf("No Cache    : %i\n", CP_BLOCK * ps->fft_alloc_size * (2 * sizeof(float) + sizeof(cufftComplex)) / 1024 / 1024);
156
 
*/
 
156
#endif /* DICT_HW_VERBOSE_OUTPUT */
157
157
 
158
158
        // Counting necessary memory, here is cache memory, 64MB is considered for other needs (base and current images)
159
159
    if ((ps->use_cache)&&((cache_memory + CUDA_EXTRA_MEMORY) > device_memory)) ps->use_cache = 0;
864
864
            ps->ncp * sizeof(float), 2,
865
865
            cudaMemcpyDeviceToHost
866
866
        );
867
 
        
868
 
        printf("%f %f\n", move_x[0], move_x[1]);
869
867
    } else {
870
868
        move_y = ps->points + 6 * points_alloc;
871
869
        move_x = move_y + points_alloc;