summaryrefslogtreecommitdiffstats
path: root/patches/ccpi-regularisation-toolkit-fgptv-openmp.patch
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@ipecompute4.ands.kit.edu>2022-09-06 19:12:09 +0200
committerSuren A. Chilingaryan <csa@ipecompute4.ands.kit.edu>2022-09-06 19:12:09 +0200
commitefa4313aa57e4c3511eb1d5d88edc37e99f899fa (patch)
treeb4061f583770608a19a313a9ef40cef71cc053d2 /patches/ccpi-regularisation-toolkit-fgptv-openmp.patch
parent4616a04086c1f9248008add524a9cf74ffecca33 (diff)
downloadccpi-efa4313aa57e4c3511eb1d5d88edc37e99f899fa.tar.gz
ccpi-efa4313aa57e4c3511eb1d5d88edc37e99f899fa.tar.bz2
ccpi-efa4313aa57e4c3511eb1d5d88edc37e99f899fa.tar.xz
ccpi-efa4313aa57e4c3511eb1d5d88edc37e99f899fa.zip
Add all CCPi patches (patches are not applied automatically, but just collected)
Diffstat (limited to 'patches/ccpi-regularisation-toolkit-fgptv-openmp.patch')
-rw-r--r--patches/ccpi-regularisation-toolkit-fgptv-openmp.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/ccpi-regularisation-toolkit-fgptv-openmp.patch b/patches/ccpi-regularisation-toolkit-fgptv-openmp.patch
new file mode 100644
index 0000000..09b5f51
--- /dev/null
+++ b/patches/ccpi-regularisation-toolkit-fgptv-openmp.patch
@@ -0,0 +1,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) {