[PATCH] D47849: [OpenMP][Clang][NVPTX] Enable math functions called in an OpenMP NVPTX target device region to be resolved as device-native function calls
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 6 16:37:26 PDT 2018
ABataev added a comment.
Add tests for C++ and move OpenMP specific tests to OpenMP directory
================
Comment at: lib/Headers/__clang_cuda_device_functions.h:28
+#if defined(_OPENMP)
+#include <__clang_cuda_libdevice_declares.h>
+#include <stddef.h>
----------------
Do we really need to include all that stuff here? Will it work with C++, especially with the latest versions of the standard?
================
Comment at: lib/Headers/__clang_cuda_device_functions.h:44
+#elif defined(_OPENMP)
+#define __DEVICE__ static __inline__ __attribute__((always_inline))
+#endif
----------------
Do you really need "__inline__" if you are using 'alwsys_inline' attribute already? Will it work on Windows?
Repository:
rC Clang
https://reviews.llvm.org/D47849
More information about the cfe-commits
mailing list