[libomptarget] Fix devicertl build
authorJon Chesterfield <jonathanchesterfield@gmail.com>
Mon, 15 Mar 2021 19:50:21 +0000 (19:50 +0000)
committerJon Chesterfield <jonathanchesterfield@gmail.com>
Mon, 15 Mar 2021 19:50:22 +0000 (19:50 +0000)
commitbcb3f0f867b27179f9cab49d2ef41fe7769112c0
treec001b96d1475a95e6e3e6a45236c3ac7de36f8fa
parent9c486eb34894d077fabf590c7d0c23aab2ad8bb2
[libomptarget] Fix devicertl build

[libomptarget] Fix devicertl build

The target specific functions in target_interface are extern C, but the
implementations for nvptx were mostly C++ mangling. That worked out as
a quirk of DEVICE macro expanding to nothing, except for shuffle.h which
only forward declared the functions with C++ linkage.

Also implements GetWarpSize, as used by shuffle, and includes target_interface
in nvptx target_impl.cu to help catch future divergence between interface and
implementation.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D98651
openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip
openmp/libomptarget/deviceRTLs/common/include/target/shuffle.h
openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu
openmp/libomptarget/deviceRTLs/target_interface.h