From a4a5fc2666bfd3ca009ce6c7d05bc83ff4d57313 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 26 Mar 2019 17:31:58 +0100 Subject: egs_exact: do not construct the matrix more often than necessary It does not change unless the diff coeffs change. --- ell_grid_solve.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ell_grid_solve.h') diff --git a/ell_grid_solve.h b/ell_grid_solve.h index 182b087..0718b67 100644 --- a/ell_grid_solve.h +++ b/ell_grid_solve.h @@ -211,6 +211,8 @@ typedef struct EGSContext { int64_t time_total; } EGSContext; +#define EGS_INIT_FLAG_SAME_DIFF_COEFFS (1 << 0) + /** * Allocate the solver for the given domain size. * @@ -229,7 +231,7 @@ EGSContext *mg2di_egs_alloc(enum EGSType solver_type, size_t domain_size[2]); * * @return 0 on success, a negative error code on failure. */ -int mg2di_egs_init(EGSContext *ctx); +int mg2di_egs_init(EGSContext *ctx, int flags); /** * Free the solver and write NULL to the provided pointer. */ -- cgit v1.2.3