Skip to content

Commit

Permalink
Add number of repeated transpositions to statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
SSoelvsten committed Apr 5, 2024
1 parent 897a723 commit 0491d30
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/adiar/internal/algorithms/quantify.h
Original file line number Diff line number Diff line change
Expand Up @@ -1435,6 +1435,7 @@ namespace adiar::internal

#ifdef ADIAR_STATS
stats_quantify.partial_sweeps += 1u;
stats_quantify.partial_repetitions += 1u;
#endif
transposed = __quantify(ep, transposed, partial_impl);

Expand Down
10 changes: 9 additions & 1 deletion src/adiar/statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,15 @@ namespace adiar

indent_level++;

o << indent << label << "termination" << internal::stats_quantify.partial_termination << endl;
o << indent << label << "repeated transpositions"
<< internal::stats_quantify.partial_repetitions << " = "
<< internal::percent_frac(internal::stats_quantify.partial_repetitions,
internal::stats_quantify.partial_sweeps)
<< percent << endl;
o << indent << label << "termination" << internal::stats_quantify.partial_termination << " = "
<< internal::percent_frac(internal::stats_quantify.partial_termination,
internal::stats_quantify.partial_sweeps)
<< percent << endl;

indent_level--;
}
Expand Down
5 changes: 5 additions & 0 deletions src/adiar/statistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,11 @@ namespace adiar
//////////////////////////////////////////////////////////////////////////////////////////////
uintwide partial_termination = 0;

//////////////////////////////////////////////////////////////////////////////////////////////
/// \brief Number of *partial* multi-variable sweeps that are repeated partial transposition.
//////////////////////////////////////////////////////////////////////////////////////////////
uintwide partial_repetitions = 0;

//////////////////////////////////////////////////////////////////////////////////////////////
/// \brief Number of *nested* multi-variable sweeps.
//////////////////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 0491d30

Please sign in to comment.