Skip to content

Commit 7fa38ff

Browse files
authored
Merge pull request #203 from azabazno/opencl_30_preproc_dir_11
OpenCL C 3.0 patch update: incorrect preprocessor directives in header
2 parents ba8482c + 8ea721b commit 7fa38ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

patches/clang/0001-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 0116b61334e967d152f8b81708c93e57312c0955 Mon Sep 17 00:00:00 2001
1+
From 21ffb389c1f308394006751c543d048c673a2545 Mon Sep 17 00:00:00 2001
22
From: Anton Zabaznov <[email protected]>
33
Date: Tue, 22 Sep 2020 19:03:50 +0300
44
Subject: [PATCH] OpenCL 3.0 support
@@ -930,7 +930,7 @@ index 430e07d36f6..afa900ab24d 100644
930930

931931
#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
932932
diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h
933-
index 66e18bdd47b..e3b94149fc0 100644
933+
index 66e18bdd47b..67d900eb1c3 100644
934934
--- a/clang/lib/Headers/opencl-c.h
935935
+++ b/clang/lib/Headers/opencl-c.h
936936
@@ -35,7 +35,6 @@
@@ -3522,7 +3522,7 @@ index 66e18bdd47b..e3b94149fc0 100644
35223522

35233523
// atomic_fetch()
35243524
-
3525-
+#ifdef defined(__opencl_c_atomic_scope_device) && \
3525+
+#if defined(__opencl_c_atomic_scope_device) && \
35263526
+ defined(__opencl_c_atomic_order_seq_cst)
35273527
+#ifdef __opencl_c_generic_address_space
35283528
int __ovld atomic_fetch_add(volatile atomic_int *object, int operand);
@@ -3686,7 +3686,7 @@ index 66e18bdd47b..e3b94149fc0 100644
36863686
+ // defined(cl_khr_int64_extended_atomics)
36873687
+#endif // __opencl_c_generic_address_space
36883688
+
3689-
+#ifdef(__OPENCL_C_VERSION__ >= CL_VERSION_3_0)
3689+
+#if(__OPENCL_C_VERSION__ >= CL_VERSION_3_0)
36903690
+int __ovld atomic_fetch_add(volatile atomic_int __global *object, int operand);
36913691
+uint __ovld atomic_fetch_add(volatile atomic_uint __local *object,
36923692
+ uint operand);

0 commit comments

Comments
 (0)