Skip to content

Commit

Permalink
Fixed __kmpc_get_target_offload() to call library initialization.
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D44793

llvm-svn: 328228
  • Loading branch information
AndreyChurbanov committed Mar 22, 2018
1 parent 710d7b9 commit 2d91a8a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion openmp/runtime/src/kmp_csupport.cpp
Expand Up @@ -4066,7 +4066,12 @@ void __kmpc_doacross_fini(ident_t *loc, int gtid) {
#endif

#if OMP_50_ENABLED
int __kmpc_get_target_offload(void) { return __kmp_target_offload; }
int __kmpc_get_target_offload(void) {
if (!__kmp_init_serial) {
__kmp_serial_initialize();
}
return __kmp_target_offload;
}
#endif // OMP_50_ENABLED

// end of file //

0 comments on commit 2d91a8a

Please sign in to comment.