Author: jvesely
Date: Thu Jun 21 12:27:23 2018
New Revision: 335277

URL: http://llvm.org/viewvc/llvm-project?rev=335277&view=rev
Log:
atom: Consolidate cl_khr_int64_{base,extended}_atomics declarations

Reviewed-By: Aaron Watry <awa...@gmail.com>
Tested-By: Aaron Watry <awa...@gmail.com>
Signed-off-by: Jan Vesely <jan.ves...@rutgers.edu>

Added:
    libclc/trunk/generic/include/clc/atom_decl_int64.inc
Modified:
    libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_add.h
    libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_sub.h
    libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_xchg.h
    libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_and.h
    libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_max.h
    libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_min.h
    libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_or.h
    libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_xor.h

Added: libclc/trunk/generic/include/clc/atom_decl_int64.inc
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/atom_decl_int64.inc?rev=335277&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/atom_decl_int64.inc (added)
+++ libclc/trunk/generic/include/clc/atom_decl_int64.inc Thu Jun 21 12:27:23 
2018
@@ -0,0 +1,11 @@
+#define __CLC_DECLARE_ATOM(ADDRSPACE, TYPE) \
+       _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION (volatile ADDRSPACE TYPE *, 
TYPE);
+
+__CLC_DECLARE_ATOM(local, long)
+__CLC_DECLARE_ATOM(local, ulong)
+__CLC_DECLARE_ATOM(global, long)
+__CLC_DECLARE_ATOM(global, ulong)
+
+#undef __CLC_DECLARE_ATOM
+
+#undef __CLC_FUNCTION

Modified: libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_add.h
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_add.h?rev=335277&r1=335276&r2=335277&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_add.h 
(original)
+++ libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_add.h Thu 
Jun 21 12:27:23 2018
@@ -1,4 +1,2 @@
-_CLC_OVERLOAD _CLC_DECL long atom_add(volatile global long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_add(volatile global unsigned long 
*p, unsigned long val);
-_CLC_OVERLOAD _CLC_DECL long atom_add(volatile local long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_add(volatile local unsigned long 
*p, unsigned long val);
+#define __CLC_FUNCTION atom_add
+#include <clc/atom_decl_int64.inc>

Modified: libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_sub.h
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_sub.h?rev=335277&r1=335276&r2=335277&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_sub.h 
(original)
+++ libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_sub.h Thu 
Jun 21 12:27:23 2018
@@ -1,4 +1,2 @@
-_CLC_OVERLOAD _CLC_DECL long atom_sub(volatile global long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_sub(volatile global unsigned long 
*p, unsigned long val);
-_CLC_OVERLOAD _CLC_DECL long atom_sub(volatile local long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_sub(volatile local unsigned long 
*p, unsigned long val);
+#define __CLC_FUNCTION atom_sub
+#include <clc/atom_decl_int64.inc>

Modified: libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_xchg.h
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_xchg.h?rev=335277&r1=335276&r2=335277&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_xchg.h 
(original)
+++ libclc/trunk/generic/include/clc/cl_khr_int64_base_atomics/atom_xchg.h Thu 
Jun 21 12:27:23 2018
@@ -1,4 +1,2 @@
-_CLC_OVERLOAD _CLC_DECL long atom_xchg(volatile global long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_xchg(volatile global unsigned long 
*p, unsigned long val);
-_CLC_OVERLOAD _CLC_DECL long atom_xchg(volatile local long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_xchg(volatile local unsigned long 
*p, unsigned long val);
+#define __CLC_FUNCTION atom_xchg
+#include <clc/atom_decl_int64.inc>

Modified: 
libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_and.h
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_and.h?rev=335277&r1=335276&r2=335277&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_and.h 
(original)
+++ libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_and.h 
Thu Jun 21 12:27:23 2018
@@ -1,4 +1,2 @@
-_CLC_OVERLOAD _CLC_DECL long atom_and(volatile global long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_and(volatile global unsigned long 
*p, unsigned long val);
-_CLC_OVERLOAD _CLC_DECL long atom_and(volatile local long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_and(volatile local unsigned long 
*p, unsigned long val);
+#define __CLC_FUNCTION atom_and
+#include <clc/atom_decl_int64.inc>

Modified: 
libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_max.h
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_max.h?rev=335277&r1=335276&r2=335277&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_max.h 
(original)
+++ libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_max.h 
Thu Jun 21 12:27:23 2018
@@ -1,4 +1,2 @@
-_CLC_OVERLOAD _CLC_DECL long atom_max(volatile global long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_max(volatile global unsigned long 
*p, unsigned long val);
-_CLC_OVERLOAD _CLC_DECL long atom_max(volatile local long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_max(volatile local unsigned long 
*p, unsigned long val);
+#define __CLC_FUNCTION atom_max
+#include <clc/atom_decl_int64.inc>

Modified: 
libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_min.h
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_min.h?rev=335277&r1=335276&r2=335277&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_min.h 
(original)
+++ libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_min.h 
Thu Jun 21 12:27:23 2018
@@ -1,4 +1,2 @@
-_CLC_OVERLOAD _CLC_DECL long atom_min(volatile global long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_min(volatile global unsigned long 
*p, unsigned long val);
-_CLC_OVERLOAD _CLC_DECL long atom_min(volatile local long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_min(volatile local unsigned long 
*p, unsigned long val);
+#define __CLC_FUNCTION atom_min
+#include <clc/atom_decl_int64.inc>

Modified: 
libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_or.h
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_or.h?rev=335277&r1=335276&r2=335277&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_or.h 
(original)
+++ libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_or.h 
Thu Jun 21 12:27:23 2018
@@ -1,4 +1,2 @@
-_CLC_OVERLOAD _CLC_DECL long atom_or(volatile global long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_or(volatile global unsigned long 
*p, unsigned long val);
-_CLC_OVERLOAD _CLC_DECL long atom_or(volatile local long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_or(volatile local unsigned long *p, 
unsigned long val);
+#define __CLC_FUNCTION atom_or
+#include <clc/atom_decl_int64.inc>

Modified: 
libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_xor.h
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_xor.h?rev=335277&r1=335276&r2=335277&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_xor.h 
(original)
+++ libclc/trunk/generic/include/clc/cl_khr_int64_extended_atomics/atom_xor.h 
Thu Jun 21 12:27:23 2018
@@ -1,4 +1,2 @@
-_CLC_OVERLOAD _CLC_DECL long atom_xor(volatile global long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_xor(volatile global unsigned long 
*p, unsigned long val);
-_CLC_OVERLOAD _CLC_DECL long atom_xor(volatile local long *p, long val);
-_CLC_OVERLOAD _CLC_DECL unsigned long atom_xor(volatile local unsigned long 
*p, unsigned long val);
+#define __CLC_FUNCTION atom_xor
+#include <clc/atom_decl_int64.inc>


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to