From 458d1eacf730675bccbf3d18db9a9681f3cff0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20K=2E=20Guti=C3=A9rrez?= Date: Sun, 14 Jul 2024 15:45:41 -0600 Subject: [PATCH] Time scope creation time in test-omp. (#224) Signed-off-by: Samuel K. Gutierrez --- include/quo-vadis-pthread.h | 3 +++ src/quo-vadis-pthread.cc | 3 --- tests/test-omp.c | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/quo-vadis-pthread.h b/include/quo-vadis-pthread.h index 89cfe91..a21c1a6 100644 --- a/include/quo-vadis-pthread.h +++ b/include/quo-vadis-pthread.h @@ -27,6 +27,9 @@ extern "C" { #endif +/** + * Similar to pthread_create(3). + */ int qv_pthread_create( pthread_t *thread, diff --git a/src/quo-vadis-pthread.cc b/src/quo-vadis-pthread.cc index 3543c92..1c13357 100644 --- a/src/quo-vadis-pthread.cc +++ b/src/quo-vadis-pthread.cc @@ -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, diff --git a/tests/test-omp.c b/tests/test-omp.c index 2446282..125952f 100644 --- a/tests/test-omp.c +++ b/tests/test-omp.c @@ -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