98 num *ztilde = S->ztilde;
99 const num *Ku = S->
Ku;
101 const num *VaryingLambda = S->
Opt.VaryingLambda;
102 const num Gamma2 = S->
Opt.Gamma2;
103 const int Width = S->
Width;
104 const int Height = S->
Height;
109 const long PadJump = ((long)PadWidth)*(PadHeight - Height);
116 const num Beta = S->
Opt.Lambda / Gamma2;
118 for(k = 0; k < NumChannels; k++, Ku += PadJump)
119 for(y = 0; y < Height; y++,
120 z += Width, ztilde += Width, f += Width, Ku += PadWidth)
122 for(x = 0; x < Width; x++)
125 znew = Ku[x] - f[x] + z[x] - ztilde[x];
129 else if(znew < -Beta)
133 # elif _FIDELITY == 2
134 znew = (Ku[x] + z[x] - ztilde[x] + Beta*f[x])
136 # elif _FIDELITY == 3
137 znew = (Ku[x] + z[x] - ztilde[x] - Beta)/2;
138 znew = znew + (num)sqrt(znew*znew + Beta*f[x]);
141 ztilde[x] += 2*znew - z[x] - Ku[x];
148 const num *LambdaPtr;
151 for(k = 0; k < NumChannels; k++, Ku += PadJump)
152 for(y = 0, LambdaPtr = VaryingLambda; y < Height; y++,
153 z += Width, ztilde += Width, f += Width, Ku += PadWidth)
155 for(x = 0; x < Width; x++)
157 Beta = LambdaPtr[x] / Gamma2;
160 znew = Ku[x] - f[x] + z[x] - ztilde[x];
164 else if(znew < -Beta)
168 # elif _FIDELITY == 2
169 znew = (Ku[x] + z[x] - ztilde[x] + Beta*f[x])
171 # elif _FIDELITY == 3
172 znew = (Ku[x] + z[x] - ztilde[x] - Beta)/2;
173 znew = znew + (num)sqrt(znew*znew + Beta*f[x]);
176 ztilde[x] += 2*znew - z[x] - Ku[x];