1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- a/src/Core/regularisers_CPU/utils.c
+++ b/src/Core/regularisers_CPU/utils.c
@@ -176,6 +176,7 @@ float Proj_func2D(float *P1, float *P2, int methTV, long DimTotal)
}
return 1;
}
+
/*3D Projection onto convex set for P (called in PD_TV, FGP_TV, FGP_dTV methods)*/
float Proj_func3D(float *P1, float *P2, float *P3, int methTV, long DimTotal)
{
@@ -183,7 +184,7 @@ float Proj_func3D(float *P1, float *P2, float *P3, int methTV, long DimTotal)
long i;
if (methTV == 0) {
/* isotropic TV*/
-#pragma omp parallel for shared(P1,P2,P3) private(i,val1,val2,val3,sq_denom)
+#pragma omp parallel for shared(P1,P2,P3) private(i,val1,val2,val3,denom,sq_denom)
for(i=0; i<DimTotal; i++) {
denom = powf(P1[i],2) + powf(P2[i],2) + powf(P3[i],2);
if (denom > 1.0f) {
|