[Openmp-commits] [openmp] r348857 - [test] [runtime] Permit omp_get_wtick() to return 0.01

Michal Gorny via Openmp-commits openmp-commits at lists.llvm.org
Tue Dec 11 07:39:34 PST 2018


Author: mgorny
Date: Tue Dec 11 07:39:34 2018
New Revision: 348857

URL: http://llvm.org/viewvc/llvm-project?rev=348857&view=rev
Log:
[test] [runtime] Permit omp_get_wtick() to return 0.01

Increase the range for omp_get_wtick() test to allow for 0.01
(from <0.01).  This is needed for NetBSD where it returns exactly that
value due to CLOCKS_PER_SEC being 100.  This should not cause
a significant difference from e.g. FreeBSD where it is 128,
and especially from Linux where CLOCKS_PER_SEC is apparently meaningless
and sysconf(_SC_CLK_TCK) gives 100 as well.

Differential Revision: https://reviews.llvm.org/D55493

Modified:
    openmp/trunk/runtime/test/api/omp_get_wtick.c

Modified: openmp/trunk/runtime/test/api/omp_get_wtick.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/api/omp_get_wtick.c?rev=348857&r1=348856&r2=348857&view=diff
==============================================================================
--- openmp/trunk/runtime/test/api/omp_get_wtick.c (original)
+++ openmp/trunk/runtime/test/api/omp_get_wtick.c Tue Dec 11 07:39:34 2018
@@ -7,7 +7,7 @@ int test_omp_get_wtick()
   double tick;
   tick = -1.;
   tick = omp_get_wtick ();
-  return ((tick > 0.0) && (tick < 0.01));
+  return ((tick > 0.0) && (tick <= 0.01));
 }
 
 int main()




More information about the Openmp-commits mailing list