Skip to content
Open
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
9 changes: 9 additions & 0 deletions include/cupdlpx_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ extern "C"
int iteration_limit;
} termination_criteria_t;


typedef enum {
PDHG_TUNING_HEURISTIC,
PDHG_TUNING_BENCHMARK,
PDHG_CUSPARSE_FIX,
PDHG_FUSED_FIX,
} pdhg_tuning_method_t;

typedef struct
{
int l_inf_ruiz_iterations;
Expand All @@ -89,6 +97,7 @@ extern "C"
restart_parameters_t restart_params;
double reflection_coefficient;
bool feasibility_polishing;
pdhg_tuning_method_t tuning_method;
} pdhg_parameters_t;

typedef struct
Expand Down
12 changes: 12 additions & 0 deletions internal/internal_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ typedef struct
double *val;
} cu_sparse_matrix_csr_t;

typedef enum
{
CUSPARSE_UPDATE,
FUSED_UPDATE,
} pdhg_update_algorithm_t;


typedef struct
{
int num_variables;
Expand Down Expand Up @@ -123,6 +130,9 @@ typedef struct
double *ones_primal_d;
double *ones_dual_d;

pdhg_update_algorithm_t primal_update_algorithm;
pdhg_update_algorithm_t dual_update_algorithm;

double feasibility_polishing_time;
int feasibility_iteration;
} pdhg_solver_state_t;
Expand All @@ -136,3 +146,5 @@ typedef struct
double obj_vec_rescale;
double rescaling_time_sec;
} rescale_info_t;


6 changes: 6 additions & 0 deletions internal/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ extern "C"
bool verbose,
termination_reason_t termination_reason);

void print_table_head(const pdhg_parameters_t *params);

void display_iteration_stats(const pdhg_solver_state_t *solver_state, bool verbose);

const char *termination_reason_to_string(termination_reason_t reason);
Expand All @@ -125,6 +127,10 @@ extern "C"
int coo_to_csr(const matrix_desc_t *desc,
int **row_ptr, int **col_ind, double **vals, int *nnz_out);

int calculate_max_nnz_row(int m, const int* matA_row_ptr);

int calculate_max_nnz_col(int n, const int* matAt_row_ptr);

void check_feas_polishing_termination_criteria(
pdhg_solver_state_t *solver_state,
const termination_criteria_t *criteria,
Expand Down
Loading