atomic: Move define cleanup to shared include

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: 335274
This commit is contained in:
Jan Vesely 2018-06-21 19:27:07 +00:00
parent be73fd6b5d
commit eabc110372
9 changed files with 8 additions and 26 deletions

View File

@ -1,5 +1,2 @@
#define __CLC_FUNCTION atomic_add
#include <clc/atomic/atomic_decl.inc>
#undef __CLC_FUNCTION
#undef __CLC_DECLARE_ATOMIC
#undef __CLC_DECLARE_ATOMIC_ADDRSPACE

View File

@ -1,5 +1,2 @@
#define __CLC_FUNCTION atomic_and
#include <clc/atomic/atomic_decl.inc>
#undef __CLC_FUNCTION
#undef __CLC_DECLARE_ATOMIC
#undef __CLC_DECLARE_ATOMIC_ADDRSPACE

View File

@ -1,4 +1,3 @@
#define __CLC_DECLARE_ATOMIC(ADDRSPACE, TYPE) \
_CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION (volatile ADDRSPACE TYPE *, TYPE);
@ -8,3 +7,8 @@
__CLC_DECLARE_ATOMIC_ADDRSPACE(int)
__CLC_DECLARE_ATOMIC_ADDRSPACE(uint)
#undef __CLC_DECLARE_ATOMIC_ADDRSPACE
#undef __CLC_DECLARE_ATOMIC
#undef __CLC_FUNCTION

View File

@ -1,5 +1,2 @@
#define __CLC_FUNCTION atomic_max
#include <clc/atomic/atomic_decl.inc>
#undef __CLC_FUNCTION
#undef __CLC_DECLARE_ATOMIC
#undef __CLC_DECLARE_ATOMIC_ADDRSPACE

View File

@ -1,5 +1,2 @@
#define __CLC_FUNCTION atomic_min
#include <clc/atomic/atomic_decl.inc>
#undef __CLC_FUNCTION
#undef __CLC_DECLARE_ATOMIC
#undef __CLC_DECLARE_ATOMIC_ADDRSPACE

View File

@ -1,5 +1,2 @@
#define __CLC_FUNCTION atomic_or
#include <clc/atomic/atomic_decl.inc>
#undef __CLC_FUNCTION
#undef __CLC_DECLARE_ATOMIC
#undef __CLC_DECLARE_ATOMIC_ADDRSPACE

View File

@ -1,5 +1,2 @@
#define __CLC_FUNCTION atomic_sub
#include <clc/atomic/atomic_decl.inc>
#undef __CLC_FUNCTION
#undef __CLC_DECLARE_ATOMIC
#undef __CLC_DECLARE_ATOMIC_ADDRSPACE

View File

@ -1,6 +1,5 @@
#define __CLC_FUNCTION atomic_xchg
_CLC_OVERLOAD _CLC_DECL float __CLC_FUNCTION (volatile local float *, float);
_CLC_OVERLOAD _CLC_DECL float __CLC_FUNCTION (volatile global float *, float);
#include <clc/atomic/atomic_decl.inc>
__CLC_DECLARE_ATOMIC_ADDRSPACE(float);
#undef __CLC_FUNCTION
#undef __CLC_DECLARE_ATOMIC
#undef __CLC_DECLARE_ATOMIC_ADDRSPACE

View File

@ -1,5 +1,2 @@
#define __CLC_FUNCTION atomic_xor
#include <clc/atomic/atomic_decl.inc>
#undef __CLC_FUNCTION
#undef __CLC_DECLARE_ATOMIC
#undef __CLC_DECLARE_ATOMIC_ADDRSPACE