From 121a0add4a95c52c41b03723fb321e2f84902276 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 11 Jan 2023 17:13:40 +0100 Subject: {nl,ps}solve: eliminate const warnings --- pssolve.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pssolve.c') diff --git a/pssolve.c b/pssolve.c index dd62391..882eed3 100644 --- a/pssolve.c +++ b/pssolve.c @@ -67,7 +67,7 @@ struct PSSolvePriv { typedef struct ConstructMatrixThread { const PSEquationContext *eq_ctx; - const double **eq_coeffs; + const double * const *eq_coeffs; double *mat; ptrdiff_t mat_stride; unsigned int var_idx; @@ -77,7 +77,7 @@ static void construct_matrix(void *arg, unsigned int job_idx, unsigned int threa { ConstructMatrixThread *cmt = arg; const PSEquationContext *eq_ctx = cmt->eq_ctx; - const double **eq_coeffs = cmt->eq_coeffs; + const double * const *eq_coeffs = cmt->eq_coeffs; double *mat = cmt->mat; ptrdiff_t mat_stride = cmt->mat_stride; unsigned int var_idx = cmt->var_idx; @@ -169,7 +169,7 @@ static int lu_invert(TDLogger *logger, const int N, double *mat, double *rhs, in } int tdi_pssolve_solve(PSSolveContext *ctx, - const double *(**eq_coeffs)[PSSOLVE_DIFF_ORDER_NB], + const PSEqCoeffs *eq_coeffs, const double *rhs, double *coeffs) { PSSolvePriv *s = ctx->priv; @@ -188,7 +188,7 @@ int tdi_pssolve_solve(PSSolveContext *ctx, for (int j = 0; j < ctx->nb_equations; j++) { ConstructMatrixThread thread = { .eq_ctx = eq_ctx, - .eq_coeffs = eq_coeffs[i][j], + .eq_coeffs = eq_coeffs[i].func_coeffs[j], .mat = mat, .mat_stride = s->nb_coeffs, .var_idx = j, -- cgit v1.2.3