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
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);
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);
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;