aboutsummaryrefslogtreecommitdiff
path: root/residual_calc.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-04-17 10:26:30 +0200
committerAnton Khirnov <anton@khirnov.net>2019-04-17 10:27:53 +0200
commitf9285315eccc26354eef6d8349db777727a63394 (patch)
tree99fff854450394d781126481e8b2fc48f4508c64 /residual_calc.h
parent6a92edee9bd679d1f71e66b2cc96456bead219fd (diff)
egs: do not assume the same stride for all arrays
Also, allocate all the diff coeffs together.
Diffstat (limited to 'residual_calc.h')
-rw-r--r--residual_calc.h9
1 files changed, 6 insertions, 3 deletions
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