Skip to content

Commit

Permalink
Time scope creation time in test-omp. (#224)
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel K. Gutierrez <[email protected]>
  • Loading branch information
samuelkgutierrez authored Jul 14, 2024
1 parent 1b4a6b6 commit 458d1ea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions include/quo-vadis-pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
extern "C" {
#endif

/**
* Similar to pthread_create(3).
*/
int
qv_pthread_create(
pthread_t *thread,
Expand Down
3 changes: 0 additions & 3 deletions src/quo-vadis-pthread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ qv_pthread_scope_split_at(
qvi_catch_and_return();
}

/**
* Similar to pthread_create(3).
*/
int
qv_pthread_create(
pthread_t *thread,
Expand Down
5 changes: 5 additions & 0 deletions tests/test-omp.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,13 @@ main(void)

#pragma omp parallel
{
const double tick = omp_get_wtime();
scopei ep_sinfo;
scopei_ep(&ep_sinfo);
const double tock = omp_get_wtime();

#pragma omp master
printf("# Scope creation took %lf seconds\n", tock - tick);

scopei_ep_push(&ep_sinfo);
#pragma omp task
Expand Down

0 comments on commit 458d1ea

Please sign in to comment.