Skip to content
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(PSLP LANGUAGES C CXX) # The library is written in C, but we also have so

set(PSLP_VERSION_MAJOR 0)
set(PSLP_VERSION_MINOR 0)
set(PSLP_VERSION_PATCH 5)
set(PSLP_VERSION_PATCH 6)
set(PSLP_VERSION "${PSLP_VERSION_MAJOR}.${PSLP_VERSION_MINOR}.${PSLP_VERSION_PATCH}")
add_compile_definitions(PSLP_VERSION="${PSLP_VERSION}")

Expand Down
2 changes: 1 addition & 1 deletion include/PSLP/PSLP_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ extern "C"

/* Postsolve the problem given the primal-dual solution (x, y, z) of the
reduced problem. The function populates presolver->sol, so if you're
looking for the solution to the original problem, you should look there.
looking for the solution to the original problem, you want to look there.
If the solver has added the offset to the objective when solving the reduced
problem, the optimal value of the original problem is the same as that of
the reduced problem. */
Expand Down
5 changes: 3 additions & 2 deletions include/PSLP/PSLP_sol.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
#define PSLP_SOL_H

#ifdef __cplusplus
#include <cstddef> // size_t
extern "C"
{
#else
#include <stddef.h> // size_t
#endif

#include <stddef.h>

typedef struct Solution
{
double *x;
Expand Down
64 changes: 38 additions & 26 deletions include/PSLP/PSLP_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,44 @@
#ifndef PSLP_STATS_H
#define PSLP_STATS_H

typedef struct PresolveStats
#ifdef __cplusplus
#include <cstddef> // size_t
extern "C"
{
size_t n_rows_original;
size_t n_cols_original;
size_t nnz_original;
size_t n_rows_reduced;
size_t n_cols_reduced;
size_t nnz_reduced;

/* reduction stats */
size_t nnz_removed_trivial;
size_t nnz_removed_fast;
size_t nnz_removed_primal_propagation;
size_t nnz_removed_parallel_rows;
size_t nnz_removed_parallel_cols;

/* time stats */
double time_init;
double time_fast_reductions;
double time_medium_reductions;
double time_primal_propagation;
double time_parallel_rows;
double time_parallel_cols;
double time_presolve;
double time_postsolve;

} PresolveStats;
#else
#include <stddef.h> // size_t
#endif

typedef struct PresolveStats
{
size_t n_rows_original;
size_t n_cols_original;
size_t nnz_original;
size_t n_rows_reduced;
size_t n_cols_reduced;
size_t nnz_reduced;

/* reduction stats */
size_t nnz_removed_trivial;
size_t nnz_removed_fast;
size_t nnz_removed_primal_propagation;
size_t nnz_removed_parallel_rows;
size_t nnz_removed_parallel_cols;

/* time stats */
double time_init;
double time_fast_reductions;
double time_medium_reductions;
double time_primal_propagation;
double time_parallel_rows;
double time_parallel_cols;
double time_presolve;
double time_postsolve;

} PresolveStats;

#ifdef __cplusplus
}
#endif

#endif // PSLP_STATS_H