atom: Consolidate cl_khr_int64_{base,extended}_atomics declarations

Reviewed-By: Aaron Watry <awatry@gmail.com>
Tested-By: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 335277
This commit is contained in:
Jan Vesely 2018-06-21 19:27:23 +00:00
parent d1c3811ff7
commit b9cbe0bf51
9 changed files with 27 additions and 32 deletions

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>