[Libclc-dev] [PATCH] atomic: undef macros that are included from atomic_decl.inc

Jeroen Ketema j.ketema at imperial.ac.uk
Wed Sep 17 08:34:09 PDT 2014


LGTM

On 17 Sep 2014, at 16:24, Aaron Watry <awatry at gmail.com> wrote:

> Signed-off-by: Aaron Watry <awatry at gmail.com>
> CC: Jeroen Ketema <j.ketema at imperial.ac.uk>
> ---
> generic/include/clc/atomic/atomic_add.h  | 2 ++
> generic/include/clc/atomic/atomic_and.h  | 2 ++
> generic/include/clc/atomic/atomic_max.h  | 2 ++
> generic/include/clc/atomic/atomic_min.h  | 2 ++
> generic/include/clc/atomic/atomic_or.h   | 2 ++
> generic/include/clc/atomic/atomic_sub.h  | 2 ++
> generic/include/clc/atomic/atomic_xchg.h | 1 +
> generic/include/clc/atomic/atomic_xor.h  | 2 ++
> 8 files changed, 15 insertions(+)
> 
> diff --git a/generic/include/clc/atomic/atomic_add.h b/generic/include/clc/atomic/atomic_add.h
> index 66d8978..7dd4fd3 100644
> --- a/generic/include/clc/atomic/atomic_add.h
> +++ b/generic/include/clc/atomic/atomic_add.h
> @@ -1,3 +1,5 @@
> #define __CLC_FUNCTION atomic_add
> #include <clc/atomic/atomic_decl.inc>
> #undef __CLC_FUNCTION
> +#undef __CLC_DECLARE_ATOMIC
> +#undef __CLC_DECLARE_ATOMIC_ADDRSPACE
> diff --git a/generic/include/clc/atomic/atomic_and.h b/generic/include/clc/atomic/atomic_and.h
> index 87898af..a198c46 100644
> --- a/generic/include/clc/atomic/atomic_and.h
> +++ b/generic/include/clc/atomic/atomic_and.h
> @@ -1,3 +1,5 @@
> #define __CLC_FUNCTION atomic_and
> #include <clc/atomic/atomic_decl.inc>
> #undef __CLC_FUNCTION
> +#undef __CLC_DECLARE_ATOMIC
> +#undef __CLC_DECLARE_ATOMIC_ADDRSPACE
> diff --git a/generic/include/clc/atomic/atomic_max.h b/generic/include/clc/atomic/atomic_max.h
> index 30dc180..ed09ec9 100644
> --- a/generic/include/clc/atomic/atomic_max.h
> +++ b/generic/include/clc/atomic/atomic_max.h
> @@ -1,3 +1,5 @@
> #define __CLC_FUNCTION atomic_max
> #include <clc/atomic/atomic_decl.inc>
> #undef __CLC_FUNCTION
> +#undef __CLC_DECLARE_ATOMIC
> +#undef __CLC_DECLARE_ATOMIC_ADDRSPACE
> diff --git a/generic/include/clc/atomic/atomic_min.h b/generic/include/clc/atomic/atomic_min.h
> index 1b731cf..6a46af4 100644
> --- a/generic/include/clc/atomic/atomic_min.h
> +++ b/generic/include/clc/atomic/atomic_min.h
> @@ -1,3 +1,5 @@
> #define __CLC_FUNCTION atomic_min
> #include <clc/atomic/atomic_decl.inc>
> #undef __CLC_FUNCTION
> +#undef __CLC_DECLARE_ATOMIC
> +#undef __CLC_DECLARE_ATOMIC_ADDRSPACE
> diff --git a/generic/include/clc/atomic/atomic_or.h b/generic/include/clc/atomic/atomic_or.h
> index b3df97a..2369d81 100644
> --- a/generic/include/clc/atomic/atomic_or.h
> +++ b/generic/include/clc/atomic/atomic_or.h
> @@ -1,3 +1,5 @@
> #define __CLC_FUNCTION atomic_or
> #include <clc/atomic/atomic_decl.inc>
> #undef __CLC_FUNCTION
> +#undef __CLC_DECLARE_ATOMIC
> +#undef __CLC_DECLARE_ATOMIC_ADDRSPACE
> diff --git a/generic/include/clc/atomic/atomic_sub.h b/generic/include/clc/atomic/atomic_sub.h
> index 576a3ab..993e995 100644
> --- a/generic/include/clc/atomic/atomic_sub.h
> +++ b/generic/include/clc/atomic/atomic_sub.h
> @@ -1,3 +1,5 @@
> #define __CLC_FUNCTION atomic_sub
> #include <clc/atomic/atomic_decl.inc>
> #undef __CLC_FUNCTION
> +#undef __CLC_DECLARE_ATOMIC
> +#undef __CLC_DECLARE_ATOMIC_ADDRSPACE
> diff --git a/generic/include/clc/atomic/atomic_xchg.h b/generic/include/clc/atomic/atomic_xchg.h
> index 7add098..ebe0d9a 100644
> --- a/generic/include/clc/atomic/atomic_xchg.h
> +++ b/generic/include/clc/atomic/atomic_xchg.h
> @@ -2,4 +2,5 @@
> #include <clc/atomic/atomic_decl.inc>
> __CLC_DECLARE_ATOMIC_ADDRSPACE(float);
> #undef __CLC_FUNCTION
> +#undef __CLC_DECLARE_ATOMIC
> #undef __CLC_DECLARE_ATOMIC_ADDRSPACE
> diff --git a/generic/include/clc/atomic/atomic_xor.h b/generic/include/clc/atomic/atomic_xor.h
> index 59aa367..2cb7480 100644
> --- a/generic/include/clc/atomic/atomic_xor.h
> +++ b/generic/include/clc/atomic/atomic_xor.h
> @@ -1,3 +1,5 @@
> #define __CLC_FUNCTION atomic_xor
> #include <clc/atomic/atomic_decl.inc>
> #undef __CLC_FUNCTION
> +#undef __CLC_DECLARE_ATOMIC
> +#undef __CLC_DECLARE_ATOMIC_ADDRSPACE
> -- 
> 1.9.1
> 





More information about the Libclc-dev mailing list