[libclc] [NFC][libclc] Rename __CLC_FUNCTION to either FUNCTION or __IMPL_FUNCTION (PR #146999)

Wenju He via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 3 22:13:38 PDT 2025


https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/146999

Rename to FUNCTION if it is for declaration, since it doesn't make much sense to use __CLC_FUNCTION for OpenCL function declaration. Rename to __IMPL_FUNCTION if it is for definition, since in some cases implementation function isn't clc_* function.

>From 01b0fa5c2ea2d83800943bf2d680a15c1f30e88d Mon Sep 17 00:00:00 2001
From: Wenju He <wenju.he at intel.com>
Date: Fri, 4 Jul 2025 12:59:20 +0800
Subject: [PATCH] [NFC][libclc] Rename __CLC_FUNCTION to either FUNCTION or
 __IMPL_FUNCTION

Rename to FUNCTION if it is for declaration, since it doesn't make much
sense to use __CLC_FUNCTION for OpenCL function declaration.
Rename to __IMPL_FUNCTION if it is for definition, since in some cases
implementation function isn't clc_* function.
---
 libclc/clc/include/clc/common/clc_degrees.h   |  4 ++--
 libclc/clc/include/clc/common/clc_radians.h   |  4 ++--
 libclc/clc/include/clc/common/clc_sign.h      |  4 ++--
 libclc/clc/include/clc/common/clc_step.h      |  4 ++--
 .../clc/include/clc/geometric/binary_decl.inc |  4 ++--
 .../clc/include/clc/geometric/binary_def.inc  |  6 +++---
 .../clc/include/clc/geometric/clc_distance.h  |  4 ++--
 libclc/clc/include/clc/geometric/clc_dot.h    |  4 ++--
 .../include/clc/geometric/clc_fast_distance.h |  4 ++--
 .../include/clc/geometric/clc_fast_length.h   |  4 ++--
 .../clc/geometric/clc_fast_normalize.h        |  4 ++--
 libclc/clc/include/clc/geometric/clc_length.h |  4 ++--
 .../clc/include/clc/geometric/clc_normalize.h |  4 ++--
 .../clc/include/clc/geometric/unary_decl.inc  |  2 +-
 .../clc/include/clc/geometric/unary_def.inc   |  6 +++---
 libclc/clc/include/clc/integer/clc_add_sat.h  |  4 ++--
 libclc/clc/include/clc/integer/clc_clz.h      |  4 ++--
 libclc/clc/include/clc/integer/clc_ctz.h      |  4 ++--
 libclc/clc/include/clc/integer/clc_hadd.h     |  4 ++--
 libclc/clc/include/clc/integer/clc_mad24.h    |  4 ++--
 libclc/clc/include/clc/integer/clc_mad_sat.h  |  4 ++--
 libclc/clc/include/clc/integer/clc_mul24.h    |  4 ++--
 libclc/clc/include/clc/integer/clc_mul_hi.h   |  4 ++--
 libclc/clc/include/clc/integer/clc_popcount.h |  4 ++--
 libclc/clc/include/clc/integer/clc_rhadd.h    |  4 ++--
 libclc/clc/include/clc/integer/clc_rotate.h   |  4 ++--
 libclc/clc/include/clc/integer/clc_sub_sat.h  |  4 ++--
 .../include/clc/internal/math/clc_sw_fma.h    |  4 ++--
 .../binary_decl_with_scalar_second_arg.inc    |  8 ++++----
 .../include/clc/math/binary_def_via_fp32.inc  |  6 +++---
 libclc/clc/include/clc/math/clc_acos.h        |  4 ++--
 libclc/clc/include/clc/math/clc_acosh.h       |  4 ++--
 libclc/clc/include/clc/math/clc_acospi.h      |  4 ++--
 libclc/clc/include/clc/math/clc_asin.h        |  4 ++--
 libclc/clc/include/clc/math/clc_asinh.h       |  4 ++--
 libclc/clc/include/clc/math/clc_asinpi.h      |  4 ++--
 libclc/clc/include/clc/math/clc_atan.h        |  4 ++--
 libclc/clc/include/clc/math/clc_atan2.h       |  4 ++--
 libclc/clc/include/clc/math/clc_atan2pi.h     |  4 ++--
 libclc/clc/include/clc/math/clc_atanh.h       |  4 ++--
 libclc/clc/include/clc/math/clc_atanpi.h      |  4 ++--
 libclc/clc/include/clc/math/clc_cbrt.inc      |  4 ++--
 libclc/clc/include/clc/math/clc_ceil.h        |  4 ++--
 libclc/clc/include/clc/math/clc_copysign.h    |  4 ++--
 libclc/clc/include/clc/math/clc_cos.h         |  4 ++--
 libclc/clc/include/clc/math/clc_cosh.h        |  4 ++--
 libclc/clc/include/clc/math/clc_cospi.h       |  4 ++--
 libclc/clc/include/clc/math/clc_erf.h         |  4 ++--
 libclc/clc/include/clc/math/clc_erfc.h        |  4 ++--
 libclc/clc/include/clc/math/clc_exp.h         |  4 ++--
 libclc/clc/include/clc/math/clc_exp10.h       |  4 ++--
 libclc/clc/include/clc/math/clc_exp2.h        |  4 ++--
 libclc/clc/include/clc/math/clc_expm1.h       |  4 ++--
 libclc/clc/include/clc/math/clc_fabs.h        |  4 ++--
 libclc/clc/include/clc/math/clc_fdim.h        |  4 ++--
 libclc/clc/include/clc/math/clc_floor.h       |  4 ++--
 libclc/clc/include/clc/math/clc_fma.h         |  4 ++--
 libclc/clc/include/clc/math/clc_fmax.h        |  4 ++--
 libclc/clc/include/clc/math/clc_fmin.h        |  4 ++--
 libclc/clc/include/clc/math/clc_fmod.h        |  4 ++--
 libclc/clc/include/clc/math/clc_fract.h       |  4 ++--
 libclc/clc/include/clc/math/clc_frexp.h       |  4 ++--
 libclc/clc/include/clc/math/clc_half_cos.h    |  4 ++--
 libclc/clc/include/clc/math/clc_half_divide.h |  4 ++--
 libclc/clc/include/clc/math/clc_half_exp.h    |  4 ++--
 libclc/clc/include/clc/math/clc_half_exp10.h  |  4 ++--
 libclc/clc/include/clc/math/clc_half_exp2.h   |  4 ++--
 libclc/clc/include/clc/math/clc_half_log.h    |  4 ++--
 libclc/clc/include/clc/math/clc_half_log10.h  |  4 ++--
 libclc/clc/include/clc/math/clc_half_log2.h   |  4 ++--
 libclc/clc/include/clc/math/clc_half_powr.h   |  4 ++--
 libclc/clc/include/clc/math/clc_half_recip.h  |  4 ++--
 libclc/clc/include/clc/math/clc_half_rsqrt.h  |  4 ++--
 libclc/clc/include/clc/math/clc_half_sin.h    |  4 ++--
 libclc/clc/include/clc/math/clc_half_sqrt.h   |  4 ++--
 libclc/clc/include/clc/math/clc_half_tan.h    |  4 ++--
 libclc/clc/include/clc/math/clc_hypot.h       |  4 ++--
 libclc/clc/include/clc/math/clc_ilogb.h       |  4 ++--
 libclc/clc/include/clc/math/clc_lgamma.h      |  4 ++--
 libclc/clc/include/clc/math/clc_lgamma_r.h    |  4 ++--
 libclc/clc/include/clc/math/clc_log.h         |  4 ++--
 libclc/clc/include/clc/math/clc_log10.h       |  4 ++--
 libclc/clc/include/clc/math/clc_log1p.h       |  4 ++--
 libclc/clc/include/clc/math/clc_log2.h        |  4 ++--
 libclc/clc/include/clc/math/clc_logb.h        |  4 ++--
 libclc/clc/include/clc/math/clc_mad.h         |  4 ++--
 libclc/clc/include/clc/math/clc_maxmag.h      |  4 ++--
 libclc/clc/include/clc/math/clc_minmag.h      |  4 ++--
 libclc/clc/include/clc/math/clc_modf.h        |  4 ++--
 libclc/clc/include/clc/math/clc_nan.h         |  4 ++--
 libclc/clc/include/clc/math/clc_native_cos.h  |  4 ++--
 .../clc/include/clc/math/clc_native_divide.h  |  4 ++--
 libclc/clc/include/clc/math/clc_native_exp.h  |  4 ++--
 .../clc/include/clc/math/clc_native_exp10.h   |  4 ++--
 libclc/clc/include/clc/math/clc_native_exp2.h |  4 ++--
 libclc/clc/include/clc/math/clc_native_log.h  |  4 ++--
 .../clc/include/clc/math/clc_native_log10.h   |  4 ++--
 libclc/clc/include/clc/math/clc_native_log2.h |  4 ++--
 libclc/clc/include/clc/math/clc_native_powr.h |  4 ++--
 .../clc/include/clc/math/clc_native_recip.h   |  4 ++--
 .../clc/include/clc/math/clc_native_rsqrt.h   |  4 ++--
 libclc/clc/include/clc/math/clc_native_sin.h  |  4 ++--
 libclc/clc/include/clc/math/clc_native_sqrt.h |  4 ++--
 libclc/clc/include/clc/math/clc_native_tan.h  |  4 ++--
 libclc/clc/include/clc/math/clc_nextafter.h   |  4 ++--
 libclc/clc/include/clc/math/clc_pow.h         |  4 ++--
 libclc/clc/include/clc/math/clc_pown.h        |  4 ++--
 libclc/clc/include/clc/math/clc_powr.h        |  4 ++--
 libclc/clc/include/clc/math/clc_remainder.h   |  4 ++--
 libclc/clc/include/clc/math/clc_remquo.h      |  4 ++--
 libclc/clc/include/clc/math/clc_rint.h        |  4 ++--
 libclc/clc/include/clc/math/clc_rootn.h       |  4 ++--
 libclc/clc/include/clc/math/clc_round.h       |  4 ++--
 libclc/clc/include/clc/math/clc_rsqrt.h       |  4 ++--
 libclc/clc/include/clc/math/clc_sin.h         |  4 ++--
 libclc/clc/include/clc/math/clc_sincos.h      |  4 ++--
 libclc/clc/include/clc/math/clc_sinh.h        |  4 ++--
 libclc/clc/include/clc/math/clc_sinpi.h       |  4 ++--
 libclc/clc/include/clc/math/clc_sqrt.h        |  4 ++--
 libclc/clc/include/clc/math/clc_tan.h         |  4 ++--
 libclc/clc/include/clc/math/clc_tanh.h        |  4 ++--
 libclc/clc/include/clc/math/clc_tanpi.h       |  4 ++--
 libclc/clc/include/clc/math/clc_tgamma.h      |  4 ++--
 libclc/clc/include/clc/math/clc_trunc.h       |  4 ++--
 libclc/clc/include/clc/math/remquo_decl.inc   | 20 ++++++++-----------
 libclc/clc/include/clc/math/unary_decl.inc    |  2 +-
 .../clc/math/unary_decl_with_int_ptr.inc      | 16 +++++++--------
 .../clc/math/unary_decl_with_int_return.inc   |  2 +-
 .../include/clc/math/unary_decl_with_ptr.inc  | 16 +++++++--------
 .../include/clc/math/unary_def_via_fp32.inc   |  4 ++--
 .../clc/math/unary_def_with_int_ptr.inc       | 12 +++++------
 .../clc/math/unary_def_with_int_return.inc    |  6 +++---
 .../include/clc/math/unary_def_with_ptr.inc   | 12 +++++------
 libclc/clc/include/clc/misc/clc_shuffle.h     |  4 ++--
 libclc/clc/include/clc/misc/clc_shuffle2.h    |  4 ++--
 libclc/clc/include/clc/misc/shuffle2_decl.inc | 16 +++++++--------
 libclc/clc/include/clc/misc/shuffle2_def.inc  | 12 +++++------
 libclc/clc/include/clc/misc/shuffle_decl.inc  |  8 ++++----
 libclc/clc/include/clc/misc/shuffle_def.inc   | 12 +++++------
 .../include/clc/relational/binary_decl.inc    |  3 +--
 .../clc/include/clc/relational/clc_isfinite.h |  4 ++--
 .../include/clc/relational/clc_isgreater.h    |  4 ++--
 .../clc/relational/clc_isgreaterequal.h       |  4 ++--
 .../clc/include/clc/relational/clc_isless.h   |  4 ++--
 .../include/clc/relational/clc_islessequal.h  |  4 ++--
 .../clc/relational/clc_islessgreater.h        |  4 ++--
 .../clc/include/clc/relational/clc_isnormal.h |  4 ++--
 .../include/clc/relational/clc_isnotequal.h   |  4 ++--
 .../include/clc/relational/clc_isordered.h    |  4 ++--
 .../include/clc/relational/clc_isunordered.h  |  4 ++--
 .../clc/include/clc/relational/clc_signbit.h  |  4 ++--
 .../clc/include/clc/relational/unary_decl.inc |  2 +-
 libclc/clc/include/clc/shared/binary_decl.inc |  4 ++--
 .../binary_decl_with_int_second_arg.inc       |  3 +--
 .../binary_decl_with_scalar_second_arg.inc    |  8 ++++----
 libclc/clc/include/clc/shared/binary_def.inc  |  6 +++---
 .../shared/binary_def_with_int_second_arg.inc |  6 +++---
 .../binary_def_with_scalar_second_arg.inc     |  8 ++++----
 .../clc/include/clc/shared/ternary_decl.inc   |  5 ++---
 libclc/clc/include/clc/shared/ternary_def.inc |  6 +++---
 libclc/clc/include/clc/shared/unary_decl.inc  |  2 +-
 libclc/clc/include/clc/shared/unary_def.inc   |  6 +++---
 libclc/clc/lib/generic/integer/clc_add_sat.cl |  2 +-
 .../clc/lib/generic/integer/clc_popcount.cl   |  2 +-
 libclc/clc/lib/generic/integer/clc_sub_sat.cl |  2 +-
 libclc/clc/lib/generic/math/clc_ceil.cl       |  2 +-
 libclc/clc/lib/generic/math/clc_copysign.cl   |  2 +-
 libclc/clc/lib/generic/math/clc_erf.cl        |  2 +-
 libclc/clc/lib/generic/math/clc_erfc.cl       |  2 +-
 libclc/clc/lib/generic/math/clc_fabs.cl       |  2 +-
 libclc/clc/lib/generic/math/clc_floor.cl      |  2 +-
 libclc/clc/lib/generic/math/clc_fmod.cl       |  2 +-
 libclc/clc/lib/generic/math/clc_half_cos.cl   |  2 +-
 libclc/clc/lib/generic/math/clc_half_exp.cl   |  2 +-
 libclc/clc/lib/generic/math/clc_half_exp10.cl |  2 +-
 libclc/clc/lib/generic/math/clc_half_exp2.cl  |  2 +-
 libclc/clc/lib/generic/math/clc_half_log.cl   |  2 +-
 libclc/clc/lib/generic/math/clc_half_log10.cl |  2 +-
 libclc/clc/lib/generic/math/clc_half_log2.cl  |  2 +-
 libclc/clc/lib/generic/math/clc_half_powr.cl  |  2 +-
 libclc/clc/lib/generic/math/clc_half_rsqrt.cl |  2 +-
 libclc/clc/lib/generic/math/clc_half_sin.cl   |  2 +-
 libclc/clc/lib/generic/math/clc_half_sqrt.cl  |  2 +-
 libclc/clc/lib/generic/math/clc_half_tan.cl   |  2 +-
 libclc/clc/lib/generic/math/clc_native_cos.cl |  2 +-
 libclc/clc/lib/generic/math/clc_native_exp.cl |  2 +-
 .../clc/lib/generic/math/clc_native_exp2.cl   |  2 +-
 libclc/clc/lib/generic/math/clc_native_log.cl |  2 +-
 .../clc/lib/generic/math/clc_native_log10.cl  |  2 +-
 .../clc/lib/generic/math/clc_native_log2.cl   |  2 +-
 libclc/clc/lib/generic/math/clc_native_sin.cl |  2 +-
 .../clc/lib/generic/math/clc_native_sqrt.cl   |  2 +-
 libclc/clc/lib/generic/math/clc_remainder.cl  |  2 +-
 libclc/clc/lib/generic/math/clc_rint.cl       |  2 +-
 libclc/clc/lib/generic/math/clc_round.cl      |  2 +-
 libclc/clc/lib/generic/math/clc_tgamma.cl     |  2 +-
 libclc/clc/lib/generic/math/clc_trunc.cl      |  2 +-
 .../include/clc/opencl/atomic/atom_add.h      |  6 +++---
 .../include/clc/opencl/atomic/atom_and.h      |  6 +++---
 .../clc/opencl/atomic/atom_decl_int32.inc     |  4 ++--
 .../clc/opencl/atomic/atom_decl_int64.inc     |  4 ++--
 .../include/clc/opencl/atomic/atom_max.h      |  6 +++---
 .../include/clc/opencl/atomic/atom_min.h      |  6 +++---
 .../include/clc/opencl/atomic/atom_or.h       |  6 +++---
 .../include/clc/opencl/atomic/atom_sub.h      |  6 +++---
 .../include/clc/opencl/atomic/atom_xchg.h     |  6 +++---
 .../include/clc/opencl/atomic/atom_xor.h      |  6 +++---
 .../include/clc/opencl/atomic/atomic_add.h    |  2 +-
 .../include/clc/opencl/atomic/atomic_and.h    |  2 +-
 .../include/clc/opencl/atomic/atomic_decl.inc |  4 ++--
 .../include/clc/opencl/atomic/atomic_max.h    |  2 +-
 .../include/clc/opencl/atomic/atomic_min.h    |  2 +-
 .../include/clc/opencl/atomic/atomic_or.h     |  2 +-
 .../include/clc/opencl/atomic/atomic_sub.h    |  2 +-
 .../include/clc/opencl/atomic/atomic_xchg.h   |  6 +++---
 .../include/clc/opencl/atomic/atomic_xor.h    |  2 +-
 .../include/clc/opencl/common/degrees.h       |  4 ++--
 .../include/clc/opencl/common/radians.h       |  4 ++--
 .../opencl/include/clc/opencl/common/sign.h   |  4 ++--
 .../include/clc/opencl/geometric/distance.h   |  4 ++--
 .../opencl/include/clc/opencl/geometric/dot.h |  4 ++--
 .../clc/opencl/geometric/fast_distance.h      |  4 ++--
 .../clc/opencl/geometric/fast_length.h        |  4 ++--
 .../clc/opencl/geometric/fast_normalize.h     |  4 ++--
 .../include/clc/opencl/geometric/length.h     |  4 ++--
 .../include/clc/opencl/geometric/normalize.h  |  4 ++--
 .../include/clc/opencl/integer/add_sat.h      |  4 ++--
 .../opencl/include/clc/opencl/integer/clz.h   |  4 ++--
 .../opencl/include/clc/opencl/integer/ctz.h   |  4 ++--
 .../opencl/include/clc/opencl/integer/hadd.h  |  4 ++--
 .../opencl/include/clc/opencl/integer/mad24.h |  4 ++--
 .../include/clc/opencl/integer/mad_hi.h       |  4 ++--
 .../include/clc/opencl/integer/mad_sat.h      |  4 ++--
 .../opencl/include/clc/opencl/integer/mul24.h |  4 ++--
 .../include/clc/opencl/integer/mul_hi.h       |  4 ++--
 .../include/clc/opencl/integer/popcount.h     |  4 ++--
 .../opencl/include/clc/opencl/integer/rhadd.h |  4 ++--
 .../include/clc/opencl/integer/rotate.h       |  4 ++--
 .../include/clc/opencl/integer/sub_sat.h      |  4 ++--
 libclc/opencl/include/clc/opencl/math/acos.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/acosh.h |  4 ++--
 .../opencl/include/clc/opencl/math/acospi.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/asin.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/asinh.h |  4 ++--
 .../opencl/include/clc/opencl/math/asinpi.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/atan.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/atan2.h |  4 ++--
 .../opencl/include/clc/opencl/math/atan2pi.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/atanh.h |  4 ++--
 .../opencl/include/clc/opencl/math/atanpi.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/cbrt.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/ceil.h  |  4 ++--
 .../opencl/include/clc/opencl/math/copysign.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/cos.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/cosh.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/cospi.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/erf.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/erfc.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/exp.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/exp10.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/exp2.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/expm1.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/fabs.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/fdim.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/floor.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/fma.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/fmax.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/fmin.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/fmod.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/fract.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/frexp.h |  4 ++--
 .../opencl/include/clc/opencl/math/half_cos.h |  4 ++--
 .../include/clc/opencl/math/half_divide.h     |  4 ++--
 .../opencl/include/clc/opencl/math/half_exp.h |  4 ++--
 .../include/clc/opencl/math/half_exp10.h      |  4 ++--
 .../include/clc/opencl/math/half_exp2.h       |  4 ++--
 .../opencl/include/clc/opencl/math/half_log.h |  4 ++--
 .../include/clc/opencl/math/half_log10.h      |  4 ++--
 .../include/clc/opencl/math/half_log2.h       |  4 ++--
 .../include/clc/opencl/math/half_powr.h       |  4 ++--
 .../include/clc/opencl/math/half_recip.h      |  4 ++--
 .../include/clc/opencl/math/half_rsqrt.h      |  4 ++--
 .../opencl/include/clc/opencl/math/half_sin.h |  4 ++--
 .../include/clc/opencl/math/half_sqrt.h       |  4 ++--
 .../opencl/include/clc/opencl/math/half_tan.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/hypot.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/ilogb.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/ldexp.h |  4 ++--
 .../opencl/include/clc/opencl/math/lgamma.h   |  4 ++--
 .../opencl/include/clc/opencl/math/lgamma_r.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/log.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/log10.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/log1p.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/log2.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/logb.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/mad.h   |  4 ++--
 .../opencl/include/clc/opencl/math/maxmag.h   |  4 ++--
 .../opencl/include/clc/opencl/math/minmag.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/modf.h  |  4 ++--
 .../include/clc/opencl/math/native_cos.h      |  4 ++--
 .../include/clc/opencl/math/native_divide.h   |  4 ++--
 .../include/clc/opencl/math/native_exp.h      |  4 ++--
 .../include/clc/opencl/math/native_exp10.h    |  4 ++--
 .../include/clc/opencl/math/native_exp2.h     |  4 ++--
 .../include/clc/opencl/math/native_log.h      |  4 ++--
 .../include/clc/opencl/math/native_log10.h    |  4 ++--
 .../include/clc/opencl/math/native_log2.h     |  4 ++--
 .../include/clc/opencl/math/native_powr.h     |  4 ++--
 .../include/clc/opencl/math/native_recip.h    |  4 ++--
 .../include/clc/opencl/math/native_rsqrt.h    |  4 ++--
 .../include/clc/opencl/math/native_sin.h      |  4 ++--
 .../include/clc/opencl/math/native_sqrt.h     |  4 ++--
 .../include/clc/opencl/math/native_tan.h      |  4 ++--
 .../include/clc/opencl/math/nextafter.h       |  4 ++--
 libclc/opencl/include/clc/opencl/math/pow.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/pown.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/powr.h  |  4 ++--
 .../include/clc/opencl/math/remainder.h       |  4 ++--
 .../opencl/include/clc/opencl/math/remquo.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/rint.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/rootn.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/round.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/rsqrt.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/sin.h   |  4 ++--
 .../opencl/include/clc/opencl/math/sincos.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/sinh.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/sinpi.h |  4 ++--
 libclc/opencl/include/clc/opencl/math/sqrt.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/tan.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/tanh.h  |  4 ++--
 libclc/opencl/include/clc/opencl/math/tanpi.h |  4 ++--
 .../opencl/include/clc/opencl/math/tgamma.h   |  4 ++--
 libclc/opencl/include/clc/opencl/math/trunc.h |  4 ++--
 .../opencl/include/clc/opencl/misc/shuffle.h  |  4 ++--
 .../opencl/include/clc/opencl/misc/shuffle2.h |  4 ++--
 .../include/clc/opencl/relational/isfinite.h  |  4 ++--
 .../include/clc/opencl/relational/isgreater.h |  4 ++--
 .../clc/opencl/relational/isgreaterequal.h    |  4 ++--
 .../include/clc/opencl/relational/isless.h    |  4 ++--
 .../clc/opencl/relational/islessequal.h       |  4 ++--
 .../clc/opencl/relational/islessgreater.h     |  4 ++--
 .../include/clc/opencl/relational/isnormal.h  |  4 ++--
 .../clc/opencl/relational/isnotequal.h        |  4 ++--
 .../include/clc/opencl/relational/isordered.h |  4 ++--
 .../clc/opencl/relational/isunordered.h       |  4 ++--
 .../include/clc/opencl/relational/signbit.h   |  4 ++--
 libclc/opencl/lib/clspv/math/fma.cl           |  2 +-
 libclc/opencl/lib/generic/math/ldexp.cl       |  2 +-
 libclc/opencl/lib/generic/math/nextafter.cl   |  2 +-
 .../lib/generic/relational/binary_def.inc     |  4 ++--
 .../lib/generic/relational/unary_def.inc      |  4 ++--
 libclc/opencl/lib/spirv/math/fma.cl           |  2 +-
 352 files changed, 716 insertions(+), 723 deletions(-)

diff --git a/libclc/clc/include/clc/common/clc_degrees.h b/libclc/clc/include/clc/common/clc_degrees.h
index 5f04fac1f2612..e633344c291c1 100644
--- a/libclc/clc/include/clc/common/clc_degrees.h
+++ b/libclc/clc/include/clc/common/clc_degrees.h
@@ -10,10 +10,10 @@
 #define __CLC_COMMON_CLC_DEGREES_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_degrees
+#define FUNCTION __clc_degrees
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_COMMON_CLC_DEGREES_H__
diff --git a/libclc/clc/include/clc/common/clc_radians.h b/libclc/clc/include/clc/common/clc_radians.h
index 03d7c4b9e3014..0b075efbcce2f 100644
--- a/libclc/clc/include/clc/common/clc_radians.h
+++ b/libclc/clc/include/clc/common/clc_radians.h
@@ -10,10 +10,10 @@
 #define __CLC_COMMON_CLC_RADIANS_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_radians
+#define FUNCTION __clc_radians
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_COMMON_CLC_RADIANS_H__
diff --git a/libclc/clc/include/clc/common/clc_sign.h b/libclc/clc/include/clc/common/clc_sign.h
index 9737f1e54441b..0a8c4cc94d80b 100644
--- a/libclc/clc/include/clc/common/clc_sign.h
+++ b/libclc/clc/include/clc/common/clc_sign.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_COMMON_CLC_SIGN_H__
 #define __CLC_COMMON_CLC_SIGN_H__
 
-#define __CLC_FUNCTION __clc_sign
+#define FUNCTION __clc_sign
 #define __CLC_BODY <clc/math/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_COMMON_CLC_SIGN_H__
diff --git a/libclc/clc/include/clc/common/clc_step.h b/libclc/clc/include/clc/common/clc_step.h
index 6b093d06896c0..96b4759cabf77 100644
--- a/libclc/clc/include/clc/common/clc_step.h
+++ b/libclc/clc/include/clc/common/clc_step.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_COMMON_CLC_STEP_H__
 #define __CLC_COMMON_CLC_STEP_H__
 
-#define __CLC_FUNCTION __clc_step
+#define FUNCTION __clc_step
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_COMMON_CLC_STEP_H__
diff --git a/libclc/clc/include/clc/geometric/binary_decl.inc b/libclc/clc/include/clc/geometric/binary_decl.inc
index 3f3aafdeae6c3..342d97a802659 100644
--- a/libclc/clc/include/clc/geometric/binary_decl.inc
+++ b/libclc/clc/include/clc/geometric/binary_decl.inc
@@ -10,7 +10,7 @@
 #if (__CLC_VECSIZE_OR_1 == 1 || __CLC_VECSIZE_OR_1 == 2 ||                     \
      __CLC_VECSIZE_OR_1 == 3 || __CLC_VECSIZE_OR_1 == 4)
 
-_CLC_OVERLOAD _CLC_DECL __CLC_SCALAR_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE a,
-                                                            __CLC_GENTYPE b);
+_CLC_OVERLOAD _CLC_DECL __CLC_SCALAR_GENTYPE FUNCTION(__CLC_GENTYPE a,
+                                                      __CLC_GENTYPE b);
 
 #endif
diff --git a/libclc/clc/include/clc/geometric/binary_def.inc b/libclc/clc/include/clc/geometric/binary_def.inc
index 8fc875a052210..ad4fa4c01683b 100644
--- a/libclc/clc/include/clc/geometric/binary_def.inc
+++ b/libclc/clc/include/clc/geometric/binary_def.inc
@@ -8,8 +8,8 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 // Geometric functions are only defined for scalar, vec2, vec3 and vec4
@@ -18,7 +18,7 @@
 
 _CLC_OVERLOAD _CLC_DEF __CLC_SCALAR_GENTYPE FUNCTION(__CLC_GENTYPE a,
                                                      __CLC_GENTYPE b) {
-  return __CLC_FUNCTION(FUNCTION)(a, b);
+  return __IMPL_FUNCTION(FUNCTION)(a, b);
 }
 
 #endif
diff --git a/libclc/clc/include/clc/geometric/clc_distance.h b/libclc/clc/include/clc/geometric/clc_distance.h
index 1acea411a08b6..666e2c881bc9a 100644
--- a/libclc/clc/include/clc/geometric/clc_distance.h
+++ b/libclc/clc/include/clc/geometric/clc_distance.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_GEOMETRIC_CLC_DISTANCE_H__
 #define __CLC_GEOMETRIC_CLC_DISTANCE_H__
 
-#define __CLC_FUNCTION __clc_distance
+#define FUNCTION __clc_distance
 #define __CLC_BODY <clc/geometric/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_GEOMETRIC_CLC_DISTANCE_H__
diff --git a/libclc/clc/include/clc/geometric/clc_dot.h b/libclc/clc/include/clc/geometric/clc_dot.h
index a5a97d1bdd2bc..4bfed6e3abc51 100644
--- a/libclc/clc/include/clc/geometric/clc_dot.h
+++ b/libclc/clc/include/clc/geometric/clc_dot.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_GEOMETRIC_CLC_DOT_H__
 #define __CLC_GEOMETRIC_CLC_DOT_H__
 
-#define __CLC_FUNCTION __clc_dot
+#define FUNCTION __clc_dot
 #define __CLC_BODY <clc/geometric/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_GEOMETRIC_CLC_DOT_H__
diff --git a/libclc/clc/include/clc/geometric/clc_fast_distance.h b/libclc/clc/include/clc/geometric/clc_fast_distance.h
index 17165e56367ca..2932d0147a6d8 100644
--- a/libclc/clc/include/clc/geometric/clc_fast_distance.h
+++ b/libclc/clc/include/clc/geometric/clc_fast_distance.h
@@ -10,11 +10,11 @@
 #define __CLC_GEOMETRIC_CLC_FAST_DISTANCE_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_fast_distance
+#define FUNCTION __clc_fast_distance
 #define __CLC_BODY <clc/geometric/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_GEOMETRIC_CLC_FAST_DISTANCE_H__
diff --git a/libclc/clc/include/clc/geometric/clc_fast_length.h b/libclc/clc/include/clc/geometric/clc_fast_length.h
index a2d533e79c0ef..903ecc8b91755 100644
--- a/libclc/clc/include/clc/geometric/clc_fast_length.h
+++ b/libclc/clc/include/clc/geometric/clc_fast_length.h
@@ -10,11 +10,11 @@
 #define __CLC_GEOMETRIC_CLC_FAST_LENGTH_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_fast_length
+#define FUNCTION __clc_fast_length
 #define __CLC_BODY <clc/geometric/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_GEOMETRIC_CLC_FAST_LENGTH_H__
diff --git a/libclc/clc/include/clc/geometric/clc_fast_normalize.h b/libclc/clc/include/clc/geometric/clc_fast_normalize.h
index a168ac1d46783..a91862fe61cb7 100644
--- a/libclc/clc/include/clc/geometric/clc_fast_normalize.h
+++ b/libclc/clc/include/clc/geometric/clc_fast_normalize.h
@@ -11,11 +11,11 @@
 
 #define __FLOAT_ONLY
 #define __CLC_GEOMETRIC_RET_GENTYPE
-#define __CLC_FUNCTION __clc_fast_normalize
+#define FUNCTION __clc_fast_normalize
 #define __CLC_BODY <clc/geometric/unary_decl.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 #undef __CLC_GEOMETRIC_RET_GENTYPE
 
 #endif // __CLC_GEOMETRIC_CLC_FAST_NORMALIZE_H__
diff --git a/libclc/clc/include/clc/geometric/clc_length.h b/libclc/clc/include/clc/geometric/clc_length.h
index f8ce12db07871..35b206e6c3fbb 100644
--- a/libclc/clc/include/clc/geometric/clc_length.h
+++ b/libclc/clc/include/clc/geometric/clc_length.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_GEOMETRIC_CLC_LENGTH_H__
 #define __CLC_GEOMETRIC_CLC_LENGTH_H__
 
-#define __CLC_FUNCTION __clc_length
+#define FUNCTION __clc_length
 #define __CLC_BODY <clc/geometric/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_GEOMETRIC_CLC_LENGTH_H__
diff --git a/libclc/clc/include/clc/geometric/clc_normalize.h b/libclc/clc/include/clc/geometric/clc_normalize.h
index 3058a72b2bbbe..745ed7f4887d1 100644
--- a/libclc/clc/include/clc/geometric/clc_normalize.h
+++ b/libclc/clc/include/clc/geometric/clc_normalize.h
@@ -10,11 +10,11 @@
 #define __CLC_GEOMETRIC_CLC_NORMALIZE_H__
 
 #define __CLC_GEOMETRIC_RET_GENTYPE
-#define __CLC_FUNCTION __clc_normalize
+#define FUNCTION __clc_normalize
 #define __CLC_BODY <clc/geometric/unary_decl.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 #undef __CLC_GEOMETRIC_RET_GENTYPE
 
 #endif // __CLC_GEOMETRIC_CLC_NORMALIZE_H__
diff --git a/libclc/clc/include/clc/geometric/unary_decl.inc b/libclc/clc/include/clc/geometric/unary_decl.inc
index 6da16d2e8abf8..cff66000fcf77 100644
--- a/libclc/clc/include/clc/geometric/unary_decl.inc
+++ b/libclc/clc/include/clc/geometric/unary_decl.inc
@@ -16,6 +16,6 @@ _CLC_OVERLOAD _CLC_DECL
 #else
     __CLC_SCALAR_GENTYPE
 #endif
-    __CLC_FUNCTION(__CLC_GENTYPE a);
+    FUNCTION(__CLC_GENTYPE a);
 
 #endif
diff --git a/libclc/clc/include/clc/geometric/unary_def.inc b/libclc/clc/include/clc/geometric/unary_def.inc
index 5bedefb662765..ea90de0ec581d 100644
--- a/libclc/clc/include/clc/geometric/unary_def.inc
+++ b/libclc/clc/include/clc/geometric/unary_def.inc
@@ -8,8 +8,8 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 // Geometric functions are only defined for scalar, vec2, vec3 and vec4
@@ -23,7 +23,7 @@ _CLC_OVERLOAD _CLC_DEF
     __CLC_SCALAR_GENTYPE
 #endif
     FUNCTION(__CLC_GENTYPE a) {
-  return __CLC_FUNCTION(FUNCTION)(a);
+  return __IMPL_FUNCTION(FUNCTION)(a);
 }
 
 #endif
diff --git a/libclc/clc/include/clc/integer/clc_add_sat.h b/libclc/clc/include/clc/integer/clc_add_sat.h
index 8c3495f6c5193..be095d38225e6 100644
--- a/libclc/clc/include/clc/integer/clc_add_sat.h
+++ b/libclc/clc/include/clc/integer/clc_add_sat.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTEGER_CLC_ADD_SAT_H__
 #define __CLC_INTEGER_CLC_ADD_SAT_H__
 
-#define __CLC_FUNCTION __clc_add_sat
+#define FUNCTION __clc_add_sat
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_ADD_SAT_H__
diff --git a/libclc/clc/include/clc/integer/clc_clz.h b/libclc/clc/include/clc/integer/clc_clz.h
index dd62cc935f8cd..3e0530bad6f11 100644
--- a/libclc/clc/include/clc/integer/clc_clz.h
+++ b/libclc/clc/include/clc/integer/clc_clz.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTEGER_CLC_CLZ_H__
 #define __CLC_INTEGER_CLC_CLZ_H__
 
-#define __CLC_FUNCTION __clc_clz
+#define FUNCTION __clc_clz
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_CLZ_H__
diff --git a/libclc/clc/include/clc/integer/clc_ctz.h b/libclc/clc/include/clc/integer/clc_ctz.h
index 3f2079e023f67..1495dc5560f1d 100644
--- a/libclc/clc/include/clc/integer/clc_ctz.h
+++ b/libclc/clc/include/clc/integer/clc_ctz.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTEGER_CLC_CTZ_H__
 #define __CLC_INTEGER_CLC_CTZ_H__
 
-#define __CLC_FUNCTION __clc_ctz
+#define FUNCTION __clc_ctz
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_CTZ_H__
diff --git a/libclc/clc/include/clc/integer/clc_hadd.h b/libclc/clc/include/clc/integer/clc_hadd.h
index 679369d3c9d4e..7aaee9b601a26 100644
--- a/libclc/clc/include/clc/integer/clc_hadd.h
+++ b/libclc/clc/include/clc/integer/clc_hadd.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTEGER_CLC_HADD_H__
 #define __CLC_INTEGER_CLC_HADD_H__
 
-#define __CLC_FUNCTION __clc_hadd
+#define FUNCTION __clc_hadd
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_HADD_H__
diff --git a/libclc/clc/include/clc/integer/clc_mad24.h b/libclc/clc/include/clc/integer/clc_mad24.h
index e19bd905d22eb..121840f81d63e 100644
--- a/libclc/clc/include/clc/integer/clc_mad24.h
+++ b/libclc/clc/include/clc/integer/clc_mad24.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTEGER_CLC_MAD24_H__
 #define __CLC_INTEGER_CLC_MAD24_H__
 
-#define __CLC_FUNCTION __clc_mad24
+#define FUNCTION __clc_mad24
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
 
 #include <clc/integer/gentype24.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_MAD24_H__
diff --git a/libclc/clc/include/clc/integer/clc_mad_sat.h b/libclc/clc/include/clc/integer/clc_mad_sat.h
index 845378b3e7c46..0c418068ca4ac 100644
--- a/libclc/clc/include/clc/integer/clc_mad_sat.h
+++ b/libclc/clc/include/clc/integer/clc_mad_sat.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTEGER_CLC_MAD_SAT_H__
 #define __CLC_INTEGER_CLC_MAD_SAT_H__
 
-#define __CLC_FUNCTION __clc_mad_sat
+#define FUNCTION __clc_mad_sat
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_MAD_SAT_H__
diff --git a/libclc/clc/include/clc/integer/clc_mul24.h b/libclc/clc/include/clc/integer/clc_mul24.h
index f813de55c71e5..9310458d59817 100644
--- a/libclc/clc/include/clc/integer/clc_mul24.h
+++ b/libclc/clc/include/clc/integer/clc_mul24.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTEGER_CLC_MUL24_H__
 #define __CLC_INTEGER_CLC_MUL24_H__
 
-#define __CLC_FUNCTION __clc_mul24
+#define FUNCTION __clc_mul24
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype24.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_MUL24_H__
diff --git a/libclc/clc/include/clc/integer/clc_mul_hi.h b/libclc/clc/include/clc/integer/clc_mul_hi.h
index e4738e5570e81..6542f237d09bc 100644
--- a/libclc/clc/include/clc/integer/clc_mul_hi.h
+++ b/libclc/clc/include/clc/integer/clc_mul_hi.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTEGER_CLC_MUL_HI_H__
 #define __CLC_INTEGER_CLC_MUL_HI_H__
 
-#define __CLC_FUNCTION __clc_mul_hi
+#define FUNCTION __clc_mul_hi
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_MUL_HI_H__
diff --git a/libclc/clc/include/clc/integer/clc_popcount.h b/libclc/clc/include/clc/integer/clc_popcount.h
index 55ca6ccfcec28..8ece2e998862d 100644
--- a/libclc/clc/include/clc/integer/clc_popcount.h
+++ b/libclc/clc/include/clc/integer/clc_popcount.h
@@ -9,12 +9,12 @@
 #ifndef __CLC_INTEGER_CLC_POPCOUNT_H__
 #define __CLC_INTEGER_CLC_POPCOUNT_H__
 
-#define __CLC_FUNCTION __clc_popcount
+#define FUNCTION __clc_popcount
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
 #undef __CLC_INTRINSIC
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_POPCOUNT_H__
diff --git a/libclc/clc/include/clc/integer/clc_rhadd.h b/libclc/clc/include/clc/integer/clc_rhadd.h
index b8b0b1a3a56ed..882f950656dfb 100644
--- a/libclc/clc/include/clc/integer/clc_rhadd.h
+++ b/libclc/clc/include/clc/integer/clc_rhadd.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTEGER_CLC_RHADD_H__
 #define __CLC_INTEGER_CLC_RHADD_H__
 
-#define __CLC_FUNCTION __clc_rhadd
+#define FUNCTION __clc_rhadd
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_RHADD_H__
diff --git a/libclc/clc/include/clc/integer/clc_rotate.h b/libclc/clc/include/clc/integer/clc_rotate.h
index 513bf98526233..61cf08788ef3b 100644
--- a/libclc/clc/include/clc/integer/clc_rotate.h
+++ b/libclc/clc/include/clc/integer/clc_rotate.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTEGER_CLC_ROTATE_H__
 #define __CLC_INTEGER_CLC_ROTATE_H__
 
-#define __CLC_FUNCTION __clc_rotate
+#define FUNCTION __clc_rotate
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_ROTATE_H__
diff --git a/libclc/clc/include/clc/integer/clc_sub_sat.h b/libclc/clc/include/clc/integer/clc_sub_sat.h
index 94a5484adefcf..1b694a4a1780a 100644
--- a/libclc/clc/include/clc/integer/clc_sub_sat.h
+++ b/libclc/clc/include/clc/integer/clc_sub_sat.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTEGER_CLC_SUB_SAT_H__
 #define __CLC_INTEGER_CLC_SUB_SAT_H__
 
-#define __CLC_FUNCTION __clc_sub_sat
+#define FUNCTION __clc_sub_sat
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTEGER_CLC_SUB_SAT_H__
diff --git a/libclc/clc/include/clc/internal/math/clc_sw_fma.h b/libclc/clc/include/clc/internal/math/clc_sw_fma.h
index 5d6c76879ceb9..8497f4efd1137 100644
--- a/libclc/clc/include/clc/internal/math/clc_sw_fma.h
+++ b/libclc/clc/include/clc/internal/math/clc_sw_fma.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_INTERNAL_MATH_CLC_SW_FMA_H__
 #define __CLC_INTERNAL_MATH_CLC_SW_FMA_H__
 
-#define __CLC_FUNCTION __clc_sw_fma
+#define FUNCTION __clc_sw_fma
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_INTERNAL_MATH_CLC_SW_FMA_H__
diff --git a/libclc/clc/include/clc/math/binary_decl_with_scalar_second_arg.inc b/libclc/clc/include/clc/math/binary_decl_with_scalar_second_arg.inc
index 6694b20a29ec0..1b2b9ff33521b 100644
--- a/libclc/clc/include/clc/math/binary_decl_with_scalar_second_arg.inc
+++ b/libclc/clc/include/clc/math/binary_decl_with_scalar_second_arg.inc
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE a,
-                                                     __CLC_GENTYPE b);
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE a,
-                                                     __CLC_SCALAR_GENTYPE b);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE a,
+                                               __CLC_GENTYPE b);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE a,
+                                               __CLC_SCALAR_GENTYPE b);
diff --git a/libclc/clc/include/clc/math/binary_def_via_fp32.inc b/libclc/clc/include/clc/math/binary_def_via_fp32.inc
index 0b4108adb0610..b53a178bf0f10 100644
--- a/libclc/clc/include/clc/math/binary_def_via_fp32.inc
+++ b/libclc/clc/include/clc/math/binary_def_via_fp32.inc
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                    __CLC_GENTYPE y) {
+_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                              __CLC_GENTYPE y) {
   return __CLC_CONVERT_GENTYPE(
-      __CLC_FUNCTION(__CLC_CONVERT_FLOATN(x), __CLC_CONVERT_FLOATN(y)));
+      FUNCTION(__CLC_CONVERT_FLOATN(x), __CLC_CONVERT_FLOATN(y)));
 }
diff --git a/libclc/clc/include/clc/math/clc_acos.h b/libclc/clc/include/clc/math/clc_acos.h
index 1d484fa5b56c9..130e3111ec1ca 100644
--- a/libclc/clc/include/clc/math/clc_acos.h
+++ b/libclc/clc/include/clc/math/clc_acos.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ACOS_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_acos
+#define FUNCTION __clc_acos
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ACOS_H__
diff --git a/libclc/clc/include/clc/math/clc_acosh.h b/libclc/clc/include/clc/math/clc_acosh.h
index 9492724bb27ba..9b8c7184b9742 100644
--- a/libclc/clc/include/clc/math/clc_acosh.h
+++ b/libclc/clc/include/clc/math/clc_acosh.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ACOSH_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_acosh
+#define FUNCTION __clc_acosh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ACOSH_H__
diff --git a/libclc/clc/include/clc/math/clc_acospi.h b/libclc/clc/include/clc/math/clc_acospi.h
index 90cfc06b7dffb..6d4dc694900a0 100644
--- a/libclc/clc/include/clc/math/clc_acospi.h
+++ b/libclc/clc/include/clc/math/clc_acospi.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ACOSPI_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_acospi
+#define FUNCTION __clc_acospi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ACOSPI_H__
diff --git a/libclc/clc/include/clc/math/clc_asin.h b/libclc/clc/include/clc/math/clc_asin.h
index f6246c49f8022..f3d69a7bf9956 100644
--- a/libclc/clc/include/clc/math/clc_asin.h
+++ b/libclc/clc/include/clc/math/clc_asin.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ASIN_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_asin
+#define FUNCTION __clc_asin
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ASIN_H__
diff --git a/libclc/clc/include/clc/math/clc_asinh.h b/libclc/clc/include/clc/math/clc_asinh.h
index 05e44fa438cee..dc4530fa68b82 100644
--- a/libclc/clc/include/clc/math/clc_asinh.h
+++ b/libclc/clc/include/clc/math/clc_asinh.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ASINH_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_asinh
+#define FUNCTION __clc_asinh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ASINH_H__
diff --git a/libclc/clc/include/clc/math/clc_asinpi.h b/libclc/clc/include/clc/math/clc_asinpi.h
index 8f308dd06022e..19d8ec3ad0c50 100644
--- a/libclc/clc/include/clc/math/clc_asinpi.h
+++ b/libclc/clc/include/clc/math/clc_asinpi.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ASINPI_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_asinpi
+#define FUNCTION __clc_asinpi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ASINPI_H__
diff --git a/libclc/clc/include/clc/math/clc_atan.h b/libclc/clc/include/clc/math/clc_atan.h
index 203e46c2b8a4a..9f10efeae976c 100644
--- a/libclc/clc/include/clc/math/clc_atan.h
+++ b/libclc/clc/include/clc/math/clc_atan.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ATAN_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_atan
+#define FUNCTION __clc_atan
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ATAN_H__
diff --git a/libclc/clc/include/clc/math/clc_atan2.h b/libclc/clc/include/clc/math/clc_atan2.h
index 6edc9dda48f4d..99bd0760f3fe8 100644
--- a/libclc/clc/include/clc/math/clc_atan2.h
+++ b/libclc/clc/include/clc/math/clc_atan2.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ATAN2_H__
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION __clc_atan2
+#define FUNCTION __clc_atan2
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ATAN2_H__
diff --git a/libclc/clc/include/clc/math/clc_atan2pi.h b/libclc/clc/include/clc/math/clc_atan2pi.h
index 2f26d1d9ae985..ae044b7bbfafb 100644
--- a/libclc/clc/include/clc/math/clc_atan2pi.h
+++ b/libclc/clc/include/clc/math/clc_atan2pi.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ATAN2PI_H__
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION __clc_atan2pi
+#define FUNCTION __clc_atan2pi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ATAN2PI_H__
diff --git a/libclc/clc/include/clc/math/clc_atanh.h b/libclc/clc/include/clc/math/clc_atanh.h
index 85f9fc53be1a6..c1a95d4acba1b 100644
--- a/libclc/clc/include/clc/math/clc_atanh.h
+++ b/libclc/clc/include/clc/math/clc_atanh.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ATANH_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_atanh
+#define FUNCTION __clc_atanh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ATANH_H__
diff --git a/libclc/clc/include/clc/math/clc_atanpi.h b/libclc/clc/include/clc/math/clc_atanpi.h
index 2b3c6b373ed42..43f752ecfe98b 100644
--- a/libclc/clc/include/clc/math/clc_atanpi.h
+++ b/libclc/clc/include/clc/math/clc_atanpi.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ATANPI_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_atanpi
+#define FUNCTION __clc_atanpi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ATANPI_H__
diff --git a/libclc/clc/include/clc/math/clc_cbrt.inc b/libclc/clc/include/clc/math/clc_cbrt.inc
index fd9b750c8fd89..019b5174a9015 100644
--- a/libclc/clc/include/clc/math/clc_cbrt.inc
+++ b/libclc/clc/include/clc/math/clc_cbrt.inc
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_CBRT_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_cbrt
+#define FUNCTION __clc_cbrt
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_CBRT_H__
diff --git a/libclc/clc/include/clc/math/clc_ceil.h b/libclc/clc/include/clc/math/clc_ceil.h
index 45668224c6176..c60b794c83c6c 100644
--- a/libclc/clc/include/clc/math/clc_ceil.h
+++ b/libclc/clc/include/clc/math/clc_ceil.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_CEIL_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_ceil
+#define FUNCTION __clc_ceil
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_CEIL_H__
diff --git a/libclc/clc/include/clc/math/clc_copysign.h b/libclc/clc/include/clc/math/clc_copysign.h
index 563dd2827839a..5976e42de250f 100644
--- a/libclc/clc/include/clc/math/clc_copysign.h
+++ b/libclc/clc/include/clc/math/clc_copysign.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_COPYSIGN_H__
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION __clc_copysign
+#define FUNCTION __clc_copysign
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_COPYSIGN_H__
diff --git a/libclc/clc/include/clc/math/clc_cos.h b/libclc/clc/include/clc/math/clc_cos.h
index 44681608efc37..3a1ae9342e265 100644
--- a/libclc/clc/include/clc/math/clc_cos.h
+++ b/libclc/clc/include/clc/math/clc_cos.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_COS_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_cos
+#define FUNCTION __clc_cos
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_COS_H__
diff --git a/libclc/clc/include/clc/math/clc_cosh.h b/libclc/clc/include/clc/math/clc_cosh.h
index 7bcfa2ea26e06..3033d76000dc0 100644
--- a/libclc/clc/include/clc/math/clc_cosh.h
+++ b/libclc/clc/include/clc/math/clc_cosh.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_COSH_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_cosh
+#define FUNCTION __clc_cosh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_COSH_H__
diff --git a/libclc/clc/include/clc/math/clc_cospi.h b/libclc/clc/include/clc/math/clc_cospi.h
index 4d82100649b01..3e4e73f096a06 100644
--- a/libclc/clc/include/clc/math/clc_cospi.h
+++ b/libclc/clc/include/clc/math/clc_cospi.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_COSPI_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_cospi
+#define FUNCTION __clc_cospi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_COSPI_H__
diff --git a/libclc/clc/include/clc/math/clc_erf.h b/libclc/clc/include/clc/math/clc_erf.h
index 01a21b36b352f..04b990c65133f 100644
--- a/libclc/clc/include/clc/math/clc_erf.h
+++ b/libclc/clc/include/clc/math/clc_erf.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ERF_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_erf
+#define FUNCTION __clc_erf
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ERF_H__
diff --git a/libclc/clc/include/clc/math/clc_erfc.h b/libclc/clc/include/clc/math/clc_erfc.h
index efd581542879f..be2578b4bfb04 100644
--- a/libclc/clc/include/clc/math/clc_erfc.h
+++ b/libclc/clc/include/clc/math/clc_erfc.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ERFC_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_erfc
+#define FUNCTION __clc_erfc
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ERFC_H__
diff --git a/libclc/clc/include/clc/math/clc_exp.h b/libclc/clc/include/clc/math/clc_exp.h
index 84369bb8fbdd6..355148934427f 100644
--- a/libclc/clc/include/clc/math/clc_exp.h
+++ b/libclc/clc/include/clc/math/clc_exp.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_EXP_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_exp
+#define FUNCTION __clc_exp
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_EXP_H__
diff --git a/libclc/clc/include/clc/math/clc_exp10.h b/libclc/clc/include/clc/math/clc_exp10.h
index 500271cb07429..c281ee84dd3a1 100644
--- a/libclc/clc/include/clc/math/clc_exp10.h
+++ b/libclc/clc/include/clc/math/clc_exp10.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_EXP10_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_exp10
+#define FUNCTION __clc_exp10
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_EXP10_H__
diff --git a/libclc/clc/include/clc/math/clc_exp2.h b/libclc/clc/include/clc/math/clc_exp2.h
index 4ad0ddea48a7c..bb10f12d34e2e 100644
--- a/libclc/clc/include/clc/math/clc_exp2.h
+++ b/libclc/clc/include/clc/math/clc_exp2.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_EXP2_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_exp2
+#define FUNCTION __clc_exp2
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_EXP2_H__
diff --git a/libclc/clc/include/clc/math/clc_expm1.h b/libclc/clc/include/clc/math/clc_expm1.h
index 5c60960ca5b03..7a199dca17cb3 100644
--- a/libclc/clc/include/clc/math/clc_expm1.h
+++ b/libclc/clc/include/clc/math/clc_expm1.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_EXPM1_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_expm1
+#define FUNCTION __clc_expm1
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_EXPM1_H__
diff --git a/libclc/clc/include/clc/math/clc_fabs.h b/libclc/clc/include/clc/math/clc_fabs.h
index 1ef38a8c75957..8af3bb572142f 100644
--- a/libclc/clc/include/clc/math/clc_fabs.h
+++ b/libclc/clc/include/clc/math/clc_fabs.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_FABS_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_fabs
+#define FUNCTION __clc_fabs
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_FABS_H__
diff --git a/libclc/clc/include/clc/math/clc_fdim.h b/libclc/clc/include/clc/math/clc_fdim.h
index 50ad045db62cf..c678eb25f59ba 100644
--- a/libclc/clc/include/clc/math/clc_fdim.h
+++ b/libclc/clc/include/clc/math/clc_fdim.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_FDIM_H__
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION __clc_fdim
+#define FUNCTION __clc_fdim
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_FDIM_H__
diff --git a/libclc/clc/include/clc/math/clc_floor.h b/libclc/clc/include/clc/math/clc_floor.h
index d243819e0a42c..b3fe8ea95ce13 100644
--- a/libclc/clc/include/clc/math/clc_floor.h
+++ b/libclc/clc/include/clc/math/clc_floor.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_FLOOR_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_floor
+#define FUNCTION __clc_floor
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_FLOOR_H__
diff --git a/libclc/clc/include/clc/math/clc_fma.h b/libclc/clc/include/clc/math/clc_fma.h
index 5e87f4c470850..efe20bd150eb5 100644
--- a/libclc/clc/include/clc/math/clc_fma.h
+++ b/libclc/clc/include/clc/math/clc_fma.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_FMA_H__
 #define __CLC_MATH_CLC_FMA_H__
 
-#define __CLC_FUNCTION __clc_fma
+#define FUNCTION __clc_fma
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_FMA_H__
diff --git a/libclc/clc/include/clc/math/clc_fmax.h b/libclc/clc/include/clc/math/clc_fmax.h
index f367a9b6ea1ca..fd5d38987ec11 100644
--- a/libclc/clc/include/clc/math/clc_fmax.h
+++ b/libclc/clc/include/clc/math/clc_fmax.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_FMAX_H__
 #define __CLC_MATH_CLC_FMAX_H__
 
-#define __CLC_FUNCTION __clc_fmax
+#define FUNCTION __clc_fmax
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_FMAX_H__
diff --git a/libclc/clc/include/clc/math/clc_fmin.h b/libclc/clc/include/clc/math/clc_fmin.h
index 47ed3fad2d8c2..9fcdb56475ff6 100644
--- a/libclc/clc/include/clc/math/clc_fmin.h
+++ b/libclc/clc/include/clc/math/clc_fmin.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_FMIN_H__
 #define __CLC_MATH_CLC_FMIN_H__
 
-#define __CLC_FUNCTION __clc_fmin
+#define FUNCTION __clc_fmin
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_FMIN_H__
diff --git a/libclc/clc/include/clc/math/clc_fmod.h b/libclc/clc/include/clc/math/clc_fmod.h
index 44179babd7fed..840bb850d73c9 100644
--- a/libclc/clc/include/clc/math/clc_fmod.h
+++ b/libclc/clc/include/clc/math/clc_fmod.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_FMOD_H__
 #define __CLC_MATH_CLC_FMOD_H__
 
-#define __CLC_FUNCTION __clc_fmod
+#define FUNCTION __clc_fmod
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_FMOD_H__
diff --git a/libclc/clc/include/clc/math/clc_fract.h b/libclc/clc/include/clc/math/clc_fract.h
index af762ecc59ea5..26c402c79641a 100644
--- a/libclc/clc/include/clc/math/clc_fract.h
+++ b/libclc/clc/include/clc/math/clc_fract.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_FRACT_H__
 #define __CLC_MATH_CLC_FRACT_H__
 
-#define __CLC_FUNCTION __clc_fract
+#define FUNCTION __clc_fract
 #define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_FRACT_H__
diff --git a/libclc/clc/include/clc/math/clc_frexp.h b/libclc/clc/include/clc/math/clc_frexp.h
index d6ed2754d0d40..e3c9f6b363dd1 100644
--- a/libclc/clc/include/clc/math/clc_frexp.h
+++ b/libclc/clc/include/clc/math/clc_frexp.h
@@ -9,10 +9,10 @@
 #ifndef __CLC_MATH_CLC_FREXP_H__
 #define __CLC_MATH_CLC_FREXP_H__
 
-#define __CLC_FUNCTION __clc_frexp
+#define FUNCTION __clc_frexp
 #define __CLC_BODY <clc/math/unary_decl_with_int_ptr.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_FREXP_H__
diff --git a/libclc/clc/include/clc/math/clc_half_cos.h b/libclc/clc/include/clc/math/clc_half_cos.h
index 4c70572c99070..0f9f0b61443f9 100644
--- a/libclc/clc/include/clc/math/clc_half_cos.h
+++ b/libclc/clc/include/clc/math/clc_half_cos.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_COS_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_cos
+#define FUNCTION __clc_half_cos
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_COS_H__
diff --git a/libclc/clc/include/clc/math/clc_half_divide.h b/libclc/clc/include/clc/math/clc_half_divide.h
index d87577e3bc201..44d90f39b4f61 100644
--- a/libclc/clc/include/clc/math/clc_half_divide.h
+++ b/libclc/clc/include/clc/math/clc_half_divide.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_DIVIDE_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_divide
+#define FUNCTION __clc_half_divide
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_DIVIDE_H__
diff --git a/libclc/clc/include/clc/math/clc_half_exp.h b/libclc/clc/include/clc/math/clc_half_exp.h
index a66f9c2ab16cb..158d28c16aabb 100644
--- a/libclc/clc/include/clc/math/clc_half_exp.h
+++ b/libclc/clc/include/clc/math/clc_half_exp.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_EXP_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_exp
+#define FUNCTION __clc_half_exp
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_EXP_H__
diff --git a/libclc/clc/include/clc/math/clc_half_exp10.h b/libclc/clc/include/clc/math/clc_half_exp10.h
index a61720af4d1b5..4982b618e505a 100644
--- a/libclc/clc/include/clc/math/clc_half_exp10.h
+++ b/libclc/clc/include/clc/math/clc_half_exp10.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_EXP10_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_exp10
+#define FUNCTION __clc_half_exp10
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_EXP10_H__
diff --git a/libclc/clc/include/clc/math/clc_half_exp2.h b/libclc/clc/include/clc/math/clc_half_exp2.h
index ca96d25f77c58..dc0f67659bf9f 100644
--- a/libclc/clc/include/clc/math/clc_half_exp2.h
+++ b/libclc/clc/include/clc/math/clc_half_exp2.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_EXP2_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_exp2
+#define FUNCTION __clc_half_exp2
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_EXP2_H__
diff --git a/libclc/clc/include/clc/math/clc_half_log.h b/libclc/clc/include/clc/math/clc_half_log.h
index 95bf1a9745605..df527e1a8fb57 100644
--- a/libclc/clc/include/clc/math/clc_half_log.h
+++ b/libclc/clc/include/clc/math/clc_half_log.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_LOG_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_log
+#define FUNCTION __clc_half_log
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_LOG_H__
diff --git a/libclc/clc/include/clc/math/clc_half_log10.h b/libclc/clc/include/clc/math/clc_half_log10.h
index 359e37ce6cf18..47db4cd325931 100644
--- a/libclc/clc/include/clc/math/clc_half_log10.h
+++ b/libclc/clc/include/clc/math/clc_half_log10.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_LOG10_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_log10
+#define FUNCTION __clc_half_log10
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_LOG10_H__
diff --git a/libclc/clc/include/clc/math/clc_half_log2.h b/libclc/clc/include/clc/math/clc_half_log2.h
index 82bfa9bd6afa6..2b95b444b3f24 100644
--- a/libclc/clc/include/clc/math/clc_half_log2.h
+++ b/libclc/clc/include/clc/math/clc_half_log2.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_LOG2_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_log2
+#define FUNCTION __clc_half_log2
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_LOG2_H__
diff --git a/libclc/clc/include/clc/math/clc_half_powr.h b/libclc/clc/include/clc/math/clc_half_powr.h
index bde0c0249abfd..2fd62213b8241 100644
--- a/libclc/clc/include/clc/math/clc_half_powr.h
+++ b/libclc/clc/include/clc/math/clc_half_powr.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_POWR_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_powr
+#define FUNCTION __clc_half_powr
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_POWR_H__
diff --git a/libclc/clc/include/clc/math/clc_half_recip.h b/libclc/clc/include/clc/math/clc_half_recip.h
index 40793cfb2aef5..d2ace8b7a17e4 100644
--- a/libclc/clc/include/clc/math/clc_half_recip.h
+++ b/libclc/clc/include/clc/math/clc_half_recip.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_RECIP_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_recip
+#define FUNCTION __clc_half_recip
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_RECIP_H__
diff --git a/libclc/clc/include/clc/math/clc_half_rsqrt.h b/libclc/clc/include/clc/math/clc_half_rsqrt.h
index c0c9971480f87..a50dabccdaafc 100644
--- a/libclc/clc/include/clc/math/clc_half_rsqrt.h
+++ b/libclc/clc/include/clc/math/clc_half_rsqrt.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_RSQRT_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_rsqrt
+#define FUNCTION __clc_half_rsqrt
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_RSQRT_H__
diff --git a/libclc/clc/include/clc/math/clc_half_sin.h b/libclc/clc/include/clc/math/clc_half_sin.h
index 022b6bbeabf16..f79f6afc2b4ec 100644
--- a/libclc/clc/include/clc/math/clc_half_sin.h
+++ b/libclc/clc/include/clc/math/clc_half_sin.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_SIN_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_sin
+#define FUNCTION __clc_half_sin
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_SIN_H__
diff --git a/libclc/clc/include/clc/math/clc_half_sqrt.h b/libclc/clc/include/clc/math/clc_half_sqrt.h
index be663c298b89c..df5fc222a5c9f 100644
--- a/libclc/clc/include/clc/math/clc_half_sqrt.h
+++ b/libclc/clc/include/clc/math/clc_half_sqrt.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_SQRT_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_sqrt
+#define FUNCTION __clc_half_sqrt
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_SQRT_H__
diff --git a/libclc/clc/include/clc/math/clc_half_tan.h b/libclc/clc/include/clc/math/clc_half_tan.h
index acb30c4e31d4e..0f6ef87907225 100644
--- a/libclc/clc/include/clc/math/clc_half_tan.h
+++ b/libclc/clc/include/clc/math/clc_half_tan.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_HALF_TAN_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_half_tan
+#define FUNCTION __clc_half_tan
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HALF_TAN_H__
diff --git a/libclc/clc/include/clc/math/clc_hypot.h b/libclc/clc/include/clc/math/clc_hypot.h
index 40b354154fa53..b2d69ebda96e2 100644
--- a/libclc/clc/include/clc/math/clc_hypot.h
+++ b/libclc/clc/include/clc/math/clc_hypot.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_HYPOT_H__
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION __clc_hypot
+#define FUNCTION __clc_hypot
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_HYPOT_H__
diff --git a/libclc/clc/include/clc/math/clc_ilogb.h b/libclc/clc/include/clc/math/clc_ilogb.h
index 6aeaf6be3ac6c..e02108ff1444b 100644
--- a/libclc/clc/include/clc/math/clc_ilogb.h
+++ b/libclc/clc/include/clc/math/clc_ilogb.h
@@ -9,10 +9,10 @@
 #ifndef __CLC_MATH_CLC_ILOGB_H__
 #define __CLC_MATH_CLC_ILOGB_H__
 
-#define __CLC_FUNCTION __clc_ilogb
+#define FUNCTION __clc_ilogb
 #define __CLC_BODY <clc/math/unary_decl_with_int_return.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ILOGB_H__
diff --git a/libclc/clc/include/clc/math/clc_lgamma.h b/libclc/clc/include/clc/math/clc_lgamma.h
index f54c5e2b61b67..69b1ff9701ca5 100644
--- a/libclc/clc/include/clc/math/clc_lgamma.h
+++ b/libclc/clc/include/clc/math/clc_lgamma.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_LGAMMA_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_lgamma
+#define FUNCTION __clc_lgamma
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_LGAMMA_H__
diff --git a/libclc/clc/include/clc/math/clc_lgamma_r.h b/libclc/clc/include/clc/math/clc_lgamma_r.h
index 262e62372227a..a98f760d8032e 100644
--- a/libclc/clc/include/clc/math/clc_lgamma_r.h
+++ b/libclc/clc/include/clc/math/clc_lgamma_r.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_LGAMMA_R_H__
 #define __CLC_MATH_CLC_LGAMMA_R_H__
 
-#define __CLC_FUNCTION __clc_lgamma_r
+#define FUNCTION __clc_lgamma_r
 #define __CLC_BODY <clc/math/unary_decl_with_int_ptr.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_LGAMMA_R_H__
diff --git a/libclc/clc/include/clc/math/clc_log.h b/libclc/clc/include/clc/math/clc_log.h
index 8b0e44b425a89..6bddb5ff746ec 100644
--- a/libclc/clc/include/clc/math/clc_log.h
+++ b/libclc/clc/include/clc/math/clc_log.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_LOG_H__
 #define __CLC_MATH_CLC_LOG_H__
 
-#define __CLC_FUNCTION __clc_log
+#define FUNCTION __clc_log
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_LOG_H__
diff --git a/libclc/clc/include/clc/math/clc_log10.h b/libclc/clc/include/clc/math/clc_log10.h
index 6e086690c6ada..e3a5b19eb4184 100644
--- a/libclc/clc/include/clc/math/clc_log10.h
+++ b/libclc/clc/include/clc/math/clc_log10.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_LOG10_H__
 #define __CLC_MATH_CLC_LOG10_H__
 
-#define __CLC_FUNCTION __clc_log10
+#define FUNCTION __clc_log10
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_LOG10_H__
diff --git a/libclc/clc/include/clc/math/clc_log1p.h b/libclc/clc/include/clc/math/clc_log1p.h
index 1be8c8548d488..f502802dafb22 100644
--- a/libclc/clc/include/clc/math/clc_log1p.h
+++ b/libclc/clc/include/clc/math/clc_log1p.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_LOG1P_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_log1p
+#define FUNCTION __clc_log1p
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_LOG1P_H__
diff --git a/libclc/clc/include/clc/math/clc_log2.h b/libclc/clc/include/clc/math/clc_log2.h
index c5f9e37f39845..7344cabaeffaa 100644
--- a/libclc/clc/include/clc/math/clc_log2.h
+++ b/libclc/clc/include/clc/math/clc_log2.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_LOG2_H__
 #define __CLC_MATH_CLC_LOG2_H__
 
-#define __CLC_FUNCTION __clc_log2
+#define FUNCTION __clc_log2
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_LOG2_H__
diff --git a/libclc/clc/include/clc/math/clc_logb.h b/libclc/clc/include/clc/math/clc_logb.h
index 75a2ce7e578b1..1339d5819171d 100644
--- a/libclc/clc/include/clc/math/clc_logb.h
+++ b/libclc/clc/include/clc/math/clc_logb.h
@@ -9,10 +9,10 @@
 #ifndef __CLC_MATH_CLC_LOGB_H__
 #define __CLC_MATH_CLC_LOGB_H__
 
-#define __CLC_FUNCTION __clc_logb
+#define FUNCTION __clc_logb
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_LOGB_H__
diff --git a/libclc/clc/include/clc/math/clc_mad.h b/libclc/clc/include/clc/math/clc_mad.h
index 117e361380eda..72014b7c0ef7b 100644
--- a/libclc/clc/include/clc/math/clc_mad.h
+++ b/libclc/clc/include/clc/math/clc_mad.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_MAD_H__
 
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
-#define __CLC_FUNCTION __clc_mad
+#define FUNCTION __clc_mad
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_MAD_H__
diff --git a/libclc/clc/include/clc/math/clc_maxmag.h b/libclc/clc/include/clc/math/clc_maxmag.h
index 857ad7867b05d..058230e6ebfc9 100644
--- a/libclc/clc/include/clc/math/clc_maxmag.h
+++ b/libclc/clc/include/clc/math/clc_maxmag.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_MAXMAG_H__
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION __clc_maxmag
+#define FUNCTION __clc_maxmag
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_MAXMAG_H__
diff --git a/libclc/clc/include/clc/math/clc_minmag.h b/libclc/clc/include/clc/math/clc_minmag.h
index 9615d029bfed2..581b957828235 100644
--- a/libclc/clc/include/clc/math/clc_minmag.h
+++ b/libclc/clc/include/clc/math/clc_minmag.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_MINMAG_H__
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION __clc_minmag
+#define FUNCTION __clc_minmag
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_MINMAG_H__
diff --git a/libclc/clc/include/clc/math/clc_modf.h b/libclc/clc/include/clc/math/clc_modf.h
index aa8f9e20892ab..fbdd3f8ffd4b8 100644
--- a/libclc/clc/include/clc/math/clc_modf.h
+++ b/libclc/clc/include/clc/math/clc_modf.h
@@ -9,10 +9,10 @@
 #ifndef __CLC_MATH_CLC_MODF_H__
 #define __CLC_MATH_CLC_MODF_H__
 
-#define __CLC_FUNCTION __clc_modf
+#define FUNCTION __clc_modf
 #define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_MODF_H__
diff --git a/libclc/clc/include/clc/math/clc_nan.h b/libclc/clc/include/clc/math/clc_nan.h
index 91901fd9369f2..45d91184cf145 100644
--- a/libclc/clc/include/clc/math/clc_nan.h
+++ b/libclc/clc/include/clc/math/clc_nan.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_NAN_H__
 #define __CLC_MATH_CLC_NAN_H__
 
-#define __CLC_FUNCTION __clc_nan
+#define FUNCTION __clc_nan
 #define __CLC_BODY <clc/math/clc_nan.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NAN_H__
diff --git a/libclc/clc/include/clc/math/clc_native_cos.h b/libclc/clc/include/clc/math/clc_native_cos.h
index bd678301fa505..08d51baca1f61 100644
--- a/libclc/clc/include/clc/math/clc_native_cos.h
+++ b/libclc/clc/include/clc/math/clc_native_cos.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_COS_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_cos
+#define FUNCTION __clc_native_cos
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_COS_H__
diff --git a/libclc/clc/include/clc/math/clc_native_divide.h b/libclc/clc/include/clc/math/clc_native_divide.h
index 1e912152cbb6c..a10ed512f10d9 100644
--- a/libclc/clc/include/clc/math/clc_native_divide.h
+++ b/libclc/clc/include/clc/math/clc_native_divide.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_DIVIDE_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_divide
+#define FUNCTION __clc_native_divide
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_DIVIDE_H__
diff --git a/libclc/clc/include/clc/math/clc_native_exp.h b/libclc/clc/include/clc/math/clc_native_exp.h
index e85d7a8b006e3..30801fe2f8ad3 100644
--- a/libclc/clc/include/clc/math/clc_native_exp.h
+++ b/libclc/clc/include/clc/math/clc_native_exp.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_EXP_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_exp
+#define FUNCTION __clc_native_exp
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_EXP_H__
diff --git a/libclc/clc/include/clc/math/clc_native_exp10.h b/libclc/clc/include/clc/math/clc_native_exp10.h
index 17213bbd2b248..91cf60ef6a2be 100644
--- a/libclc/clc/include/clc/math/clc_native_exp10.h
+++ b/libclc/clc/include/clc/math/clc_native_exp10.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_EXP10_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_exp10
+#define FUNCTION __clc_native_exp10
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_EXP10_H__
diff --git a/libclc/clc/include/clc/math/clc_native_exp2.h b/libclc/clc/include/clc/math/clc_native_exp2.h
index 2310fcd60cacf..fe47280536198 100644
--- a/libclc/clc/include/clc/math/clc_native_exp2.h
+++ b/libclc/clc/include/clc/math/clc_native_exp2.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_EXP2_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_exp2
+#define FUNCTION __clc_native_exp2
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_EXP2_H__
diff --git a/libclc/clc/include/clc/math/clc_native_log.h b/libclc/clc/include/clc/math/clc_native_log.h
index 0613e34f500c8..25a7054d2a599 100644
--- a/libclc/clc/include/clc/math/clc_native_log.h
+++ b/libclc/clc/include/clc/math/clc_native_log.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_LOG_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_log
+#define FUNCTION __clc_native_log
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_LOG_H__
diff --git a/libclc/clc/include/clc/math/clc_native_log10.h b/libclc/clc/include/clc/math/clc_native_log10.h
index 462226393c093..d46124d655ee7 100644
--- a/libclc/clc/include/clc/math/clc_native_log10.h
+++ b/libclc/clc/include/clc/math/clc_native_log10.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_LOG10_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_log10
+#define FUNCTION __clc_native_log10
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_LOG10_H__
diff --git a/libclc/clc/include/clc/math/clc_native_log2.h b/libclc/clc/include/clc/math/clc_native_log2.h
index 357ed117097f4..8998553b4984a 100644
--- a/libclc/clc/include/clc/math/clc_native_log2.h
+++ b/libclc/clc/include/clc/math/clc_native_log2.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_LOG2_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_log2
+#define FUNCTION __clc_native_log2
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_LOG2_H__
diff --git a/libclc/clc/include/clc/math/clc_native_powr.h b/libclc/clc/include/clc/math/clc_native_powr.h
index 378b9c8895ea9..932cfa66aeb9c 100644
--- a/libclc/clc/include/clc/math/clc_native_powr.h
+++ b/libclc/clc/include/clc/math/clc_native_powr.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_POWR_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_powr
+#define FUNCTION __clc_native_powr
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_POWR_H__
diff --git a/libclc/clc/include/clc/math/clc_native_recip.h b/libclc/clc/include/clc/math/clc_native_recip.h
index 8ff18012c5f02..6b94cbc3d6c6e 100644
--- a/libclc/clc/include/clc/math/clc_native_recip.h
+++ b/libclc/clc/include/clc/math/clc_native_recip.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_RECIP_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_recip
+#define FUNCTION __clc_native_recip
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_RECIP_H__
diff --git a/libclc/clc/include/clc/math/clc_native_rsqrt.h b/libclc/clc/include/clc/math/clc_native_rsqrt.h
index 91e3b87261c27..5fa870b3f868a 100644
--- a/libclc/clc/include/clc/math/clc_native_rsqrt.h
+++ b/libclc/clc/include/clc/math/clc_native_rsqrt.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_RSQRT_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_rsqrt
+#define FUNCTION __clc_native_rsqrt
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_RSQRT_H__
diff --git a/libclc/clc/include/clc/math/clc_native_sin.h b/libclc/clc/include/clc/math/clc_native_sin.h
index a2354cee90f27..d25968c74409e 100644
--- a/libclc/clc/include/clc/math/clc_native_sin.h
+++ b/libclc/clc/include/clc/math/clc_native_sin.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_SIN_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_sin
+#define FUNCTION __clc_native_sin
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_SIN_H__
diff --git a/libclc/clc/include/clc/math/clc_native_sqrt.h b/libclc/clc/include/clc/math/clc_native_sqrt.h
index 94fdfd955cedc..e8a28b7f70463 100644
--- a/libclc/clc/include/clc/math/clc_native_sqrt.h
+++ b/libclc/clc/include/clc/math/clc_native_sqrt.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_SQRT_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_sqrt
+#define FUNCTION __clc_native_sqrt
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_SQRT_H__
diff --git a/libclc/clc/include/clc/math/clc_native_tan.h b/libclc/clc/include/clc/math/clc_native_tan.h
index 3d300bb3cbcb1..36fdd6d8c011b 100644
--- a/libclc/clc/include/clc/math/clc_native_tan.h
+++ b/libclc/clc/include/clc/math/clc_native_tan.h
@@ -10,11 +10,11 @@
 #define __CLC_MATH_CLC_NATIVE_TAN_H__
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION __clc_native_tan
+#define FUNCTION __clc_native_tan
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NATIVE_TAN_H__
diff --git a/libclc/clc/include/clc/math/clc_nextafter.h b/libclc/clc/include/clc/math/clc_nextafter.h
index f24742b9e9c37..d080a40a06f03 100644
--- a/libclc/clc/include/clc/math/clc_nextafter.h
+++ b/libclc/clc/include/clc/math/clc_nextafter.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_NEXTAFTER_H__
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION __clc_nextafter
+#define FUNCTION __clc_nextafter
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_NEXTAFTER_H__
diff --git a/libclc/clc/include/clc/math/clc_pow.h b/libclc/clc/include/clc/math/clc_pow.h
index 5e37e5bf6da65..b33391e10a42a 100644
--- a/libclc/clc/include/clc/math/clc_pow.h
+++ b/libclc/clc/include/clc/math/clc_pow.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_POW_H__
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION __clc_pow
+#define FUNCTION __clc_pow
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_POW_H__
diff --git a/libclc/clc/include/clc/math/clc_pown.h b/libclc/clc/include/clc/math/clc_pown.h
index 30628efb19001..473bbe1603c52 100644
--- a/libclc/clc/include/clc/math/clc_pown.h
+++ b/libclc/clc/include/clc/math/clc_pown.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_POWN_H__
 
 #define __CLC_BODY <clc/shared/binary_decl_with_int_second_arg.inc>
-#define __CLC_FUNCTION __clc_pown
+#define FUNCTION __clc_pown
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_POWN_H__
diff --git a/libclc/clc/include/clc/math/clc_powr.h b/libclc/clc/include/clc/math/clc_powr.h
index baa494cce6989..a820516f18660 100644
--- a/libclc/clc/include/clc/math/clc_powr.h
+++ b/libclc/clc/include/clc/math/clc_powr.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_POWR_H__
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION __clc_powr
+#define FUNCTION __clc_powr
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_POWR_H__
diff --git a/libclc/clc/include/clc/math/clc_remainder.h b/libclc/clc/include/clc/math/clc_remainder.h
index a7700c95103b4..bc53b043045cd 100644
--- a/libclc/clc/include/clc/math/clc_remainder.h
+++ b/libclc/clc/include/clc/math/clc_remainder.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_REMAINDER_H__
 #define __CLC_MATH_CLC_REMAINDER_H__
 
-#define __CLC_FUNCTION __clc_remainder
+#define FUNCTION __clc_remainder
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_REMAINDER_H__
diff --git a/libclc/clc/include/clc/math/clc_remquo.h b/libclc/clc/include/clc/math/clc_remquo.h
index 48a8844a6e384..b46f94ba94477 100644
--- a/libclc/clc/include/clc/math/clc_remquo.h
+++ b/libclc/clc/include/clc/math/clc_remquo.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_MATH_CLC_REMQUO_H__
 #define __CLC_MATH_CLC_REMQUO_H__
 
-#define __CLC_FUNCTION __clc_remquo
+#define FUNCTION __clc_remquo
 #define __CLC_BODY <clc/math/remquo_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_REMQUO_H__
diff --git a/libclc/clc/include/clc/math/clc_rint.h b/libclc/clc/include/clc/math/clc_rint.h
index 17b1549f439b8..c446c75764710 100644
--- a/libclc/clc/include/clc/math/clc_rint.h
+++ b/libclc/clc/include/clc/math/clc_rint.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_RINT_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_rint
+#define FUNCTION __clc_rint
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_RINT_H__
diff --git a/libclc/clc/include/clc/math/clc_rootn.h b/libclc/clc/include/clc/math/clc_rootn.h
index 90a25ad52d867..fb7817ee250fd 100644
--- a/libclc/clc/include/clc/math/clc_rootn.h
+++ b/libclc/clc/include/clc/math/clc_rootn.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ROOTN_H__
 
 #define __CLC_BODY <clc/shared/binary_decl_with_int_second_arg.inc>
-#define __CLC_FUNCTION __clc_rootn
+#define FUNCTION __clc_rootn
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ROOTN_H__
diff --git a/libclc/clc/include/clc/math/clc_round.h b/libclc/clc/include/clc/math/clc_round.h
index 78ebf4db99e9f..fd1872a5cf224 100644
--- a/libclc/clc/include/clc/math/clc_round.h
+++ b/libclc/clc/include/clc/math/clc_round.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_ROUND_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_round
+#define FUNCTION __clc_round
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_ROUND_H__
diff --git a/libclc/clc/include/clc/math/clc_rsqrt.h b/libclc/clc/include/clc/math/clc_rsqrt.h
index 59402fbead2b2..1690ede1b8926 100644
--- a/libclc/clc/include/clc/math/clc_rsqrt.h
+++ b/libclc/clc/include/clc/math/clc_rsqrt.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_RSQRT_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_rsqrt
+#define FUNCTION __clc_rsqrt
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_RSQRT_H__
diff --git a/libclc/clc/include/clc/math/clc_sin.h b/libclc/clc/include/clc/math/clc_sin.h
index de4c722ca123f..89ae444eb6e30 100644
--- a/libclc/clc/include/clc/math/clc_sin.h
+++ b/libclc/clc/include/clc/math/clc_sin.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_SIN_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_sin
+#define FUNCTION __clc_sin
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_SIN_H__
diff --git a/libclc/clc/include/clc/math/clc_sincos.h b/libclc/clc/include/clc/math/clc_sincos.h
index e26dc7c024c9c..bf3e0806db381 100644
--- a/libclc/clc/include/clc/math/clc_sincos.h
+++ b/libclc/clc/include/clc/math/clc_sincos.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_SINCOS_H__
 
 #define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
-#define __CLC_FUNCTION __clc_sincos
+#define FUNCTION __clc_sincos
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_SINCOS_H__
diff --git a/libclc/clc/include/clc/math/clc_sinh.h b/libclc/clc/include/clc/math/clc_sinh.h
index fa9cabe79cb0e..c94d8e37acc64 100644
--- a/libclc/clc/include/clc/math/clc_sinh.h
+++ b/libclc/clc/include/clc/math/clc_sinh.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_SINH_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_sinh
+#define FUNCTION __clc_sinh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_SINH_H__
diff --git a/libclc/clc/include/clc/math/clc_sinpi.h b/libclc/clc/include/clc/math/clc_sinpi.h
index db563c2e7e14a..725e559600edd 100644
--- a/libclc/clc/include/clc/math/clc_sinpi.h
+++ b/libclc/clc/include/clc/math/clc_sinpi.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_SINPI_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_sinpi
+#define FUNCTION __clc_sinpi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_SINPI_H__
diff --git a/libclc/clc/include/clc/math/clc_sqrt.h b/libclc/clc/include/clc/math/clc_sqrt.h
index 7084515533291..74aea8e858099 100644
--- a/libclc/clc/include/clc/math/clc_sqrt.h
+++ b/libclc/clc/include/clc/math/clc_sqrt.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_SQRT_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_sqrt
+#define FUNCTION __clc_sqrt
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_SQRT_H__
diff --git a/libclc/clc/include/clc/math/clc_tan.h b/libclc/clc/include/clc/math/clc_tan.h
index 028ff28ecd69d..d16370420a030 100644
--- a/libclc/clc/include/clc/math/clc_tan.h
+++ b/libclc/clc/include/clc/math/clc_tan.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_TAN_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_tan
+#define FUNCTION __clc_tan
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_TAN_H__
diff --git a/libclc/clc/include/clc/math/clc_tanh.h b/libclc/clc/include/clc/math/clc_tanh.h
index 88fce2340d99b..2c860c165ca67 100644
--- a/libclc/clc/include/clc/math/clc_tanh.h
+++ b/libclc/clc/include/clc/math/clc_tanh.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_TANH_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_tanh
+#define FUNCTION __clc_tanh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_TANH_H__
diff --git a/libclc/clc/include/clc/math/clc_tanpi.h b/libclc/clc/include/clc/math/clc_tanpi.h
index 596bb72b4b8de..2691fa696c0a5 100644
--- a/libclc/clc/include/clc/math/clc_tanpi.h
+++ b/libclc/clc/include/clc/math/clc_tanpi.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_TANPI_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_tanpi
+#define FUNCTION __clc_tanpi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_TANPI_H__
diff --git a/libclc/clc/include/clc/math/clc_tgamma.h b/libclc/clc/include/clc/math/clc_tgamma.h
index dd76e041875d5..d067703c2e9df 100644
--- a/libclc/clc/include/clc/math/clc_tgamma.h
+++ b/libclc/clc/include/clc/math/clc_tgamma.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_TGAMMA_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_tgamma
+#define FUNCTION __clc_tgamma
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_TGAMMA_H__
diff --git a/libclc/clc/include/clc/math/clc_trunc.h b/libclc/clc/include/clc/math/clc_trunc.h
index 33445f9fe15d6..6a8353a4f6d45 100644
--- a/libclc/clc/include/clc/math/clc_trunc.h
+++ b/libclc/clc/include/clc/math/clc_trunc.h
@@ -10,10 +10,10 @@
 #define __CLC_MATH_CLC_TRUNC_H__
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION __clc_trunc
+#define FUNCTION __clc_trunc
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MATH_CLC_TRUNC_H__
diff --git a/libclc/clc/include/clc/math/remquo_decl.inc b/libclc/clc/include/clc/math/remquo_decl.inc
index cba28a7244eb4..24d96b0488059 100644
--- a/libclc/clc/include/clc/math/remquo_decl.inc
+++ b/libclc/clc/include/clc/math/remquo_decl.inc
@@ -6,19 +6,15 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     __CLC_GENTYPE y,
-                                                     private __CLC_INTN *q);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x, __CLC_GENTYPE y,
+                                               private __CLC_INTN *q);
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     __CLC_GENTYPE y,
-                                                     global __CLC_INTN *q);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x, __CLC_GENTYPE y,
+                                               global __CLC_INTN *q);
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     __CLC_GENTYPE y,
-                                                     local __CLC_INTN *q);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x, __CLC_GENTYPE y,
+                                               local __CLC_INTN *q);
 #if _CLC_GENERIC_AS_SUPPORTED
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     __CLC_GENTYPE y,
-                                                     generic __CLC_INTN *q);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x, __CLC_GENTYPE y,
+                                               generic __CLC_INTN *q);
 #endif
diff --git a/libclc/clc/include/clc/math/unary_decl.inc b/libclc/clc/include/clc/math/unary_decl.inc
index 5d742de00b711..ce1a71b8284aa 100644
--- a/libclc/clc/include/clc/math/unary_decl.inc
+++ b/libclc/clc/include/clc/math/unary_decl.inc
@@ -6,4 +6,4 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x);
diff --git a/libclc/clc/include/clc/math/unary_decl_with_int_ptr.inc b/libclc/clc/include/clc/math/unary_decl_with_int_ptr.inc
index 8bfe17c3c6817..d62046a5292cd 100644
--- a/libclc/clc/include/clc/math/unary_decl_with_int_ptr.inc
+++ b/libclc/clc/include/clc/math/unary_decl_with_int_ptr.inc
@@ -6,13 +6,13 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     global __CLC_INTN *iptr);
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     local __CLC_INTN *iptr);
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     private __CLC_INTN *iptr);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                               global __CLC_INTN *iptr);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                               local __CLC_INTN *iptr);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                               private __CLC_INTN *iptr);
 #if _CLC_GENERIC_AS_SUPPORTED
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     generic __CLC_INTN *iptr);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                               generic __CLC_INTN *iptr);
 #endif
diff --git a/libclc/clc/include/clc/math/unary_decl_with_int_return.inc b/libclc/clc/include/clc/math/unary_decl_with_int_return.inc
index 333a752ced39e..ed8d0a12506f2 100644
--- a/libclc/clc/include/clc/math/unary_decl_with_int_return.inc
+++ b/libclc/clc/include/clc/math/unary_decl_with_int_return.inc
@@ -6,4 +6,4 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_INTN __CLC_FUNCTION(__CLC_GENTYPE x);
+_CLC_OVERLOAD _CLC_DECL __CLC_INTN FUNCTION(__CLC_GENTYPE x);
diff --git a/libclc/clc/include/clc/math/unary_decl_with_ptr.inc b/libclc/clc/include/clc/math/unary_decl_with_ptr.inc
index 63a20e3d21c5d..ca0077bec558f 100644
--- a/libclc/clc/include/clc/math/unary_decl_with_ptr.inc
+++ b/libclc/clc/include/clc/math/unary_decl_with_ptr.inc
@@ -6,14 +6,14 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     global __CLC_GENTYPE *ptr);
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     local __CLC_GENTYPE *ptr);
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
-__CLC_FUNCTION(__CLC_GENTYPE x, private __CLC_GENTYPE *ptr);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                               global __CLC_GENTYPE *ptr);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                               local __CLC_GENTYPE *ptr);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                               private __CLC_GENTYPE *ptr);
 
 #if _CLC_GENERIC_AS_SUPPORTED
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
-__CLC_FUNCTION(__CLC_GENTYPE x, generic __CLC_GENTYPE *ptr);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                               generic __CLC_GENTYPE *ptr);
 #endif
diff --git a/libclc/clc/include/clc/math/unary_def_via_fp32.inc b/libclc/clc/include/clc/math/unary_def_via_fp32.inc
index aefee6170571d..f109e8ec4a111 100644
--- a/libclc/clc/include/clc/math/unary_def_via_fp32.inc
+++ b/libclc/clc/include/clc/math/unary_def_via_fp32.inc
@@ -6,6 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x) {
-  return __CLC_CONVERT_GENTYPE(__CLC_FUNCTION(__CLC_CONVERT_FLOATN(x)));
+_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x) {
+  return __CLC_CONVERT_GENTYPE(FUNCTION(__CLC_CONVERT_FLOATN(x)));
 }
diff --git a/libclc/clc/include/clc/math/unary_def_with_int_ptr.inc b/libclc/clc/include/clc/math/unary_def_with_int_ptr.inc
index 464c6ffc7c8ca..a8ed34ad04bbf 100644
--- a/libclc/clc/include/clc/math/unary_def_with_int_ptr.inc
+++ b/libclc/clc/include/clc/math/unary_def_with_int_ptr.inc
@@ -8,28 +8,28 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
                                               private __CLC_INTN *iptr) {
-  return __CLC_FUNCTION(FUNCTION)(x, iptr);
+  return __IMPL_FUNCTION(FUNCTION)(x, iptr);
 }
 
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
                                               global __CLC_INTN *iptr) {
-  return __CLC_FUNCTION(FUNCTION)(x, iptr);
+  return __IMPL_FUNCTION(FUNCTION)(x, iptr);
 }
 
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
                                               local __CLC_INTN *iptr) {
-  return __CLC_FUNCTION(FUNCTION)(x, iptr);
+  return __IMPL_FUNCTION(FUNCTION)(x, iptr);
 }
 
 #if _CLC_DISTINCT_GENERIC_AS_SUPPORTED
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
                                               generic __CLC_INTN *iptr) {
-  return __CLC_FUNCTION(FUNCTION)(x, iptr);
+  return __IMPL_FUNCTION(FUNCTION)(x, iptr);
 }
 #endif
diff --git a/libclc/clc/include/clc/math/unary_def_with_int_return.inc b/libclc/clc/include/clc/math/unary_def_with_int_return.inc
index 33be58bf45842..c7bb84cf5f7c8 100644
--- a/libclc/clc/include/clc/math/unary_def_with_int_return.inc
+++ b/libclc/clc/include/clc/math/unary_def_with_int_return.inc
@@ -8,10 +8,10 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 _CLC_OVERLOAD _CLC_DEF __CLC_INTN FUNCTION(__CLC_GENTYPE a) {
-  return __CLC_FUNCTION(FUNCTION)(a);
+  return __IMPL_FUNCTION(FUNCTION)(a);
 }
diff --git a/libclc/clc/include/clc/math/unary_def_with_ptr.inc b/libclc/clc/include/clc/math/unary_def_with_ptr.inc
index fecec80dde834..c3faa9aab87c9 100644
--- a/libclc/clc/include/clc/math/unary_def_with_ptr.inc
+++ b/libclc/clc/include/clc/math/unary_def_with_ptr.inc
@@ -8,28 +8,28 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
                                               private __CLC_GENTYPE *ptr) {
-  return __CLC_FUNCTION(FUNCTION)(x, ptr);
+  return __IMPL_FUNCTION(FUNCTION)(x, ptr);
 }
 
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
                                               global __CLC_GENTYPE *ptr) {
-  return __CLC_FUNCTION(FUNCTION)(x, ptr);
+  return __IMPL_FUNCTION(FUNCTION)(x, ptr);
 }
 
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
                                               local __CLC_GENTYPE *ptr) {
-  return __CLC_FUNCTION(FUNCTION)(x, ptr);
+  return __IMPL_FUNCTION(FUNCTION)(x, ptr);
 }
 
 #if _CLC_DISTINCT_GENERIC_AS_SUPPORTED
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
                                               generic __CLC_GENTYPE *ptr) {
-  return __CLC_FUNCTION(FUNCTION)(x, ptr);
+  return __IMPL_FUNCTION(FUNCTION)(x, ptr);
 }
 #endif
diff --git a/libclc/clc/include/clc/misc/clc_shuffle.h b/libclc/clc/include/clc/misc/clc_shuffle.h
index ba3d7a2bddd62..1e9ec6828f95a 100644
--- a/libclc/clc/include/clc/misc/clc_shuffle.h
+++ b/libclc/clc/include/clc/misc/clc_shuffle.h
@@ -9,7 +9,7 @@
 #ifndef __CLC_MISC_CLC_SHUFFLE_H__
 #define __CLC_MISC_CLC_SHUFFLE_H__
 
-#define __CLC_FUNCTION __clc_shuffle
+#define FUNCTION __clc_shuffle
 
 // Integer-type decls
 #define __CLC_BODY <clc/misc/shuffle_decl.inc>
@@ -19,6 +19,6 @@
 #define __CLC_BODY <clc/misc/shuffle_decl.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MISC_CLC_SHUFFLE_H__
diff --git a/libclc/clc/include/clc/misc/clc_shuffle2.h b/libclc/clc/include/clc/misc/clc_shuffle2.h
index 84bafba12b211..fb5361cfeb95a 100644
--- a/libclc/clc/include/clc/misc/clc_shuffle2.h
+++ b/libclc/clc/include/clc/misc/clc_shuffle2.h
@@ -9,7 +9,7 @@
 #ifndef __CLC_MISC_CLC_SHUFFLE2_H__
 #define __CLC_MISC_CLC_SHUFFLE2_H__
 
-#define __CLC_FUNCTION __clc_shuffle2
+#define FUNCTION __clc_shuffle2
 
 // Integer-type decls
 #define __CLC_BODY <clc/misc/shuffle2_decl.inc>
@@ -19,6 +19,6 @@
 #define __CLC_BODY <clc/misc/shuffle2_decl.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_MISC_CLC_SHUFFLE2_H__
diff --git a/libclc/clc/include/clc/misc/shuffle2_decl.inc b/libclc/clc/include/clc/misc/shuffle2_decl.inc
index 2fc992ef2c177..47fd5e28a3142 100644
--- a/libclc/clc/include/clc/misc/shuffle2_decl.inc
+++ b/libclc/clc/include/clc/misc/shuffle2_decl.inc
@@ -13,16 +13,16 @@
 // size as the mask. Elements in the mask must be the same size (number of bits)
 // as the input value., e.g. char8 ret = shuffle(char2 x, uchar8 mask);
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
-__CLC_FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 2) x,
-               __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 2) y, __CLC_U_GENTYPE mask);
+FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 2) x,
+         __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 2) y, __CLC_U_GENTYPE mask);
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
-__CLC_FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 4) x,
-               __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 4) y, __CLC_U_GENTYPE mask);
+FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 4) x,
+         __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 4) y, __CLC_U_GENTYPE mask);
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
-__CLC_FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 8) x,
-               __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 8) y, __CLC_U_GENTYPE mask);
+FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 8) x,
+         __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 8) y, __CLC_U_GENTYPE mask);
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
-__CLC_FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 16) x,
-               __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 16) y, __CLC_U_GENTYPE mask);
+FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 16) x,
+         __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 16) y, __CLC_U_GENTYPE mask);
 
 #endif
diff --git a/libclc/clc/include/clc/misc/shuffle2_def.inc b/libclc/clc/include/clc/misc/shuffle2_def.inc
index 099a175d665dd..0415b8c187291 100644
--- a/libclc/clc/include/clc/misc/shuffle2_def.inc
+++ b/libclc/clc/include/clc/misc/shuffle2_def.inc
@@ -11,8 +11,8 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 // The return type is same base type as the input type, with the same vector
@@ -21,22 +21,22 @@
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
 FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 2) x,
          __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 2) y, __CLC_U_GENTYPE mask) {
-  return __CLC_FUNCTION(FUNCTION)(x, y, mask);
+  return __IMPL_FUNCTION(FUNCTION)(x, y, mask);
 }
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
 FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 4) x,
          __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 4) y, __CLC_U_GENTYPE mask) {
-  return __CLC_FUNCTION(FUNCTION)(x, y, mask);
+  return __IMPL_FUNCTION(FUNCTION)(x, y, mask);
 }
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
 FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 8) x,
          __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 8) y, __CLC_U_GENTYPE mask) {
-  return __CLC_FUNCTION(FUNCTION)(x, y, mask);
+  return __IMPL_FUNCTION(FUNCTION)(x, y, mask);
 }
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
 FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 16) x,
          __CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 16) y, __CLC_U_GENTYPE mask) {
-  return __CLC_FUNCTION(FUNCTION)(x, y, mask);
+  return __IMPL_FUNCTION(FUNCTION)(x, y, mask);
 }
 
 #endif
diff --git a/libclc/clc/include/clc/misc/shuffle_decl.inc b/libclc/clc/include/clc/misc/shuffle_decl.inc
index 5e7e5b24c2873..c6c64d5b5fede 100644
--- a/libclc/clc/include/clc/misc/shuffle_decl.inc
+++ b/libclc/clc/include/clc/misc/shuffle_decl.inc
@@ -13,12 +13,12 @@
 // size as the mask. Elements in the mask must be the same size (number of bits)
 // as the input value., e.g. char8 ret = shuffle(char2 x, uchar8 mask);
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
-__CLC_FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 2) x, __CLC_U_GENTYPE mask);
+FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 2) x, __CLC_U_GENTYPE mask);
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
-__CLC_FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 4) x, __CLC_U_GENTYPE mask);
+FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 4) x, __CLC_U_GENTYPE mask);
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
-__CLC_FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 8) x, __CLC_U_GENTYPE mask);
+FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 8) x, __CLC_U_GENTYPE mask);
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
-__CLC_FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 16) x, __CLC_U_GENTYPE mask);
+FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 16) x, __CLC_U_GENTYPE mask);
 
 #endif
diff --git a/libclc/clc/include/clc/misc/shuffle_def.inc b/libclc/clc/include/clc/misc/shuffle_def.inc
index 84c873e6458ec..d2a088498fc6c 100644
--- a/libclc/clc/include/clc/misc/shuffle_def.inc
+++ b/libclc/clc/include/clc/misc/shuffle_def.inc
@@ -11,8 +11,8 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 // The return type is same base type as the input type, with the same vector
@@ -20,19 +20,19 @@
 // as the input value., e.g. char8 ret = shuffle(char2 x, uchar8 mask);
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
 FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 2) x, __CLC_U_GENTYPE mask) {
-  return __CLC_FUNCTION(FUNCTION)(x, mask);
+  return __IMPL_FUNCTION(FUNCTION)(x, mask);
 }
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
 FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 4) x, __CLC_U_GENTYPE mask) {
-  return __CLC_FUNCTION(FUNCTION)(x, mask);
+  return __IMPL_FUNCTION(FUNCTION)(x, mask);
 }
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
 FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 8) x, __CLC_U_GENTYPE mask) {
-  return __CLC_FUNCTION(FUNCTION)(x, mask);
+  return __IMPL_FUNCTION(FUNCTION)(x, mask);
 }
 _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE
 FUNCTION(__CLC_XCONCAT(__CLC_SCALAR_GENTYPE, 16) x, __CLC_U_GENTYPE mask) {
-  return __CLC_FUNCTION(FUNCTION)(x, mask);
+  return __IMPL_FUNCTION(FUNCTION)(x, mask);
 }
 
 #endif
diff --git a/libclc/clc/include/clc/relational/binary_decl.inc b/libclc/clc/include/clc/relational/binary_decl.inc
index b82fb85d9742c..bcdf5238b8f58 100644
--- a/libclc/clc/include/clc/relational/binary_decl.inc
+++ b/libclc/clc/include/clc/relational/binary_decl.inc
@@ -6,5 +6,4 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_INTN __CLC_FUNCTION(__CLC_FLOATN a,
-                                                  __CLC_FLOATN b);
+_CLC_OVERLOAD _CLC_DECL __CLC_INTN FUNCTION(__CLC_FLOATN a, __CLC_FLOATN b);
diff --git a/libclc/clc/include/clc/relational/clc_isfinite.h b/libclc/clc/include/clc/relational/clc_isfinite.h
index 37483edd37613..5e71ec7a0640a 100644
--- a/libclc/clc/include/clc/relational/clc_isfinite.h
+++ b/libclc/clc/include/clc/relational/clc_isfinite.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_RELATIONAL_CLC_ISFINITE_H__
 #define __CLC_RELATIONAL_CLC_ISFINITE_H__
 
-#define __CLC_FUNCTION __clc_isfinite
+#define FUNCTION __clc_isfinite
 #define __CLC_BODY <clc/relational/unary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_RELATIONAL_CLC_ISFINITE_H__
diff --git a/libclc/clc/include/clc/relational/clc_isgreater.h b/libclc/clc/include/clc/relational/clc_isgreater.h
index 4ce18ee631712..e2e6911a80cdd 100644
--- a/libclc/clc/include/clc/relational/clc_isgreater.h
+++ b/libclc/clc/include/clc/relational/clc_isgreater.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_RELATIONAL_CLC_ISGREATER_H__
 #define __CLC_RELATIONAL_CLC_ISGREATER_H__
 
-#define __CLC_FUNCTION __clc_isgreater
+#define FUNCTION __clc_isgreater
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_RELATIONAL_CLC_ISGREATER_H__
diff --git a/libclc/clc/include/clc/relational/clc_isgreaterequal.h b/libclc/clc/include/clc/relational/clc_isgreaterequal.h
index c0a430cc61e97..3fe8835aff9d5 100644
--- a/libclc/clc/include/clc/relational/clc_isgreaterequal.h
+++ b/libclc/clc/include/clc/relational/clc_isgreaterequal.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_RELATIONAL_CLC_ISGREATEREQUAL_H__
 #define __CLC_RELATIONAL_CLC_ISGREATEREQUAL_H__
 
-#define __CLC_FUNCTION __clc_isgreaterequal
+#define FUNCTION __clc_isgreaterequal
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_RELATIONAL_CLC_ISGREATEREQUAL_H__
diff --git a/libclc/clc/include/clc/relational/clc_isless.h b/libclc/clc/include/clc/relational/clc_isless.h
index e680793970620..01384cf6fa4a0 100644
--- a/libclc/clc/include/clc/relational/clc_isless.h
+++ b/libclc/clc/include/clc/relational/clc_isless.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_RELATIONAL_CLC_ISLESS_H__
 #define __CLC_RELATIONAL_CLC_ISLESS_H__
 
-#define __CLC_FUNCTION __clc_isless
+#define FUNCTION __clc_isless
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_RELATIONAL_CLC_ISLESS_H__
diff --git a/libclc/clc/include/clc/relational/clc_islessequal.h b/libclc/clc/include/clc/relational/clc_islessequal.h
index 8e95d04bf4752..a4b77a451b248 100644
--- a/libclc/clc/include/clc/relational/clc_islessequal.h
+++ b/libclc/clc/include/clc/relational/clc_islessequal.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_RELATIONAL_CLC_ISLESSEQUAL_H__
 #define __CLC_RELATIONAL_CLC_ISLESSEQUAL_H__
 
-#define __CLC_FUNCTION __clc_islessequal
+#define FUNCTION __clc_islessequal
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_RELATIONAL_CLC_ISLESSEQUAL_H__
diff --git a/libclc/clc/include/clc/relational/clc_islessgreater.h b/libclc/clc/include/clc/relational/clc_islessgreater.h
index 69c43e40b463e..9fb6d641bfa14 100644
--- a/libclc/clc/include/clc/relational/clc_islessgreater.h
+++ b/libclc/clc/include/clc/relational/clc_islessgreater.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_RELATIONAL_CLC_ISLESSGREATER_H__
 #define __CLC_RELATIONAL_CLC_ISLESSGREATER_H__
 
-#define __CLC_FUNCTION __clc_islessgreater
+#define FUNCTION __clc_islessgreater
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_RELATIONAL_CLC_ISLESSGREATER_H__
diff --git a/libclc/clc/include/clc/relational/clc_isnormal.h b/libclc/clc/include/clc/relational/clc_isnormal.h
index 4fee10a022444..d580fed5a7395 100644
--- a/libclc/clc/include/clc/relational/clc_isnormal.h
+++ b/libclc/clc/include/clc/relational/clc_isnormal.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_RELATIONAL_CLC_ISNORMAL_H__
 #define __CLC_RELATIONAL_CLC_ISNORMAL_H__
 
-#define __CLC_FUNCTION __clc_isnormal
+#define FUNCTION __clc_isnormal
 #define __CLC_BODY <clc/relational/unary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_RELATIONAL_CLC_ISNORMAL_H__
diff --git a/libclc/clc/include/clc/relational/clc_isnotequal.h b/libclc/clc/include/clc/relational/clc_isnotequal.h
index 3aac82cfb9387..16982fc3c5aaa 100644
--- a/libclc/clc/include/clc/relational/clc_isnotequal.h
+++ b/libclc/clc/include/clc/relational/clc_isnotequal.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_RELATIONAL_CLC_ISNOTEQUAL_H__
 #define __CLC_RELATIONAL_CLC_ISNOTEQUAL_H__
 
-#define __CLC_FUNCTION __clc_isnotequal
+#define FUNCTION __clc_isnotequal
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_RELATIONAL_CLC_ISNOTEQUAL_H__
diff --git a/libclc/clc/include/clc/relational/clc_isordered.h b/libclc/clc/include/clc/relational/clc_isordered.h
index 20b5adb0cce72..7ba26662105fc 100644
--- a/libclc/clc/include/clc/relational/clc_isordered.h
+++ b/libclc/clc/include/clc/relational/clc_isordered.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_RELATIONAL_CLC_ISORDERED_H__
 #define __CLC_RELATIONAL_CLC_ISORDERED_H__
 
-#define __CLC_FUNCTION __clc_isordered
+#define FUNCTION __clc_isordered
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_RELATIONAL_CLC_ISORDERED_H__
diff --git a/libclc/clc/include/clc/relational/clc_isunordered.h b/libclc/clc/include/clc/relational/clc_isunordered.h
index 7e693233ba344..eac158d245191 100644
--- a/libclc/clc/include/clc/relational/clc_isunordered.h
+++ b/libclc/clc/include/clc/relational/clc_isunordered.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_RELATIONAL_CLC_ISUNORDERED_H__
 #define __CLC_RELATIONAL_CLC_ISUNORDERED_H__
 
-#define __CLC_FUNCTION __clc_isunordered
+#define FUNCTION __clc_isunordered
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_RELATIONAL_CLC_ISUNORDERED_H__
diff --git a/libclc/clc/include/clc/relational/clc_signbit.h b/libclc/clc/include/clc/relational/clc_signbit.h
index 55159c9cc56d1..892263a09e99c 100644
--- a/libclc/clc/include/clc/relational/clc_signbit.h
+++ b/libclc/clc/include/clc/relational/clc_signbit.h
@@ -9,11 +9,11 @@
 #ifndef __CLC_RELATIONAL_CLC_SIGNBIT_H__
 #define __CLC_RELATIONAL_CLC_SIGNBIT_H__
 
-#define __CLC_FUNCTION __clc_signbit
+#define FUNCTION __clc_signbit
 #define __CLC_BODY <clc/relational/unary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __CLC_RELATIONAL_CLC_SIGNBIT_H__
diff --git a/libclc/clc/include/clc/relational/unary_decl.inc b/libclc/clc/include/clc/relational/unary_decl.inc
index cff02d0cb9c47..b9fb36c905469 100644
--- a/libclc/clc/include/clc/relational/unary_decl.inc
+++ b/libclc/clc/include/clc/relational/unary_decl.inc
@@ -6,4 +6,4 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_INTN __CLC_FUNCTION(__CLC_FLOATN x);
+_CLC_OVERLOAD _CLC_DECL __CLC_INTN FUNCTION(__CLC_FLOATN x);
diff --git a/libclc/clc/include/clc/shared/binary_decl.inc b/libclc/clc/include/clc/shared/binary_decl.inc
index 589a31a7305ac..ff4739dcdb8d1 100644
--- a/libclc/clc/include/clc/shared/binary_decl.inc
+++ b/libclc/clc/include/clc/shared/binary_decl.inc
@@ -6,5 +6,5 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     __CLC_GENTYPE y);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                               __CLC_GENTYPE y);
diff --git a/libclc/clc/include/clc/shared/binary_decl_with_int_second_arg.inc b/libclc/clc/include/clc/shared/binary_decl_with_int_second_arg.inc
index 1a854abe11d7a..a86d89b4fc85f 100644
--- a/libclc/clc/include/clc/shared/binary_decl_with_int_second_arg.inc
+++ b/libclc/clc/include/clc/shared/binary_decl_with_int_second_arg.inc
@@ -8,5 +8,4 @@
 
 #include <clc/utils.h>
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     __CLC_INTN y);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x, __CLC_INTN y);
diff --git a/libclc/clc/include/clc/shared/binary_decl_with_scalar_second_arg.inc b/libclc/clc/include/clc/shared/binary_decl_with_scalar_second_arg.inc
index 6044902a5be7c..05a53393170f6 100644
--- a/libclc/clc/include/clc/shared/binary_decl_with_scalar_second_arg.inc
+++ b/libclc/clc/include/clc/shared/binary_decl_with_scalar_second_arg.inc
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     __CLC_GENTYPE y);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                               __CLC_GENTYPE y);
 
 #ifndef __CLC_SCALAR
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x,
-                                                     __CLC_SCALAR_GENTYPE y);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x,
+                                               __CLC_SCALAR_GENTYPE y);
 #endif
diff --git a/libclc/clc/include/clc/shared/binary_def.inc b/libclc/clc/include/clc/shared/binary_def.inc
index 646e1504f4826..9ab5a7c5a79e5 100644
--- a/libclc/clc/include/clc/shared/binary_def.inc
+++ b/libclc/clc/include/clc/shared/binary_def.inc
@@ -8,11 +8,11 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE a,
                                               __CLC_GENTYPE b) {
-  return __CLC_FUNCTION(FUNCTION)(a, b);
+  return __IMPL_FUNCTION(FUNCTION)(a, b);
 }
diff --git a/libclc/clc/include/clc/shared/binary_def_with_int_second_arg.inc b/libclc/clc/include/clc/shared/binary_def_with_int_second_arg.inc
index 756bce6538ab4..262b6b21cc648 100644
--- a/libclc/clc/include/clc/shared/binary_def_with_int_second_arg.inc
+++ b/libclc/clc/include/clc/shared/binary_def_with_int_second_arg.inc
@@ -8,10 +8,10 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x, __CLC_INTN y) {
-  return __CLC_FUNCTION(FUNCTION)(x, y);
+  return __IMPL_FUNCTION(FUNCTION)(x, y);
 }
diff --git a/libclc/clc/include/clc/shared/binary_def_with_scalar_second_arg.inc b/libclc/clc/include/clc/shared/binary_def_with_scalar_second_arg.inc
index 49fa7d2ce36e9..103f775ab87e5 100644
--- a/libclc/clc/include/clc/shared/binary_def_with_scalar_second_arg.inc
+++ b/libclc/clc/include/clc/shared/binary_def_with_scalar_second_arg.inc
@@ -8,18 +8,18 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE a,
                                               __CLC_GENTYPE b) {
-  return __CLC_FUNCTION(FUNCTION)(a, b);
+  return __IMPL_FUNCTION(FUNCTION)(a, b);
 }
 
 #ifndef __CLC_SCALAR
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE a,
                                               __CLC_SCALAR_GENTYPE b) {
-  return __CLC_FUNCTION(FUNCTION)(a, (__CLC_GENTYPE)b);
+  return __IMPL_FUNCTION(FUNCTION)(a, (__CLC_GENTYPE)b);
 }
 #endif
diff --git a/libclc/clc/include/clc/shared/ternary_decl.inc b/libclc/clc/include/clc/shared/ternary_decl.inc
index e734c0f898075..a76db1eefb6a4 100644
--- a/libclc/clc/include/clc/shared/ternary_decl.inc
+++ b/libclc/clc/include/clc/shared/ternary_decl.inc
@@ -6,6 +6,5 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE a,
-                                                     __CLC_GENTYPE b,
-                                                     __CLC_GENTYPE c);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE a, __CLC_GENTYPE b,
+                                               __CLC_GENTYPE c);
diff --git a/libclc/clc/include/clc/shared/ternary_def.inc b/libclc/clc/include/clc/shared/ternary_def.inc
index 36952136e74c0..92134e8cb6f27 100644
--- a/libclc/clc/include/clc/shared/ternary_def.inc
+++ b/libclc/clc/include/clc/shared/ternary_def.inc
@@ -8,11 +8,11 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE a, __CLC_GENTYPE b,
                                               __CLC_GENTYPE c) {
-  return __CLC_FUNCTION(FUNCTION)(a, b, c);
+  return __IMPL_FUNCTION(FUNCTION)(a, b, c);
 }
diff --git a/libclc/clc/include/clc/shared/unary_decl.inc b/libclc/clc/include/clc/shared/unary_decl.inc
index 5d742de00b711..ce1a71b8284aa 100644
--- a/libclc/clc/include/clc/shared/unary_decl.inc
+++ b/libclc/clc/include/clc/shared/unary_decl.inc
@@ -6,4 +6,4 @@
 //
 //===----------------------------------------------------------------------===//
 
-_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x);
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x);
diff --git a/libclc/clc/include/clc/shared/unary_def.inc b/libclc/clc/include/clc/shared/unary_def.inc
index 3325d410ede53..e746a6bc89f32 100644
--- a/libclc/clc/include/clc/shared/unary_def.inc
+++ b/libclc/clc/include/clc/shared/unary_def.inc
@@ -8,10 +8,10 @@
 
 #include <clc/utils.h>
 
-#ifndef __CLC_FUNCTION
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#ifndef __IMPL_FUNCTION
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 #endif
 
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE a) {
-  return __CLC_FUNCTION(FUNCTION)(a);
+  return __IMPL_FUNCTION(FUNCTION)(a);
 }
diff --git a/libclc/clc/lib/generic/integer/clc_add_sat.cl b/libclc/clc/lib/generic/integer/clc_add_sat.cl
index b0cf51e61597f..8241ee5d547ac 100644
--- a/libclc/clc/lib/generic/integer/clc_add_sat.cl
+++ b/libclc/clc/lib/generic/integer/clc_add_sat.cl
@@ -9,7 +9,7 @@
 #include <clc/internal/clc.h>
 
 #define FUNCTION __clc_add_sat
-#define __CLC_FUNCTION(x) __builtin_elementwise_add_sat
+#define __IMPL_FUNCTION(x) __builtin_elementwise_add_sat
 #define __CLC_BODY <clc/shared/binary_def.inc>
 
 #include <clc/integer/gentype.inc>
diff --git a/libclc/clc/lib/generic/integer/clc_popcount.cl b/libclc/clc/lib/generic/integer/clc_popcount.cl
index f9e1cdf982049..078ceecc97691 100644
--- a/libclc/clc/lib/generic/integer/clc_popcount.cl
+++ b/libclc/clc/lib/generic/integer/clc_popcount.cl
@@ -9,7 +9,7 @@
 #include <clc/internal/clc.h>
 
 #define FUNCTION __clc_popcount
-#define __CLC_FUNCTION(x) __builtin_elementwise_popcount
+#define __IMPL_FUNCTION(x) __builtin_elementwise_popcount
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/integer/gentype.inc>
diff --git a/libclc/clc/lib/generic/integer/clc_sub_sat.cl b/libclc/clc/lib/generic/integer/clc_sub_sat.cl
index a9aa5f67323f3..e664f04b17481 100644
--- a/libclc/clc/lib/generic/integer/clc_sub_sat.cl
+++ b/libclc/clc/lib/generic/integer/clc_sub_sat.cl
@@ -9,7 +9,7 @@
 #include <clc/internal/clc.h>
 
 #define FUNCTION __clc_sub_sat
-#define __CLC_FUNCTION(x) __builtin_elementwise_sub_sat
+#define __IMPL_FUNCTION(x) __builtin_elementwise_sub_sat
 #define __CLC_BODY <clc/shared/binary_def.inc>
 
 #include <clc/integer/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_ceil.cl b/libclc/clc/lib/generic/math/clc_ceil.cl
index c4df638d5ce26..b06cb364b58d9 100644
--- a/libclc/clc/lib/generic/math/clc_ceil.cl
+++ b/libclc/clc/lib/generic/math/clc_ceil.cl
@@ -9,7 +9,7 @@
 #include <clc/internal/clc.h>
 
 #define FUNCTION __clc_ceil
-#define __CLC_FUNCTION(x) __builtin_elementwise_ceil
+#define __IMPL_FUNCTION(x) __builtin_elementwise_ceil
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_copysign.cl b/libclc/clc/lib/generic/math/clc_copysign.cl
index b066c14bcf3f5..06f126b16dfde 100644
--- a/libclc/clc/lib/generic/math/clc_copysign.cl
+++ b/libclc/clc/lib/generic/math/clc_copysign.cl
@@ -9,7 +9,7 @@
 #include <clc/internal/clc.h>
 
 #define FUNCTION __clc_copysign
-#define __CLC_FUNCTION(x) __builtin_elementwise_copysign
+#define __IMPL_FUNCTION(x) __builtin_elementwise_copysign
 #define __CLC_BODY <clc/shared/binary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_erf.cl b/libclc/clc/lib/generic/math/clc_erf.cl
index 910926d27a343..17fee3e8d11f8 100644
--- a/libclc/clc/lib/generic/math/clc_erf.cl
+++ b/libclc/clc/lib/generic/math/clc_erf.cl
@@ -516,7 +516,7 @@ _CLC_OVERLOAD _CLC_DEF double __clc_erf(double y) {
 
 // Forward the half version of this builtin onto the float one
 #define __HALF_ONLY
-#define __CLC_FUNCTION __clc_erf
+#define FUNCTION __clc_erf
 #define __CLC_BODY <clc/math/unary_def_via_fp32.inc>
 #include <clc/math/gentype.inc>
 
diff --git a/libclc/clc/lib/generic/math/clc_erfc.cl b/libclc/clc/lib/generic/math/clc_erfc.cl
index 105c299366148..77f8959831d27 100644
--- a/libclc/clc/lib/generic/math/clc_erfc.cl
+++ b/libclc/clc/lib/generic/math/clc_erfc.cl
@@ -525,7 +525,7 @@ _CLC_OVERLOAD _CLC_DEF double __clc_erfc(double x) {
 
 // Forward the half version of this builtin onto the float one
 #define __HALF_ONLY
-#define __CLC_FUNCTION __clc_erfc
+#define FUNCTION __clc_erfc
 #define __CLC_BODY <clc/math/unary_def_via_fp32.inc>
 #include <clc/math/gentype.inc>
 
diff --git a/libclc/clc/lib/generic/math/clc_fabs.cl b/libclc/clc/lib/generic/math/clc_fabs.cl
index f684c1e76bbbd..a0f0f3af07e25 100644
--- a/libclc/clc/lib/generic/math/clc_fabs.cl
+++ b/libclc/clc/lib/generic/math/clc_fabs.cl
@@ -9,7 +9,7 @@
 #include <clc/internal/clc.h>
 
 #define FUNCTION __clc_fabs
-#define __CLC_FUNCTION(x) __builtin_elementwise_abs
+#define __IMPL_FUNCTION(x) __builtin_elementwise_abs
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_floor.cl b/libclc/clc/lib/generic/math/clc_floor.cl
index 0626ba36f3ea8..a14adb98297e7 100644
--- a/libclc/clc/lib/generic/math/clc_floor.cl
+++ b/libclc/clc/lib/generic/math/clc_floor.cl
@@ -9,7 +9,7 @@
 #include <clc/internal/clc.h>
 
 #define FUNCTION __clc_floor
-#define __CLC_FUNCTION(x) __builtin_elementwise_floor
+#define __IMPL_FUNCTION(x) __builtin_elementwise_floor
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_fmod.cl b/libclc/clc/lib/generic/math/clc_fmod.cl
index 30ab1789d7941..3162ef60d46ef 100644
--- a/libclc/clc/lib/generic/math/clc_fmod.cl
+++ b/libclc/clc/lib/generic/math/clc_fmod.cl
@@ -190,7 +190,7 @@ _CLC_DEF _CLC_OVERLOAD double __clc_fmod(double x, double y) {
 
 // Forward the half version of this builtin onto the float one
 #define __HALF_ONLY
-#define __CLC_FUNCTION __clc_fmod
+#define FUNCTION __clc_fmod
 #define __CLC_BODY <clc/math/binary_def_via_fp32.inc>
 #include <clc/math/gentype.inc>
 
diff --git a/libclc/clc/lib/generic/math/clc_half_cos.cl b/libclc/clc/lib/generic/math/clc_half_cos.cl
index c2064a00232f4..79a7ee7b483f4 100644
--- a/libclc/clc/lib/generic/math/clc_half_cos.cl
+++ b/libclc/clc/lib/generic/math/clc_half_cos.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_cos
-#define __CLC_FUNCTION(x) __clc_cos
+#define __IMPL_FUNCTION(x) __clc_cos
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_half_exp.cl b/libclc/clc/lib/generic/math/clc_half_exp.cl
index 88336f9df011d..b53454580e3ce 100644
--- a/libclc/clc/lib/generic/math/clc_half_exp.cl
+++ b/libclc/clc/lib/generic/math/clc_half_exp.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_exp
-#define __CLC_FUNCTION(x) __clc_exp
+#define __IMPL_FUNCTION(x) __clc_exp
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_half_exp10.cl b/libclc/clc/lib/generic/math/clc_half_exp10.cl
index b3c0001a85278..7bd107bf59e85 100644
--- a/libclc/clc/lib/generic/math/clc_half_exp10.cl
+++ b/libclc/clc/lib/generic/math/clc_half_exp10.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_exp10
-#define __CLC_FUNCTION(x) __clc_exp10
+#define __IMPL_FUNCTION(x) __clc_exp10
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_half_exp2.cl b/libclc/clc/lib/generic/math/clc_half_exp2.cl
index f3ffcc6876b94..a20d79bfff6e3 100644
--- a/libclc/clc/lib/generic/math/clc_half_exp2.cl
+++ b/libclc/clc/lib/generic/math/clc_half_exp2.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_exp2
-#define __CLC_FUNCTION(x) __clc_exp2
+#define __IMPL_FUNCTION(x) __clc_exp2
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_half_log.cl b/libclc/clc/lib/generic/math/clc_half_log.cl
index 7371344ab2d1c..26b2c756c9889 100644
--- a/libclc/clc/lib/generic/math/clc_half_log.cl
+++ b/libclc/clc/lib/generic/math/clc_half_log.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_log
-#define __CLC_FUNCTION(x) __clc_log
+#define __IMPL_FUNCTION(x) __clc_log
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_half_log10.cl b/libclc/clc/lib/generic/math/clc_half_log10.cl
index e9becad210ea9..36f5bf55bb531 100644
--- a/libclc/clc/lib/generic/math/clc_half_log10.cl
+++ b/libclc/clc/lib/generic/math/clc_half_log10.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_log10
-#define __CLC_FUNCTION(x) __clc_log10
+#define __IMPL_FUNCTION(x) __clc_log10
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_half_log2.cl b/libclc/clc/lib/generic/math/clc_half_log2.cl
index aa8d838afad7c..cbf1d350dd8e2 100644
--- a/libclc/clc/lib/generic/math/clc_half_log2.cl
+++ b/libclc/clc/lib/generic/math/clc_half_log2.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_log2
-#define __CLC_FUNCTION(x) __clc_log2
+#define __IMPL_FUNCTION(x) __clc_log2
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_half_powr.cl b/libclc/clc/lib/generic/math/clc_half_powr.cl
index ade6731db1434..f7ef2074b840e 100644
--- a/libclc/clc/lib/generic/math/clc_half_powr.cl
+++ b/libclc/clc/lib/generic/math/clc_half_powr.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_powr
-#define __CLC_FUNCTION(x) __clc_powr
+#define __IMPL_FUNCTION(x) __clc_powr
 #define __CLC_BODY <clc/shared/binary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_half_rsqrt.cl b/libclc/clc/lib/generic/math/clc_half_rsqrt.cl
index 07daf7fc36234..7e5d9e0526851 100644
--- a/libclc/clc/lib/generic/math/clc_half_rsqrt.cl
+++ b/libclc/clc/lib/generic/math/clc_half_rsqrt.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_rsqrt
-#define __CLC_FUNCTION(x) __clc_rsqrt
+#define __IMPL_FUNCTION(x) __clc_rsqrt
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_half_sin.cl b/libclc/clc/lib/generic/math/clc_half_sin.cl
index c0af5e7bf4717..ef333dae3797c 100644
--- a/libclc/clc/lib/generic/math/clc_half_sin.cl
+++ b/libclc/clc/lib/generic/math/clc_half_sin.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_sin
-#define __CLC_FUNCTION(x) __clc_sin
+#define __IMPL_FUNCTION(x) __clc_sin
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_half_sqrt.cl b/libclc/clc/lib/generic/math/clc_half_sqrt.cl
index b6b5097e965c5..293eb81196b63 100644
--- a/libclc/clc/lib/generic/math/clc_half_sqrt.cl
+++ b/libclc/clc/lib/generic/math/clc_half_sqrt.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_sqrt
-#define __CLC_FUNCTION(x) __clc_sqrt
+#define __IMPL_FUNCTION(x) __clc_sqrt
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_half_tan.cl b/libclc/clc/lib/generic/math/clc_half_tan.cl
index ca27f3c662aad..ecc9f8f328311 100644
--- a/libclc/clc/lib/generic/math/clc_half_tan.cl
+++ b/libclc/clc/lib/generic/math/clc_half_tan.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_half_tan
-#define __CLC_FUNCTION(x) __clc_tan
+#define __IMPL_FUNCTION(x) __clc_tan
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_native_cos.cl b/libclc/clc/lib/generic/math/clc_native_cos.cl
index de56fdec48d24..2e63e9c9493f1 100644
--- a/libclc/clc/lib/generic/math/clc_native_cos.cl
+++ b/libclc/clc/lib/generic/math/clc_native_cos.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_native_cos
-#define __CLC_FUNCTION(x) __builtin_elementwise_cos
+#define __IMPL_FUNCTION(x) __builtin_elementwise_cos
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_native_exp.cl b/libclc/clc/lib/generic/math/clc_native_exp.cl
index 400270a6163a4..2f50a0aefac92 100644
--- a/libclc/clc/lib/generic/math/clc_native_exp.cl
+++ b/libclc/clc/lib/generic/math/clc_native_exp.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_native_exp
-#define __CLC_FUNCTION(x) __builtin_elementwise_exp
+#define __IMPL_FUNCTION(x) __builtin_elementwise_exp
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_native_exp2.cl b/libclc/clc/lib/generic/math/clc_native_exp2.cl
index 427d901fcdb19..25f557306c35b 100644
--- a/libclc/clc/lib/generic/math/clc_native_exp2.cl
+++ b/libclc/clc/lib/generic/math/clc_native_exp2.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_native_exp2
-#define __CLC_FUNCTION(x) __builtin_elementwise_exp2
+#define __IMPL_FUNCTION(x) __builtin_elementwise_exp2
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_native_log.cl b/libclc/clc/lib/generic/math/clc_native_log.cl
index 85f188b654282..b9b9d274f8b9f 100644
--- a/libclc/clc/lib/generic/math/clc_native_log.cl
+++ b/libclc/clc/lib/generic/math/clc_native_log.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_native_log
-#define __CLC_FUNCTION(x) __builtin_elementwise_log
+#define __IMPL_FUNCTION(x) __builtin_elementwise_log
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_native_log10.cl b/libclc/clc/lib/generic/math/clc_native_log10.cl
index 624018e4481bf..221aa406466c4 100644
--- a/libclc/clc/lib/generic/math/clc_native_log10.cl
+++ b/libclc/clc/lib/generic/math/clc_native_log10.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_native_log10
-#define __CLC_FUNCTION(x) __builtin_elementwise_log10
+#define __IMPL_FUNCTION(x) __builtin_elementwise_log10
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_native_log2.cl b/libclc/clc/lib/generic/math/clc_native_log2.cl
index 2c8c18e61ca5d..c3008ce242c74 100644
--- a/libclc/clc/lib/generic/math/clc_native_log2.cl
+++ b/libclc/clc/lib/generic/math/clc_native_log2.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_native_log2
-#define __CLC_FUNCTION(x) __builtin_elementwise_log2
+#define __IMPL_FUNCTION(x) __builtin_elementwise_log2
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_native_sin.cl b/libclc/clc/lib/generic/math/clc_native_sin.cl
index 22b988bf4375f..533f8d726d41a 100644
--- a/libclc/clc/lib/generic/math/clc_native_sin.cl
+++ b/libclc/clc/lib/generic/math/clc_native_sin.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_native_sin
-#define __CLC_FUNCTION(x) __builtin_elementwise_sin
+#define __IMPL_FUNCTION(x) __builtin_elementwise_sin
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_native_sqrt.cl b/libclc/clc/lib/generic/math/clc_native_sqrt.cl
index ed022ef1fee1f..e0f028e988b42 100644
--- a/libclc/clc/lib/generic/math/clc_native_sqrt.cl
+++ b/libclc/clc/lib/generic/math/clc_native_sqrt.cl
@@ -10,7 +10,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION __clc_native_sqrt
-#define __CLC_FUNCTION(x) __builtin_elementwise_sqrt
+#define __IMPL_FUNCTION(x) __builtin_elementwise_sqrt
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_remainder.cl b/libclc/clc/lib/generic/math/clc_remainder.cl
index 1d631f22874d3..2b3d185a8bee6 100644
--- a/libclc/clc/lib/generic/math/clc_remainder.cl
+++ b/libclc/clc/lib/generic/math/clc_remainder.cl
@@ -226,7 +226,7 @@ _CLC_DEF _CLC_OVERLOAD double __clc_remainder(double x, double y) {
 
 // Forward the half version of this builtin onto the float one
 #define __HALF_ONLY
-#define __CLC_FUNCTION __clc_remainder
+#define FUNCTION __clc_remainder
 #define __CLC_BODY <clc/math/binary_def_via_fp32.inc>
 #include <clc/math/gentype.inc>
 
diff --git a/libclc/clc/lib/generic/math/clc_rint.cl b/libclc/clc/lib/generic/math/clc_rint.cl
index 2188a7d901f01..b3f94490e3b5a 100644
--- a/libclc/clc/lib/generic/math/clc_rint.cl
+++ b/libclc/clc/lib/generic/math/clc_rint.cl
@@ -9,7 +9,7 @@
 #include <clc/internal/clc.h>
 
 #define FUNCTION __clc_rint
-#define __CLC_FUNCTION(x) __builtin_elementwise_rint
+#define __IMPL_FUNCTION(x) __builtin_elementwise_rint
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_round.cl b/libclc/clc/lib/generic/math/clc_round.cl
index e784dbeaf3fab..8c298d8c34835 100644
--- a/libclc/clc/lib/generic/math/clc_round.cl
+++ b/libclc/clc/lib/generic/math/clc_round.cl
@@ -9,7 +9,7 @@
 #include <clc/internal/clc.h>
 
 #define FUNCTION __clc_round
-#define __CLC_FUNCTION(x) __builtin_elementwise_round
+#define __IMPL_FUNCTION(x) __builtin_elementwise_round
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/math/clc_tgamma.cl b/libclc/clc/lib/generic/math/clc_tgamma.cl
index 83d9942eaf3f7..e0fed98026ca5 100644
--- a/libclc/clc/lib/generic/math/clc_tgamma.cl
+++ b/libclc/clc/lib/generic/math/clc_tgamma.cl
@@ -75,7 +75,7 @@ _CLC_OVERLOAD _CLC_DEF double __clc_tgamma(double x) {
 
 // Forward the half version of this builtin onto the float one
 #define __HALF_ONLY
-#define __CLC_FUNCTION __clc_tgamma
+#define FUNCTION __clc_tgamma
 #define __CLC_BODY <clc/math/unary_def_via_fp32.inc>
 #include <clc/math/gentype.inc>
 
diff --git a/libclc/clc/lib/generic/math/clc_trunc.cl b/libclc/clc/lib/generic/math/clc_trunc.cl
index 0bf2bc44c26f8..6261d04cd26de 100644
--- a/libclc/clc/lib/generic/math/clc_trunc.cl
+++ b/libclc/clc/lib/generic/math/clc_trunc.cl
@@ -9,7 +9,7 @@
 #include <clc/internal/clc.h>
 
 #define FUNCTION __clc_trunc
-#define __CLC_FUNCTION(x) __builtin_elementwise_trunc
+#define __IMPL_FUNCTION(x) __builtin_elementwise_trunc
 #define __CLC_BODY <clc/shared/unary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_add.h b/libclc/opencl/include/clc/opencl/atomic/atom_add.h
index 62c73d99371fb..8b3b8372ca9ff 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atom_add.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atom_add.h
@@ -7,18 +7,18 @@
 //===----------------------------------------------------------------------===//
 
 #ifdef cl_khr_global_int32_base_atomics
-#define __CLC_FUNCTION atom_add
+#define FUNCTION atom_add
 #define __CLC_ADDRESS_SPACE global
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_global_int32_base_atomics
 
 #ifdef cl_khr_local_int32_base_atomics
-#define __CLC_FUNCTION atom_add
+#define FUNCTION atom_add
 #define __CLC_ADDRESS_SPACE local
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_local_int32_base_atomics
 
 #ifdef cl_khr_int64_base_atomics
-#define __CLC_FUNCTION atom_add
+#define FUNCTION atom_add
 #include <clc/opencl/atomic/atom_decl_int64.inc>
 #endif // cl_khr_int64_base_atomics
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_and.h b/libclc/opencl/include/clc/opencl/atomic/atom_and.h
index 9dd9466f62f86..8eda27bd0732f 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atom_and.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atom_and.h
@@ -7,18 +7,18 @@
 //===----------------------------------------------------------------------===//
 
 #ifdef cl_khr_global_int32_extended_atomics
-#define __CLC_FUNCTION atom_and
+#define FUNCTION atom_and
 #define __CLC_ADDRESS_SPACE global
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_global_int32_extended_atomics
 
 #ifdef cl_khr_local_int32_extended_atomics
-#define __CLC_FUNCTION atom_and
+#define FUNCTION atom_and
 #define __CLC_ADDRESS_SPACE local
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_local_int32_extended_atomics
 
 #ifdef cl_khr_int64_extended_atomics
-#define __CLC_FUNCTION atom_and
+#define FUNCTION atom_and
 #include <clc/opencl/atomic/atom_decl_int64.inc>
 #endif // cl_khr_int64_extended_atomics
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc b/libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc
index 866d8903db816..b8631ceac3a42 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc
+++ b/libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc
@@ -10,12 +10,12 @@
 #include <clc/clctypes.h>
 
 #define __CLC_DECLARE_ATOM(ADDRSPACE, TYPE)                                    \
-  _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION(volatile ADDRSPACE TYPE *, TYPE);
+  _CLC_OVERLOAD _CLC_DECL TYPE FUNCTION(volatile 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 FUNCTION
 #undef __CLC_ADDRESS_SPACE
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc b/libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc
index 146de3412fc2e..3918a7cae006b 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc
+++ b/libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc
@@ -10,7 +10,7 @@
 #include <clc/clctypes.h>
 
 #define __CLC_DECLARE_ATOM(ADDRSPACE, TYPE)                                    \
-  _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION(volatile ADDRSPACE TYPE *, TYPE);
+  _CLC_OVERLOAD _CLC_DECL TYPE FUNCTION(volatile ADDRSPACE TYPE *, TYPE);
 
 __CLC_DECLARE_ATOM(local, long)
 __CLC_DECLARE_ATOM(local, ulong)
@@ -19,4 +19,4 @@ __CLC_DECLARE_ATOM(global, ulong)
 
 #undef __CLC_DECLARE_ATOM
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_max.h b/libclc/opencl/include/clc/opencl/atomic/atom_max.h
index 00b47e6b14fde..778085138f795 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atom_max.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atom_max.h
@@ -7,18 +7,18 @@
 //===----------------------------------------------------------------------===//
 
 #ifdef cl_khr_global_int32_extended_atomics
-#define __CLC_FUNCTION atom_max
+#define FUNCTION atom_max
 #define __CLC_ADDRESS_SPACE global
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_global_int32_extended_atomics
 
 #ifdef cl_khr_local_int32_extended_atomics
-#define __CLC_FUNCTION atom_max
+#define FUNCTION atom_max
 #define __CLC_ADDRESS_SPACE local
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_local_int32_extended_atomics
 
 #ifdef cl_khr_int64_extended_atomics
-#define __CLC_FUNCTION atom_max
+#define FUNCTION atom_max
 #include <clc/opencl/atomic/atom_decl_int64.inc>
 #endif // cl_khr_int64_extended_atomics
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_min.h b/libclc/opencl/include/clc/opencl/atomic/atom_min.h
index 40bed0dc086f2..d3169397b89fe 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atom_min.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atom_min.h
@@ -7,18 +7,18 @@
 //===----------------------------------------------------------------------===//
 
 #ifdef cl_khr_global_int32_extended_atomics
-#define __CLC_FUNCTION atom_min
+#define FUNCTION atom_min
 #define __CLC_ADDRESS_SPACE global
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_global_int32_extended_atomics
 
 #ifdef cl_khr_local_int32_extended_atomics
-#define __CLC_FUNCTION atom_min
+#define FUNCTION atom_min
 #define __CLC_ADDRESS_SPACE local
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_local_int32_extended_atomics
 
 #ifdef cl_khr_int64_extended_atomics
-#define __CLC_FUNCTION atom_min
+#define FUNCTION atom_min
 #include <clc/opencl/atomic/atom_decl_int64.inc>
 #endif // cl_khr_int64_extended_atomics
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_or.h b/libclc/opencl/include/clc/opencl/atomic/atom_or.h
index 2c0beb850b4d0..9a058c813b999 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atom_or.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atom_or.h
@@ -7,18 +7,18 @@
 //===----------------------------------------------------------------------===//
 
 #ifdef cl_khr_global_int32_extended_atomics
-#define __CLC_FUNCTION atom_or
+#define FUNCTION atom_or
 #define __CLC_ADDRESS_SPACE global
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_global_int32_extended_atomics
 
 #ifdef cl_khr_local_int32_extended_atomics
-#define __CLC_FUNCTION atom_or
+#define FUNCTION atom_or
 #define __CLC_ADDRESS_SPACE local
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_local_int32_extended_atomics
 
 #ifdef cl_khr_int64_extended_atomics
-#define __CLC_FUNCTION atom_or
+#define FUNCTION atom_or
 #include <clc/opencl/atomic/atom_decl_int64.inc>
 #endif // cl_khr_int64_extended_atomics
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_sub.h b/libclc/opencl/include/clc/opencl/atomic/atom_sub.h
index 36074aaef5a32..7cbcce5c8bf51 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atom_sub.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atom_sub.h
@@ -7,18 +7,18 @@
 //===----------------------------------------------------------------------===//
 
 #ifdef cl_khr_global_int32_base_atomics
-#define __CLC_FUNCTION atom_sub
+#define FUNCTION atom_sub
 #define __CLC_ADDRESS_SPACE global
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_global_int32_base_atomics
 
 #ifdef cl_khr_local_int32_base_atomics
-#define __CLC_FUNCTION atom_sub
+#define FUNCTION atom_sub
 #define __CLC_ADDRESS_SPACE local
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_local_int32_base_atomics
 
 #ifdef cl_khr_int64_base_atomics
-#define __CLC_FUNCTION atom_sub
+#define FUNCTION atom_sub
 #include <clc/opencl/atomic/atom_decl_int64.inc>
 #endif // cl_khr_int64_base_atomics
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h b/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h
index a5043aa4109ed..75d9a391d1c7b 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h
@@ -7,18 +7,18 @@
 //===----------------------------------------------------------------------===//
 
 #ifdef cl_khr_global_int32_base_atomics
-#define __CLC_FUNCTION atom_xchg
+#define FUNCTION atom_xchg
 #define __CLC_ADDRESS_SPACE global
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_global_int32_base_atomics
 
 #ifdef cl_khr_local_int32_base_atomics
-#define __CLC_FUNCTION atom_xchg
+#define FUNCTION atom_xchg
 #define __CLC_ADDRESS_SPACE local
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_local_int32_base_atomics
 
 #ifdef cl_khr_int64_base_atomics
-#define __CLC_FUNCTION atom_xchg
+#define FUNCTION atom_xchg
 #include <clc/opencl/atomic/atom_decl_int64.inc>
 #endif // cl_khr_int64_base_atomics
diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_xor.h b/libclc/opencl/include/clc/opencl/atomic/atom_xor.h
index 0c4b456b8f23f..b01b1fba23787 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atom_xor.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atom_xor.h
@@ -7,18 +7,18 @@
 //===----------------------------------------------------------------------===//
 
 #ifdef cl_khr_global_int32_extended_atomics
-#define __CLC_FUNCTION atom_xor
+#define FUNCTION atom_xor
 #define __CLC_ADDRESS_SPACE global
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_global_int32_extended_atomics
 
 #ifdef cl_khr_local_int32_extended_atomics
-#define __CLC_FUNCTION atom_xor
+#define FUNCTION atom_xor
 #define __CLC_ADDRESS_SPACE local
 #include <clc/opencl/atomic/atom_decl_int32.inc>
 #endif // cl_khr_local_int32_extended_atomics
 
 #ifdef cl_khr_int64_extended_atomics
-#define __CLC_FUNCTION atom_xor
+#define FUNCTION atom_xor
 #include <clc/opencl/atomic/atom_decl_int64.inc>
 #endif // cl_khr_int64_extended_atomics
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_add.h b/libclc/opencl/include/clc/opencl/atomic/atomic_add.h
index 937def3f4a2ae..74b3d8ffd8c35 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_add.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atomic_add.h
@@ -6,5 +6,5 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION atomic_add
+#define FUNCTION atomic_add
 #include <clc/opencl/atomic/atomic_decl.inc>
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_and.h b/libclc/opencl/include/clc/opencl/atomic/atomic_and.h
index 5f353f40318f6..aec521e07bc20 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_and.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atomic_and.h
@@ -6,5 +6,5 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION atomic_and
+#define FUNCTION atomic_and
 #include <clc/opencl/atomic/atomic_decl.inc>
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc b/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc
index 0cfd4c3eab5f6..e060e3aaea161 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc
+++ b/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_DECLARE_ATOMIC(ADDRSPACE, TYPE)                                  \
-  _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION(volatile ADDRSPACE TYPE *, TYPE);
+  _CLC_OVERLOAD _CLC_DECL TYPE FUNCTION(volatile ADDRSPACE TYPE *, TYPE);
 
 #define __CLC_DECLARE_ATOMIC_ADDRSPACE(TYPE)                                   \
   __CLC_DECLARE_ATOMIC(global, TYPE)                                           \
@@ -19,4 +19,4 @@ __CLC_DECLARE_ATOMIC_ADDRSPACE(uint)
 #undef __CLC_DECLARE_ATOMIC_ADDRSPACE
 #undef __CLC_DECLARE_ATOMIC
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_max.h b/libclc/opencl/include/clc/opencl/atomic/atomic_max.h
index 13832423cfeec..4f23f3858531c 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_max.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atomic_max.h
@@ -6,5 +6,5 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION atomic_max
+#define FUNCTION atomic_max
 #include <clc/opencl/atomic/atomic_decl.inc>
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_min.h b/libclc/opencl/include/clc/opencl/atomic/atomic_min.h
index 3bd47a3f7837d..1d99600f6d13f 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_min.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atomic_min.h
@@ -6,5 +6,5 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION atomic_min
+#define FUNCTION atomic_min
 #include <clc/opencl/atomic/atomic_decl.inc>
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_or.h b/libclc/opencl/include/clc/opencl/atomic/atomic_or.h
index 13f84ea49a5ab..7cb920df99760 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_or.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atomic_or.h
@@ -6,5 +6,5 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION atomic_or
+#define FUNCTION atomic_or
 #include <clc/opencl/atomic/atomic_decl.inc>
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h b/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h
index eedc9d0e76054..f12e77523770b 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h
@@ -6,5 +6,5 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION atomic_sub
+#define FUNCTION atomic_sub
 #include <clc/opencl/atomic/atomic_decl.inc>
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h b/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h
index ec322d56e23d1..ef5ad542a2d45 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION atomic_xchg
+#define 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);
+_CLC_OVERLOAD _CLC_DECL float FUNCTION(volatile local float *, float);
+_CLC_OVERLOAD _CLC_DECL float FUNCTION(volatile global float *, float);
 #include <clc/opencl/atomic/atomic_decl.inc>
diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h b/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h
index 6f6b4564fdf3c..fb6498d9d0b32 100644
--- a/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h
+++ b/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h
@@ -6,5 +6,5 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION atomic_xor
+#define FUNCTION atomic_xor
 #include <clc/opencl/atomic/atomic_decl.inc>
diff --git a/libclc/opencl/include/clc/opencl/common/degrees.h b/libclc/opencl/include/clc/opencl/common/degrees.h
index f442c5fbda857..6511bc9be10d7 100644
--- a/libclc/opencl/include/clc/opencl/common/degrees.h
+++ b/libclc/opencl/include/clc/opencl/common/degrees.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION degrees
+#define FUNCTION degrees
 #define __CLC_BODY <clc/math/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/common/radians.h b/libclc/opencl/include/clc/opencl/common/radians.h
index 2772f7c2f0ae8..7cfee9e6d6403 100644
--- a/libclc/opencl/include/clc/opencl/common/radians.h
+++ b/libclc/opencl/include/clc/opencl/common/radians.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION radians
+#define FUNCTION radians
 #define __CLC_BODY <clc/math/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/common/sign.h b/libclc/opencl/include/clc/opencl/common/sign.h
index 2bb95716358fd..76b53d27efc8b 100644
--- a/libclc/opencl/include/clc/opencl/common/sign.h
+++ b/libclc/opencl/include/clc/opencl/common/sign.h
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION sign
+#define FUNCTION sign
 #define __CLC_BODY <clc/math/unary_decl.inc>
 #include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/geometric/distance.h b/libclc/opencl/include/clc/opencl/geometric/distance.h
index 28ec8274302ef..aa7149d718276 100644
--- a/libclc/opencl/include/clc/opencl/geometric/distance.h
+++ b/libclc/opencl/include/clc/opencl/geometric/distance.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION distance
+#define FUNCTION distance
 #define __CLC_BODY <clc/geometric/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/geometric/dot.h b/libclc/opencl/include/clc/opencl/geometric/dot.h
index 92d5b56d2e067..af149a7779e45 100644
--- a/libclc/opencl/include/clc/opencl/geometric/dot.h
+++ b/libclc/opencl/include/clc/opencl/geometric/dot.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION dot
+#define FUNCTION dot
 #define __CLC_BODY <clc/geometric/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_distance.h b/libclc/opencl/include/clc/opencl/geometric/fast_distance.h
index 975c485f16614..6ae297a499153 100644
--- a/libclc/opencl/include/clc/opencl/geometric/fast_distance.h
+++ b/libclc/opencl/include/clc/opencl/geometric/fast_distance.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION fast_distance
+#define FUNCTION fast_distance
 #define __CLC_BODY <clc/geometric/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_length.h b/libclc/opencl/include/clc/opencl/geometric/fast_length.h
index 1efa18ccd3061..6bfb439fa222e 100644
--- a/libclc/opencl/include/clc/opencl/geometric/fast_length.h
+++ b/libclc/opencl/include/clc/opencl/geometric/fast_length.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION fast_length
+#define FUNCTION fast_length
 #define __CLC_BODY <clc/geometric/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h b/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h
index a860b9ceeb21d..54347d77df6ce 100644
--- a/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h
+++ b/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 #define __FLOAT_ONLY
-#define __CLC_FUNCTION fast_normalize
+#define FUNCTION fast_normalize
 #define __CLC_GEOMETRIC_RET_GENTYPE
 #define __CLC_BODY <clc/geometric/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 #undef __CLC_GEOMETRIC_RET_GENTYPE
diff --git a/libclc/opencl/include/clc/opencl/geometric/length.h b/libclc/opencl/include/clc/opencl/geometric/length.h
index 2105a8f8cece0..b9a4788e095b4 100644
--- a/libclc/opencl/include/clc/opencl/geometric/length.h
+++ b/libclc/opencl/include/clc/opencl/geometric/length.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION length
+#define FUNCTION length
 #define __CLC_BODY <clc/geometric/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/geometric/normalize.h b/libclc/opencl/include/clc/opencl/geometric/normalize.h
index a15b7003329b5..90d6f332682ab 100644
--- a/libclc/opencl/include/clc/opencl/geometric/normalize.h
+++ b/libclc/opencl/include/clc/opencl/geometric/normalize.h
@@ -6,11 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION normalize
+#define FUNCTION normalize
 #define __CLC_GEOMETRIC_RET_GENTYPE
 #define __CLC_BODY <clc/geometric/unary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
 #undef __CLC_GEOMETRIC_RET_GENTYPE
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/add_sat.h b/libclc/opencl/include/clc/opencl/integer/add_sat.h
index 1982d11908008..c0acb63e945d5 100644
--- a/libclc/opencl/include/clc/opencl/integer/add_sat.h
+++ b/libclc/opencl/include/clc/opencl/integer/add_sat.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION add_sat
+#define FUNCTION add_sat
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/clz.h b/libclc/opencl/include/clc/opencl/integer/clz.h
index b215fc1d0bc94..b05f8b27b0541 100644
--- a/libclc/opencl/include/clc/opencl/integer/clz.h
+++ b/libclc/opencl/include/clc/opencl/integer/clz.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION clz
+#define FUNCTION clz
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/ctz.h b/libclc/opencl/include/clc/opencl/integer/ctz.h
index 2ab6436440853..44ca8fe541ef9 100644
--- a/libclc/opencl/include/clc/opencl/integer/ctz.h
+++ b/libclc/opencl/include/clc/opencl/integer/ctz.h
@@ -8,11 +8,11 @@
 
 #if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
 
-#define __CLC_FUNCTION ctz
+#define FUNCTION ctz
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #endif // __OPENCL_C_VERSION__ >= CL_VERSION_2_0
diff --git a/libclc/opencl/include/clc/opencl/integer/hadd.h b/libclc/opencl/include/clc/opencl/integer/hadd.h
index c05c9d50e67d3..fc66fab1bbfba 100644
--- a/libclc/opencl/include/clc/opencl/integer/hadd.h
+++ b/libclc/opencl/include/clc/opencl/integer/hadd.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION hadd
+#define FUNCTION hadd
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/mad24.h b/libclc/opencl/include/clc/opencl/integer/mad24.h
index 9ff998a8604d4..7c5f4d478cd95 100644
--- a/libclc/opencl/include/clc/opencl/integer/mad24.h
+++ b/libclc/opencl/include/clc/opencl/integer/mad24.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION mad24
+#define FUNCTION mad24
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
 
 #include <clc/integer/gentype24.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/mad_hi.h b/libclc/opencl/include/clc/opencl/integer/mad_hi.h
index e06ab8f3c11f1..c68d1b65dcf24 100644
--- a/libclc/opencl/include/clc/opencl/integer/mad_hi.h
+++ b/libclc/opencl/include/clc/opencl/integer/mad_hi.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION mad_hi
+#define FUNCTION mad_hi
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/mad_sat.h b/libclc/opencl/include/clc/opencl/integer/mad_sat.h
index 0a9fd7869a6f4..02ced7a74b2b1 100644
--- a/libclc/opencl/include/clc/opencl/integer/mad_sat.h
+++ b/libclc/opencl/include/clc/opencl/integer/mad_sat.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION mad_sat
+#define FUNCTION mad_sat
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/mul24.h b/libclc/opencl/include/clc/opencl/integer/mul24.h
index d2aca25fc3140..67aebcaf2a308 100644
--- a/libclc/opencl/include/clc/opencl/integer/mul24.h
+++ b/libclc/opencl/include/clc/opencl/integer/mul24.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION mul24
+#define FUNCTION mul24
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype24.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/mul_hi.h b/libclc/opencl/include/clc/opencl/integer/mul_hi.h
index 4374ec73be32a..24a9d1b8f8035 100644
--- a/libclc/opencl/include/clc/opencl/integer/mul_hi.h
+++ b/libclc/opencl/include/clc/opencl/integer/mul_hi.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION mul_hi
+#define FUNCTION mul_hi
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/popcount.h b/libclc/opencl/include/clc/opencl/integer/popcount.h
index 4d43f26f489e6..301f30cb7a6bf 100644
--- a/libclc/opencl/include/clc/opencl/integer/popcount.h
+++ b/libclc/opencl/include/clc/opencl/integer/popcount.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION popcount
+#define FUNCTION popcount
 #define __CLC_BODY <clc/shared/unary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/rhadd.h b/libclc/opencl/include/clc/opencl/integer/rhadd.h
index 3da5524df206c..b1a46e998493f 100644
--- a/libclc/opencl/include/clc/opencl/integer/rhadd.h
+++ b/libclc/opencl/include/clc/opencl/integer/rhadd.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION rhadd
+#define FUNCTION rhadd
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/rotate.h b/libclc/opencl/include/clc/opencl/integer/rotate.h
index 1e4de24cbf313..be4fe2680d34a 100644
--- a/libclc/opencl/include/clc/opencl/integer/rotate.h
+++ b/libclc/opencl/include/clc/opencl/integer/rotate.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION rotate
+#define FUNCTION rotate
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/integer/sub_sat.h b/libclc/opencl/include/clc/opencl/integer/sub_sat.h
index ee5d8c78f3ebe..65f57a17b0fee 100644
--- a/libclc/opencl/include/clc/opencl/integer/sub_sat.h
+++ b/libclc/opencl/include/clc/opencl/integer/sub_sat.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION sub_sat
+#define FUNCTION sub_sat
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/integer/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/acos.h b/libclc/opencl/include/clc/opencl/math/acos.h
index 695e6560478c8..0a9104f4003ad 100644
--- a/libclc/opencl/include/clc/opencl/math/acos.h
+++ b/libclc/opencl/include/clc/opencl/math/acos.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION acos
+#define FUNCTION acos
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/acosh.h b/libclc/opencl/include/clc/opencl/math/acosh.h
index 52197d448d6be..cc1844e41fa9d 100644
--- a/libclc/opencl/include/clc/opencl/math/acosh.h
+++ b/libclc/opencl/include/clc/opencl/math/acosh.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION acosh
+#define FUNCTION acosh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/acospi.h b/libclc/opencl/include/clc/opencl/math/acospi.h
index 47e4e5f3e7f15..34175b1a83d88 100644
--- a/libclc/opencl/include/clc/opencl/math/acospi.h
+++ b/libclc/opencl/include/clc/opencl/math/acospi.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION acospi
+#define FUNCTION acospi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/asin.h b/libclc/opencl/include/clc/opencl/math/asin.h
index eb83d2d2743f3..d6055834bc43d 100644
--- a/libclc/opencl/include/clc/opencl/math/asin.h
+++ b/libclc/opencl/include/clc/opencl/math/asin.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION asin
+#define FUNCTION asin
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/asinh.h b/libclc/opencl/include/clc/opencl/math/asinh.h
index 74ce5ba6731c6..d29f058291058 100644
--- a/libclc/opencl/include/clc/opencl/math/asinh.h
+++ b/libclc/opencl/include/clc/opencl/math/asinh.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION asinh
+#define FUNCTION asinh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/asinpi.h b/libclc/opencl/include/clc/opencl/math/asinpi.h
index a7bd6469c93a9..8d57697f6acaa 100644
--- a/libclc/opencl/include/clc/opencl/math/asinpi.h
+++ b/libclc/opencl/include/clc/opencl/math/asinpi.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION asinpi
+#define FUNCTION asinpi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/atan.h b/libclc/opencl/include/clc/opencl/math/atan.h
index 4c83c2d4c819b..5642000d91666 100644
--- a/libclc/opencl/include/clc/opencl/math/atan.h
+++ b/libclc/opencl/include/clc/opencl/math/atan.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION atan
+#define FUNCTION atan
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/atan2.h b/libclc/opencl/include/clc/opencl/math/atan2.h
index 5872e41218dc4..c6bfb20bacd06 100644
--- a/libclc/opencl/include/clc/opencl/math/atan2.h
+++ b/libclc/opencl/include/clc/opencl/math/atan2.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION atan2
+#define FUNCTION atan2
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/atan2pi.h b/libclc/opencl/include/clc/opencl/math/atan2pi.h
index b68cf492e2925..87817b9938420 100644
--- a/libclc/opencl/include/clc/opencl/math/atan2pi.h
+++ b/libclc/opencl/include/clc/opencl/math/atan2pi.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION atan2pi
+#define FUNCTION atan2pi
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/atanh.h b/libclc/opencl/include/clc/opencl/math/atanh.h
index 6ea99c2dedc40..ae0751120f840 100644
--- a/libclc/opencl/include/clc/opencl/math/atanh.h
+++ b/libclc/opencl/include/clc/opencl/math/atanh.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION atanh
+#define FUNCTION atanh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/atanpi.h b/libclc/opencl/include/clc/opencl/math/atanpi.h
index 5c7d0a9130fd0..67d9a13a8dd0d 100644
--- a/libclc/opencl/include/clc/opencl/math/atanpi.h
+++ b/libclc/opencl/include/clc/opencl/math/atanpi.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION atanpi
+#define FUNCTION atanpi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/cbrt.h b/libclc/opencl/include/clc/opencl/math/cbrt.h
index f0599e0805ab7..e2dad07b0f002 100644
--- a/libclc/opencl/include/clc/opencl/math/cbrt.h
+++ b/libclc/opencl/include/clc/opencl/math/cbrt.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION cbrt
+#define FUNCTION cbrt
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/ceil.h b/libclc/opencl/include/clc/opencl/math/ceil.h
index 82e5dc4eec000..a7ca6bf12b85d 100644
--- a/libclc/opencl/include/clc/opencl/math/ceil.h
+++ b/libclc/opencl/include/clc/opencl/math/ceil.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION ceil
+#define FUNCTION ceil
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/copysign.h b/libclc/opencl/include/clc/opencl/math/copysign.h
index 3956dcd2fc19c..40baac0a586bb 100644
--- a/libclc/opencl/include/clc/opencl/math/copysign.h
+++ b/libclc/opencl/include/clc/opencl/math/copysign.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION copysign
+#define FUNCTION copysign
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/cos.h b/libclc/opencl/include/clc/opencl/math/cos.h
index 073282a3e0c1e..7837075abb5f0 100644
--- a/libclc/opencl/include/clc/opencl/math/cos.h
+++ b/libclc/opencl/include/clc/opencl/math/cos.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION cos
+#define FUNCTION cos
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/cosh.h b/libclc/opencl/include/clc/opencl/math/cosh.h
index f156194cd9b14..bc2c1f595de23 100644
--- a/libclc/opencl/include/clc/opencl/math/cosh.h
+++ b/libclc/opencl/include/clc/opencl/math/cosh.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION cosh
+#define FUNCTION cosh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/cospi.h b/libclc/opencl/include/clc/opencl/math/cospi.h
index 2e9ae1b2ed376..fb55e87d2569d 100644
--- a/libclc/opencl/include/clc/opencl/math/cospi.h
+++ b/libclc/opencl/include/clc/opencl/math/cospi.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION cospi
+#define FUNCTION cospi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/erf.h b/libclc/opencl/include/clc/opencl/math/erf.h
index cbbb58b6c35a7..66737077eef41 100644
--- a/libclc/opencl/include/clc/opencl/math/erf.h
+++ b/libclc/opencl/include/clc/opencl/math/erf.h
@@ -9,8 +9,8 @@
 #undef erfc
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION erf
+#define FUNCTION erf
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/erfc.h b/libclc/opencl/include/clc/opencl/math/erfc.h
index 74cef50ecc7c8..279a44b49346f 100644
--- a/libclc/opencl/include/clc/opencl/math/erfc.h
+++ b/libclc/opencl/include/clc/opencl/math/erfc.h
@@ -9,8 +9,8 @@
 #undef erfc
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION erfc
+#define FUNCTION erfc
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/exp.h b/libclc/opencl/include/clc/opencl/math/exp.h
index a6193a9eac844..4eb5d31c157ec 100644
--- a/libclc/opencl/include/clc/opencl/math/exp.h
+++ b/libclc/opencl/include/clc/opencl/math/exp.h
@@ -9,8 +9,8 @@
 #undef exp
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION exp
+#define FUNCTION exp
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/exp10.h b/libclc/opencl/include/clc/opencl/math/exp10.h
index 7b48c1ce0348f..feef3bfb27fb5 100644
--- a/libclc/opencl/include/clc/opencl/math/exp10.h
+++ b/libclc/opencl/include/clc/opencl/math/exp10.h
@@ -9,8 +9,8 @@
 #undef exp10
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION exp10
+#define FUNCTION exp10
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/exp2.h b/libclc/opencl/include/clc/opencl/math/exp2.h
index 7081050769e9a..801eecd34d5f3 100644
--- a/libclc/opencl/include/clc/opencl/math/exp2.h
+++ b/libclc/opencl/include/clc/opencl/math/exp2.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION exp2
+#define FUNCTION exp2
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/expm1.h b/libclc/opencl/include/clc/opencl/math/expm1.h
index 9f6a512df38e6..b1b27ec8a1fb5 100644
--- a/libclc/opencl/include/clc/opencl/math/expm1.h
+++ b/libclc/opencl/include/clc/opencl/math/expm1.h
@@ -9,8 +9,8 @@
 #undef exp
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION expm1
+#define FUNCTION expm1
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/fabs.h b/libclc/opencl/include/clc/opencl/math/fabs.h
index 41212d6f597c8..d3b4a6cbc2e9e 100644
--- a/libclc/opencl/include/clc/opencl/math/fabs.h
+++ b/libclc/opencl/include/clc/opencl/math/fabs.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION fabs
+#define FUNCTION fabs
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/fdim.h b/libclc/opencl/include/clc/opencl/math/fdim.h
index fdc261072c164..da05471f0a013 100644
--- a/libclc/opencl/include/clc/opencl/math/fdim.h
+++ b/libclc/opencl/include/clc/opencl/math/fdim.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION fdim
+#define FUNCTION fdim
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/floor.h b/libclc/opencl/include/clc/opencl/math/floor.h
index 80f8fcc5ac95d..6927366cd5b8b 100644
--- a/libclc/opencl/include/clc/opencl/math/floor.h
+++ b/libclc/opencl/include/clc/opencl/math/floor.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION floor
+#define FUNCTION floor
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/fma.h b/libclc/opencl/include/clc/opencl/math/fma.h
index 9a201bb98400f..ebb60a670d699 100644
--- a/libclc/opencl/include/clc/opencl/math/fma.h
+++ b/libclc/opencl/include/clc/opencl/math/fma.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
-#define __CLC_FUNCTION fma
+#define FUNCTION fma
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/fmax.h b/libclc/opencl/include/clc/opencl/math/fmax.h
index 2144bb334f1ae..be3fba1575064 100644
--- a/libclc/opencl/include/clc/opencl/math/fmax.h
+++ b/libclc/opencl/include/clc/opencl/math/fmax.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/binary_decl_with_scalar_second_arg.inc>
-#define __CLC_FUNCTION fmax
+#define FUNCTION fmax
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/fmin.h b/libclc/opencl/include/clc/opencl/math/fmin.h
index 5a2af3725bf2b..4867ed894ea10 100644
--- a/libclc/opencl/include/clc/opencl/math/fmin.h
+++ b/libclc/opencl/include/clc/opencl/math/fmin.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/binary_decl_with_scalar_second_arg.inc>
-#define __CLC_FUNCTION fmin
+#define FUNCTION fmin
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/fmod.h b/libclc/opencl/include/clc/opencl/math/fmod.h
index 10236aec3e9e3..9b10fecc0f147 100644
--- a/libclc/opencl/include/clc/opencl/math/fmod.h
+++ b/libclc/opencl/include/clc/opencl/math/fmod.h
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION fmod
+#define FUNCTION fmod
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 #include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/fract.h b/libclc/opencl/include/clc/opencl/math/fract.h
index 8443d4968c985..01c06771421e6 100644
--- a/libclc/opencl/include/clc/opencl/math/fract.h
+++ b/libclc/opencl/include/clc/opencl/math/fract.h
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION fract
+#define FUNCTION fract
 #define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
 #include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/frexp.h b/libclc/opencl/include/clc/opencl/math/frexp.h
index 796acca1cb75a..38d4942284709 100644
--- a/libclc/opencl/include/clc/opencl/math/frexp.h
+++ b/libclc/opencl/include/clc/opencl/math/frexp.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION frexp
+#define FUNCTION frexp
 #define __CLC_BODY <clc/math/unary_decl_with_int_ptr.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_cos.h b/libclc/opencl/include/clc/opencl/math/half_cos.h
index f6d2966b2222a..63c3216756e30 100644
--- a/libclc/opencl/include/clc/opencl/math/half_cos.h
+++ b/libclc/opencl/include/clc/opencl/math/half_cos.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_cos
+#define FUNCTION half_cos
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_divide.h b/libclc/opencl/include/clc/opencl/math/half_divide.h
index a05eab5b1c78e..fd69b94fb5a35 100644
--- a/libclc/opencl/include/clc/opencl/math/half_divide.h
+++ b/libclc/opencl/include/clc/opencl/math/half_divide.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION half_divide
+#define FUNCTION half_divide
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_exp.h b/libclc/opencl/include/clc/opencl/math/half_exp.h
index 33d79c2e7d961..a815ebc91eefd 100644
--- a/libclc/opencl/include/clc/opencl/math/half_exp.h
+++ b/libclc/opencl/include/clc/opencl/math/half_exp.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_exp
+#define FUNCTION half_exp
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_exp10.h b/libclc/opencl/include/clc/opencl/math/half_exp10.h
index 1c1a79e10c0de..80b74a2f42285 100644
--- a/libclc/opencl/include/clc/opencl/math/half_exp10.h
+++ b/libclc/opencl/include/clc/opencl/math/half_exp10.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_exp10
+#define FUNCTION half_exp10
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_exp2.h b/libclc/opencl/include/clc/opencl/math/half_exp2.h
index 09c4c08986bff..eaa0cb3b5704b 100644
--- a/libclc/opencl/include/clc/opencl/math/half_exp2.h
+++ b/libclc/opencl/include/clc/opencl/math/half_exp2.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_exp2
+#define FUNCTION half_exp2
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_log.h b/libclc/opencl/include/clc/opencl/math/half_log.h
index 3bf0857ffad05..ea20a37b96e5b 100644
--- a/libclc/opencl/include/clc/opencl/math/half_log.h
+++ b/libclc/opencl/include/clc/opencl/math/half_log.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_log
+#define FUNCTION half_log
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_log10.h b/libclc/opencl/include/clc/opencl/math/half_log10.h
index 117649055cad5..35217f85bfeaf 100644
--- a/libclc/opencl/include/clc/opencl/math/half_log10.h
+++ b/libclc/opencl/include/clc/opencl/math/half_log10.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_log10
+#define FUNCTION half_log10
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_log2.h b/libclc/opencl/include/clc/opencl/math/half_log2.h
index 15f77f56d6177..bbcc0b9d17aa6 100644
--- a/libclc/opencl/include/clc/opencl/math/half_log2.h
+++ b/libclc/opencl/include/clc/opencl/math/half_log2.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_log2
+#define FUNCTION half_log2
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_powr.h b/libclc/opencl/include/clc/opencl/math/half_powr.h
index 27aa2b0fab666..eaa16251b68ac 100644
--- a/libclc/opencl/include/clc/opencl/math/half_powr.h
+++ b/libclc/opencl/include/clc/opencl/math/half_powr.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION half_powr
+#define FUNCTION half_powr
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_recip.h b/libclc/opencl/include/clc/opencl/math/half_recip.h
index b1a48d4bbefbc..b91b0d3d7c716 100644
--- a/libclc/opencl/include/clc/opencl/math/half_recip.h
+++ b/libclc/opencl/include/clc/opencl/math/half_recip.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_recip
+#define FUNCTION half_recip
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_rsqrt.h b/libclc/opencl/include/clc/opencl/math/half_rsqrt.h
index 4a277013df23a..5fc2764537aa5 100644
--- a/libclc/opencl/include/clc/opencl/math/half_rsqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/half_rsqrt.h
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_rsqrt
+#define FUNCTION half_rsqrt
 #define __FLOAT_ONLY
 #include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_sin.h b/libclc/opencl/include/clc/opencl/math/half_sin.h
index ad6309100ada0..279605d15ffc6 100644
--- a/libclc/opencl/include/clc/opencl/math/half_sin.h
+++ b/libclc/opencl/include/clc/opencl/math/half_sin.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_sin
+#define FUNCTION half_sin
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_sqrt.h b/libclc/opencl/include/clc/opencl/math/half_sqrt.h
index 00d2036fb2d35..5c8080b7c584c 100644
--- a/libclc/opencl/include/clc/opencl/math/half_sqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/half_sqrt.h
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_sqrt
+#define FUNCTION half_sqrt
 #define __FLOAT_ONLY
 #include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/half_tan.h b/libclc/opencl/include/clc/opencl/math/half_tan.h
index ee5f24ba55f5f..e63d919fb600e 100644
--- a/libclc/opencl/include/clc/opencl/math/half_tan.h
+++ b/libclc/opencl/include/clc/opencl/math/half_tan.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION half_tan
+#define FUNCTION half_tan
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/hypot.h b/libclc/opencl/include/clc/opencl/math/hypot.h
index a9d464af95c0a..4b3dae721cd5b 100644
--- a/libclc/opencl/include/clc/opencl/math/hypot.h
+++ b/libclc/opencl/include/clc/opencl/math/hypot.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION hypot
+#define FUNCTION hypot
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/ilogb.h b/libclc/opencl/include/clc/opencl/math/ilogb.h
index 45d8ea064b464..49ef681390aa7 100644
--- a/libclc/opencl/include/clc/opencl/math/ilogb.h
+++ b/libclc/opencl/include/clc/opencl/math/ilogb.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION ilogb
+#define FUNCTION ilogb
 #define __CLC_BODY <clc/math/unary_decl_with_int_return.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/ldexp.h b/libclc/opencl/include/clc/opencl/math/ldexp.h
index ca50ae6a98312..783ecd1db3821 100644
--- a/libclc/opencl/include/clc/opencl/math/ldexp.h
+++ b/libclc/opencl/include/clc/opencl/math/ldexp.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION ldexp
+#define FUNCTION ldexp
 #define __CLC_BODY <clc/shared/binary_decl_with_int_second_arg.inc>
 #include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
+#undef FUNCTION
 
 #define __CLC_BODY <clc/opencl/math/ldexp.inc>
 #include <clc/math/gentype.inc>
diff --git a/libclc/opencl/include/clc/opencl/math/lgamma.h b/libclc/opencl/include/clc/opencl/math/lgamma.h
index 9f0be722b5f63..63120747a26ac 100644
--- a/libclc/opencl/include/clc/opencl/math/lgamma.h
+++ b/libclc/opencl/include/clc/opencl/math/lgamma.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION lgamma
+#define FUNCTION lgamma
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/lgamma_r.h b/libclc/opencl/include/clc/opencl/math/lgamma_r.h
index 78438b1be5514..1dd7cca890936 100644
--- a/libclc/opencl/include/clc/opencl/math/lgamma_r.h
+++ b/libclc/opencl/include/clc/opencl/math/lgamma_r.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION lgamma_r
+#define FUNCTION lgamma_r
 #define __CLC_BODY <clc/math/unary_decl_with_int_ptr.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/log.h b/libclc/opencl/include/clc/opencl/math/log.h
index 8fec73d7fb69b..ab8e85908cdeb 100644
--- a/libclc/opencl/include/clc/opencl/math/log.h
+++ b/libclc/opencl/include/clc/opencl/math/log.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION log
+#define FUNCTION log
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/log10.h b/libclc/opencl/include/clc/opencl/math/log10.h
index 21cf2a976942d..eec17f2da9b52 100644
--- a/libclc/opencl/include/clc/opencl/math/log10.h
+++ b/libclc/opencl/include/clc/opencl/math/log10.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION log10
+#define FUNCTION log10
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/log1p.h b/libclc/opencl/include/clc/opencl/math/log1p.h
index 643207ebb9474..6334f7d86e4e7 100644
--- a/libclc/opencl/include/clc/opencl/math/log1p.h
+++ b/libclc/opencl/include/clc/opencl/math/log1p.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION log1p
+#define FUNCTION log1p
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/log2.h b/libclc/opencl/include/clc/opencl/math/log2.h
index 26b407f1019b1..ae9992a619ca6 100644
--- a/libclc/opencl/include/clc/opencl/math/log2.h
+++ b/libclc/opencl/include/clc/opencl/math/log2.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION log2
+#define FUNCTION log2
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/logb.h b/libclc/opencl/include/clc/opencl/math/logb.h
index a0daa98063810..75e153b500474 100644
--- a/libclc/opencl/include/clc/opencl/math/logb.h
+++ b/libclc/opencl/include/clc/opencl/math/logb.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION logb
+#define FUNCTION logb
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/mad.h b/libclc/opencl/include/clc/opencl/math/mad.h
index 3daf9b9f8a0e9..20e199a78a712 100644
--- a/libclc/opencl/include/clc/opencl/math/mad.h
+++ b/libclc/opencl/include/clc/opencl/math/mad.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/shared/ternary_decl.inc>
-#define __CLC_FUNCTION mad
+#define FUNCTION mad
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/maxmag.h b/libclc/opencl/include/clc/opencl/math/maxmag.h
index d4616e60dc378..ea41128d6b6b8 100644
--- a/libclc/opencl/include/clc/opencl/math/maxmag.h
+++ b/libclc/opencl/include/clc/opencl/math/maxmag.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION maxmag
+#define FUNCTION maxmag
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/minmag.h b/libclc/opencl/include/clc/opencl/math/minmag.h
index 92c0f23a22b72..59b3916e56933 100644
--- a/libclc/opencl/include/clc/opencl/math/minmag.h
+++ b/libclc/opencl/include/clc/opencl/math/minmag.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION minmag
+#define FUNCTION minmag
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/modf.h b/libclc/opencl/include/clc/opencl/math/modf.h
index b582cae948f26..75bf8d849a709 100644
--- a/libclc/opencl/include/clc/opencl/math/modf.h
+++ b/libclc/opencl/include/clc/opencl/math/modf.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION modf
+#define FUNCTION modf
 #define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_cos.h b/libclc/opencl/include/clc/opencl/math/native_cos.h
index 17967ac462c19..fa2a94abe292e 100644
--- a/libclc/opencl/include/clc/opencl/math/native_cos.h
+++ b/libclc/opencl/include/clc/opencl/math/native_cos.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_cos
+#define FUNCTION native_cos
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_divide.h b/libclc/opencl/include/clc/opencl/math/native_divide.h
index 5fe0c32f67d8e..60742038d9e4a 100644
--- a/libclc/opencl/include/clc/opencl/math/native_divide.h
+++ b/libclc/opencl/include/clc/opencl/math/native_divide.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION native_divide
+#define FUNCTION native_divide
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_exp.h b/libclc/opencl/include/clc/opencl/math/native_exp.h
index 51adca24b1bae..c77ffed7f37b5 100644
--- a/libclc/opencl/include/clc/opencl/math/native_exp.h
+++ b/libclc/opencl/include/clc/opencl/math/native_exp.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_exp
+#define FUNCTION native_exp
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_exp10.h b/libclc/opencl/include/clc/opencl/math/native_exp10.h
index 9c832735b0d97..4f1f1c4ee183e 100644
--- a/libclc/opencl/include/clc/opencl/math/native_exp10.h
+++ b/libclc/opencl/include/clc/opencl/math/native_exp10.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_exp10
+#define FUNCTION native_exp10
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_exp2.h b/libclc/opencl/include/clc/opencl/math/native_exp2.h
index 44bdbdee56adf..33e2ad37168dc 100644
--- a/libclc/opencl/include/clc/opencl/math/native_exp2.h
+++ b/libclc/opencl/include/clc/opencl/math/native_exp2.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_exp2
+#define FUNCTION native_exp2
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_log.h b/libclc/opencl/include/clc/opencl/math/native_log.h
index 9ca7df63ecd9b..6564416e84976 100644
--- a/libclc/opencl/include/clc/opencl/math/native_log.h
+++ b/libclc/opencl/include/clc/opencl/math/native_log.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_log
+#define FUNCTION native_log
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_log10.h b/libclc/opencl/include/clc/opencl/math/native_log10.h
index 10f9f6e87c5c1..ef6e2a7ddbc22 100644
--- a/libclc/opencl/include/clc/opencl/math/native_log10.h
+++ b/libclc/opencl/include/clc/opencl/math/native_log10.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_log10
+#define FUNCTION native_log10
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_log2.h b/libclc/opencl/include/clc/opencl/math/native_log2.h
index f481930cae61b..c1d7d54eb3dea 100644
--- a/libclc/opencl/include/clc/opencl/math/native_log2.h
+++ b/libclc/opencl/include/clc/opencl/math/native_log2.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_log2
+#define FUNCTION native_log2
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_powr.h b/libclc/opencl/include/clc/opencl/math/native_powr.h
index a9210092ed38d..3e472e313bfc2 100644
--- a/libclc/opencl/include/clc/opencl/math/native_powr.h
+++ b/libclc/opencl/include/clc/opencl/math/native_powr.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/shared/binary_decl.inc>
-#define __CLC_FUNCTION native_powr
+#define FUNCTION native_powr
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_recip.h b/libclc/opencl/include/clc/opencl/math/native_recip.h
index 6ab10e88cf712..8aea05ba9358b 100644
--- a/libclc/opencl/include/clc/opencl/math/native_recip.h
+++ b/libclc/opencl/include/clc/opencl/math/native_recip.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_recip
+#define FUNCTION native_recip
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_rsqrt.h b/libclc/opencl/include/clc/opencl/math/native_rsqrt.h
index fc6e384e47998..5f73545ce0f7d 100644
--- a/libclc/opencl/include/clc/opencl/math/native_rsqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/native_rsqrt.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_rsqrt
+#define FUNCTION native_rsqrt
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_sin.h b/libclc/opencl/include/clc/opencl/math/native_sin.h
index 295ac31dcf388..c109b5ecad5ed 100644
--- a/libclc/opencl/include/clc/opencl/math/native_sin.h
+++ b/libclc/opencl/include/clc/opencl/math/native_sin.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_sin
+#define FUNCTION native_sin
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_sqrt.h b/libclc/opencl/include/clc/opencl/math/native_sqrt.h
index 76beaa3814e00..061565ca1b30b 100644
--- a/libclc/opencl/include/clc/opencl/math/native_sqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/native_sqrt.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_sqrt
+#define FUNCTION native_sqrt
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/native_tan.h b/libclc/opencl/include/clc/opencl/math/native_tan.h
index 02afc2b4a1316..5b93b2604b477 100644
--- a/libclc/opencl/include/clc/opencl/math/native_tan.h
+++ b/libclc/opencl/include/clc/opencl/math/native_tan.h
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION native_tan
+#define FUNCTION native_tan
 #define __FLOAT_ONLY
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/nextafter.h b/libclc/opencl/include/clc/opencl/math/nextafter.h
index ce1d549c0659b..3b95500b0e9da 100644
--- a/libclc/opencl/include/clc/opencl/math/nextafter.h
+++ b/libclc/opencl/include/clc/opencl/math/nextafter.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION nextafter
+#define FUNCTION nextafter
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/pow.h b/libclc/opencl/include/clc/opencl/math/pow.h
index 5f8479332830e..3b62f4c154f36 100644
--- a/libclc/opencl/include/clc/opencl/math/pow.h
+++ b/libclc/opencl/include/clc/opencl/math/pow.h
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION pow
+#define FUNCTION pow
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 #include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/pown.h b/libclc/opencl/include/clc/opencl/math/pown.h
index bbdf8f8b6e91e..ba249712ec84c 100644
--- a/libclc/opencl/include/clc/opencl/math/pown.h
+++ b/libclc/opencl/include/clc/opencl/math/pown.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION pown
+#define FUNCTION pown
 #define __CLC_BODY <clc/shared/binary_decl_with_int_second_arg.inc>
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/powr.h b/libclc/opencl/include/clc/opencl/math/powr.h
index d128d79edb39f..6cbcbc143f40a 100644
--- a/libclc/opencl/include/clc/opencl/math/powr.h
+++ b/libclc/opencl/include/clc/opencl/math/powr.h
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION powr
+#define FUNCTION powr
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 #include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/remainder.h b/libclc/opencl/include/clc/opencl/math/remainder.h
index d366474f4192c..0315516a1e5ab 100644
--- a/libclc/opencl/include/clc/opencl/math/remainder.h
+++ b/libclc/opencl/include/clc/opencl/math/remainder.h
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION remainder
+#define FUNCTION remainder
 #define __CLC_BODY <clc/shared/binary_decl.inc>
 #include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/remquo.h b/libclc/opencl/include/clc/opencl/math/remquo.h
index 007d380c7cfc8..5ce010e2c273f 100644
--- a/libclc/opencl/include/clc/opencl/math/remquo.h
+++ b/libclc/opencl/include/clc/opencl/math/remquo.h
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION remquo
+#define FUNCTION remquo
 
 #define __CLC_BODY <clc/math/remquo_decl.inc>
 #include <clc/math/gentype.inc>
@@ -18,4 +18,4 @@
 #undef __CLC_ADDRESS_SPACE
 #endif
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/rint.h b/libclc/opencl/include/clc/opencl/math/rint.h
index aa31c177882ca..bb27f3d321530 100644
--- a/libclc/opencl/include/clc/opencl/math/rint.h
+++ b/libclc/opencl/include/clc/opencl/math/rint.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION rint
+#define FUNCTION rint
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/rootn.h b/libclc/opencl/include/clc/opencl/math/rootn.h
index 669aeefb273a9..0751e875948fa 100644
--- a/libclc/opencl/include/clc/opencl/math/rootn.h
+++ b/libclc/opencl/include/clc/opencl/math/rootn.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/shared/binary_decl_with_int_second_arg.inc>
-#define __CLC_FUNCTION rootn
+#define FUNCTION rootn
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/round.h b/libclc/opencl/include/clc/opencl/math/round.h
index f4209f631d6ce..6764c251bdb91 100644
--- a/libclc/opencl/include/clc/opencl/math/round.h
+++ b/libclc/opencl/include/clc/opencl/math/round.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION round
+#define FUNCTION round
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/rsqrt.h b/libclc/opencl/include/clc/opencl/math/rsqrt.h
index 5f674b299adbd..4bcda124c8b82 100644
--- a/libclc/opencl/include/clc/opencl/math/rsqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/rsqrt.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION rsqrt
+#define FUNCTION rsqrt
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/sin.h b/libclc/opencl/include/clc/opencl/math/sin.h
index 5ef699395689f..38761d946cc9b 100644
--- a/libclc/opencl/include/clc/opencl/math/sin.h
+++ b/libclc/opencl/include/clc/opencl/math/sin.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION sin
+#define FUNCTION sin
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/sincos.h b/libclc/opencl/include/clc/opencl/math/sincos.h
index 7426c23e88af9..0a812f3d13c84 100644
--- a/libclc/opencl/include/clc/opencl/math/sincos.h
+++ b/libclc/opencl/include/clc/opencl/math/sincos.h
@@ -7,6 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
-#define __CLC_FUNCTION __clc_sincos
+#define FUNCTION __clc_sincos
 #include <clc/math/gentype.inc>
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/sinh.h b/libclc/opencl/include/clc/opencl/math/sinh.h
index c6d7d9a936e2f..194a6acf155a4 100644
--- a/libclc/opencl/include/clc/opencl/math/sinh.h
+++ b/libclc/opencl/include/clc/opencl/math/sinh.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION sinh
+#define FUNCTION sinh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/sinpi.h b/libclc/opencl/include/clc/opencl/math/sinpi.h
index 0d90dbf153511..f4be7d08ab5f7 100644
--- a/libclc/opencl/include/clc/opencl/math/sinpi.h
+++ b/libclc/opencl/include/clc/opencl/math/sinpi.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION sinpi
+#define FUNCTION sinpi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/sqrt.h b/libclc/opencl/include/clc/opencl/math/sqrt.h
index 03faa0513c06e..6f842365b469a 100644
--- a/libclc/opencl/include/clc/opencl/math/sqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/sqrt.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION sqrt
+#define FUNCTION sqrt
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/tan.h b/libclc/opencl/include/clc/opencl/math/tan.h
index bbc0b79ba0bba..312561364889d 100644
--- a/libclc/opencl/include/clc/opencl/math/tan.h
+++ b/libclc/opencl/include/clc/opencl/math/tan.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION tan
+#define FUNCTION tan
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/tanh.h b/libclc/opencl/include/clc/opencl/math/tanh.h
index 9017078740a0b..fef93ebe9f7bf 100644
--- a/libclc/opencl/include/clc/opencl/math/tanh.h
+++ b/libclc/opencl/include/clc/opencl/math/tanh.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION tanh
+#define FUNCTION tanh
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/tanpi.h b/libclc/opencl/include/clc/opencl/math/tanpi.h
index f02b5a9be81ff..2df53e8fe99b0 100644
--- a/libclc/opencl/include/clc/opencl/math/tanpi.h
+++ b/libclc/opencl/include/clc/opencl/math/tanpi.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION tanpi
+#define FUNCTION tanpi
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/tgamma.h b/libclc/opencl/include/clc/opencl/math/tgamma.h
index c74d67a857c5d..8c0f320c7c34c 100644
--- a/libclc/opencl/include/clc/opencl/math/tgamma.h
+++ b/libclc/opencl/include/clc/opencl/math/tgamma.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION tgamma
+#define FUNCTION tgamma
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/math/trunc.h b/libclc/opencl/include/clc/opencl/math/trunc.h
index 5832e9e93bd8f..41597cb56209e 100644
--- a/libclc/opencl/include/clc/opencl/math/trunc.h
+++ b/libclc/opencl/include/clc/opencl/math/trunc.h
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
-#define __CLC_FUNCTION trunc
+#define FUNCTION trunc
 
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/misc/shuffle.h b/libclc/opencl/include/clc/opencl/misc/shuffle.h
index f9d84c9633d37..3c3be84a5baf3 100644
--- a/libclc/opencl/include/clc/opencl/misc/shuffle.h
+++ b/libclc/opencl/include/clc/opencl/misc/shuffle.h
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION shuffle
+#define FUNCTION shuffle
 
 // Integer-type decls
 #define __CLC_BODY <clc/misc/shuffle_decl.inc>
@@ -16,4 +16,4 @@
 #define __CLC_BODY <clc/misc/shuffle_decl.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/misc/shuffle2.h b/libclc/opencl/include/clc/opencl/misc/shuffle2.h
index 91548ad784fbb..865de53029be8 100644
--- a/libclc/opencl/include/clc/opencl/misc/shuffle2.h
+++ b/libclc/opencl/include/clc/opencl/misc/shuffle2.h
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION shuffle2
+#define FUNCTION shuffle2
 
 // Integer-type decls
 #define __CLC_BODY <clc/misc/shuffle2_decl.inc>
@@ -16,4 +16,4 @@
 #define __CLC_BODY <clc/misc/shuffle2_decl.inc>
 #include <clc/math/gentype.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/relational/isfinite.h b/libclc/opencl/include/clc/opencl/relational/isfinite.h
index e92a4d40a8cbe..3c70ebacd7dff 100644
--- a/libclc/opencl/include/clc/opencl/relational/isfinite.h
+++ b/libclc/opencl/include/clc/opencl/relational/isfinite.h
@@ -8,9 +8,9 @@
 
 #undef isfinite
 
-#define __CLC_FUNCTION isfinite
+#define FUNCTION isfinite
 #define __CLC_BODY <clc/relational/unary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/relational/isgreater.h b/libclc/opencl/include/clc/opencl/relational/isgreater.h
index bec1e81f48baa..f64b5d8c13e25 100644
--- a/libclc/opencl/include/clc/opencl/relational/isgreater.h
+++ b/libclc/opencl/include/clc/opencl/relational/isgreater.h
@@ -8,9 +8,9 @@
 
 #undef isgreater
 
-#define __CLC_FUNCTION isgreater
+#define FUNCTION isgreater
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h b/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h
index da02167fc010a..e8b6a03e6bf42 100644
--- a/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h
+++ b/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h
@@ -8,9 +8,9 @@
 
 #undef isgreaterequal
 
-#define __CLC_FUNCTION isgreaterequal
+#define FUNCTION isgreaterequal
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/relational/isless.h b/libclc/opencl/include/clc/opencl/relational/isless.h
index c930b6df6d083..d5a8c06beb683 100644
--- a/libclc/opencl/include/clc/opencl/relational/isless.h
+++ b/libclc/opencl/include/clc/opencl/relational/isless.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION isless
+#define FUNCTION isless
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/relational/islessequal.h b/libclc/opencl/include/clc/opencl/relational/islessequal.h
index 335c29612446e..b4c3aee168d57 100644
--- a/libclc/opencl/include/clc/opencl/relational/islessequal.h
+++ b/libclc/opencl/include/clc/opencl/relational/islessequal.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION islessequal
+#define FUNCTION islessequal
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/relational/islessgreater.h b/libclc/opencl/include/clc/opencl/relational/islessgreater.h
index f9a5fa8b01221..f1306b3aac263 100644
--- a/libclc/opencl/include/clc/opencl/relational/islessgreater.h
+++ b/libclc/opencl/include/clc/opencl/relational/islessgreater.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define __CLC_FUNCTION islessgreater
+#define FUNCTION islessgreater
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/relational/isnormal.h b/libclc/opencl/include/clc/opencl/relational/isnormal.h
index 33b7a7e894511..92646c342c079 100644
--- a/libclc/opencl/include/clc/opencl/relational/isnormal.h
+++ b/libclc/opencl/include/clc/opencl/relational/isnormal.h
@@ -8,9 +8,9 @@
 
 #undef isnormal
 
-#define __CLC_FUNCTION isnormal
+#define FUNCTION isnormal
 #define __CLC_BODY <clc/relational/unary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/relational/isnotequal.h b/libclc/opencl/include/clc/opencl/relational/isnotequal.h
index dfb9de1da3a18..f65f3d47720a7 100644
--- a/libclc/opencl/include/clc/opencl/relational/isnotequal.h
+++ b/libclc/opencl/include/clc/opencl/relational/isnotequal.h
@@ -8,9 +8,9 @@
 
 #undef isnotequal
 
-#define __CLC_FUNCTION isnotequal
+#define FUNCTION isnotequal
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/relational/isordered.h b/libclc/opencl/include/clc/opencl/relational/isordered.h
index bc6dbdeba92a0..92cefa6d6f366 100644
--- a/libclc/opencl/include/clc/opencl/relational/isordered.h
+++ b/libclc/opencl/include/clc/opencl/relational/isordered.h
@@ -8,9 +8,9 @@
 
 #undef isordered
 
-#define __CLC_FUNCTION isordered
+#define FUNCTION isordered
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/relational/isunordered.h b/libclc/opencl/include/clc/opencl/relational/isunordered.h
index 73f05ce9edea8..af91e626abd3e 100644
--- a/libclc/opencl/include/clc/opencl/relational/isunordered.h
+++ b/libclc/opencl/include/clc/opencl/relational/isunordered.h
@@ -8,9 +8,9 @@
 
 #undef isunordered
 
-#define __CLC_FUNCTION isunordered
+#define FUNCTION isunordered
 #define __CLC_BODY <clc/relational/binary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/include/clc/opencl/relational/signbit.h b/libclc/opencl/include/clc/opencl/relational/signbit.h
index 89785f5fc1030..1e0894cfba5a2 100644
--- a/libclc/opencl/include/clc/opencl/relational/signbit.h
+++ b/libclc/opencl/include/clc/opencl/relational/signbit.h
@@ -8,9 +8,9 @@
 
 #undef signbit
 
-#define __CLC_FUNCTION signbit
+#define FUNCTION signbit
 #define __CLC_BODY <clc/relational/unary_decl.inc>
 
 #include <clc/relational/floatn.inc>
 
-#undef __CLC_FUNCTION
+#undef FUNCTION
diff --git a/libclc/opencl/lib/clspv/math/fma.cl b/libclc/opencl/lib/clspv/math/fma.cl
index 0f3141a0e09ee..c027b4fcd8f12 100644
--- a/libclc/opencl/lib/clspv/math/fma.cl
+++ b/libclc/opencl/lib/clspv/math/fma.cl
@@ -11,7 +11,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION fma
-#define __CLC_FUNCTION(x) __clc_sw_fma
+#define __IMPL_FUNCTION(x) __clc_sw_fma
 #define __CLC_BODY <clc/shared/ternary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/opencl/lib/generic/math/ldexp.cl b/libclc/opencl/lib/generic/math/ldexp.cl
index 069ba8251feba..81c027f736e32 100644
--- a/libclc/opencl/lib/generic/math/ldexp.cl
+++ b/libclc/opencl/lib/generic/math/ldexp.cl
@@ -10,7 +10,7 @@
 #include <clc/opencl/clc.h>
 
 #define FUNCTION ldexp
-#define __CLC_FUNCTION(x) __clc_ldexp
+#define __IMPL_FUNCTION(x) __clc_ldexp
 #define __CLC_BODY <clc/shared/binary_def_with_int_second_arg.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/opencl/lib/generic/math/nextafter.cl b/libclc/opencl/lib/generic/math/nextafter.cl
index 6a5a745f82526..6fd52802941b1 100644
--- a/libclc/opencl/lib/generic/math/nextafter.cl
+++ b/libclc/opencl/lib/generic/math/nextafter.cl
@@ -10,7 +10,7 @@
 #include <clc/opencl/clc.h>
 
 #define FUNCTION nextafter
-#define __CLC_FUNCTION(x) __clc_nextafter
+#define __IMPL_FUNCTION(x) __clc_nextafter
 #define __CLC_BODY <clc/shared/binary_def.inc>
 
 #include <clc/math/gentype.inc>
diff --git a/libclc/opencl/lib/generic/relational/binary_def.inc b/libclc/opencl/lib/generic/relational/binary_def.inc
index a3b90bbd6d417..54bb237b8f8f5 100644
--- a/libclc/opencl/lib/generic/relational/binary_def.inc
+++ b/libclc/opencl/lib/generic/relational/binary_def.inc
@@ -8,8 +8,8 @@
 
 #include <clc/utils.h>
 
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 
 _CLC_OVERLOAD _CLC_DEF __CLC_INTN FUNCTION(__CLC_FLOATN a, __CLC_FLOATN b) {
-  return __CLC_FUNCTION(FUNCTION)(a, b);
+  return __IMPL_FUNCTION(FUNCTION)(a, b);
 }
diff --git a/libclc/opencl/lib/generic/relational/unary_def.inc b/libclc/opencl/lib/generic/relational/unary_def.inc
index 80dea211bb30f..47bb33ef2da3d 100644
--- a/libclc/opencl/lib/generic/relational/unary_def.inc
+++ b/libclc/opencl/lib/generic/relational/unary_def.inc
@@ -8,8 +8,8 @@
 
 #include <clc/utils.h>
 
-#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
+#define __IMPL_FUNCTION(x) __CLC_CONCAT(__clc_, x)
 
 _CLC_OVERLOAD _CLC_DEF __CLC_INTN FUNCTION(__CLC_FLOATN a) {
-  return __CLC_FUNCTION(FUNCTION)(a);
+  return __IMPL_FUNCTION(FUNCTION)(a);
 }
diff --git a/libclc/opencl/lib/spirv/math/fma.cl b/libclc/opencl/lib/spirv/math/fma.cl
index 0f3141a0e09ee..c027b4fcd8f12 100644
--- a/libclc/opencl/lib/spirv/math/fma.cl
+++ b/libclc/opencl/lib/spirv/math/fma.cl
@@ -11,7 +11,7 @@
 
 #define __FLOAT_ONLY
 #define FUNCTION fma
-#define __CLC_FUNCTION(x) __clc_sw_fma
+#define __IMPL_FUNCTION(x) __clc_sw_fma
 #define __CLC_BODY <clc/shared/ternary_def.inc>
 
 #include <clc/math/gentype.inc>



More information about the cfe-commits mailing list