Author: jvesely Date: Thu Jun 21 12:27:18 2018 New Revision: 335276 URL: http://llvm.org/viewvc/llvm-project?rev=335276&view=rev Log: atom: Consolidate cl_khr_{local,global}_int32_{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_int32.inc Modified: libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_add.h libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_sub.h libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_xchg.h libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_and.h libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_max.h libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_min.h libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_or.h libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_xor.h libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_add.h libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_sub.h libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_xchg.h libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_and.h libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_max.h libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_min.h libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_or.h libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_xor.h Added: libclc/trunk/generic/include/clc/atom_decl_int32.inc URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/atom_decl_int32.inc?rev=335276&view=auto ============================================================================== --- libclc/trunk/generic/include/clc/atom_decl_int32.inc (added) +++ libclc/trunk/generic/include/clc/atom_decl_int32.inc Thu Jun 21 12:27:18 2018 @@ -0,0 +1,10 @@ +#define __CLC_DECLARE_ATOM(ADDRSPACE, TYPE) \ + _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION (ADDRSPACE TYPE *, TYPE); + +__CLC_DECLARE_ATOM(__CLC_ADDRESS_SPACE, int) +__CLC_DECLARE_ATOM(__CLC_ADDRESS_SPACE, uint) + +#undef __CLC_DECLARE_ATOM + +#undef __CLC_FUNCTION +#undef __CLC_ADDRESS_SPACE Modified: libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_add.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_add.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_add.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_add.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_add(global int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_add(global unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_add +#define __CLC_ADDRESS_SPACE global +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_sub.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_sub.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_sub.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_sub.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_sub(global int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_sub(global unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_sub +#define __CLC_ADDRESS_SPACE global +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_xchg.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_xchg.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_xchg.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_global_int32_base_atomics/atom_xchg.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_xchg(global int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_xchg(global unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_xchg +#define __CLC_ADDRESS_SPACE global +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_and.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_and.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_and.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_and.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_and(global int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_and(global unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_and +#define __CLC_ADDRESS_SPACE global +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_max.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_max.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_max.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_max.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_max(global int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_max(global unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_max +#define __CLC_ADDRESS_SPACE global +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_min.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_min.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_min.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_min.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_min(global int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_min(global unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_min +#define __CLC_ADDRESS_SPACE global +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_or.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_or.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_or.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_or.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_or(global int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_or(global unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_or +#define __CLC_ADDRESS_SPACE global +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_xor.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_xor.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_xor.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_global_int32_extended_atomics/atom_xor.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_xor(global int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_xor(global unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_xor +#define __CLC_ADDRESS_SPACE global +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_add.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_add.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_add.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_add.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_add(local int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_add(local unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_add +#define __CLC_ADDRESS_SPACE local +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_sub.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_sub.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_sub.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_sub.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_sub(local int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_sub(local unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_sub +#define __CLC_ADDRESS_SPACE local +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_xchg.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_xchg.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_xchg.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_local_int32_base_atomics/atom_xchg.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_xchg(local int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_xchg(local unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_xchg +#define __CLC_ADDRESS_SPACE local +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_and.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_and.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_and.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_and.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_and(local int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_and(local unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_and +#define __CLC_ADDRESS_SPACE local +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_max.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_max.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_max.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_max.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_max(local int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_max(local unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_max +#define __CLC_ADDRESS_SPACE local +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_min.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_min.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_min.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_min.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_min(local int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_min(local unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_min +#define __CLC_ADDRESS_SPACE local +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_or.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_or.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_or.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_or.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_or(local int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_or(local unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_or +#define __CLC_ADDRESS_SPACE local +#include <clc/atom_decl_int32.inc> Modified: libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_xor.h URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_xor.h?rev=335276&r1=335275&r2=335276&view=diff ============================================================================== --- libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_xor.h (original) +++ libclc/trunk/generic/include/clc/cl_khr_local_int32_extended_atomics/atom_xor.h Thu Jun 21 12:27:18 2018 @@ -1,2 +1,3 @@ -_CLC_OVERLOAD _CLC_DECL int atom_xor(local int *p, int val); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_xor(local unsigned int *p, unsigned int val); +#define __CLC_FUNCTION atom_xor +#define __CLC_ADDRESS_SPACE local +#include <clc/atom_decl_int32.inc> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits