Skip to content

Commit

Permalink
240430.212121.HKT try fixing "conversion to non-scalar type requested"
Browse files Browse the repository at this point in the history
  • Loading branch information
zaikunzhang committed Apr 30, 2024
1 parent 43abd5f commit 03213fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions c/prima.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ const char *prima_get_rc_string(const prima_rc_t rc)
// The function that does the minimization using a PRIMA solver
prima_rc_t prima_minimize(const prima_algorithm_t algorithm, const prima_problem_t problem, const prima_options_t options, prima_result_t *const result)
{
int info = (int) prima_init_result(result, problem);
int info = prima_init_result(result, problem);

if (info == PRIMA_RC_DFT)
info = (int) prima_check_problem(problem, algorithm);
info = prima_check_problem(problem, algorithm);

if (info == PRIMA_RC_DFT) {
// We copy x0 into result->x only after prima_check_problem has succeeded,
Expand Down Expand Up @@ -232,11 +232,11 @@ prima_rc_t prima_minimize(const prima_algorithm_t algorithm, const prima_problem
break;

default:
info = (int) PRIMA_INVALID_INPUT;
info = PRIMA_INVALID_INPUT;
}
}

result->status = (prima_result_t) info;
result->status = info;
result->message = prima_get_rc_string(result->status);

return result->status;
Expand Down

0 comments on commit 03213fe

Please sign in to comment.