Skip to content

OpenCL C 3.0 patch update: incorrect preprocessor directives in header #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions patches/clang/0001-OpenCL-3.0-support.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 6dacab1f93b0841d698e3153764e2cfa252979ff Mon Sep 17 00:00:00 2001
From 911aba1f4a95f914994957a769c938eac04555ca Mon Sep 17 00:00:00 2001
From: Anton Zabaznov <[email protected]>
Date: Tue, 22 Sep 2020 19:03:50 +0300
Subject: [PATCH] OpenCL 3.0 support
Subject: [PATCH 1/2] OpenCL 3.0 support

---
clang/include/clang/Basic/Builtins.def | 65 +-
Expand Down Expand Up @@ -935,7 +935,7 @@ index 430e07d36f6..2cc688ccc3d 100644

#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h
index 06c5ab6a72f..c402a72e801 100644
index 06c5ab6a72f..a2327e3cb8a 100644
--- a/clang/lib/Headers/opencl-c.h
+++ b/clang/lib/Headers/opencl-c.h
@@ -35,7 +35,6 @@
Expand Down Expand Up @@ -3527,7 +3527,7 @@ index 06c5ab6a72f..c402a72e801 100644

// atomic_fetch()
-
+#ifdef defined(__opencl_c_atomic_scope_device) && \
+#if defined(__opencl_c_atomic_scope_device) && \
+ defined(__opencl_c_atomic_order_seq_cst)
+#ifdef __opencl_c_generic_address_space
int __ovld atomic_fetch_add(volatile atomic_int *object, int operand);
Expand Down Expand Up @@ -3703,7 +3703,7 @@ index 06c5ab6a72f..c402a72e801 100644
+ // defined(cl_khr_int64_extended_atomics)
+#endif // __opencl_c_generic_address_space
+
+#ifdef(__OPENCL_C_VERSION__ >= CL_VERSION_3_0)
+#if(__OPENCL_C_VERSION__ >= CL_VERSION_3_0)
+int __ovld atomic_fetch_add(volatile atomic_int __global *object, int operand);
+uint __ovld atomic_fetch_add(volatile atomic_uint __local *object,
+ uint operand);
Expand Down