/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-08-08 20:10:46 UTC
  • Revision ID: csa@dside.dyndns.org-20100808201046-ad223bdx3ahc9j3a
Fixes, support for batched FFT transforms

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
    DICTContext ctx = (DICTContext)data;
86
86
 
87
87
    ProcessingState ps = ctx->pstates[device_id];
88
 
    if (ps) fftFree(ps);
 
88
    if (ps) {
 
89
# ifdef SEQUENTIAL_CUDPP_DESTROY        
 
90
        hw_sched_lock(ctx->sched, data);
 
91
# endif SEQUENTIAL_CUDPP_DESTROY        
 
92
        fftFree(ps);
 
93
# ifdef SEQUENTIAL_CUDPP_DESTROY        
 
94
        hw_sched_unlock(ctx->sched, data);
 
95
# endif SEQUENTIAL_CUDPP_DESTROY        
 
96
    }
89
97
            
90
98
    return 0;
91
99
}
442
450
    }
443
451
    
444
452
#ifdef DICT_SUPPORT_THREADS 
445
 
    hw_sched_limit_num_threads(ctx->sched, i);
 
453
    if ((i + 1) < device_number) hw_sched_limit_num_threads(ctx->sched, i + 1);
 
454
    else hw_sched_limit_num_threads(ctx->sched, 0);
446
455
    
447
456
    if (ctx->use_threads) {
448
457
        hw_sched_schedule_task(ctx->sched, ctx, dictSetupThread);