use fftuc instead of linop (no tmp memory)
@@ -485,11 +485,11 @@ static complex float* compute_psf2(int N, const long psf_dims[N + 1], unsigned l
struct linop_s* lop_fft = NULL;
- if ((NULL != lop_fftuc) && (NULL != *lop_fftuc)) {
+ if (NULL != lop_fftuc) {
lop_fft = *lop_fftuc;
- } else {
+ if (NULL == lop_fft){
long loop_dims[ND];
long fft_dims[ND];
@@ -502,10 +502,11 @@ static complex float* compute_psf2(int N, const long psf_dims[N + 1], unsigned l
linop_forward_unchecked(lop_fft, psft, psft);
- if (NULL != lop_fftuc)
*lop_fftuc = lop_fft;
- else
- linop_free(lop_fft);
+ } else {
+
+ fftuc(ND, img2_dims, flags, psft, psft);
+ }
float scale = 1.;
for (int i = 0; i < N; i++)
