summaryrefslogtreecommitdiffstats
path: root/main_func
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2017-08-04 16:14:24 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2017-08-04 16:14:24 +0100
commit7555e87dceba139655112063b4ab6c01331099f3 (patch)
tree32755b00a2ef66cd476ed8daf2e0f2df4d8f0afa /main_func
parentaa29eea34e3240f5a32baec0290c38d3b8cc9428 (diff)
downloadregularization-7555e87dceba139655112063b4ab6c01331099f3.tar.gz
regularization-7555e87dceba139655112063b4ab6c01331099f3.tar.bz2
regularization-7555e87dceba139655112063b4ab6c01331099f3.tar.xz
regularization-7555e87dceba139655112063b4ab6c01331099f3.zip
extern C function called by C++
adds extern "C" to the definition of the functions if the code is called from C++ rather than from C/Matlab
Diffstat (limited to 'main_func')
-rw-r--r--main_func/regularizers_CPU/FGP_TV_core.h11
-rw-r--r--main_func/regularizers_CPU/LLT_model_core.h10
-rw-r--r--main_func/regularizers_CPU/PatchBased_Regul_core.h9
-rw-r--r--main_func/regularizers_CPU/SplitBregman_TV_core.h12
-rw-r--r--main_func/regularizers_CPU/TGV_PD_core.h11
5 files changed, 41 insertions, 12 deletions
diff --git a/main_func/regularizers_CPU/FGP_TV_core.h b/main_func/regularizers_CPU/FGP_TV_core.h
index db3cef4..778d489 100644
--- a/main_func/regularizers_CPU/FGP_TV_core.h
+++ b/main_func/regularizers_CPU/FGP_TV_core.h
@@ -3,7 +3,7 @@ This work is part of the Core Imaging Library developed by
Visual Analytics and Imaging System Group of the Science Technology
Facilities Council, STFC
-Copyright 2017 Daniil Kazanteev
+Copyright 2017 Daniil Kazantsev
Copyright 2017 Srikanth Nagella, Edoardo Pasca
Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-#include <matrix.h>
+//#include <matrix.h>
#include <math.h>
#include <stdlib.h>
#include <memory.h>
@@ -51,7 +51,9 @@ limitations under the License.
* D. Kazantsev, 2016-17
*
*/
-
+#ifdef __cplusplus
+extern "C" {
+#endif
//float copyIm(float *A, float *B, int dimX, int dimY, int dimZ);
float Obj_func2D(float *A, float *D, float *R1, float *R2, float lambda, int dimX, int dimY);
float Grad_func2D(float *P1, float *P2, float *D, float *R1, float *R2, float lambda, int dimX, int dimY);
@@ -62,3 +64,6 @@ float Obj_func3D(float *A, float *D, float *R1, float *R2, float *R3, float lamb
float Grad_func3D(float *P1, float *P2, float *P3, float *D, float *R1, float *R2, float *R3, float lambda, int dimX, int dimY, int dimZ);
float Proj_func3D(float *P1, float *P2, float *P3, int dimX, int dimY, int dimZ);
float Rupd_func3D(float *P1, float *P1_old, float *P2, float *P2_old, float *P3, float *P3_old, float *R1, float *R2, float *R3, float tkp1, float tk, int dimX, int dimY, int dimZ);
+#ifdef __cplusplus
+}
+#endif \ No newline at end of file
diff --git a/main_func/regularizers_CPU/LLT_model_core.h b/main_func/regularizers_CPU/LLT_model_core.h
index f40794f..273c89b 100644
--- a/main_func/regularizers_CPU/LLT_model_core.h
+++ b/main_func/regularizers_CPU/LLT_model_core.h
@@ -3,7 +3,7 @@ This work is part of the Core Imaging Library developed by
Visual Analytics and Imaging System Group of the Science Technology
Facilities Council, STFC
-Copyright 2017 Daniil Kazanteev
+Copyright 2017 Daniil Kazantsev
Copyright 2017 Srikanth Nagella, Edoardo Pasca
Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-#include <matrix.h>
+//#include <matrix.h>
#include <math.h>
#include <stdlib.h>
#include <memory.h>
@@ -53,6 +53,9 @@ limitations under the License.
* 28.11.16/Harwell
*/
/* 2D functions */
+#ifdef __cplusplus
+extern "C" {
+#endif
float der2D(float *U, float *D1, float *D2, int dimX, int dimY, int dimZ);
float div_upd2D(float *U0, float *U, float *D1, float *D2, int dimX, int dimY, int dimZ, float lambda, float tau);
@@ -63,3 +66,6 @@ float calcMap(float *U, unsigned short *Map, int dimX, int dimY, int dimZ);
float cleanMap(unsigned short *Map, int dimX, int dimY, int dimZ);
//float copyIm(float *A, float *U, int dimX, int dimY, int dimZ);
+#ifdef __cplusplus
+}
+#endif \ No newline at end of file
diff --git a/main_func/regularizers_CPU/PatchBased_Regul_core.h b/main_func/regularizers_CPU/PatchBased_Regul_core.h
index b83cf10..d4a8a46 100644
--- a/main_func/regularizers_CPU/PatchBased_Regul_core.h
+++ b/main_func/regularizers_CPU/PatchBased_Regul_core.h
@@ -19,7 +19,7 @@ limitations under the License.
#define _USE_MATH_DEFINES
-#include <matrix.h>
+//#include <matrix.h>
#include <math.h>
#include <stdlib.h>
#include <memory.h>
@@ -58,7 +58,12 @@ TestTemporalSmoothing.m
* 02/07/2014
* Harwell, UK
*/
-
+#ifdef __cplusplus
+extern "C" {
+#endif
float pad_crop(float *A, float *Ap, int OldSizeX, int OldSizeY, int OldSizeZ, int NewSizeX, int NewSizeY, int NewSizeZ, int padXY, int switchpad_crop);
float PB_FUNC2D(float *A, float *B, int dimX, int dimY, int padXY, int SearchW, int SimilW, float h, float lambda);
float PB_FUNC3D(float *A, float *B, int dimX, int dimY, int dimZ, int padXY, int SearchW, int SimilW, float h, float lambda);
+#ifdef __cplusplus
+}
+#endif \ No newline at end of file
diff --git a/main_func/regularizers_CPU/SplitBregman_TV_core.h b/main_func/regularizers_CPU/SplitBregman_TV_core.h
index 78aef09..6ed3ff9 100644
--- a/main_func/regularizers_CPU/SplitBregman_TV_core.h
+++ b/main_func/regularizers_CPU/SplitBregman_TV_core.h
@@ -3,7 +3,7 @@ This work is part of the Core Imaging Library developed by
Visual Analytics and Imaging System Group of the Science Technology
Facilities Council, STFC
-Copyright 2017 Daniil Kazanteev
+Copyright 2017 Daniil Kazantsev
Copyright 2017 Srikanth Nagella, Edoardo Pasca
Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
-#include <matrix.h>
+//#include <matrix.h>
#include <math.h>
#include <stdlib.h>
#include <memory.h>
@@ -49,6 +49,10 @@ limitations under the License.
* D. Kazantsev, 2016*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
//float copyIm(float *A, float *B, int dimX, int dimY, int dimZ);
float gauss_seidel2D(float *U, float *A, float *Dx, float *Dy, float *Bx, float *By, int dimX, int dimY, float lambda, float mu);
float updDxDy_shrinkAniso2D(float *U, float *Dx, float *Dy, float *Bx, float *By, int dimX, int dimY, float lambda);
@@ -59,3 +63,7 @@ float gauss_seidel3D(float *U, float *A, float *Dx, float *Dy, float *Dz, float
float updDxDyDz_shrinkAniso3D(float *U, float *Dx, float *Dy, float *Dz, float *Bx, float *By, float *Bz, int dimX, int dimY, int dimZ, float lambda);
float updDxDyDz_shrinkIso3D(float *U, float *Dx, float *Dy, float *Dz, float *Bx, float *By, float *Bz, int dimX, int dimY, int dimZ, float lambda);
float updBxByBz3D(float *U, float *Dx, float *Dy, float *Dz, float *Bx, float *By, float *Bz, int dimX, int dimY, int dimZ);
+
+#ifdef __cplusplus
+}
+#endif \ No newline at end of file
diff --git a/main_func/regularizers_CPU/TGV_PD_core.h b/main_func/regularizers_CPU/TGV_PD_core.h
index 2c6a0d6..25a8216 100644
--- a/main_func/regularizers_CPU/TGV_PD_core.h
+++ b/main_func/regularizers_CPU/TGV_PD_core.h
@@ -3,7 +3,7 @@ This work is part of the Core Imaging Library developed by
Visual Analytics and Imaging System Group of the Science Technology
Facilities Council, STFC
-Copyright 2017 Daniil Kazanteev
+Copyright 2017 Daniil Kazantsev
Copyright 2017 Srikanth Nagella, Edoardo Pasca
Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,7 +17,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-#include <matrix.h>
+//#include <matrix.h>
#include <math.h>
#include <stdlib.h>
#include <memory.h>
@@ -50,7 +50,9 @@ limitations under the License.
*
* 28.11.16/Harwell
*/
-
+#ifdef __cplusplus
+extern "C" {
+#endif
/* 2D functions */
float DualP_2D(float *U, float *V1, float *V2, float *P1, float *P2, int dimX, int dimY, int dimZ, float sigma);
float ProjP_2D(float *P1, float *P2, int dimX, int dimY, int dimZ, float alpha1);
@@ -63,3 +65,6 @@ float DualP_3D(float *U, float *V1, float *V2, float *V3, float *P1, float *P2,
float newU(float *U, float *U_old, int dimX, int dimY, int dimZ);
//float copyIm(float *A, float *U, int dimX, int dimY, int dimZ);
+#ifdef __cplusplus
+}
+#endif