diff options
author | Thomas White <taw@physics.org> | 2023-05-02 10:09:47 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-07-28 13:22:04 +0200 |
commit | 3b3b437c4ed970754963b2d3ec5a4a7d1b380a7f (patch) | |
tree | b5af6d79313b9f346f0181777a6ac55b4e4bd469 /libcrystfel/src | |
parent | 0e183e720250d96a7ad561d84a253488a14bf2b8 (diff) |
Add profiling for Mille
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/predict-refine.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index 3b52d0c1..af58b5f7 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -38,6 +38,7 @@ #include "geometry.h" #include "cell-utils.h" #include "predict-refine.h" +#include "profile.h" #ifdef HAVE_MILLEPEDE #include <mille_c_wrap.h> @@ -582,6 +583,8 @@ static void write_mille(Mille *mille, int n, UnitCell *cell, float global_gradients[2]; int labels[2]; + profile_start("mille-calc"); + /* Excitation error terms */ for ( i=0; i<n; i++ ) { @@ -647,6 +650,9 @@ static void write_mille(Mille *mille, int n, UnitCell *cell, y_dev(&rps[i], image->detgeom, dx, dy), 0.65*rps[i].panel->pixel_pitch); } + + profile_end("mille-calc"); + #endif /* HAVE_MILLEPEDE */ } @@ -757,7 +763,9 @@ int refine_prediction(struct image *image, Crystal *cr, Mille *mille) #ifdef HAVE_MILLEPEDE if ( mille != NULL ) { + profile_start("mille-write"); mille_write_record(mille); + profile_end("mille-write"); } #endif |