Skip to content

Commit

Permalink
Ifdef cplusplus in headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Benny44 committed Sep 3, 2021
1 parent 5c89bc3 commit 5afae42
Show file tree
Hide file tree
Showing 22 changed files with 177 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/ladel.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#ifndef LADEL_H
#define LADEL_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_col_counts.h"
#include "ladel_constants.h"
#include "ladel_copy.h"
Expand Down Expand Up @@ -251,4 +255,8 @@ ladel_int ladel_row_del(ladel_factor *LD,
* @}
*/

#ifdef __cplusplus
}
#endif

#endif /*LADEL_H*/
8 changes: 8 additions & 0 deletions include/ladel_add.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#ifndef LADEL_ADD_H
#define LADEL_ADD_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand Down Expand Up @@ -58,4 +62,8 @@ ladel_sparse_matrix *ladel_add_matrices_advanced( ladel_double alpha,
ladel_int values,
ladel_work *work);

#ifdef __cplusplus
}
#endif

#endif /* LADEL_ADD_H */
8 changes: 8 additions & 0 deletions include/ladel_col_counts.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
#ifndef LADEL_COL_COUNTS_H
#define LADEL_COL_COUNTS_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand All @@ -26,4 +30,8 @@ ladel_int ladel_col_counts( ladel_sparse_matrix *M,
ladel_symbolics *sym,
ladel_work *work);

#ifdef __cplusplus
}
#endif

#endif /*LADEL_COL_COUNTS_H*/
8 changes: 8 additions & 0 deletions include/ladel_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#ifndef LADEL_CONSTANTS_H
#define LADEL_CONSTANTS_H

#ifdef __cplusplus
extern "C" {
#endif

/**
* @name Constants
* @{
Expand Down Expand Up @@ -64,4 +68,8 @@
* @}
*/

#ifdef __cplusplus
}
#endif

#endif /*LADEL_CONSTANTS_H*/
8 changes: 8 additions & 0 deletions include/ladel_copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#ifndef LADEL_COPY_H
#define LADEL_COPY_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand Down Expand Up @@ -51,4 +55,8 @@ void ladel_double_vector_copy( ladel_double *x,
ladel_int size,
ladel_double *y);

#ifdef __cplusplus
}
#endif

#endif /*LADEL_COPY_H*/
8 changes: 8 additions & 0 deletions include/ladel_debug_print.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#ifndef LADEL_DEBUG_PRINT_H
#define LADEL_DEBUG_PRINT_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_global.h"
#include "ladel_types.h"

Expand Down Expand Up @@ -62,4 +66,8 @@ void ladel_print_factor_matlab(ladel_factor *LD);
*/
void ladel_print_set(ladel_set *set);

#ifdef __cplusplus
}
#endif

#endif
8 changes: 8 additions & 0 deletions include/ladel_etree.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
#ifndef LADEL_ETREE_H
#define LADEL_ETREE_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"
/**
* Computes the elimination tree of a matrix.
Expand Down Expand Up @@ -43,4 +47,8 @@ ladel_int ladel_etree_and_col_counts( ladel_sparse_matrix *M,
ladel_work *work);
#endif

#ifdef __cplusplus
}
#endif

#endif /*LADEL_ETREE_H*/
8 changes: 8 additions & 0 deletions include/ladel_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#ifndef LADEL_GLOBAL_H
#define LADEL_GLOBAL_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"
#include "ladel_constants.h"
#include "ladel_copy.h"
Expand Down Expand Up @@ -199,4 +203,8 @@ ladel_work *ladel_workspace_free(ladel_work* work);
ladel_work *ladel_workspace_allocate(ladel_int ncol);


#ifdef __cplusplus
}
#endif

#endif /*LADEL_GLOBAL_H*/
8 changes: 8 additions & 0 deletions include/ladel_ldl_numeric.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#ifndef LDL_NUMERIC_H
#define LDL_NUMERIC_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand Down Expand Up @@ -39,4 +43,8 @@ ladel_int ladel_ldl_numeric(ladel_sparse_matrix *Mpp,
ladel_factor *LD,
ladel_work *work);

#ifdef __cplusplus
}
#endif

#endif /*LDL_NUMERIC_H*/
8 changes: 8 additions & 0 deletions include/ladel_ldl_symbolic.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#ifndef LADEL_LDL_SYMBOLIC_H
#define LADEL_LDL_SYMBOLIC_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand All @@ -25,4 +29,8 @@ ladel_int ladel_ldl_symbolic( ladel_sparse_matrix *M,
ladel_sparse_matrix *Mpp,
ladel_work *work);

#ifdef __cplusplus
}
#endif

#endif /*LADEL_LDL_SYMBOLIC_H*/
8 changes: 8 additions & 0 deletions include/ladel_matmat.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#ifndef LADEL_MATMAT_H
#define LADEL_MATMAT_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand Down Expand Up @@ -65,4 +69,8 @@ ladel_sparse_matrix *ladel_mat_mat_transpose_advanced( ladel_sparse_matrix *M,
ladel_int values,
ladel_work *work);

#ifdef __cplusplus
}
#endif

#endif /* LADEL_MATMAT_H */
8 changes: 8 additions & 0 deletions include/ladel_matvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#ifndef LADEL_MATVEC_H
#define LADEL_MATVEC_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_global.h"
#include "ladel_types.h"

Expand Down Expand Up @@ -49,4 +53,8 @@ void ladel_symmetric_matvec(const ladel_sparse_matrix *M,
ladel_double *y,
ladel_int reset);

#ifdef __cplusplus
}
#endif

#endif /* LADEL_MATVEC_H */
8 changes: 8 additions & 0 deletions include/ladel_pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#ifndef LADEL_PATTERN_H
#define LADEL_PATTERN_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand Down Expand Up @@ -45,4 +49,8 @@ ladel_int ladel_etree_dfs( ladel_sparse_matrix *W,
ladel_int col_in_W,
ladel_int maximum_row);

#ifdef __cplusplus
}
#endif

#endif /*LADEL_PATTERN_H*/
8 changes: 8 additions & 0 deletions include/ladel_permutation.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#ifndef LADEL_PERMUTATION_H
#define LADEL_PERMUTATION_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand Down Expand Up @@ -72,4 +76,8 @@ void ladel_permute_sparse_vector( ladel_sparse_matrix *x,
ladel_int *p,
ladel_work *work);

#ifdef __cplusplus
}
#endif

#endif /*LADEL_PERMUTATION_H*/
8 changes: 8 additions & 0 deletions include/ladel_postorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#ifndef LADEL_POSTORDER_H
#define LADEL_POSTORDER_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand All @@ -24,4 +28,8 @@ ladel_int ladel_postorder( ladel_sparse_matrix *M,
ladel_symbolics *sym,
ladel_work *work);

#ifdef __cplusplus
}
#endif

#endif /*LADEL_POSTORDER_H*/
8 changes: 8 additions & 0 deletions include/ladel_rank1_mod.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#ifndef LADEL_RANK1_MOD_H
#define LADEL_RANK1_MOD_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand Down Expand Up @@ -54,4 +58,8 @@ ladel_int ladel_set_union( ladel_set *first_set,
ladel_int *insertions,
ladel_int threshold);

#ifdef __cplusplus
}
#endif

#endif
8 changes: 8 additions & 0 deletions include/ladel_row_mod.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
#ifndef LADEL_ROW_MOD_H
#define LADEL_ROW_MOD_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

#ifdef __cplusplus
}
#endif

#endif /*LADEL_ROW_MOD_H*/
8 changes: 8 additions & 0 deletions include/ladel_scale.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#ifndef LADEL_SCALE_H
#define LADEL_SCALE_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand Down Expand Up @@ -56,4 +60,8 @@ void ladel_infinity_norm_rows( ladel_sparse_matrix *M,
ladel_double *norms);


#ifdef __cplusplus
}
#endif

#endif /*LADEL_SCALE_H*/
9 changes: 9 additions & 0 deletions include/ladel_submatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#ifndef LADEL_SUBMATRIX_H
#define LADEL_SUBMATRIX_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ladel_types.h"

/**
Expand All @@ -20,4 +24,9 @@
ladel_sparse_matrix *ladel_column_submatrix(ladel_sparse_matrix *M,
ladel_int *cols,
ladel_int nb_cols);

#ifdef __cplusplus
}
#endif

#endif /* LADEL_SUBMATRIX_H */
Loading

0 comments on commit 5afae42

Please sign in to comment.