Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid including headers in extern "C" blocks #830

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHOLMOD/GPU/cholmod_gpu_kernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions ParU/Config/ParU.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -620,14 +620,14 @@ ParU_Info ParU_FreeControl

// The following definitions are available in both C and C++:

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>
#include <stdbool.h>
#include <math.h>

#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 ;
Expand Down
8 changes: 4 additions & 4 deletions ParU/Include/ParU.h
Original file line number Diff line number Diff line change
Expand Up @@ -620,14 +620,14 @@ ParU_Info ParU_FreeControl

// The following definitions are available in both C and C++:

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>
#include <stdbool.h>
#include <math.h>

#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 ;
Expand Down
3 changes: 0 additions & 3 deletions ParU/Tcov/paru_c_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@
}

#include "paru_cov.hpp"
extern "C"
{
#include "ParU.h"
}

int main(int argc, char **argv)
{
Expand Down
11 changes: 5 additions & 6 deletions SPQR/Include/SuiteSparseQR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
#include <cublas_v2.h>
#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 <complex>
Expand Down