[PATCH] D59361: [CUDA][Windows] Partial fix for bug 38811 (Step 1 of 3)
Evgeny Mankov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 15 05:04:30 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rC356255: [CUDA][Windows] Partial fix for bug #38811 (Step 1 of 3) (authored by emankov, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D59361?vs=190607&id=190809#toc
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59361/new/
https://reviews.llvm.org/D59361
Files:
lib/Headers/__clang_cuda_device_functions.h
Index: lib/Headers/__clang_cuda_device_functions.h
===================================================================
--- lib/Headers/__clang_cuda_device_functions.h
+++ lib/Headers/__clang_cuda_device_functions.h
@@ -1563,7 +1563,7 @@
__DEVICE__ float j1f(float __a) { return __nv_j1f(__a); }
__DEVICE__ double jn(int __n, double __a) { return __nv_jn(__n, __a); }
__DEVICE__ float jnf(int __n, float __a) { return __nv_jnf(__n, __a); }
-#if defined(__LP64__)
+#if defined(__LP64__) || defined(_WIN64)
__DEVICE__ long labs(long __a) { return llabs(__a); };
#else
__DEVICE__ long labs(long __a) { return __nv_abs(__a); };
@@ -1597,7 +1597,7 @@
__DEVICE__ float logf(float __a) {
return __FAST_OR_SLOW(__nv_fast_logf, __nv_logf)(__a);
}
-#if defined(__LP64__)
+#if defined(__LP64__) || defined(_WIN64)
__DEVICE__ long lrint(double __a) { return llrint(__a); }
__DEVICE__ long lrintf(float __a) { return __float2ll_rn(__a); }
__DEVICE__ long lround(double __a) { return llround(__a); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59361.190809.patch
Type: text/x-patch
Size: 999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190315/46b7cd50/attachment.bin>
More information about the cfe-commits
mailing list