is a variable only depends on image shapes. It is always a small number compared to
So I tried to remove this number. Thus according to the formula in the supplementary information of your paper:
when the red column of item is removed, all the fft operation seems to be redundant. So to validate this idea, I modify
. Specifically, here is the detailed modification:
operationfft=1*xxfft+ 1*yyfft+(contiz^2)*zzfft+ 2*xyfft+ 2*(contiz)*xzfft+2*(contiz)*yzfft;
normlize = single((fidelity/mu) +paral1^2 +operationfft);
clear xxfft yyfft zzfft xyfft xzfft yzfft operationfft
if gpu==1
f=gpuArray(f);
normlize =gpuArray(normlize);
bxx = gpuArray.zeros(sizeg,'single');
byy = bxx;
bzz = bxx;
bxy =bxx;
bxz =bxx;
byz = bxx;
bl1 =bxx;
else
bxx = zeros(sizeg,'single');
byy = bxx;
bzz = bxx;
bxy = bxx;
bxz = bxx;
byz = bxx;
bl1 = bxx;
end
g_update = (fidelity/mu)*f;
for iter = 1:iteration
tic;
g_update = fftn(g_update);
if iter>1
g = real(ifftn(g_update./normlize));
else
g = real(ifftn(g_update./(fidelity/mu)));
end
g_update = (fidelity/mu)*f;
%operationfft=1*xxfft+ 1*yyfft+(contiz^2)*zzfft+ 2*xyfft+ 2*(contiz)*xzfft+2*(contiz)*yzfft;
normlize = single((fidelity/mu) +paral1^2 );%+operationfft);
clear xxfft yyfft zzfft xyfft xzfft yzfft %operationfft
if gpu==1
f=gpuArray(f);
normlize =gpuArray(normlize);
bxx = gpuArray.zeros(sizeg,'single');
byy = bxx;
bzz = bxx;
bxy =bxx;
bxz =bxx;
byz = bxx;
bl1 =bxx;
else
bxx = zeros(sizeg,'single');
byy = bxx;
bzz = bxx;
bxy = bxx;
bxz = bxx;
byz = bxx;
bl1 = bxx;
end
g_update = (fidelity/mu)*f;
for iter = 1:iteration
tic;
%g_update = fftn(g_update);
if iter>1
%g = real(ifftn(g_update./normlize));
g = g_update./normlize;
else
%g = real(ifftn(g_update./(fidelity/mu)));
g = g_update / (fidelity / mu);
end
g_update = (fidelity/mu)*f;