From f9285315eccc26354eef6d8349db777727a63394 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 17 Apr 2019 10:26:30 +0200 Subject: egs: do not assume the same stride for all arrays Also, allocate all the diff coeffs together. --- residual_calc.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'residual_calc.h') diff --git a/residual_calc.h b/residual_calc.h index af1bf39..c466214 100644 --- a/residual_calc.h +++ b/residual_calc.h @@ -68,10 +68,13 @@ int mg2di_residual_calc_init(ResidualCalcContext *ctx); /** * Calculate the residual. */ -int mg2di_residual_calc(ResidualCalcContext *ctx, size_t size[2], ptrdiff_t stride, - double *res_max, - double *dst, const double *u, const double *rhs, +int mg2di_residual_calc(ResidualCalcContext *ctx, size_t size[2], + double *residual_max, + double *dst, ptrdiff_t dst_stride, + const double *u, ptrdiff_t u_stride, + const double *rhs, ptrdiff_t rhs_stride, const double * const diff_coeffs[MG2D_DIFF_COEFF_NB], + ptrdiff_t diff_coeffs_stride, const double *fd_factors); #endif // MG2D_RESIDUAL_CALC_H -- cgit v1.2.3