Commit 9cdf397a authored by David Rohr's avatar David Rohr
Browse files

we should use fftw_malloc to allocate memory used for ffts (since we do not...

we should use fftw_malloc to allocate memory used for ffts (since we do not consider correct aliasing with new), anyhow, the conv_map variable is only used for FFTAlgo=0 and should not be allocated otherwise
parent 3054c146
......@@ -361,15 +361,15 @@ int bioem::run()
// ******************************** MAIN CYCLE ******************************************
// *** Declaring Private variables for each thread *****
mycomplex_t* proj_mapFFT;
myfloat_t* conv_map = new myfloat_t[param.param_device.NumberPixels * param.param_device.NumberPixels];
myfloat_t* conv_map = NULL;
mycomplex_t* conv_mapFFT;
myfloat_t sumCONV, sumsquareCONV;
//allocating fftw_complex vector
proj_mapFFT = (mycomplex_t *) myfftw_malloc(sizeof(mycomplex_t) * param.param_device.NumberPixels * param.param_device.NumberFFTPixels1D);
conv_mapFFT = (mycomplex_t *) myfftw_malloc(sizeof(mycomplex_t) * param.param_device.NumberPixels * param.param_device.NumberFFTPixels1D);
if (!FFTAlgo) conv_map = (myfloat_t*) myfftw_malloc(sizeof(myfloat_t) * param.param_device.NumberPixels * param.param_device.NumberPixels);
HighResTimer timer, timer2;
......@@ -421,7 +421,7 @@ int bioem::run()
//deallocating fftw_complex vector
delete[] conv_map;
if (!FFTAlgo) myfftw_free(conv_map);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment