diff options
author | Ethan Stewart <ethan.stewart@amd.com> | 2020-02-12 23:29:10 +0000 |
---|---|---|
committer | JonChesterfield <jonathanchesterfield@gmail.com> | 2020-02-12 23:29:34 +0000 |
commit | 190a11148b756e0b650ad9c5b6cf5314e9afdd0a (patch) | |
tree | e2a3525881fdd80f42d2df8f3bbf8ce19f38dd76 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | c2ce9ea4e372ee31271da44c727dc598e12261a5 (diff) | |
download | llvm-190a11148b756e0b650ad9c5b6cf5314e9afdd0a.zip llvm-190a11148b756e0b650ad9c5b6cf5314e9afdd0a.tar.gz llvm-190a11148b756e0b650ad9c5b6cf5314e9afdd0a.tar.bz2 |
Changed omp_get_max_threads() implementation to more closely match spec description.
Summary: The 5.0 spec states, "The omp_get_max_threads routine returns an upper bound on the number of threads that could be used to form a new team if a parallel construct without a num_threads clause were encountered after execution returns from this routine." The attached test shows Max Threads: 96, Num Threads: 128 without the proposed change. The number of threads should not exceed the (max) nthreads ICV, hence we should return the higher SPMD thread number even when omp_get_max_threads() is called in a generic kernel. This change does fail the api test, max_threads.c, because now it would return 64 instead of 32.
Reviewers: jdoerfert, ABataev, grokos, JonChesterfield
Reviewed By: jdoerfert
Subscribers: openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D74092
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions