diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-04-17 14:38:23 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2019-04-19 17:11:40 +0200 |
commit | 5b94910fc4c6a47856290e9c23f9a905cf63c1eb (patch) | |
tree | e33245aef4e7885b801e1a2474c18e1ed9737518 /ell_grid_solve.h | |
parent | 8c35e7648cf7db413e1d2a9478edec797eac5df3 (diff) |
Add and use a new timer API.
Diffstat (limited to 'ell_grid_solve.h')
-rw-r--r-- | ell_grid_solve.h | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/ell_grid_solve.h b/ell_grid_solve.h index d46edd9..8f984ce 100644 --- a/ell_grid_solve.h +++ b/ell_grid_solve.h @@ -44,6 +44,7 @@ #include "mg2d_boundary.h" #include "mg2d_constants.h" #include "ndarray.h" +#include "timer.h" enum EGSType { /** @@ -84,20 +85,15 @@ typedef struct EGSRelaxContext { */ double relax_multiplier; - int64_t count_correct; - int64_t time_correct; + Timer timer_correct; } EGSRelaxContext; typedef struct EGSExactContext { - int64_t count_mat_construct; - int64_t time_mat_construct; - int64_t count_bicgstab_solve; + Timer timer_mat_construct; + Timer timer_bicgstab; int64_t bicgstab_iterations; - int64_t time_bicgstab_solve; - int64_t count_lu_solve; - int64_t time_lu_solve; - int64_t count_export; - int64_t time_export; + Timer timer_lu_solve; + Timer timer_export; } EGSExactContext; typedef struct EGSContext { @@ -195,21 +191,14 @@ typedef struct EGSContext { NDArray *diff_coeffs[MG2D_DIFF_COEFF_NB]; /* timings */ - int64_t time_boundaries; - int64_t count_boundaries; - int64_t time_bnd_fixval; - int64_t count_bnd_fixval; - int64_t time_bnd_falloff; - int64_t count_bnd_falloff; - int64_t time_bnd_reflect; - int64_t count_bnd_reflect; - int64_t time_bnd_corners; - int64_t count_bnd_corners; - int64_t time_res_calc; - int64_t count_res; - int64_t time_init; - int64_t count_init; - int64_t time_total; + Timer timer_bnd; + Timer timer_bnd_fixval; + Timer timer_bnd_falloff; + Timer timer_bnd_reflect; + Timer timer_bnd_corners; + Timer timer_res_calc; + Timer timer_init; + Timer timer_solve; } EGSContext; #define EGS_INIT_FLAG_SAME_DIFF_COEFFS (1 << 0) |