-
Notifications
You must be signed in to change notification settings - Fork 61
Add timing for search #1909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add timing for search #1909
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -3799,6 +3799,10 @@ t8_forest_compute_profile (t8_forest_t forest) | |||||||
| sc_stats_set1 (&forest->stats[14], profile->balance_rounds, "forest: Tree offset runtime."); | ||||||||
| sc_stats_set1 (&forest->stats[15], profile->balance_rounds, "forest: offset runtime."); | ||||||||
| sc_stats_set1 (&forest->stats[16], profile->balance_rounds, "forest: first descendant runtime."); | ||||||||
| sc_stats_set1 (&forest->stats[17], profile->balance_rounds, "forest: search check element runtime."); | ||||||||
| sc_stats_set1 (&forest->stats[18], profile->balance_rounds, "forest: search check queries runtime."); | ||||||||
| sc_stats_set1 (&forest->stats[19], profile->balance_rounds, "forest: search split_array runtime."); | ||||||||
| sc_stats_set1 (&forest->stats[20], profile->balance_rounds, "forest: search total runtime."); | ||||||||
| /* compute stats */ | ||||||||
| sc_stats_compute (sc_MPI_COMM_WORLD, T8_PROFILE_NUM_STATS, forest->stats); | ||||||||
| forest->stats_computed = 1; | ||||||||
|
|
@@ -3968,6 +3972,42 @@ t8_forest_profile_get_first_descendant_runtime (t8_forest_t forest) | |||||||
| } | ||||||||
| return 0; | ||||||||
| } | ||||||||
| double | ||||||||
| t8_forest_profile_get_search_check_element_runtime (t8_forest_t forest) | ||||||||
| { | ||||||||
| T8_ASSERT (t8_forest_is_committed (forest)); | ||||||||
| if (forest->profile != NULL) { | ||||||||
| return forest->profile->search_check_element_time; | ||||||||
| } | ||||||||
| return 0; | ||||||||
| } | ||||||||
| double | ||||||||
| t8_forest_profile_search_check_query_runtime (t8_forest_t forest) | ||||||||
| { | ||||||||
| T8_ASSERT (t8_forest_is_committed (forest)); | ||||||||
| if (forest->profile != NULL) { | ||||||||
| return forest->profile->search_check_query_time; | ||||||||
| } | ||||||||
| return 0; | ||||||||
| } | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| double | ||||||||
| t8_forest_profile_search_split_array_runtime (t8_forest_t forest) | ||||||||
| { | ||||||||
| T8_ASSERT (t8_forest_is_committed (forest)); | ||||||||
| if (forest->profile != NULL) { | ||||||||
| return forest->profile->search_split_array_time; | ||||||||
| } | ||||||||
| return 0; | ||||||||
| } | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| double | ||||||||
| t8_forest_profile_search_total_runtime (t8_forest_t forest) | ||||||||
| { | ||||||||
| T8_ASSERT (t8_forest_is_committed (forest)); | ||||||||
| if (forest->profile != NULL) { | ||||||||
| return forest->profile->search_time; | ||||||||
| } | ||||||||
| return 0; | ||||||||
| } | ||||||||
|
|
||||||||
| void | ||||||||
| t8_forest_compute_elements_offset (t8_forest_t forest) | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -210,6 +210,48 @@ t8_forest_profile_get_forest_offsets_runtime (t8_forest_t forest); | |||||||
| */ | ||||||||
| double | ||||||||
| t8_forest_profile_get_first_descendant_runtime (t8_forest_t forest); | ||||||||
|
|
||||||||
| /** Get the sum of the runtimes of the last calls to \ref check_element in search. | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All comments do not match the actual function. Please re-edit them. |
||||||||
| * \param [in] forest The forest. | ||||||||
| * \return The time | ||||||||
| * \a forest must be committed before calling this function. | ||||||||
| * \see t8_forest_set_profiling | ||||||||
| */ | ||||||||
| double | ||||||||
| t8_forest_profile_get_search_check_element_runtime (t8_forest_t forest); | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| /** Get the sum of the runtimes of the last calls to \ref check_element in search. | ||||||||
| * \param [in] forest The forest. | ||||||||
| * \return The time | ||||||||
| * \a forest must be committed before calling this function. | ||||||||
| * \see t8_forest_set_profiling | ||||||||
| */ | ||||||||
| double | ||||||||
| t8_forest_profile_get_search_check_query_runtime (t8_forest_t forest); | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| /** Get the sum of the runtimes of the last calls to \ref check_query in search. | ||||||||
| * \param [in] forest The forest. | ||||||||
| * \return The time | ||||||||
| * \a forest must be committed before calling this function. | ||||||||
| * \see t8_forest_set_profiling | ||||||||
| */ | ||||||||
| double | ||||||||
| t8_forest_profile_get_search_split_array_runtime (t8_forest_t forest); | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| /** Get the sum of the runtimes of the last calls to \ref split_array in search. | ||||||||
| * \param [in] forest The forest. | ||||||||
| * \return The time | ||||||||
| * \a forest must be committed before calling this function. | ||||||||
| * \see t8_forest_set_profiling | ||||||||
| */ | ||||||||
| double | ||||||||
| t8_forest_profile_get_search_check_element_runtime (t8_forest_t forest); | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| /** Get the runtime of the last call to \ref search. | ||||||||
| * \param [in] forest The forest. | ||||||||
| * \return The time | ||||||||
| * \a forest must be committed before calling this function. | ||||||||
| * \see t8_forest_set_profiling | ||||||||
| */ | ||||||||
| double | ||||||||
| t8_forest_profile_get_search_total_runtime (t8_forest_t forest); | ||||||||
|
|
||||||||
| T8_EXTERN_C_END (); | ||||||||
|
|
||||||||
| #endif /* !T8_FOREST_PROFILING_H */ | ||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.