diff --git a/CHOLMOD/GPU/cholmod_gpu_kernels.h b/CHOLMOD/GPU/cholmod_gpu_kernels.h index c1708273b..be7e68799 100644 --- a/CHOLMOD/GPU/cholmod_gpu_kernels.h +++ b/CHOLMOD/GPU/cholmod_gpu_kernels.h @@ -15,13 +15,13 @@ #ifndef CHOLMODGPUKERNELS_H #define CHOLMODGPUKERNELS_H +#include "SuiteSparse_config.h" + /* make it easy for C++ programs to include CHOLMOD */ #ifdef __cplusplus extern "C" { #endif -#include "SuiteSparse_config.h" - int createMapOnDevice ( int64_t *d_Map, int64_t *d_Ls, int64_t psi, int64_t nsrow ); int createRelativeMapOnDevice ( int64_t *d_Map, int64_t *d_Ls, diff --git a/ParU/Config/ParU.h.in b/ParU/Config/ParU.h.in index 5bfd634fd..fca394205 100644 --- a/ParU/Config/ParU.h.in +++ b/ParU/Config/ParU.h.in @@ -620,14 +620,14 @@ ParU_Info ParU_FreeControl // The following definitions are available in both C and C++: -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct ParU_C_Symbolic_struct *ParU_C_Symbolic ; typedef struct ParU_C_Numeric_struct *ParU_C_Numeric ; typedef struct ParU_C_Control_struct *ParU_C_Control ; diff --git a/ParU/Include/ParU.h b/ParU/Include/ParU.h index 6604878fb..856721037 100644 --- a/ParU/Include/ParU.h +++ b/ParU/Include/ParU.h @@ -620,14 +620,14 @@ ParU_Info ParU_FreeControl // The following definitions are available in both C and C++: -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct ParU_C_Symbolic_struct *ParU_C_Symbolic ; typedef struct ParU_C_Numeric_struct *ParU_C_Numeric ; typedef struct ParU_C_Control_struct *ParU_C_Control ; diff --git a/ParU/Tcov/paru_c_test.cpp b/ParU/Tcov/paru_c_test.cpp index d6fec407b..ca3a58e54 100644 --- a/ParU/Tcov/paru_c_test.cpp +++ b/ParU/Tcov/paru_c_test.cpp @@ -45,10 +45,7 @@ } #include "paru_cov.hpp" -extern "C" -{ #include "ParU.h" -} int main(int argc, char **argv) { diff --git a/SPQR/Include/SuiteSparseQR.hpp b/SPQR/Include/SuiteSparseQR.hpp index e4c6f1436..9cd7e8bfb 100644 --- a/SPQR/Include/SuiteSparseQR.hpp +++ b/SPQR/Include/SuiteSparseQR.hpp @@ -18,12 +18,11 @@ #include #endif #define SUITESPARSE_GPU_EXTERN_ON -extern "C" -{ - #include "SuiteSparse_config.h" - #include "cholmod.h" - #include "SuiteSparseQR_definitions.h" -} + +#include "SuiteSparse_config.h" +#include "cholmod.h" +#include "SuiteSparseQR_definitions.h" + #undef SUITESPARSE_GPU_EXTERN_ON #include