Skip to content

Commit 1a40092

Browse files
committed
OpenCL C 3.0 patch update: incorrect preprocessor directives in header
1 parent b5c9bcb commit 1a40092

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

patches/clang/0006-OpenCL-3.0-support.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From ebe6029aebb2a7a6b209f51556ef6e677100b054 Mon Sep 17 00:00:00 2001
1+
From ebfc732638fa68d1bc79fbad02011fe71ffc075a Mon Sep 17 00:00:00 2001
22
From: Anton Zabaznov <[email protected]>
33
Date: Thu, 24 Sep 2020 00:12:24 +0300
44
Subject: [PATCH] OpenCL 3.0 support
@@ -766,7 +766,7 @@ index 4cde22ce9a..d248b1c865 100644
766766
#include "clang/Basic/OpenCLExtensions.def"
767767

768768
diff --git a/lib/Headers/opencl-c.h b/lib/Headers/opencl-c.h
769-
index 514c710c11..e325990031 100644
769+
index 514c710c11..0b2efc9f2b 100644
770770
--- a/lib/Headers/opencl-c.h
771771
+++ b/lib/Headers/opencl-c.h
772772
@@ -10,6 +10,60 @@
@@ -3476,7 +3476,7 @@ index 514c710c11..e325990031 100644
34763476

34773477
// atomic_fetch()
34783478
-
3479-
+#ifdef defined(__opencl_c_atomic_scope_device) && \
3479+
+#if defined(__opencl_c_atomic_scope_device) && \
34803480
+ defined(__opencl_c_atomic_order_seq_cst)
34813481
+#ifdef __opencl_c_generic_address_space
34823482
int __ovld atomic_fetch_add(volatile atomic_int *object, int operand);
@@ -3652,7 +3652,7 @@ index 514c710c11..e325990031 100644
36523652
+ // defined(cl_khr_int64_extended_atomics)
36533653
+#endif // __opencl_c_generic_address_space
36543654
+
3655-
+#ifdef(__OPENCL_C_VERSION__ >= CL_VERSION_3_0)
3655+
+#if(__OPENCL_C_VERSION__ >= CL_VERSION_3_0)
36563656
+int __ovld atomic_fetch_add(volatile atomic_int __global *object, int operand);
36573657
+uint __ovld atomic_fetch_add(volatile atomic_uint __local *object,
36583658
+ uint operand);

0 commit comments

Comments
 (0)