Skip to content

Commit

Permalink
fixing C++ build
Browse files Browse the repository at this point in the history
  • Loading branch information
dance858 committed Nov 17, 2024
1 parent d023f64 commit 29b019d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions include/util_spectral_cones.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#ifndef UTILSPECTRALCONES_H
#define UTILSPECTRALCONES_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stddef.h>
#include <stdbool.h>
#include <stdio.h>
Expand Down Expand Up @@ -36,4 +41,7 @@ typedef struct
scs_float residuals[3];
} Newton_stats;

#ifdef __cplusplus
}
#endif
#endif
4 changes: 2 additions & 2 deletions src/spectral_cones/logdeterminant/log_cone_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ scs_int log_cone_IPM(scs_float t0, scs_float v0, scs_float *x0, scs_float *u1,
scs_int variant);

// forward declare from this file
void check_opt_cond_log_cone(const scs_float *tvx, scs_float t0,
static void check_opt_cond_log_cone(const scs_float *tvx, scs_float t0,
scs_float v0, const scs_float *x0, scs_int n,
scs_float residuals[3], scs_float *dualx);

Expand Down Expand Up @@ -131,7 +131,7 @@ scs_int log_cone_proj_wrapper(scs_float t0, scs_float v0, scs_float *x0,
}

// tvx = [t, v, x].
void check_opt_cond_log_cone(const scs_float *tvx, scs_float t0,
static void check_opt_cond_log_cone(const scs_float *tvx, scs_float t0,
scs_float v0, const scs_float *x0, scs_int n,
scs_float residuals[3], scs_float *dualx)
{
Expand Down

0 comments on commit 29b019d

Please sign in to comment.