[libclc] [libclc] Tighten OpenCL builtin include strategy (PR #147276)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 7 03:56:04 PDT 2025
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/147276
This commit continues the work from #146840 and extends it to the maths, geomtrics, common, and relational directories.
All headers have include guards and, where appropriate, include the minimal code required for their specific definitions. Implementation files no longer include the large catch-all header of all OpenCL builtin declarations.
>From 223704658153266d67b68d1326f24b572c4cf287 Mon Sep 17 00:00:00 2001
From: Fraser Cormack <fraser at codeplay.com>
Date: Mon, 7 Jul 2025 10:44:54 +0100
Subject: [PATCH] [libclc] Tighten OpenCL builtin include strategy
This commit continues the work from #146840 and extends it to the
maths, geomtrics, common, and relational directories.
All headers have include guards and, where appropriate, include the
minimal code required for their specific definitions. Implementation
files no longer include the large catch-all header of all OpenCL builtin
declarations.
---
libclc/opencl/include/clc/opencl/common/degrees.h | 5 +++++
libclc/opencl/include/clc/opencl/common/mix.h | 5 +++++
libclc/opencl/include/clc/opencl/common/radians.h | 5 +++++
libclc/opencl/include/clc/opencl/common/sign.h | 5 +++++
libclc/opencl/include/clc/opencl/common/smoothstep.h | 5 +++++
libclc/opencl/include/clc/opencl/common/step.h | 5 +++++
libclc/opencl/include/clc/opencl/geometric/cross.h | 5 +++++
libclc/opencl/include/clc/opencl/geometric/distance.h | 5 +++++
libclc/opencl/include/clc/opencl/geometric/dot.h | 5 +++++
libclc/opencl/include/clc/opencl/geometric/fast_distance.h | 5 +++++
libclc/opencl/include/clc/opencl/geometric/fast_length.h | 5 +++++
.../opencl/include/clc/opencl/geometric/fast_normalize.h | 5 +++++
libclc/opencl/include/clc/opencl/geometric/length.h | 5 +++++
libclc/opencl/include/clc/opencl/geometric/normalize.h | 5 +++++
libclc/opencl/include/clc/opencl/math/acos.h | 5 +++++
libclc/opencl/include/clc/opencl/math/acosh.h | 5 +++++
libclc/opencl/include/clc/opencl/math/acospi.h | 5 +++++
libclc/opencl/include/clc/opencl/math/asin.h | 5 +++++
libclc/opencl/include/clc/opencl/math/asinh.h | 5 +++++
libclc/opencl/include/clc/opencl/math/asinpi.h | 5 +++++
libclc/opencl/include/clc/opencl/math/atan.h | 5 +++++
libclc/opencl/include/clc/opencl/math/atan2.h | 5 +++++
libclc/opencl/include/clc/opencl/math/atan2pi.h | 5 +++++
libclc/opencl/include/clc/opencl/math/atanh.h | 5 +++++
libclc/opencl/include/clc/opencl/math/atanpi.h | 5 +++++
libclc/opencl/include/clc/opencl/math/cbrt.h | 5 +++++
libclc/opencl/include/clc/opencl/math/ceil.h | 5 +++++
libclc/opencl/include/clc/opencl/math/copysign.h | 5 +++++
libclc/opencl/include/clc/opencl/math/cos.h | 5 +++++
libclc/opencl/include/clc/opencl/math/cosh.h | 5 +++++
libclc/opencl/include/clc/opencl/math/cospi.h | 5 +++++
libclc/opencl/include/clc/opencl/math/erf.h | 5 +++++
libclc/opencl/include/clc/opencl/math/erfc.h | 5 +++++
libclc/opencl/include/clc/opencl/math/exp.h | 5 +++++
libclc/opencl/include/clc/opencl/math/exp10.h | 5 +++++
libclc/opencl/include/clc/opencl/math/exp2.h | 5 +++++
libclc/opencl/include/clc/opencl/math/expm1.h | 5 +++++
libclc/opencl/include/clc/opencl/math/fabs.h | 5 +++++
libclc/opencl/include/clc/opencl/math/fdim.h | 5 +++++
libclc/opencl/include/clc/opencl/math/floor.h | 5 +++++
libclc/opencl/include/clc/opencl/math/fma.h | 5 +++++
libclc/opencl/include/clc/opencl/math/fmax.h | 5 +++++
libclc/opencl/include/clc/opencl/math/fmin.h | 5 +++++
libclc/opencl/include/clc/opencl/math/fmod.h | 5 +++++
libclc/opencl/include/clc/opencl/math/fract.h | 5 +++++
libclc/opencl/include/clc/opencl/math/frexp.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_cos.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_divide.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_exp.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_exp10.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_exp2.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_log.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_log10.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_log2.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_powr.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_recip.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_rsqrt.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_sin.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_sqrt.h | 5 +++++
libclc/opencl/include/clc/opencl/math/half_tan.h | 5 +++++
libclc/opencl/include/clc/opencl/math/hypot.h | 5 +++++
libclc/opencl/include/clc/opencl/math/ilogb.h | 5 +++++
libclc/opencl/include/clc/opencl/math/ldexp.h | 5 +++++
libclc/opencl/include/clc/opencl/math/lgamma.h | 5 +++++
libclc/opencl/include/clc/opencl/math/lgamma_r.h | 5 +++++
libclc/opencl/include/clc/opencl/math/log.h | 5 +++++
libclc/opencl/include/clc/opencl/math/log10.h | 5 +++++
libclc/opencl/include/clc/opencl/math/log1p.h | 5 +++++
libclc/opencl/include/clc/opencl/math/log2.h | 5 +++++
libclc/opencl/include/clc/opencl/math/logb.h | 5 +++++
libclc/opencl/include/clc/opencl/math/mad.h | 5 +++++
libclc/opencl/include/clc/opencl/math/maxmag.h | 5 +++++
libclc/opencl/include/clc/opencl/math/minmag.h | 5 +++++
libclc/opencl/include/clc/opencl/math/modf.h | 5 +++++
libclc/opencl/include/clc/opencl/math/nan.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_cos.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_divide.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_exp.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_exp10.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_exp2.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_log.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_log10.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_log2.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_powr.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_recip.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_rsqrt.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_sin.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_sqrt.h | 5 +++++
libclc/opencl/include/clc/opencl/math/native_tan.h | 5 +++++
libclc/opencl/include/clc/opencl/math/nextafter.h | 5 +++++
libclc/opencl/include/clc/opencl/math/pow.h | 5 +++++
libclc/opencl/include/clc/opencl/math/pown.h | 5 +++++
libclc/opencl/include/clc/opencl/math/powr.h | 5 +++++
libclc/opencl/include/clc/opencl/math/remainder.h | 5 +++++
libclc/opencl/include/clc/opencl/math/remquo.h | 5 +++++
libclc/opencl/include/clc/opencl/math/rint.h | 5 +++++
libclc/opencl/include/clc/opencl/math/rootn.h | 5 +++++
libclc/opencl/include/clc/opencl/math/round.h | 5 +++++
libclc/opencl/include/clc/opencl/math/rsqrt.h | 5 +++++
libclc/opencl/include/clc/opencl/math/sin.h | 5 +++++
libclc/opencl/include/clc/opencl/math/sincos.h | 5 +++++
libclc/opencl/include/clc/opencl/math/sinh.h | 5 +++++
libclc/opencl/include/clc/opencl/math/sinpi.h | 5 +++++
libclc/opencl/include/clc/opencl/math/sqrt.h | 5 +++++
libclc/opencl/include/clc/opencl/math/tan.h | 5 +++++
libclc/opencl/include/clc/opencl/math/tanh.h | 5 +++++
libclc/opencl/include/clc/opencl/math/tanpi.h | 5 +++++
libclc/opencl/include/clc/opencl/math/tgamma.h | 5 +++++
libclc/opencl/include/clc/opencl/math/trunc.h | 5 +++++
libclc/opencl/include/clc/opencl/relational/all.h | 7 +++++++
libclc/opencl/include/clc/opencl/relational/any.h | 7 +++++++
libclc/opencl/include/clc/opencl/relational/bitselect.h | 7 +++++++
libclc/opencl/include/clc/opencl/relational/isequal.h | 7 +++++++
libclc/opencl/include/clc/opencl/relational/isfinite.h | 7 ++++++-
libclc/opencl/include/clc/opencl/relational/isgreater.h | 7 ++++++-
.../opencl/include/clc/opencl/relational/isgreaterequal.h | 7 ++++++-
libclc/opencl/include/clc/opencl/relational/isinf.h | 7 +++++++
libclc/opencl/include/clc/opencl/relational/isless.h | 7 +++++++
libclc/opencl/include/clc/opencl/relational/islessequal.h | 7 +++++++
.../opencl/include/clc/opencl/relational/islessgreater.h | 7 +++++++
libclc/opencl/include/clc/opencl/relational/isnan.h | 7 +++++++
libclc/opencl/include/clc/opencl/relational/isnormal.h | 7 ++++++-
libclc/opencl/include/clc/opencl/relational/isnotequal.h | 7 ++++++-
libclc/opencl/include/clc/opencl/relational/isordered.h | 7 ++++++-
libclc/opencl/include/clc/opencl/relational/isunordered.h | 7 ++++++-
libclc/opencl/include/clc/opencl/relational/select.h | 7 +++++++
libclc/opencl/include/clc/opencl/relational/signbit.h | 7 ++++++-
libclc/opencl/lib/clspv/math/fma.cl | 2 +-
libclc/opencl/lib/generic/common/degrees.cl | 2 +-
libclc/opencl/lib/generic/common/mix.cl | 2 +-
libclc/opencl/lib/generic/common/radians.cl | 2 +-
libclc/opencl/lib/generic/common/sign.cl | 2 +-
libclc/opencl/lib/generic/common/smoothstep.cl | 2 +-
libclc/opencl/lib/generic/common/step.cl | 2 +-
libclc/opencl/lib/generic/geometric/cross.cl | 2 +-
libclc/opencl/lib/generic/geometric/distance.cl | 2 +-
libclc/opencl/lib/generic/geometric/dot.cl | 2 +-
libclc/opencl/lib/generic/geometric/fast_distance.cl | 2 +-
libclc/opencl/lib/generic/geometric/fast_length.cl | 2 +-
libclc/opencl/lib/generic/geometric/fast_normalize.cl | 2 +-
libclc/opencl/lib/generic/geometric/length.cl | 2 +-
libclc/opencl/lib/generic/geometric/normalize.cl | 2 +-
libclc/opencl/lib/generic/math/acos.cl | 2 +-
libclc/opencl/lib/generic/math/acosh.cl | 2 +-
libclc/opencl/lib/generic/math/acospi.cl | 2 +-
libclc/opencl/lib/generic/math/asin.cl | 2 +-
libclc/opencl/lib/generic/math/asinh.cl | 2 +-
libclc/opencl/lib/generic/math/asinpi.cl | 2 +-
libclc/opencl/lib/generic/math/atan.cl | 2 +-
libclc/opencl/lib/generic/math/atan2.cl | 2 +-
libclc/opencl/lib/generic/math/atan2pi.cl | 2 +-
libclc/opencl/lib/generic/math/atanh.cl | 2 +-
libclc/opencl/lib/generic/math/atanpi.cl | 2 +-
libclc/opencl/lib/generic/math/cbrt.cl | 2 +-
libclc/opencl/lib/generic/math/ceil.cl | 2 +-
libclc/opencl/lib/generic/math/copysign.cl | 2 +-
libclc/opencl/lib/generic/math/cos.cl | 2 +-
libclc/opencl/lib/generic/math/cosh.cl | 2 +-
libclc/opencl/lib/generic/math/cospi.cl | 2 +-
libclc/opencl/lib/generic/math/erf.cl | 2 +-
libclc/opencl/lib/generic/math/erfc.cl | 2 +-
libclc/opencl/lib/generic/math/exp.cl | 2 +-
libclc/opencl/lib/generic/math/exp10.cl | 2 +-
libclc/opencl/lib/generic/math/exp2.cl | 2 +-
libclc/opencl/lib/generic/math/expm1.cl | 2 +-
libclc/opencl/lib/generic/math/fabs.cl | 2 +-
libclc/opencl/lib/generic/math/fdim.cl | 2 +-
libclc/opencl/lib/generic/math/floor.cl | 2 +-
libclc/opencl/lib/generic/math/fma.cl | 2 +-
libclc/opencl/lib/generic/math/fmax.cl | 2 +-
libclc/opencl/lib/generic/math/fmin.cl | 2 +-
libclc/opencl/lib/generic/math/fmod.cl | 2 +-
libclc/opencl/lib/generic/math/fract.cl | 2 +-
libclc/opencl/lib/generic/math/frexp.cl | 2 +-
libclc/opencl/lib/generic/math/half_cos.cl | 2 +-
libclc/opencl/lib/generic/math/half_divide.cl | 2 +-
libclc/opencl/lib/generic/math/half_exp.cl | 2 +-
libclc/opencl/lib/generic/math/half_exp10.cl | 2 +-
libclc/opencl/lib/generic/math/half_exp2.cl | 2 +-
libclc/opencl/lib/generic/math/half_log.cl | 2 +-
libclc/opencl/lib/generic/math/half_log10.cl | 2 +-
libclc/opencl/lib/generic/math/half_log2.cl | 2 +-
libclc/opencl/lib/generic/math/half_powr.cl | 2 +-
libclc/opencl/lib/generic/math/half_recip.cl | 2 +-
libclc/opencl/lib/generic/math/half_rsqrt.cl | 2 +-
libclc/opencl/lib/generic/math/half_sin.cl | 2 +-
libclc/opencl/lib/generic/math/half_sqrt.cl | 2 +-
libclc/opencl/lib/generic/math/half_tan.cl | 2 +-
libclc/opencl/lib/generic/math/hypot.cl | 2 +-
libclc/opencl/lib/generic/math/ilogb.cl | 2 +-
libclc/opencl/lib/generic/math/ldexp.cl | 2 +-
libclc/opencl/lib/generic/math/lgamma.cl | 2 +-
libclc/opencl/lib/generic/math/lgamma_r.cl | 2 +-
libclc/opencl/lib/generic/math/log.cl | 2 +-
libclc/opencl/lib/generic/math/log10.cl | 2 +-
libclc/opencl/lib/generic/math/log1p.cl | 2 +-
libclc/opencl/lib/generic/math/log2.cl | 2 +-
libclc/opencl/lib/generic/math/logb.cl | 2 +-
libclc/opencl/lib/generic/math/mad.cl | 2 +-
libclc/opencl/lib/generic/math/maxmag.cl | 2 +-
libclc/opencl/lib/generic/math/minmag.cl | 2 +-
libclc/opencl/lib/generic/math/modf.cl | 2 +-
libclc/opencl/lib/generic/math/native_cos.cl | 2 +-
libclc/opencl/lib/generic/math/native_divide.cl | 2 +-
libclc/opencl/lib/generic/math/native_exp.cl | 2 +-
libclc/opencl/lib/generic/math/native_exp10.cl | 2 +-
libclc/opencl/lib/generic/math/native_exp2.cl | 2 +-
libclc/opencl/lib/generic/math/native_log.cl | 2 +-
libclc/opencl/lib/generic/math/native_log10.cl | 2 +-
libclc/opencl/lib/generic/math/native_log2.cl | 2 +-
libclc/opencl/lib/generic/math/native_powr.cl | 2 +-
libclc/opencl/lib/generic/math/native_recip.cl | 2 +-
libclc/opencl/lib/generic/math/native_rsqrt.cl | 2 +-
libclc/opencl/lib/generic/math/native_sin.cl | 2 +-
libclc/opencl/lib/generic/math/native_sqrt.cl | 2 +-
libclc/opencl/lib/generic/math/native_tan.cl | 2 +-
libclc/opencl/lib/generic/math/nextafter.cl | 2 +-
libclc/opencl/lib/generic/math/pow.cl | 2 +-
libclc/opencl/lib/generic/math/pown.cl | 2 +-
libclc/opencl/lib/generic/math/powr.cl | 2 +-
libclc/opencl/lib/generic/math/remainder.cl | 2 +-
libclc/opencl/lib/generic/math/remquo.cl | 2 +-
libclc/opencl/lib/generic/math/rint.cl | 2 +-
libclc/opencl/lib/generic/math/rootn.cl | 2 +-
libclc/opencl/lib/generic/math/round.cl | 2 +-
libclc/opencl/lib/generic/math/rsqrt.cl | 2 +-
libclc/opencl/lib/generic/math/sin.cl | 2 +-
libclc/opencl/lib/generic/math/sincos.cl | 2 +-
libclc/opencl/lib/generic/math/sinh.cl | 2 +-
libclc/opencl/lib/generic/math/sinpi.cl | 2 +-
libclc/opencl/lib/generic/math/sqrt.cl | 2 +-
libclc/opencl/lib/generic/math/tan.cl | 2 +-
libclc/opencl/lib/generic/math/tanh.cl | 2 +-
libclc/opencl/lib/generic/math/tanpi.cl | 2 +-
libclc/opencl/lib/generic/math/tgamma.cl | 2 +-
libclc/opencl/lib/generic/math/trunc.cl | 2 +-
libclc/opencl/lib/generic/relational/all.cl | 2 +-
libclc/opencl/lib/generic/relational/any.cl | 2 +-
libclc/opencl/lib/generic/relational/bitselect.cl | 2 +-
libclc/opencl/lib/generic/relational/isequal.cl | 2 +-
libclc/opencl/lib/generic/relational/isfinite.cl | 2 +-
libclc/opencl/lib/generic/relational/isgreater.cl | 2 +-
libclc/opencl/lib/generic/relational/isgreaterequal.cl | 2 +-
libclc/opencl/lib/generic/relational/isinf.cl | 2 +-
libclc/opencl/lib/generic/relational/isless.cl | 2 +-
libclc/opencl/lib/generic/relational/islessequal.cl | 2 +-
libclc/opencl/lib/generic/relational/islessgreater.cl | 2 +-
libclc/opencl/lib/generic/relational/isnan.cl | 2 +-
libclc/opencl/lib/generic/relational/isnormal.cl | 2 +-
libclc/opencl/lib/generic/relational/isnotequal.cl | 2 +-
libclc/opencl/lib/generic/relational/isordered.cl | 2 +-
libclc/opencl/lib/generic/relational/isunordered.cl | 2 +-
libclc/opencl/lib/generic/relational/select.cl | 2 +-
libclc/opencl/lib/generic/relational/signbit.cl | 2 +-
libclc/opencl/lib/spirv/math/fma.cl | 2 +-
255 files changed, 791 insertions(+), 136 deletions(-)
diff --git a/libclc/opencl/include/clc/opencl/common/degrees.h b/libclc/opencl/include/clc/opencl/common/degrees.h
index 6511bc9be10d7..5bd6f4e8f7fd5 100644
--- a/libclc/opencl/include/clc/opencl/common/degrees.h
+++ b/libclc/opencl/include/clc/opencl/common/degrees.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_COMMON_DEGREES_H__
+#define __CLC_OPENCL_COMMON_DEGREES_H__
+
#define FUNCTION degrees
#define __CLC_BODY <clc/math/unary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_COMMON_DEGREES_H__
diff --git a/libclc/opencl/include/clc/opencl/common/mix.h b/libclc/opencl/include/clc/opencl/common/mix.h
index 76aeaaba665ac..75863cf69946f 100644
--- a/libclc/opencl/include/clc/opencl/common/mix.h
+++ b/libclc/opencl/include/clc/opencl/common/mix.h
@@ -6,5 +6,10 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_COMMON_MIX_H__
+#define __CLC_OPENCL_COMMON_MIX_H__
+
#define __CLC_BODY <clc/opencl/common/mix.inc>
#include <clc/math/gentype.inc>
+
+#endif // __CLC_OPENCL_COMMON_MIX_H__
diff --git a/libclc/opencl/include/clc/opencl/common/radians.h b/libclc/opencl/include/clc/opencl/common/radians.h
index 7cfee9e6d6403..3761a7e875be3 100644
--- a/libclc/opencl/include/clc/opencl/common/radians.h
+++ b/libclc/opencl/include/clc/opencl/common/radians.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_COMMON_RADIANS_H__
+#define __CLC_OPENCL_COMMON_RADIANS_H__
+
#define FUNCTION radians
#define __CLC_BODY <clc/math/unary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_COMMON_RADIANS_H__
diff --git a/libclc/opencl/include/clc/opencl/common/sign.h b/libclc/opencl/include/clc/opencl/common/sign.h
index 76b53d27efc8b..619e68ff1e14d 100644
--- a/libclc/opencl/include/clc/opencl/common/sign.h
+++ b/libclc/opencl/include/clc/opencl/common/sign.h
@@ -6,7 +6,12 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_COMMON_SIGN_H__
+#define __CLC_OPENCL_COMMON_SIGN_H__
+
#define FUNCTION sign
#define __CLC_BODY <clc/math/unary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_COMMON_SIGN_H__
diff --git a/libclc/opencl/include/clc/opencl/common/smoothstep.h b/libclc/opencl/include/clc/opencl/common/smoothstep.h
index 87a642f8947a1..79fe7d37fc1be 100644
--- a/libclc/opencl/include/clc/opencl/common/smoothstep.h
+++ b/libclc/opencl/include/clc/opencl/common/smoothstep.h
@@ -6,5 +6,10 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_COMMON_SMOOTHSTEP_H__
+#define __CLC_OPENCL_COMMON_SMOOTHSTEP_H__
+
#define __CLC_BODY <clc/opencl/common/smoothstep.inc>
#include <clc/math/gentype.inc>
+
+#endif // __CLC_OPENCL_COMMON_SMOOTHSTEP_H__
diff --git a/libclc/opencl/include/clc/opencl/common/step.h b/libclc/opencl/include/clc/opencl/common/step.h
index d25a66f16ac3a..aa3882a9f1abf 100644
--- a/libclc/opencl/include/clc/opencl/common/step.h
+++ b/libclc/opencl/include/clc/opencl/common/step.h
@@ -6,5 +6,10 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_COMMON_STEP_H__
+#define __CLC_OPENCL_COMMON_STEP_H__
+
#define __CLC_BODY <clc/opencl/common/step.inc>
#include <clc/math/gentype.inc>
+
+#endif // __CLC_OPENCL_COMMON_STEP_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/cross.h b/libclc/opencl/include/clc/opencl/geometric/cross.h
index 9d479e6eed885..be137965aea4b 100644
--- a/libclc/opencl/include/clc/opencl/geometric/cross.h
+++ b/libclc/opencl/include/clc/opencl/geometric/cross.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_GEOMETRIC_CROSS_H__
+#define __CLC_OPENCL_GEOMETRIC_CROSS_H__
+
_CLC_OVERLOAD _CLC_DECL float3 cross(float3 p0, float3 p1);
_CLC_OVERLOAD _CLC_DECL float4 cross(float4 p0, float4 p1);
@@ -13,3 +16,5 @@ _CLC_OVERLOAD _CLC_DECL float4 cross(float4 p0, float4 p1);
_CLC_OVERLOAD _CLC_DECL double3 cross(double3 p0, double3 p1);
_CLC_OVERLOAD _CLC_DECL double4 cross(double4 p0, double4 p1);
#endif
+
+#endif // __CLC_OPENCL_GEOMETRIC_CROSS_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/distance.h b/libclc/opencl/include/clc/opencl/geometric/distance.h
index aa7149d718276..f9c219c44a49b 100644
--- a/libclc/opencl/include/clc/opencl/geometric/distance.h
+++ b/libclc/opencl/include/clc/opencl/geometric/distance.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_GEOMETRIC_DISTANCE_H__
+#define __CLC_OPENCL_GEOMETRIC_DISTANCE_H__
+
#define FUNCTION distance
#define __CLC_BODY <clc/geometric/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_GEOMETRIC_DISTANCE_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/dot.h b/libclc/opencl/include/clc/opencl/geometric/dot.h
index af149a7779e45..0b391a10aa075 100644
--- a/libclc/opencl/include/clc/opencl/geometric/dot.h
+++ b/libclc/opencl/include/clc/opencl/geometric/dot.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_GEOMETRIC_DOT_H__
+#define __CLC_OPENCL_GEOMETRIC_DOT_H__
+
#define FUNCTION dot
#define __CLC_BODY <clc/geometric/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_GEOMETRIC_DOT_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_distance.h b/libclc/opencl/include/clc/opencl/geometric/fast_distance.h
index 6ae297a499153..95b4966dfac1a 100644
--- a/libclc/opencl/include/clc/opencl/geometric/fast_distance.h
+++ b/libclc/opencl/include/clc/opencl/geometric/fast_distance.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_GEOMETRIC_FAST_DISTANCE_H__
+#define __CLC_OPENCL_GEOMETRIC_FAST_DISTANCE_H__
+
#define __FLOAT_ONLY
#define FUNCTION fast_distance
#define __CLC_BODY <clc/geometric/binary_decl.inc>
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_GEOMETRIC_FAST_DISTANCE_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_length.h b/libclc/opencl/include/clc/opencl/geometric/fast_length.h
index 6bfb439fa222e..78ad1fea981c3 100644
--- a/libclc/opencl/include/clc/opencl/geometric/fast_length.h
+++ b/libclc/opencl/include/clc/opencl/geometric/fast_length.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_GEOMETRIC_FAST_LENGTH_H__
+#define __CLC_OPENCL_GEOMETRIC_FAST_LENGTH_H__
+
#define __FLOAT_ONLY
#define FUNCTION fast_length
#define __CLC_BODY <clc/geometric/unary_decl.inc>
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_GEOMETRIC_FAST_LENGTH_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h b/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h
index 54347d77df6ce..7a70dd5df5196 100644
--- a/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h
+++ b/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_GEOMETRIC_FAST_NORMALIZE_H__
+#define __CLC_OPENCL_GEOMETRIC_FAST_NORMALIZE_H__
+
#define __FLOAT_ONLY
#define FUNCTION fast_normalize
#define __CLC_GEOMETRIC_RET_GENTYPE
@@ -15,3 +18,5 @@
#undef FUNCTION
#undef __CLC_GEOMETRIC_RET_GENTYPE
+
+#endif // __CLC_OPENCL_GEOMETRIC_FAST_NORMALIZE_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/length.h b/libclc/opencl/include/clc/opencl/geometric/length.h
index b9a4788e095b4..5dd6ff5a9cad4 100644
--- a/libclc/opencl/include/clc/opencl/geometric/length.h
+++ b/libclc/opencl/include/clc/opencl/geometric/length.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_GEOMETRIC_LENGTH_H__
+#define __CLC_OPENCL_GEOMETRIC_LENGTH_H__
+
#define FUNCTION length
#define __CLC_BODY <clc/geometric/unary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_GEOMETRIC_LENGTH_H__
diff --git a/libclc/opencl/include/clc/opencl/geometric/normalize.h b/libclc/opencl/include/clc/opencl/geometric/normalize.h
index 90d6f332682ab..7d3e8fa98f8ed 100644
--- a/libclc/opencl/include/clc/opencl/geometric/normalize.h
+++ b/libclc/opencl/include/clc/opencl/geometric/normalize.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_GEOMETRIC_NORMALIZE_H__
+#define __CLC_OPENCL_GEOMETRIC_NORMALIZE_H__
+
#define FUNCTION normalize
#define __CLC_GEOMETRIC_RET_GENTYPE
#define __CLC_BODY <clc/geometric/unary_decl.inc>
@@ -14,3 +17,5 @@
#undef __CLC_GEOMETRIC_RET_GENTYPE
#undef FUNCTION
+
+#endif // __CLC_OPENCL_GEOMETRIC_NORMALIZE_H__
diff --git a/libclc/opencl/include/clc/opencl/math/acos.h b/libclc/opencl/include/clc/opencl/math/acos.h
index 0a9104f4003ad..f9e9b44bb9041 100644
--- a/libclc/opencl/include/clc/opencl/math/acos.h
+++ b/libclc/opencl/include/clc/opencl/math/acos.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ACOS_H__
+#define __CLC_OPENCL_MATH_ACOS_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION acos
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ACOS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/acosh.h b/libclc/opencl/include/clc/opencl/math/acosh.h
index cc1844e41fa9d..241b305e6bc87 100644
--- a/libclc/opencl/include/clc/opencl/math/acosh.h
+++ b/libclc/opencl/include/clc/opencl/math/acosh.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ACOSH_H__
+#define __CLC_OPENCL_MATH_ACOSH_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION acosh
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ACOSH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/acospi.h b/libclc/opencl/include/clc/opencl/math/acospi.h
index 34175b1a83d88..7014889dfb7ef 100644
--- a/libclc/opencl/include/clc/opencl/math/acospi.h
+++ b/libclc/opencl/include/clc/opencl/math/acospi.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ACOSPI_H__
+#define __CLC_OPENCL_MATH_ACOSPI_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION acospi
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ACOSPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/asin.h b/libclc/opencl/include/clc/opencl/math/asin.h
index d6055834bc43d..1ba1f459a9024 100644
--- a/libclc/opencl/include/clc/opencl/math/asin.h
+++ b/libclc/opencl/include/clc/opencl/math/asin.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ASIN_H__
+#define __CLC_OPENCL_MATH_ASIN_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION asin
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ASIN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/asinh.h b/libclc/opencl/include/clc/opencl/math/asinh.h
index d29f058291058..9a530a51fa1ee 100644
--- a/libclc/opencl/include/clc/opencl/math/asinh.h
+++ b/libclc/opencl/include/clc/opencl/math/asinh.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ASINH_H__
+#define __CLC_OPENCL_MATH_ASINH_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION asinh
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ASINH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/asinpi.h b/libclc/opencl/include/clc/opencl/math/asinpi.h
index 8d57697f6acaa..844848fff0433 100644
--- a/libclc/opencl/include/clc/opencl/math/asinpi.h
+++ b/libclc/opencl/include/clc/opencl/math/asinpi.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ASINPI_H__
+#define __CLC_OPENCL_MATH_ASINPI_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION asinpi
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ASINPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/atan.h b/libclc/opencl/include/clc/opencl/math/atan.h
index 5642000d91666..f2312b8fb0737 100644
--- a/libclc/opencl/include/clc/opencl/math/atan.h
+++ b/libclc/opencl/include/clc/opencl/math/atan.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ATAN_H__
+#define __CLC_OPENCL_MATH_ATAN_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION atan
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ATAN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/atan2.h b/libclc/opencl/include/clc/opencl/math/atan2.h
index c6bfb20bacd06..72412d44aafb1 100644
--- a/libclc/opencl/include/clc/opencl/math/atan2.h
+++ b/libclc/opencl/include/clc/opencl/math/atan2.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ATAN2_H__
+#define __CLC_OPENCL_MATH_ATAN2_H__
+
#define FUNCTION atan2
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ATAN2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/atan2pi.h b/libclc/opencl/include/clc/opencl/math/atan2pi.h
index 87817b9938420..f12a19776ef23 100644
--- a/libclc/opencl/include/clc/opencl/math/atan2pi.h
+++ b/libclc/opencl/include/clc/opencl/math/atan2pi.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ATAN2PI_H__
+#define __CLC_OPENCL_MATH_ATAN2PI_H__
+
#define FUNCTION atan2pi
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ATAN2PI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/atanh.h b/libclc/opencl/include/clc/opencl/math/atanh.h
index ae0751120f840..147a76b543e61 100644
--- a/libclc/opencl/include/clc/opencl/math/atanh.h
+++ b/libclc/opencl/include/clc/opencl/math/atanh.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ATANH_H__
+#define __CLC_OPENCL_MATH_ATANH_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION atanh
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ATANH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/atanpi.h b/libclc/opencl/include/clc/opencl/math/atanpi.h
index 67d9a13a8dd0d..12e9ea2501705 100644
--- a/libclc/opencl/include/clc/opencl/math/atanpi.h
+++ b/libclc/opencl/include/clc/opencl/math/atanpi.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ATANPI_H__
+#define __CLC_OPENCL_MATH_ATANPI_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION atanpi
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ATANPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/cbrt.h b/libclc/opencl/include/clc/opencl/math/cbrt.h
index e2dad07b0f002..fdb408ac96858 100644
--- a/libclc/opencl/include/clc/opencl/math/cbrt.h
+++ b/libclc/opencl/include/clc/opencl/math/cbrt.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_CBRT_H__
+#define __CLC_OPENCL_MATH_CBRT_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION cbrt
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_CBRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/ceil.h b/libclc/opencl/include/clc/opencl/math/ceil.h
index a7ca6bf12b85d..dad2ea4f69807 100644
--- a/libclc/opencl/include/clc/opencl/math/ceil.h
+++ b/libclc/opencl/include/clc/opencl/math/ceil.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_CEIL_H__
+#define __CLC_OPENCL_MATH_CEIL_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION ceil
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_CEIL_H__
diff --git a/libclc/opencl/include/clc/opencl/math/copysign.h b/libclc/opencl/include/clc/opencl/math/copysign.h
index 40baac0a586bb..10d6c90edf81f 100644
--- a/libclc/opencl/include/clc/opencl/math/copysign.h
+++ b/libclc/opencl/include/clc/opencl/math/copysign.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_COPYSIGN_H__
+#define __CLC_OPENCL_MATH_COPYSIGN_H__
+
#define FUNCTION copysign
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_COPYSIGN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/cos.h b/libclc/opencl/include/clc/opencl/math/cos.h
index 7837075abb5f0..4e3aec6c69628 100644
--- a/libclc/opencl/include/clc/opencl/math/cos.h
+++ b/libclc/opencl/include/clc/opencl/math/cos.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_COS_H__
+#define __CLC_OPENCL_MATH_COS_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION cos
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_COS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/cosh.h b/libclc/opencl/include/clc/opencl/math/cosh.h
index bc2c1f595de23..f316433a23514 100644
--- a/libclc/opencl/include/clc/opencl/math/cosh.h
+++ b/libclc/opencl/include/clc/opencl/math/cosh.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_COSH_H__
+#define __CLC_OPENCL_MATH_COSH_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION cosh
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_COSH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/cospi.h b/libclc/opencl/include/clc/opencl/math/cospi.h
index fb55e87d2569d..b7dfb0dbafb58 100644
--- a/libclc/opencl/include/clc/opencl/math/cospi.h
+++ b/libclc/opencl/include/clc/opencl/math/cospi.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_COSPI_H__
+#define __CLC_OPENCL_MATH_COSPI_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION cospi
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_COSPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/erf.h b/libclc/opencl/include/clc/opencl/math/erf.h
index 66737077eef41..8ce262f276e39 100644
--- a/libclc/opencl/include/clc/opencl/math/erf.h
+++ b/libclc/opencl/include/clc/opencl/math/erf.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ERF_H__
+#define __CLC_OPENCL_MATH_ERF_H__
+
#undef erfc
#define __CLC_BODY <clc/math/unary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ERF_H__
diff --git a/libclc/opencl/include/clc/opencl/math/erfc.h b/libclc/opencl/include/clc/opencl/math/erfc.h
index 279a44b49346f..26afe1315df60 100644
--- a/libclc/opencl/include/clc/opencl/math/erfc.h
+++ b/libclc/opencl/include/clc/opencl/math/erfc.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ERFC_H__
+#define __CLC_OPENCL_MATH_ERFC_H__
+
#undef erfc
#define __CLC_BODY <clc/math/unary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ERFC_H__
diff --git a/libclc/opencl/include/clc/opencl/math/exp.h b/libclc/opencl/include/clc/opencl/math/exp.h
index 4eb5d31c157ec..fb8f674a8c7e5 100644
--- a/libclc/opencl/include/clc/opencl/math/exp.h
+++ b/libclc/opencl/include/clc/opencl/math/exp.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_EXP_H__
+#define __CLC_OPENCL_MATH_EXP_H__
+
#undef exp
#define __CLC_BODY <clc/math/unary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_EXP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/exp10.h b/libclc/opencl/include/clc/opencl/math/exp10.h
index feef3bfb27fb5..cfd5c6df9d15c 100644
--- a/libclc/opencl/include/clc/opencl/math/exp10.h
+++ b/libclc/opencl/include/clc/opencl/math/exp10.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_EXP10_H__
+#define __CLC_OPENCL_MATH_EXP10_H__
+
#undef exp10
#define __CLC_BODY <clc/math/unary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_EXP10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/exp2.h b/libclc/opencl/include/clc/opencl/math/exp2.h
index 801eecd34d5f3..db0405eb13341 100644
--- a/libclc/opencl/include/clc/opencl/math/exp2.h
+++ b/libclc/opencl/include/clc/opencl/math/exp2.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_EXP2_H__
+#define __CLC_OPENCL_MATH_EXP2_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION exp2
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_EXP2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/expm1.h b/libclc/opencl/include/clc/opencl/math/expm1.h
index b1b27ec8a1fb5..0b3628d48468e 100644
--- a/libclc/opencl/include/clc/opencl/math/expm1.h
+++ b/libclc/opencl/include/clc/opencl/math/expm1.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_EXPM1_H__
+#define __CLC_OPENCL_MATH_EXPM1_H__
+
#undef exp
#define __CLC_BODY <clc/math/unary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_EXPM1_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fabs.h b/libclc/opencl/include/clc/opencl/math/fabs.h
index d3b4a6cbc2e9e..f20016f4eb8ba 100644
--- a/libclc/opencl/include/clc/opencl/math/fabs.h
+++ b/libclc/opencl/include/clc/opencl/math/fabs.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_FABS_H__
+#define __CLC_OPENCL_MATH_FABS_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION fabs
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_FABS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fdim.h b/libclc/opencl/include/clc/opencl/math/fdim.h
index da05471f0a013..82f70fd832361 100644
--- a/libclc/opencl/include/clc/opencl/math/fdim.h
+++ b/libclc/opencl/include/clc/opencl/math/fdim.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_FDIM_H__
+#define __CLC_OPENCL_MATH_FDIM_H__
+
#define FUNCTION fdim
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_FDIM_H__
diff --git a/libclc/opencl/include/clc/opencl/math/floor.h b/libclc/opencl/include/clc/opencl/math/floor.h
index 6927366cd5b8b..1930aeca74ff0 100644
--- a/libclc/opencl/include/clc/opencl/math/floor.h
+++ b/libclc/opencl/include/clc/opencl/math/floor.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_FLOOR_H__
+#define __CLC_OPENCL_MATH_FLOOR_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION floor
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_FLOOR_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fma.h b/libclc/opencl/include/clc/opencl/math/fma.h
index ebb60a670d699..6fed3fc9b2560 100644
--- a/libclc/opencl/include/clc/opencl/math/fma.h
+++ b/libclc/opencl/include/clc/opencl/math/fma.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_FMA_H__
+#define __CLC_OPENCL_MATH_FMA_H__
+
#define __CLC_BODY <clc/shared/ternary_decl.inc>
#define FUNCTION fma
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_FMA_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fmax.h b/libclc/opencl/include/clc/opencl/math/fmax.h
index be3fba1575064..84c754e2c0c71 100644
--- a/libclc/opencl/include/clc/opencl/math/fmax.h
+++ b/libclc/opencl/include/clc/opencl/math/fmax.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_FMAX_H__
+#define __CLC_OPENCL_MATH_FMAX_H__
+
#define __CLC_BODY <clc/math/binary_decl_with_scalar_second_arg.inc>
#define FUNCTION fmax
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_FMAX_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fmin.h b/libclc/opencl/include/clc/opencl/math/fmin.h
index 4867ed894ea10..b35573e4f6337 100644
--- a/libclc/opencl/include/clc/opencl/math/fmin.h
+++ b/libclc/opencl/include/clc/opencl/math/fmin.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_FMIN_H__
+#define __CLC_OPENCL_MATH_FMIN_H__
+
#define __CLC_BODY <clc/math/binary_decl_with_scalar_second_arg.inc>
#define FUNCTION fmin
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_FMIN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fmod.h b/libclc/opencl/include/clc/opencl/math/fmod.h
index 9b10fecc0f147..13515006fd2be 100644
--- a/libclc/opencl/include/clc/opencl/math/fmod.h
+++ b/libclc/opencl/include/clc/opencl/math/fmod.h
@@ -6,7 +6,12 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_FMOD_H__
+#define __CLC_OPENCL_MATH_FMOD_H__
+
#define FUNCTION fmod
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_FMOD_H__
diff --git a/libclc/opencl/include/clc/opencl/math/fract.h b/libclc/opencl/include/clc/opencl/math/fract.h
index 01c06771421e6..de953f78c5940 100644
--- a/libclc/opencl/include/clc/opencl/math/fract.h
+++ b/libclc/opencl/include/clc/opencl/math/fract.h
@@ -6,7 +6,12 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_FRACT_H__
+#define __CLC_OPENCL_MATH_FRACT_H__
+
#define FUNCTION fract
#define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_FRACT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/frexp.h b/libclc/opencl/include/clc/opencl/math/frexp.h
index 38d4942284709..c7ed7cbd1cbc4 100644
--- a/libclc/opencl/include/clc/opencl/math/frexp.h
+++ b/libclc/opencl/include/clc/opencl/math/frexp.h
@@ -6,8 +6,13 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_FREXP_H__
+#define __CLC_OPENCL_MATH_FREXP_H__
+
#define FUNCTION frexp
#define __CLC_BODY <clc/math/unary_decl_with_int_ptr.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_FREXP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_cos.h b/libclc/opencl/include/clc/opencl/math/half_cos.h
index 63c3216756e30..5ab0b69ca4224 100644
--- a/libclc/opencl/include/clc/opencl/math/half_cos.h
+++ b/libclc/opencl/include/clc/opencl/math/half_cos.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_COS_H__
+#define __CLC_OPENCL_MATH_HALF_COS_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_cos
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_COS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_divide.h b/libclc/opencl/include/clc/opencl/math/half_divide.h
index fd69b94fb5a35..ff506d0c9fd6d 100644
--- a/libclc/opencl/include/clc/opencl/math/half_divide.h
+++ b/libclc/opencl/include/clc/opencl/math/half_divide.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_DIVIDE_H__
+#define __CLC_OPENCL_MATH_HALF_DIVIDE_H__
+
#define __CLC_BODY <clc/shared/binary_decl.inc>
#define FUNCTION half_divide
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_DIVIDE_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_exp.h b/libclc/opencl/include/clc/opencl/math/half_exp.h
index a815ebc91eefd..22780c144923c 100644
--- a/libclc/opencl/include/clc/opencl/math/half_exp.h
+++ b/libclc/opencl/include/clc/opencl/math/half_exp.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_EXP_H__
+#define __CLC_OPENCL_MATH_HALF_EXP_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_exp
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_EXP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_exp10.h b/libclc/opencl/include/clc/opencl/math/half_exp10.h
index 80b74a2f42285..1a8195e67eee0 100644
--- a/libclc/opencl/include/clc/opencl/math/half_exp10.h
+++ b/libclc/opencl/include/clc/opencl/math/half_exp10.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_EXP10_H__
+#define __CLC_OPENCL_MATH_HALF_EXP10_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_exp10
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_EXP10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_exp2.h b/libclc/opencl/include/clc/opencl/math/half_exp2.h
index eaa0cb3b5704b..2ca69aa1ea076 100644
--- a/libclc/opencl/include/clc/opencl/math/half_exp2.h
+++ b/libclc/opencl/include/clc/opencl/math/half_exp2.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_EXP2_H__
+#define __CLC_OPENCL_MATH_HALF_EXP2_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_exp2
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_EXP2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_log.h b/libclc/opencl/include/clc/opencl/math/half_log.h
index ea20a37b96e5b..d2eef868790f5 100644
--- a/libclc/opencl/include/clc/opencl/math/half_log.h
+++ b/libclc/opencl/include/clc/opencl/math/half_log.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_LOG_H__
+#define __CLC_OPENCL_MATH_HALF_LOG_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_log
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_LOG_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_log10.h b/libclc/opencl/include/clc/opencl/math/half_log10.h
index 35217f85bfeaf..e0f85fff3f3ea 100644
--- a/libclc/opencl/include/clc/opencl/math/half_log10.h
+++ b/libclc/opencl/include/clc/opencl/math/half_log10.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_LOG10_H__
+#define __CLC_OPENCL_MATH_HALF_LOG10_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_log10
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_LOG10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_log2.h b/libclc/opencl/include/clc/opencl/math/half_log2.h
index bbcc0b9d17aa6..ba0105d883568 100644
--- a/libclc/opencl/include/clc/opencl/math/half_log2.h
+++ b/libclc/opencl/include/clc/opencl/math/half_log2.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_LOG2_H__
+#define __CLC_OPENCL_MATH_HALF_LOG2_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_log2
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_LOG2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_powr.h b/libclc/opencl/include/clc/opencl/math/half_powr.h
index eaa16251b68ac..4b792c0c6cba4 100644
--- a/libclc/opencl/include/clc/opencl/math/half_powr.h
+++ b/libclc/opencl/include/clc/opencl/math/half_powr.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_POWR_H__
+#define __CLC_OPENCL_MATH_HALF_POWR_H__
+
#define __CLC_BODY <clc/shared/binary_decl.inc>
#define FUNCTION half_powr
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_POWR_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_recip.h b/libclc/opencl/include/clc/opencl/math/half_recip.h
index b91b0d3d7c716..3425df4e476d8 100644
--- a/libclc/opencl/include/clc/opencl/math/half_recip.h
+++ b/libclc/opencl/include/clc/opencl/math/half_recip.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_RECIP_H__
+#define __CLC_OPENCL_MATH_HALF_RECIP_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_recip
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_RECIP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_rsqrt.h b/libclc/opencl/include/clc/opencl/math/half_rsqrt.h
index 5fc2764537aa5..e22a7375cacda 100644
--- a/libclc/opencl/include/clc/opencl/math/half_rsqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/half_rsqrt.h
@@ -6,8 +6,13 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_RSQRT_H__
+#define __CLC_OPENCL_MATH_HALF_RSQRT_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_rsqrt
#define __FLOAT_ONLY
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_RSQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_sin.h b/libclc/opencl/include/clc/opencl/math/half_sin.h
index 279605d15ffc6..cb0462c45436f 100644
--- a/libclc/opencl/include/clc/opencl/math/half_sin.h
+++ b/libclc/opencl/include/clc/opencl/math/half_sin.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_SIN_H__
+#define __CLC_OPENCL_MATH_HALF_SIN_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_sin
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_SIN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_sqrt.h b/libclc/opencl/include/clc/opencl/math/half_sqrt.h
index 5c8080b7c584c..f755fee7b4be2 100644
--- a/libclc/opencl/include/clc/opencl/math/half_sqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/half_sqrt.h
@@ -6,8 +6,13 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_SQRT_H__
+#define __CLC_OPENCL_MATH_HALF_SQRT_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_sqrt
#define __FLOAT_ONLY
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_SQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/half_tan.h b/libclc/opencl/include/clc/opencl/math/half_tan.h
index e63d919fb600e..91b5b11ae1789 100644
--- a/libclc/opencl/include/clc/opencl/math/half_tan.h
+++ b/libclc/opencl/include/clc/opencl/math/half_tan.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HALF_TAN_H__
+#define __CLC_OPENCL_MATH_HALF_TAN_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION half_tan
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HALF_TAN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/hypot.h b/libclc/opencl/include/clc/opencl/math/hypot.h
index 4b3dae721cd5b..76ff6ef0655a9 100644
--- a/libclc/opencl/include/clc/opencl/math/hypot.h
+++ b/libclc/opencl/include/clc/opencl/math/hypot.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_HYPOT_H__
+#define __CLC_OPENCL_MATH_HYPOT_H__
+
#define FUNCTION hypot
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_HYPOT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/ilogb.h b/libclc/opencl/include/clc/opencl/math/ilogb.h
index 49ef681390aa7..d9752a644bee4 100644
--- a/libclc/opencl/include/clc/opencl/math/ilogb.h
+++ b/libclc/opencl/include/clc/opencl/math/ilogb.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ILOGB_H__
+#define __CLC_OPENCL_MATH_ILOGB_H__
+
#define FUNCTION ilogb
#define __CLC_BODY <clc/math/unary_decl_with_int_return.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ILOGB_H__
diff --git a/libclc/opencl/include/clc/opencl/math/ldexp.h b/libclc/opencl/include/clc/opencl/math/ldexp.h
index 783ecd1db3821..b0194d9c9adad 100644
--- a/libclc/opencl/include/clc/opencl/math/ldexp.h
+++ b/libclc/opencl/include/clc/opencl/math/ldexp.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_LDEXP_H__
+#define __CLC_OPENCL_MATH_LDEXP_H__
+
#define FUNCTION ldexp
#define __CLC_BODY <clc/shared/binary_decl_with_int_second_arg.inc>
#include <clc/math/gentype.inc>
@@ -13,3 +16,5 @@
#define __CLC_BODY <clc/opencl/math/ldexp.inc>
#include <clc/math/gentype.inc>
+
+#endif // __CLC_OPENCL_MATH_LDEXP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/lgamma.h b/libclc/opencl/include/clc/opencl/math/lgamma.h
index 63120747a26ac..95ed07c3531ee 100644
--- a/libclc/opencl/include/clc/opencl/math/lgamma.h
+++ b/libclc/opencl/include/clc/opencl/math/lgamma.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_LGAMMA_H__
+#define __CLC_OPENCL_MATH_LGAMMA_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION lgamma
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_LGAMMA_H__
diff --git a/libclc/opencl/include/clc/opencl/math/lgamma_r.h b/libclc/opencl/include/clc/opencl/math/lgamma_r.h
index 1dd7cca890936..4853d2dd5c283 100644
--- a/libclc/opencl/include/clc/opencl/math/lgamma_r.h
+++ b/libclc/opencl/include/clc/opencl/math/lgamma_r.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_LGAMMA_R_H__
+#define __CLC_OPENCL_MATH_LGAMMA_R_H__
+
#define FUNCTION lgamma_r
#define __CLC_BODY <clc/math/unary_decl_with_int_ptr.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_LGAMMA_R_H__
diff --git a/libclc/opencl/include/clc/opencl/math/log.h b/libclc/opencl/include/clc/opencl/math/log.h
index ab8e85908cdeb..2d536d6b09266 100644
--- a/libclc/opencl/include/clc/opencl/math/log.h
+++ b/libclc/opencl/include/clc/opencl/math/log.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_LOG_H__
+#define __CLC_OPENCL_MATH_LOG_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION log
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_LOG_H__
diff --git a/libclc/opencl/include/clc/opencl/math/log10.h b/libclc/opencl/include/clc/opencl/math/log10.h
index eec17f2da9b52..0f83b8c2a03e9 100644
--- a/libclc/opencl/include/clc/opencl/math/log10.h
+++ b/libclc/opencl/include/clc/opencl/math/log10.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_LOG10_H__
+#define __CLC_OPENCL_MATH_LOG10_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION log10
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_LOG10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/log1p.h b/libclc/opencl/include/clc/opencl/math/log1p.h
index 6334f7d86e4e7..bd8adeda88d4e 100644
--- a/libclc/opencl/include/clc/opencl/math/log1p.h
+++ b/libclc/opencl/include/clc/opencl/math/log1p.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_LOG1P_H__
+#define __CLC_OPENCL_MATH_LOG1P_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION log1p
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_LOG1P_H__
diff --git a/libclc/opencl/include/clc/opencl/math/log2.h b/libclc/opencl/include/clc/opencl/math/log2.h
index ae9992a619ca6..e4f6cb619acf2 100644
--- a/libclc/opencl/include/clc/opencl/math/log2.h
+++ b/libclc/opencl/include/clc/opencl/math/log2.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_LOG2_H__
+#define __CLC_OPENCL_MATH_LOG2_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION log2
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_LOG2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/logb.h b/libclc/opencl/include/clc/opencl/math/logb.h
index 75e153b500474..3bbc8476d2ffa 100644
--- a/libclc/opencl/include/clc/opencl/math/logb.h
+++ b/libclc/opencl/include/clc/opencl/math/logb.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_LOGB_H__
+#define __CLC_OPENCL_MATH_LOGB_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION logb
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_LOGB_H__
diff --git a/libclc/opencl/include/clc/opencl/math/mad.h b/libclc/opencl/include/clc/opencl/math/mad.h
index 20e199a78a712..18732eb7be668 100644
--- a/libclc/opencl/include/clc/opencl/math/mad.h
+++ b/libclc/opencl/include/clc/opencl/math/mad.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_MAD_H__
+#define __CLC_OPENCL_MATH_MAD_H__
+
#define __CLC_BODY <clc/shared/ternary_decl.inc>
#define FUNCTION mad
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_MAD_H__
diff --git a/libclc/opencl/include/clc/opencl/math/maxmag.h b/libclc/opencl/include/clc/opencl/math/maxmag.h
index ea41128d6b6b8..c8f3d5700fa28 100644
--- a/libclc/opencl/include/clc/opencl/math/maxmag.h
+++ b/libclc/opencl/include/clc/opencl/math/maxmag.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_MAXMAG_H__
+#define __CLC_OPENCL_MATH_MAXMAG_H__
+
#define __CLC_BODY <clc/shared/binary_decl.inc>
#define FUNCTION maxmag
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_MAXMAG_H__
diff --git a/libclc/opencl/include/clc/opencl/math/minmag.h b/libclc/opencl/include/clc/opencl/math/minmag.h
index 59b3916e56933..c90a9d9bdbeb1 100644
--- a/libclc/opencl/include/clc/opencl/math/minmag.h
+++ b/libclc/opencl/include/clc/opencl/math/minmag.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_MINMAG_H__
+#define __CLC_OPENCL_MATH_MINMAG_H__
+
#define __CLC_BODY <clc/shared/binary_decl.inc>
#define FUNCTION minmag
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_MINMAG_H__
diff --git a/libclc/opencl/include/clc/opencl/math/modf.h b/libclc/opencl/include/clc/opencl/math/modf.h
index 75bf8d849a709..a336c9e242c1e 100644
--- a/libclc/opencl/include/clc/opencl/math/modf.h
+++ b/libclc/opencl/include/clc/opencl/math/modf.h
@@ -6,8 +6,13 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_MODF_H__
+#define __CLC_OPENCL_MATH_MODF_H__
+
#define FUNCTION modf
#define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_MODF_H__
diff --git a/libclc/opencl/include/clc/opencl/math/nan.h b/libclc/opencl/include/clc/opencl/math/nan.h
index c5be0af945a57..d98ac56603495 100644
--- a/libclc/opencl/include/clc/opencl/math/nan.h
+++ b/libclc/opencl/include/clc/opencl/math/nan.h
@@ -6,5 +6,10 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NAN_H__
+#define __CLC_OPENCL_MATH_NAN_H__
+
#define __CLC_BODY <clc/opencl/math/nan.inc>
#include <clc/math/gentype.inc>
+
+#endif // __CLC_OPENCL_MATH_NAN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_cos.h b/libclc/opencl/include/clc/opencl/math/native_cos.h
index fa2a94abe292e..566c32e95b32c 100644
--- a/libclc/opencl/include/clc/opencl/math/native_cos.h
+++ b/libclc/opencl/include/clc/opencl/math/native_cos.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_COS_H__
+#define __CLC_OPENCL_MATH_NATIVE_COS_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_cos
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_COS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_divide.h b/libclc/opencl/include/clc/opencl/math/native_divide.h
index 60742038d9e4a..23360b4bdeb9b 100644
--- a/libclc/opencl/include/clc/opencl/math/native_divide.h
+++ b/libclc/opencl/include/clc/opencl/math/native_divide.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_DIVIDE_H__
+#define __CLC_OPENCL_MATH_NATIVE_DIVIDE_H__
+
#define __CLC_BODY <clc/shared/binary_decl.inc>
#define FUNCTION native_divide
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_DIVIDE_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_exp.h b/libclc/opencl/include/clc/opencl/math/native_exp.h
index c77ffed7f37b5..5133469509ffb 100644
--- a/libclc/opencl/include/clc/opencl/math/native_exp.h
+++ b/libclc/opencl/include/clc/opencl/math/native_exp.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_EXP_H__
+#define __CLC_OPENCL_MATH_NATIVE_EXP_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_exp
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_EXP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_exp10.h b/libclc/opencl/include/clc/opencl/math/native_exp10.h
index 4f1f1c4ee183e..8a2788cd3bcad 100644
--- a/libclc/opencl/include/clc/opencl/math/native_exp10.h
+++ b/libclc/opencl/include/clc/opencl/math/native_exp10.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_EXP10_H__
+#define __CLC_OPENCL_MATH_NATIVE_EXP10_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_exp10
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_EXP10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_exp2.h b/libclc/opencl/include/clc/opencl/math/native_exp2.h
index 33e2ad37168dc..5a6aed09a838e 100644
--- a/libclc/opencl/include/clc/opencl/math/native_exp2.h
+++ b/libclc/opencl/include/clc/opencl/math/native_exp2.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_EXP2_H__
+#define __CLC_OPENCL_MATH_NATIVE_EXP2_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_exp2
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_EXP2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_log.h b/libclc/opencl/include/clc/opencl/math/native_log.h
index 6564416e84976..58164960644ff 100644
--- a/libclc/opencl/include/clc/opencl/math/native_log.h
+++ b/libclc/opencl/include/clc/opencl/math/native_log.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_LOG_H__
+#define __CLC_OPENCL_MATH_NATIVE_LOG_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_log
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_LOG_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_log10.h b/libclc/opencl/include/clc/opencl/math/native_log10.h
index ef6e2a7ddbc22..c215c733c0422 100644
--- a/libclc/opencl/include/clc/opencl/math/native_log10.h
+++ b/libclc/opencl/include/clc/opencl/math/native_log10.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_LOG10_H__
+#define __CLC_OPENCL_MATH_NATIVE_LOG10_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_log10
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_LOG10_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_log2.h b/libclc/opencl/include/clc/opencl/math/native_log2.h
index c1d7d54eb3dea..783abe6cd8e46 100644
--- a/libclc/opencl/include/clc/opencl/math/native_log2.h
+++ b/libclc/opencl/include/clc/opencl/math/native_log2.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_LOG2_H__
+#define __CLC_OPENCL_MATH_NATIVE_LOG2_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_log2
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_LOG2_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_powr.h b/libclc/opencl/include/clc/opencl/math/native_powr.h
index 3e472e313bfc2..9c8e171afc21a 100644
--- a/libclc/opencl/include/clc/opencl/math/native_powr.h
+++ b/libclc/opencl/include/clc/opencl/math/native_powr.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_POWR_H__
+#define __CLC_OPENCL_MATH_NATIVE_POWR_H__
+
#define __CLC_BODY <clc/shared/binary_decl.inc>
#define FUNCTION native_powr
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_POWR_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_recip.h b/libclc/opencl/include/clc/opencl/math/native_recip.h
index 8aea05ba9358b..1c88c076e03c7 100644
--- a/libclc/opencl/include/clc/opencl/math/native_recip.h
+++ b/libclc/opencl/include/clc/opencl/math/native_recip.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_RECIP_H__
+#define __CLC_OPENCL_MATH_NATIVE_RECIP_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_recip
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_RECIP_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_rsqrt.h b/libclc/opencl/include/clc/opencl/math/native_rsqrt.h
index 5f73545ce0f7d..2806f9128d94f 100644
--- a/libclc/opencl/include/clc/opencl/math/native_rsqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/native_rsqrt.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_RSQRT_H__
+#define __CLC_OPENCL_MATH_NATIVE_RSQRT_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_rsqrt
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_RSQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_sin.h b/libclc/opencl/include/clc/opencl/math/native_sin.h
index c109b5ecad5ed..81f664153cee1 100644
--- a/libclc/opencl/include/clc/opencl/math/native_sin.h
+++ b/libclc/opencl/include/clc/opencl/math/native_sin.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_SIN_H__
+#define __CLC_OPENCL_MATH_NATIVE_SIN_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_sin
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_SIN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_sqrt.h b/libclc/opencl/include/clc/opencl/math/native_sqrt.h
index 061565ca1b30b..dca0e542e0ac7 100644
--- a/libclc/opencl/include/clc/opencl/math/native_sqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/native_sqrt.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_SQRT_H__
+#define __CLC_OPENCL_MATH_NATIVE_SQRT_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_sqrt
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_SQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/native_tan.h b/libclc/opencl/include/clc/opencl/math/native_tan.h
index 5b93b2604b477..cf942110e3124 100644
--- a/libclc/opencl/include/clc/opencl/math/native_tan.h
+++ b/libclc/opencl/include/clc/opencl/math/native_tan.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NATIVE_TAN_H__
+#define __CLC_OPENCL_MATH_NATIVE_TAN_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION native_tan
#define __FLOAT_ONLY
@@ -13,3 +16,5 @@
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NATIVE_TAN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/nextafter.h b/libclc/opencl/include/clc/opencl/math/nextafter.h
index 3b95500b0e9da..e338f5bf6c2a7 100644
--- a/libclc/opencl/include/clc/opencl/math/nextafter.h
+++ b/libclc/opencl/include/clc/opencl/math/nextafter.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_NEXTAFTER_H__
+#define __CLC_OPENCL_MATH_NEXTAFTER_H__
+
#define FUNCTION nextafter
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_NEXTAFTER_H__
diff --git a/libclc/opencl/include/clc/opencl/math/pow.h b/libclc/opencl/include/clc/opencl/math/pow.h
index 3b62f4c154f36..3f4c1746faa91 100644
--- a/libclc/opencl/include/clc/opencl/math/pow.h
+++ b/libclc/opencl/include/clc/opencl/math/pow.h
@@ -6,7 +6,12 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_POW_H__
+#define __CLC_OPENCL_MATH_POW_H__
+
#define FUNCTION pow
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_POW_H__
diff --git a/libclc/opencl/include/clc/opencl/math/pown.h b/libclc/opencl/include/clc/opencl/math/pown.h
index ba249712ec84c..fd97a705c8c87 100644
--- a/libclc/opencl/include/clc/opencl/math/pown.h
+++ b/libclc/opencl/include/clc/opencl/math/pown.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_POWN_H__
+#define __CLC_OPENCL_MATH_POWN_H__
+
#define FUNCTION pown
#define __CLC_BODY <clc/shared/binary_decl_with_int_second_arg.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_POWN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/powr.h b/libclc/opencl/include/clc/opencl/math/powr.h
index 6cbcbc143f40a..47f653a73afa3 100644
--- a/libclc/opencl/include/clc/opencl/math/powr.h
+++ b/libclc/opencl/include/clc/opencl/math/powr.h
@@ -6,7 +6,12 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_POWR_H__
+#define __CLC_OPENCL_MATH_POWR_H__
+
#define FUNCTION powr
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_POWR_H__
diff --git a/libclc/opencl/include/clc/opencl/math/remainder.h b/libclc/opencl/include/clc/opencl/math/remainder.h
index 0315516a1e5ab..416a0422c9a62 100644
--- a/libclc/opencl/include/clc/opencl/math/remainder.h
+++ b/libclc/opencl/include/clc/opencl/math/remainder.h
@@ -6,7 +6,12 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_REMAINDER_H__
+#define __CLC_OPENCL_MATH_REMAINDER_H__
+
#define FUNCTION remainder
#define __CLC_BODY <clc/shared/binary_decl.inc>
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_REMAINDER_H__
diff --git a/libclc/opencl/include/clc/opencl/math/remquo.h b/libclc/opencl/include/clc/opencl/math/remquo.h
index 5ce010e2c273f..3525c6bd0f685 100644
--- a/libclc/opencl/include/clc/opencl/math/remquo.h
+++ b/libclc/opencl/include/clc/opencl/math/remquo.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_REMQUO_H__
+#define __CLC_OPENCL_MATH_REMQUO_H__
+
#define FUNCTION remquo
#define __CLC_BODY <clc/math/remquo_decl.inc>
@@ -19,3 +22,5 @@
#endif
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_REMQUO_H__
diff --git a/libclc/opencl/include/clc/opencl/math/rint.h b/libclc/opencl/include/clc/opencl/math/rint.h
index bb27f3d321530..8f08fd20c3c92 100644
--- a/libclc/opencl/include/clc/opencl/math/rint.h
+++ b/libclc/opencl/include/clc/opencl/math/rint.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_RINT_H__
+#define __CLC_OPENCL_MATH_RINT_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION rint
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_RINT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/rootn.h b/libclc/opencl/include/clc/opencl/math/rootn.h
index 0751e875948fa..20b52e7c01dc5 100644
--- a/libclc/opencl/include/clc/opencl/math/rootn.h
+++ b/libclc/opencl/include/clc/opencl/math/rootn.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ROOTN_H__
+#define __CLC_OPENCL_MATH_ROOTN_H__
+
#define __CLC_BODY <clc/shared/binary_decl_with_int_second_arg.inc>
#define FUNCTION rootn
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ROOTN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/round.h b/libclc/opencl/include/clc/opencl/math/round.h
index 6764c251bdb91..65bfc265ced0e 100644
--- a/libclc/opencl/include/clc/opencl/math/round.h
+++ b/libclc/opencl/include/clc/opencl/math/round.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_ROUND_H__
+#define __CLC_OPENCL_MATH_ROUND_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION round
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_ROUND_H__
diff --git a/libclc/opencl/include/clc/opencl/math/rsqrt.h b/libclc/opencl/include/clc/opencl/math/rsqrt.h
index 4bcda124c8b82..41fb54ea9bb5f 100644
--- a/libclc/opencl/include/clc/opencl/math/rsqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/rsqrt.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_RSQRT_H__
+#define __CLC_OPENCL_MATH_RSQRT_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION rsqrt
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_RSQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/sin.h b/libclc/opencl/include/clc/opencl/math/sin.h
index 38761d946cc9b..fc7741e164fda 100644
--- a/libclc/opencl/include/clc/opencl/math/sin.h
+++ b/libclc/opencl/include/clc/opencl/math/sin.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_SIN_H__
+#define __CLC_OPENCL_MATH_SIN_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION sin
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_SIN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/sincos.h b/libclc/opencl/include/clc/opencl/math/sincos.h
index 0a812f3d13c84..8560b078046f4 100644
--- a/libclc/opencl/include/clc/opencl/math/sincos.h
+++ b/libclc/opencl/include/clc/opencl/math/sincos.h
@@ -6,7 +6,12 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_SINCOS_H__
+#define __CLC_OPENCL_MATH_SINCOS_H__
+
#define __CLC_BODY <clc/math/unary_decl_with_ptr.inc>
#define FUNCTION __clc_sincos
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_SINCOS_H__
diff --git a/libclc/opencl/include/clc/opencl/math/sinh.h b/libclc/opencl/include/clc/opencl/math/sinh.h
index 194a6acf155a4..cbe30551ec641 100644
--- a/libclc/opencl/include/clc/opencl/math/sinh.h
+++ b/libclc/opencl/include/clc/opencl/math/sinh.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_SINH_H__
+#define __CLC_OPENCL_MATH_SINH_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION sinh
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_SINH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/sinpi.h b/libclc/opencl/include/clc/opencl/math/sinpi.h
index f4be7d08ab5f7..3ef55a1cd42dc 100644
--- a/libclc/opencl/include/clc/opencl/math/sinpi.h
+++ b/libclc/opencl/include/clc/opencl/math/sinpi.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_SINPI_H__
+#define __CLC_OPENCL_MATH_SINPI_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION sinpi
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_SINPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/sqrt.h b/libclc/opencl/include/clc/opencl/math/sqrt.h
index 6f842365b469a..8da37e94e756c 100644
--- a/libclc/opencl/include/clc/opencl/math/sqrt.h
+++ b/libclc/opencl/include/clc/opencl/math/sqrt.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_SQRT_H__
+#define __CLC_OPENCL_MATH_SQRT_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION sqrt
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_SQRT_H__
diff --git a/libclc/opencl/include/clc/opencl/math/tan.h b/libclc/opencl/include/clc/opencl/math/tan.h
index 312561364889d..b7bab825c935c 100644
--- a/libclc/opencl/include/clc/opencl/math/tan.h
+++ b/libclc/opencl/include/clc/opencl/math/tan.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_TAN_H__
+#define __CLC_OPENCL_MATH_TAN_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION tan
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_TAN_H__
diff --git a/libclc/opencl/include/clc/opencl/math/tanh.h b/libclc/opencl/include/clc/opencl/math/tanh.h
index fef93ebe9f7bf..168c06d50cb29 100644
--- a/libclc/opencl/include/clc/opencl/math/tanh.h
+++ b/libclc/opencl/include/clc/opencl/math/tanh.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_TANH_H__
+#define __CLC_OPENCL_MATH_TANH_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION tanh
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_TANH_H__
diff --git a/libclc/opencl/include/clc/opencl/math/tanpi.h b/libclc/opencl/include/clc/opencl/math/tanpi.h
index 2df53e8fe99b0..0475027086f63 100644
--- a/libclc/opencl/include/clc/opencl/math/tanpi.h
+++ b/libclc/opencl/include/clc/opencl/math/tanpi.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_TANPI_H__
+#define __CLC_OPENCL_MATH_TANPI_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION tanpi
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_TANPI_H__
diff --git a/libclc/opencl/include/clc/opencl/math/tgamma.h b/libclc/opencl/include/clc/opencl/math/tgamma.h
index 8c0f320c7c34c..6629c02002455 100644
--- a/libclc/opencl/include/clc/opencl/math/tgamma.h
+++ b/libclc/opencl/include/clc/opencl/math/tgamma.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_TGAMMA_H__
+#define __CLC_OPENCL_MATH_TGAMMA_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION tgamma
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_TGAMMA_H__
diff --git a/libclc/opencl/include/clc/opencl/math/trunc.h b/libclc/opencl/include/clc/opencl/math/trunc.h
index 41597cb56209e..0e61f6e1679f7 100644
--- a/libclc/opencl/include/clc/opencl/math/trunc.h
+++ b/libclc/opencl/include/clc/opencl/math/trunc.h
@@ -6,9 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_MATH_TRUNC_H__
+#define __CLC_OPENCL_MATH_TRUNC_H__
+
#define __CLC_BODY <clc/math/unary_decl.inc>
#define FUNCTION trunc
#include <clc/math/gentype.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_MATH_TRUNC_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/all.h b/libclc/opencl/include/clc/opencl/relational/all.h
index 31c8e895f6661..6c19d83e25bbf 100644
--- a/libclc/opencl/include/clc/opencl/relational/all.h
+++ b/libclc/opencl/include/clc/opencl/relational/all.h
@@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_RELATIONAL_ALL_H__
+#define __CLC_OPENCL_RELATIONAL_ALL_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define _CLC_ALL_DECL(TYPE) _CLC_OVERLOAD _CLC_DECL int all(TYPE v);
#define _CLC_VECTOR_ALL_DECL(TYPE) \
@@ -23,3 +28,5 @@ _CLC_VECTOR_ALL_DECL(long)
#undef _CLC_ALL_DECL
#undef _CLC_VECTOR_ALL_DECL
+
+#endif // __CLC_OPENCL_RELATIONAL_ALL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/any.h b/libclc/opencl/include/clc/opencl/relational/any.h
index 9c227e8f1600e..4f6b2e22460c1 100644
--- a/libclc/opencl/include/clc/opencl/relational/any.h
+++ b/libclc/opencl/include/clc/opencl/relational/any.h
@@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_RELATIONAL_ANY_H__
+#define __CLC_OPENCL_RELATIONAL_ANY_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define _CLC_ANY_DECL(TYPE) _CLC_OVERLOAD _CLC_DECL int any(TYPE v);
#define _CLC_VECTOR_ANY_DECL(TYPE) \
@@ -23,3 +28,5 @@ _CLC_VECTOR_ANY_DECL(long)
#undef _CLC_ANY_DECL
#undef _CLC_VECTOR_ANY_DECL
+
+#endif // __CLC_OPENCL_RELATIONAL_ANY_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/bitselect.h b/libclc/opencl/include/clc/opencl/relational/bitselect.h
index 7a39d5468e5ff..9e967c6e2d642 100644
--- a/libclc/opencl/include/clc/opencl/relational/bitselect.h
+++ b/libclc/opencl/include/clc/opencl/relational/bitselect.h
@@ -6,7 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_RELATIONAL_BITSELECT_H__
+#define __CLC_OPENCL_RELATIONAL_BITSELECT_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_BODY <clc/opencl/relational/bitselect.inc>
#include <clc/math/gentype.inc>
#define __CLC_BODY <clc/opencl/relational/bitselect.inc>
#include <clc/integer/gentype.inc>
+
+#endif // __CLC_OPENCL_RELATIONAL_BITSELECT_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isequal.h b/libclc/opencl/include/clc/opencl/relational/isequal.h
index 090b9928ede25..c679b2cfc3feb 100644
--- a/libclc/opencl/include/clc/opencl/relational/isequal.h
+++ b/libclc/opencl/include/clc/opencl/relational/isequal.h
@@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_RELATIONAL_ISEQUAL_H__
+#define __CLC_OPENCL_RELATIONAL_ISEQUAL_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define _CLC_ISEQUAL_DECL(TYPE, RETTYPE) \
_CLC_OVERLOAD _CLC_DECL RETTYPE isequal(TYPE x, TYPE y);
@@ -30,3 +35,5 @@ _CLC_VECTOR_ISEQUAL_DECL(half, short)
#undef _CLC_ISEQUAL_DECL
#undef _CLC_VECTOR_ISEQUAL_DEC
+
+#endif // __CLC_OPENCL_RELATIONAL_ISEQUAL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isfinite.h b/libclc/opencl/include/clc/opencl/relational/isfinite.h
index 3c70ebacd7dff..2548e6acf5109 100644
--- a/libclc/opencl/include/clc/opencl/relational/isfinite.h
+++ b/libclc/opencl/include/clc/opencl/relational/isfinite.h
@@ -6,7 +6,10 @@
//
//===----------------------------------------------------------------------===//
-#undef isfinite
+#ifndef __CLC_OPENCL_RELATIONAL_ISFINITE_H__
+#define __CLC_OPENCL_RELATIONAL_ISFINITE_H__
+
+#include <clc/opencl/opencl-base.h>
#define FUNCTION isfinite
#define __CLC_BODY <clc/relational/unary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/relational/floatn.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_RELATIONAL_ISFINITE_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isgreater.h b/libclc/opencl/include/clc/opencl/relational/isgreater.h
index f64b5d8c13e25..6dfe6eb810e2a 100644
--- a/libclc/opencl/include/clc/opencl/relational/isgreater.h
+++ b/libclc/opencl/include/clc/opencl/relational/isgreater.h
@@ -6,7 +6,10 @@
//
//===----------------------------------------------------------------------===//
-#undef isgreater
+#ifndef __CLC_OPENCL_RELATIONAL_ISGREATER_H__
+#define __CLC_OPENCL_RELATIONAL_ISGREATER_H__
+
+#include <clc/opencl/opencl-base.h>
#define FUNCTION isgreater
#define __CLC_BODY <clc/relational/binary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/relational/floatn.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_RELATIONAL_ISGREATER_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h b/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h
index e8b6a03e6bf42..1db2c5d58d062 100644
--- a/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h
+++ b/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h
@@ -6,7 +6,10 @@
//
//===----------------------------------------------------------------------===//
-#undef isgreaterequal
+#ifndef __CLC_OPENCL_RELATIONAL_ISGREATEREQUAL_H__
+#define __CLC_OPENCL_RELATIONAL_ISGREATEREQUAL_H__
+
+#include <clc/opencl/opencl-base.h>
#define FUNCTION isgreaterequal
#define __CLC_BODY <clc/relational/binary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/relational/floatn.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_RELATIONAL_ISGREATEREQUAL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isinf.h b/libclc/opencl/include/clc/opencl/relational/isinf.h
index da38b01e364b5..561cb1cda47b7 100644
--- a/libclc/opencl/include/clc/opencl/relational/isinf.h
+++ b/libclc/opencl/include/clc/opencl/relational/isinf.h
@@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_RELATIONAL_ISINF_H__
+#define __CLC_OPENCL_RELATIONAL_ISINF_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define _CLC_ISINF_DECL(RET_TYPE, ARG_TYPE) \
_CLC_OVERLOAD _CLC_DECL RET_TYPE isinf(ARG_TYPE);
@@ -31,3 +36,5 @@ _CLC_VECTOR_ISINF_DECL(short, half)
#undef _CLC_ISINF_DECL
#undef _CLC_VECTOR_ISINF_DECL
+
+#endif // __CLC_OPENCL_RELATIONAL_ISINF_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isless.h b/libclc/opencl/include/clc/opencl/relational/isless.h
index d5a8c06beb683..3e2afb32cddf4 100644
--- a/libclc/opencl/include/clc/opencl/relational/isless.h
+++ b/libclc/opencl/include/clc/opencl/relational/isless.h
@@ -6,9 +6,16 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_RELATIONAL_ISLESS_H__
+#define __CLC_OPENCL_RELATIONAL_ISLESS_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define FUNCTION isless
#define __CLC_BODY <clc/relational/binary_decl.inc>
#include <clc/relational/floatn.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_RELATIONAL_ISLESS_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/islessequal.h b/libclc/opencl/include/clc/opencl/relational/islessequal.h
index b4c3aee168d57..978e6a9052c16 100644
--- a/libclc/opencl/include/clc/opencl/relational/islessequal.h
+++ b/libclc/opencl/include/clc/opencl/relational/islessequal.h
@@ -6,9 +6,16 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_RELATIONAL_ISLESSEQUAL_H__
+#define __CLC_OPENCL_RELATIONAL_ISLESSEQUAL_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define FUNCTION islessequal
#define __CLC_BODY <clc/relational/binary_decl.inc>
#include <clc/relational/floatn.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_RELATIONAL_ISLESSEQUAL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/islessgreater.h b/libclc/opencl/include/clc/opencl/relational/islessgreater.h
index f1306b3aac263..56cce7db20770 100644
--- a/libclc/opencl/include/clc/opencl/relational/islessgreater.h
+++ b/libclc/opencl/include/clc/opencl/relational/islessgreater.h
@@ -6,9 +6,16 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_RELATIONAL_ISLESSGREATER_H__
+#define __CLC_OPENCL_RELATIONAL_ISLESSGREATER_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define FUNCTION islessgreater
#define __CLC_BODY <clc/relational/binary_decl.inc>
#include <clc/relational/floatn.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_RELATIONAL_ISLESSGREATER_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isnan.h b/libclc/opencl/include/clc/opencl/relational/isnan.h
index e712d6a5d93a9..fe1e5721c1d24 100644
--- a/libclc/opencl/include/clc/opencl/relational/isnan.h
+++ b/libclc/opencl/include/clc/opencl/relational/isnan.h
@@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_RELATIONAL_ISNAN_H__
+#define __CLC_OPENCL_RELATIONAL_ISNAN_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define _CLC_ISNAN_DECL(RET_TYPE, ARG_TYPE) \
_CLC_OVERLOAD _CLC_DECL RET_TYPE isnan(ARG_TYPE);
@@ -31,3 +36,5 @@ _CLC_VECTOR_ISNAN_DECL(short, half)
#undef _CLC_ISNAN_DECL
#undef _CLC_VECTOR_ISNAN_DECL
+
+#endif // __CLC_OPENCL_RELATIONAL_ISNAN_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isnormal.h b/libclc/opencl/include/clc/opencl/relational/isnormal.h
index 92646c342c079..ee74a990b5eaf 100644
--- a/libclc/opencl/include/clc/opencl/relational/isnormal.h
+++ b/libclc/opencl/include/clc/opencl/relational/isnormal.h
@@ -6,7 +6,10 @@
//
//===----------------------------------------------------------------------===//
-#undef isnormal
+#ifndef __CLC_OPENCL_RELATIONAL_ISNORMAL_H__
+#define __CLC_OPENCL_RELATIONAL_ISNORMAL_H__
+
+#include <clc/opencl/opencl-base.h>
#define FUNCTION isnormal
#define __CLC_BODY <clc/relational/unary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/relational/floatn.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_RELATIONAL_ISNORMAL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isnotequal.h b/libclc/opencl/include/clc/opencl/relational/isnotequal.h
index f65f3d47720a7..7cf94e3ceec5f 100644
--- a/libclc/opencl/include/clc/opencl/relational/isnotequal.h
+++ b/libclc/opencl/include/clc/opencl/relational/isnotequal.h
@@ -6,7 +6,10 @@
//
//===----------------------------------------------------------------------===//
-#undef isnotequal
+#ifndef __CLC_OPENCL_RELATIONAL_ISNOTEQUAL_H__
+#define __CLC_OPENCL_RELATIONAL_ISNOTEQUAL_H__
+
+#include <clc/opencl/opencl-base.h>
#define FUNCTION isnotequal
#define __CLC_BODY <clc/relational/binary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/relational/floatn.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_RELATIONAL_ISNOTEQUAL_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isordered.h b/libclc/opencl/include/clc/opencl/relational/isordered.h
index 92cefa6d6f366..ad9770bd627f2 100644
--- a/libclc/opencl/include/clc/opencl/relational/isordered.h
+++ b/libclc/opencl/include/clc/opencl/relational/isordered.h
@@ -6,7 +6,10 @@
//
//===----------------------------------------------------------------------===//
-#undef isordered
+#ifndef __CLC_OPENCL_RELATIONAL_ISORDERED_H__
+#define __CLC_OPENCL_RELATIONAL_ISORDERED_H__
+
+#include <clc/opencl/opencl-base.h>
#define FUNCTION isordered
#define __CLC_BODY <clc/relational/binary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/relational/floatn.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_RELATIONAL_ISORDERED_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/isunordered.h b/libclc/opencl/include/clc/opencl/relational/isunordered.h
index af91e626abd3e..01d2f53837317 100644
--- a/libclc/opencl/include/clc/opencl/relational/isunordered.h
+++ b/libclc/opencl/include/clc/opencl/relational/isunordered.h
@@ -6,7 +6,10 @@
//
//===----------------------------------------------------------------------===//
-#undef isunordered
+#ifndef __CLC_OPENCL_RELATIONAL_ISUNORDERED_H__
+#define __CLC_OPENCL_RELATIONAL_ISUNORDERED_H__
+
+#include <clc/opencl/opencl-base.h>
#define FUNCTION isunordered
#define __CLC_BODY <clc/relational/binary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/relational/floatn.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_RELATIONAL_ISUNORDERED_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/select.h b/libclc/opencl/include/clc/opencl/relational/select.h
index 52f42eff3e4d4..e4cefd8bcde2e 100644
--- a/libclc/opencl/include/clc/opencl/relational/select.h
+++ b/libclc/opencl/include/clc/opencl/relational/select.h
@@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//
+#ifndef __CLC_OPENCL_RELATIONAL_SELECT_H__
+#define __CLC_OPENCL_RELATIONAL_SELECT_H__
+
+#include <clc/opencl/opencl-base.h>
+
#define __CLC_SELECT_FN select
#define __CLC_BODY <clc/relational/clc_select_decl.inc>
@@ -14,3 +19,5 @@
#include <clc/integer/gentype.inc>
#undef __CLC_SELECT_FN
+
+#endif // __CLC_OPENCL_RELATIONAL_SELECT_H__
diff --git a/libclc/opencl/include/clc/opencl/relational/signbit.h b/libclc/opencl/include/clc/opencl/relational/signbit.h
index 1e0894cfba5a2..29591c0c126a9 100644
--- a/libclc/opencl/include/clc/opencl/relational/signbit.h
+++ b/libclc/opencl/include/clc/opencl/relational/signbit.h
@@ -6,7 +6,10 @@
//
//===----------------------------------------------------------------------===//
-#undef signbit
+#ifndef __CLC_OPENCL_RELATIONAL_SIGNBIT_H__
+#define __CLC_OPENCL_RELATIONAL_SIGNBIT_H__
+
+#include <clc/opencl/opencl-base.h>
#define FUNCTION signbit
#define __CLC_BODY <clc/relational/unary_decl.inc>
@@ -14,3 +17,5 @@
#include <clc/relational/floatn.inc>
#undef FUNCTION
+
+#endif // __CLC_OPENCL_RELATIONAL_SIGNBIT_H__
diff --git a/libclc/opencl/lib/clspv/math/fma.cl b/libclc/opencl/lib/clspv/math/fma.cl
index c027b4fcd8f12..83504f63772ca 100644
--- a/libclc/opencl/lib/clspv/math/fma.cl
+++ b/libclc/opencl/lib/clspv/math/fma.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/internal/math/clc_sw_fma.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/fma.h>
#define __FLOAT_ONLY
#define FUNCTION fma
diff --git a/libclc/opencl/lib/generic/common/degrees.cl b/libclc/opencl/lib/generic/common/degrees.cl
index a86003c170bff..d989fa6382edb 100644
--- a/libclc/opencl/lib/generic/common/degrees.cl
+++ b/libclc/opencl/lib/generic/common/degrees.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/common/clc_degrees.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/common/degrees.h>
#define FUNCTION degrees
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/common/mix.cl b/libclc/opencl/lib/generic/common/mix.cl
index cc95dcd3b615c..014cc1a742f1c 100644
--- a/libclc/opencl/lib/generic/common/mix.cl
+++ b/libclc/opencl/lib/generic/common/mix.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_mad.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/common/mix.h>
#define __CLC_BODY <mix.inc>
#include <clc/math/gentype.inc>
diff --git a/libclc/opencl/lib/generic/common/radians.cl b/libclc/opencl/lib/generic/common/radians.cl
index b45653be2e782..1da38920d43fb 100644
--- a/libclc/opencl/lib/generic/common/radians.cl
+++ b/libclc/opencl/lib/generic/common/radians.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/common/clc_radians.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/common/radians.h>
#define FUNCTION radians
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/common/sign.cl b/libclc/opencl/lib/generic/common/sign.cl
index 0acab050af598..9afcb7375e96a 100644
--- a/libclc/opencl/lib/generic/common/sign.cl
+++ b/libclc/opencl/lib/generic/common/sign.cl
@@ -8,7 +8,7 @@
#include <clc/clcmacro.h>
#include <clc/common/clc_sign.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/common/sign.h>
#define FUNCTION sign
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/common/smoothstep.cl b/libclc/opencl/lib/generic/common/smoothstep.cl
index 30ed1451ff302..fdf9a89dcbfdc 100644
--- a/libclc/opencl/lib/generic/common/smoothstep.cl
+++ b/libclc/opencl/lib/generic/common/smoothstep.cl
@@ -8,7 +8,7 @@
#include <clc/clcmacro.h>
#include <clc/common/clc_smoothstep.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/common/smoothstep.h>
#define SMOOTHSTEP_SINGLE_DEF(X_TYPE) \
_CLC_OVERLOAD _CLC_DEF X_TYPE smoothstep(X_TYPE edge0, X_TYPE edge1, \
diff --git a/libclc/opencl/lib/generic/common/step.cl b/libclc/opencl/lib/generic/common/step.cl
index 99a7af08c9264..d946771698150 100644
--- a/libclc/opencl/lib/generic/common/step.cl
+++ b/libclc/opencl/lib/generic/common/step.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/common/clc_step.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/common/step.h>
#define __CLC_BODY <step.inc>
#include <clc/math/gentype.inc>
diff --git a/libclc/opencl/lib/generic/geometric/cross.cl b/libclc/opencl/lib/generic/geometric/cross.cl
index bd4f86bb15d84..7553c80e6b253 100644
--- a/libclc/opencl/lib/generic/geometric/cross.cl
+++ b/libclc/opencl/lib/generic/geometric/cross.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_cross.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/geometric/cross.h>
_CLC_OVERLOAD _CLC_DEF float3 cross(float3 p0, float3 p1) {
return __clc_cross(p0, p1);
diff --git a/libclc/opencl/lib/generic/geometric/distance.cl b/libclc/opencl/lib/generic/geometric/distance.cl
index b2194abd60e97..54c78d3609ba7 100644
--- a/libclc/opencl/lib/generic/geometric/distance.cl
+++ b/libclc/opencl/lib/generic/geometric/distance.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_distance.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/geometric/distance.h>
#define FUNCTION distance
#define __CLC_BODY <clc/geometric/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/geometric/dot.cl b/libclc/opencl/lib/generic/geometric/dot.cl
index 785767f27aacf..05425aafb0404 100644
--- a/libclc/opencl/lib/generic/geometric/dot.cl
+++ b/libclc/opencl/lib/generic/geometric/dot.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_dot.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/geometric/dot.h>
#define FUNCTION dot
#define __CLC_BODY <clc/geometric/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/geometric/fast_distance.cl b/libclc/opencl/lib/generic/geometric/fast_distance.cl
index 2a19418a175b9..bc30c298a2b9a 100644
--- a/libclc/opencl/lib/generic/geometric/fast_distance.cl
+++ b/libclc/opencl/lib/generic/geometric/fast_distance.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_fast_distance.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/geometric/fast_distance.h>
#define __FLOAT_ONLY
#define FUNCTION fast_distance
diff --git a/libclc/opencl/lib/generic/geometric/fast_length.cl b/libclc/opencl/lib/generic/geometric/fast_length.cl
index 3af751af5425d..407080900cceb 100644
--- a/libclc/opencl/lib/generic/geometric/fast_length.cl
+++ b/libclc/opencl/lib/generic/geometric/fast_length.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_fast_length.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/geometric/fast_length.h>
#define __FLOAT_ONLY
#define FUNCTION fast_length
diff --git a/libclc/opencl/lib/generic/geometric/fast_normalize.cl b/libclc/opencl/lib/generic/geometric/fast_normalize.cl
index 938b30093b8de..195081371a5b2 100644
--- a/libclc/opencl/lib/generic/geometric/fast_normalize.cl
+++ b/libclc/opencl/lib/generic/geometric/fast_normalize.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_fast_normalize.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/geometric/fast_normalize.h>
#define FUNCTION fast_normalize
#define __FLOAT_ONLY
diff --git a/libclc/opencl/lib/generic/geometric/length.cl b/libclc/opencl/lib/generic/geometric/length.cl
index 5645ade4c9172..0b0ebaa74d951 100644
--- a/libclc/opencl/lib/generic/geometric/length.cl
+++ b/libclc/opencl/lib/generic/geometric/length.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_length.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/geometric/length.h>
#define FUNCTION length
#define __CLC_BODY <clc/geometric/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/geometric/normalize.cl b/libclc/opencl/lib/generic/geometric/normalize.cl
index 914f493f2cb28..eb84ffd382129 100644
--- a/libclc/opencl/lib/generic/geometric/normalize.cl
+++ b/libclc/opencl/lib/generic/geometric/normalize.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/geometric/clc_normalize.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/geometric/normalize.h>
#define FUNCTION normalize
#define __CLC_GEOMETRIC_RET_GENTYPE
diff --git a/libclc/opencl/lib/generic/math/acos.cl b/libclc/opencl/lib/generic/math/acos.cl
index 3d290225a2c29..040b2b82f6f98 100644
--- a/libclc/opencl/lib/generic/math/acos.cl
+++ b/libclc/opencl/lib/generic/math/acos.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_acos.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/acos.h>
#define FUNCTION acos
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/acosh.cl b/libclc/opencl/lib/generic/math/acosh.cl
index fea40caa3e20c..55b60bc99614a 100644
--- a/libclc/opencl/lib/generic/math/acosh.cl
+++ b/libclc/opencl/lib/generic/math/acosh.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_acosh.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/acosh.h>
#define FUNCTION acosh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/acospi.cl b/libclc/opencl/lib/generic/math/acospi.cl
index 6c5ba2982ed0b..2537c992e2ada 100644
--- a/libclc/opencl/lib/generic/math/acospi.cl
+++ b/libclc/opencl/lib/generic/math/acospi.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_acospi.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/acospi.h>
#define FUNCTION acospi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/asin.cl b/libclc/opencl/lib/generic/math/asin.cl
index b8d02cef7d3ac..08dde1201392e 100644
--- a/libclc/opencl/lib/generic/math/asin.cl
+++ b/libclc/opencl/lib/generic/math/asin.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_asin.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/asin.h>
#define FUNCTION asin
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/asinh.cl b/libclc/opencl/lib/generic/math/asinh.cl
index f043a33fe3177..189392f50b5ee 100644
--- a/libclc/opencl/lib/generic/math/asinh.cl
+++ b/libclc/opencl/lib/generic/math/asinh.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_asinh.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/asinh.h>
#define FUNCTION asinh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/asinpi.cl b/libclc/opencl/lib/generic/math/asinpi.cl
index 688da90337ea9..b9327faaccba5 100644
--- a/libclc/opencl/lib/generic/math/asinpi.cl
+++ b/libclc/opencl/lib/generic/math/asinpi.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_asinpi.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/asinpi.h>
#define FUNCTION asinpi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/atan.cl b/libclc/opencl/lib/generic/math/atan.cl
index 006fc9e65d45e..e2b1530f9e4cf 100644
--- a/libclc/opencl/lib/generic/math/atan.cl
+++ b/libclc/opencl/lib/generic/math/atan.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_atan.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/atan.h>
#define FUNCTION atan
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/atan2.cl b/libclc/opencl/lib/generic/math/atan2.cl
index ae277e7dc9567..9f3d4a965e58a 100644
--- a/libclc/opencl/lib/generic/math/atan2.cl
+++ b/libclc/opencl/lib/generic/math/atan2.cl
@@ -8,7 +8,7 @@
#include <clc/clcmacro.h>
#include <clc/math/clc_atan2.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/atan2.h>
#define FUNCTION atan2
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/atan2pi.cl b/libclc/opencl/lib/generic/math/atan2pi.cl
index 06f0974d4325a..9b3fea163f685 100644
--- a/libclc/opencl/lib/generic/math/atan2pi.cl
+++ b/libclc/opencl/lib/generic/math/atan2pi.cl
@@ -8,7 +8,7 @@
#include <clc/clcmacro.h>
#include <clc/math/clc_atan2pi.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/atan2pi.h>
#define FUNCTION atan2pi
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/atanh.cl b/libclc/opencl/lib/generic/math/atanh.cl
index ad4c54b81d21d..5e4564d347026 100644
--- a/libclc/opencl/lib/generic/math/atanh.cl
+++ b/libclc/opencl/lib/generic/math/atanh.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_atanh.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/atanh.h>
#define FUNCTION atanh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/atanpi.cl b/libclc/opencl/lib/generic/math/atanpi.cl
index 3eba081d1b3f9..ddeb38e64e993 100644
--- a/libclc/opencl/lib/generic/math/atanpi.cl
+++ b/libclc/opencl/lib/generic/math/atanpi.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_atanpi.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/atanpi.h>
#define FUNCTION atanpi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/cbrt.cl b/libclc/opencl/lib/generic/math/cbrt.cl
index edccc1aaa187d..dccb49a47dc03 100644
--- a/libclc/opencl/lib/generic/math/cbrt.cl
+++ b/libclc/opencl/lib/generic/math/cbrt.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_cbrt.inc>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/cbrt.h>
#define FUNCTION cbrt
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/ceil.cl b/libclc/opencl/lib/generic/math/ceil.cl
index 981fa80a44430..e312281b98a23 100644
--- a/libclc/opencl/lib/generic/math/ceil.cl
+++ b/libclc/opencl/lib/generic/math/ceil.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_ceil.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/ceil.h>
#define FUNCTION ceil
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/copysign.cl b/libclc/opencl/lib/generic/math/copysign.cl
index 9a34aa3ea94f8..7aa4cb2da0eec 100644
--- a/libclc/opencl/lib/generic/math/copysign.cl
+++ b/libclc/opencl/lib/generic/math/copysign.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_copysign.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/copysign.h>
#define FUNCTION copysign
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/cos.cl b/libclc/opencl/lib/generic/math/cos.cl
index 01f419ebc2878..fb40b6c00e3c8 100644
--- a/libclc/opencl/lib/generic/math/cos.cl
+++ b/libclc/opencl/lib/generic/math/cos.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_cos.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/cos.h>
#define FUNCTION cos
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/cosh.cl b/libclc/opencl/lib/generic/math/cosh.cl
index c2ee2375ce5a8..7106fc9f18fa5 100644
--- a/libclc/opencl/lib/generic/math/cosh.cl
+++ b/libclc/opencl/lib/generic/math/cosh.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_cosh.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/cosh.h>
#define FUNCTION cosh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/cospi.cl b/libclc/opencl/lib/generic/math/cospi.cl
index 05de33f74373c..0e242ad0d4779 100644
--- a/libclc/opencl/lib/generic/math/cospi.cl
+++ b/libclc/opencl/lib/generic/math/cospi.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_cospi.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/cospi.h>
#define FUNCTION cospi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/erf.cl b/libclc/opencl/lib/generic/math/erf.cl
index ba60e4c47355f..83c38867e0460 100644
--- a/libclc/opencl/lib/generic/math/erf.cl
+++ b/libclc/opencl/lib/generic/math/erf.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_erf.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/erf.h>
#define FUNCTION erf
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/erfc.cl b/libclc/opencl/lib/generic/math/erfc.cl
index 4624a04525668..1c473999bba93 100644
--- a/libclc/opencl/lib/generic/math/erfc.cl
+++ b/libclc/opencl/lib/generic/math/erfc.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_erfc.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/erfc.h>
#define FUNCTION erfc
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/exp.cl b/libclc/opencl/lib/generic/math/exp.cl
index 8b20e26716a3a..8125ce314e8e4 100644
--- a/libclc/opencl/lib/generic/math/exp.cl
+++ b/libclc/opencl/lib/generic/math/exp.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_exp.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/exp.h>
#define FUNCTION exp
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/exp10.cl b/libclc/opencl/lib/generic/math/exp10.cl
index d5bcf1960d7d9..f8c0f94a990bc 100644
--- a/libclc/opencl/lib/generic/math/exp10.cl
+++ b/libclc/opencl/lib/generic/math/exp10.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_exp10.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/exp10.h>
#define FUNCTION exp10
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/exp2.cl b/libclc/opencl/lib/generic/math/exp2.cl
index 130dbbd77be8a..dc75c2201a460 100644
--- a/libclc/opencl/lib/generic/math/exp2.cl
+++ b/libclc/opencl/lib/generic/math/exp2.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_exp2.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/exp2.h>
#define FUNCTION exp2
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/expm1.cl b/libclc/opencl/lib/generic/math/expm1.cl
index 26c3eac9e678b..7507786c2ad09 100644
--- a/libclc/opencl/lib/generic/math/expm1.cl
+++ b/libclc/opencl/lib/generic/math/expm1.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_expm1.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/expm1.h>
#define FUNCTION expm1
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/fabs.cl b/libclc/opencl/lib/generic/math/fabs.cl
index 4f9cf117a85f2..0d3128f3b2a1f 100644
--- a/libclc/opencl/lib/generic/math/fabs.cl
+++ b/libclc/opencl/lib/generic/math/fabs.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fabs.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/fabs.h>
#define FUNCTION fabs
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/fdim.cl b/libclc/opencl/lib/generic/math/fdim.cl
index 6b9a46c1bbe1a..ecdcd3aef3a7d 100644
--- a/libclc/opencl/lib/generic/math/fdim.cl
+++ b/libclc/opencl/lib/generic/math/fdim.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fdim.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/fdim.h>
#define FUNCTION fdim
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/floor.cl b/libclc/opencl/lib/generic/math/floor.cl
index 9d5f5691a7059..cda8363f91360 100644
--- a/libclc/opencl/lib/generic/math/floor.cl
+++ b/libclc/opencl/lib/generic/math/floor.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_floor.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/floor.h>
#define FUNCTION floor
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/fma.cl b/libclc/opencl/lib/generic/math/fma.cl
index c077357a44f0d..867b975069013 100644
--- a/libclc/opencl/lib/generic/math/fma.cl
+++ b/libclc/opencl/lib/generic/math/fma.cl
@@ -8,7 +8,7 @@
#include <clc/math/clc_fma.h>
#include <clc/math/math.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/fma.h>
#define FUNCTION fma
#define __CLC_BODY <clc/shared/ternary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/fmax.cl b/libclc/opencl/lib/generic/math/fmax.cl
index 6bc22823757a6..7dbd6fe0bd7f4 100644
--- a/libclc/opencl/lib/generic/math/fmax.cl
+++ b/libclc/opencl/lib/generic/math/fmax.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fmax.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/fmax.h>
#define FUNCTION fmax
#define __CLC_BODY <clc/shared/binary_def_with_scalar_second_arg.inc>
diff --git a/libclc/opencl/lib/generic/math/fmin.cl b/libclc/opencl/lib/generic/math/fmin.cl
index 2aea160b975e4..ee0dca480073e 100644
--- a/libclc/opencl/lib/generic/math/fmin.cl
+++ b/libclc/opencl/lib/generic/math/fmin.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fmin.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/fmin.h>
#define FUNCTION fmin
#define __CLC_BODY <clc/shared/binary_def_with_scalar_second_arg.inc>
diff --git a/libclc/opencl/lib/generic/math/fmod.cl b/libclc/opencl/lib/generic/math/fmod.cl
index ddd071fdab95b..ec1904d213d87 100644
--- a/libclc/opencl/lib/generic/math/fmod.cl
+++ b/libclc/opencl/lib/generic/math/fmod.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fmod.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/fmod.h>
#define FUNCTION fmod
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/fract.cl b/libclc/opencl/lib/generic/math/fract.cl
index c3e8b0afee78d..9567072bf4c39 100644
--- a/libclc/opencl/lib/generic/math/fract.cl
+++ b/libclc/opencl/lib/generic/math/fract.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_fract.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/fract.h>
#define FUNCTION fract
#define __CLC_BODY <clc/math/unary_def_with_ptr.inc>
diff --git a/libclc/opencl/lib/generic/math/frexp.cl b/libclc/opencl/lib/generic/math/frexp.cl
index 940a8e37b5b59..3ac9be792ae65 100644
--- a/libclc/opencl/lib/generic/math/frexp.cl
+++ b/libclc/opencl/lib/generic/math/frexp.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_frexp.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/frexp.h>
#define FUNCTION frexp
#define __CLC_BODY <clc/math/unary_def_with_int_ptr.inc>
diff --git a/libclc/opencl/lib/generic/math/half_cos.cl b/libclc/opencl/lib/generic/math/half_cos.cl
index 5bb91b8addbca..377c4d1642599 100644
--- a/libclc/opencl/lib/generic/math/half_cos.cl
+++ b/libclc/opencl/lib/generic/math/half_cos.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_cos.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_cos.h>
#define __FLOAT_ONLY
#define FUNCTION half_cos
diff --git a/libclc/opencl/lib/generic/math/half_divide.cl b/libclc/opencl/lib/generic/math/half_divide.cl
index 8b5d8eddd67a7..730617ba67fb3 100644
--- a/libclc/opencl/lib/generic/math/half_divide.cl
+++ b/libclc/opencl/lib/generic/math/half_divide.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_divide.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_divide.h>
#define __FLOAT_ONLY
#define FUNCTION half_divide
diff --git a/libclc/opencl/lib/generic/math/half_exp.cl b/libclc/opencl/lib/generic/math/half_exp.cl
index 97507ab2e189a..05b8753b2faf4 100644
--- a/libclc/opencl/lib/generic/math/half_exp.cl
+++ b/libclc/opencl/lib/generic/math/half_exp.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_exp.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_exp.h>
#define __FLOAT_ONLY
#define FUNCTION half_exp
diff --git a/libclc/opencl/lib/generic/math/half_exp10.cl b/libclc/opencl/lib/generic/math/half_exp10.cl
index 6925035d05f7c..b4e46aaa771cd 100644
--- a/libclc/opencl/lib/generic/math/half_exp10.cl
+++ b/libclc/opencl/lib/generic/math/half_exp10.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_exp10.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_exp10.h>
#define __FLOAT_ONLY
#define FUNCTION half_exp10
diff --git a/libclc/opencl/lib/generic/math/half_exp2.cl b/libclc/opencl/lib/generic/math/half_exp2.cl
index 5bd244482ffa4..51fe9f72477a9 100644
--- a/libclc/opencl/lib/generic/math/half_exp2.cl
+++ b/libclc/opencl/lib/generic/math/half_exp2.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_exp2.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_exp2.h>
#define __FLOAT_ONLY
#define FUNCTION half_exp2
diff --git a/libclc/opencl/lib/generic/math/half_log.cl b/libclc/opencl/lib/generic/math/half_log.cl
index 28c6964166983..b21835204a173 100644
--- a/libclc/opencl/lib/generic/math/half_log.cl
+++ b/libclc/opencl/lib/generic/math/half_log.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_log.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_log.h>
#define __FLOAT_ONLY
#define FUNCTION half_log
diff --git a/libclc/opencl/lib/generic/math/half_log10.cl b/libclc/opencl/lib/generic/math/half_log10.cl
index fcd0a818308c0..acb50f99af192 100644
--- a/libclc/opencl/lib/generic/math/half_log10.cl
+++ b/libclc/opencl/lib/generic/math/half_log10.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_log10.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_log10.h>
#define __FLOAT_ONLY
#define FUNCTION half_log10
diff --git a/libclc/opencl/lib/generic/math/half_log2.cl b/libclc/opencl/lib/generic/math/half_log2.cl
index 05214e6f5a629..c97e9e093878d 100644
--- a/libclc/opencl/lib/generic/math/half_log2.cl
+++ b/libclc/opencl/lib/generic/math/half_log2.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_log2.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_log2.h>
#define __FLOAT_ONLY
#define FUNCTION half_log2
diff --git a/libclc/opencl/lib/generic/math/half_powr.cl b/libclc/opencl/lib/generic/math/half_powr.cl
index 3562d3e286faf..d61a18ab91321 100644
--- a/libclc/opencl/lib/generic/math/half_powr.cl
+++ b/libclc/opencl/lib/generic/math/half_powr.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_powr.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_powr.h>
#define __FLOAT_ONLY
#define FUNCTION half_powr
diff --git a/libclc/opencl/lib/generic/math/half_recip.cl b/libclc/opencl/lib/generic/math/half_recip.cl
index e2650662372c8..1917448c4e695 100644
--- a/libclc/opencl/lib/generic/math/half_recip.cl
+++ b/libclc/opencl/lib/generic/math/half_recip.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_recip.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_recip.h>
#define __FLOAT_ONLY
#define FUNCTION half_recip
diff --git a/libclc/opencl/lib/generic/math/half_rsqrt.cl b/libclc/opencl/lib/generic/math/half_rsqrt.cl
index 4f287d72d6417..d6ffa651fbe6a 100644
--- a/libclc/opencl/lib/generic/math/half_rsqrt.cl
+++ b/libclc/opencl/lib/generic/math/half_rsqrt.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_rsqrt.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_rsqrt.h>
#define __FLOAT_ONLY
#define FUNCTION half_rsqrt
diff --git a/libclc/opencl/lib/generic/math/half_sin.cl b/libclc/opencl/lib/generic/math/half_sin.cl
index c1e5696185102..baba0cca49849 100644
--- a/libclc/opencl/lib/generic/math/half_sin.cl
+++ b/libclc/opencl/lib/generic/math/half_sin.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_sin.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_sin.h>
#define __FLOAT_ONLY
#define FUNCTION half_sin
diff --git a/libclc/opencl/lib/generic/math/half_sqrt.cl b/libclc/opencl/lib/generic/math/half_sqrt.cl
index c327881a553b8..7a59744ab11d0 100644
--- a/libclc/opencl/lib/generic/math/half_sqrt.cl
+++ b/libclc/opencl/lib/generic/math/half_sqrt.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_sqrt.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_sqrt.h>
#define __FLOAT_ONLY
#define FUNCTION half_sqrt
diff --git a/libclc/opencl/lib/generic/math/half_tan.cl b/libclc/opencl/lib/generic/math/half_tan.cl
index 0d16b08dc2233..acd4b011173db 100644
--- a/libclc/opencl/lib/generic/math/half_tan.cl
+++ b/libclc/opencl/lib/generic/math/half_tan.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_half_tan.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/half_tan.h>
#define __FLOAT_ONLY
#define FUNCTION half_tan
diff --git a/libclc/opencl/lib/generic/math/hypot.cl b/libclc/opencl/lib/generic/math/hypot.cl
index 3ac2983efc4bf..4c59e4696e5ae 100644
--- a/libclc/opencl/lib/generic/math/hypot.cl
+++ b/libclc/opencl/lib/generic/math/hypot.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_hypot.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/hypot.h>
#define FUNCTION hypot
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/ilogb.cl b/libclc/opencl/lib/generic/math/ilogb.cl
index 147f82d95d1f0..3829ce68fb577 100644
--- a/libclc/opencl/lib/generic/math/ilogb.cl
+++ b/libclc/opencl/lib/generic/math/ilogb.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_ilogb.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/ilogb.h>
#define FUNCTION ilogb
#define __CLC_BODY <clc/math/unary_def_with_int_return.inc>
diff --git a/libclc/opencl/lib/generic/math/ldexp.cl b/libclc/opencl/lib/generic/math/ldexp.cl
index 81c027f736e32..88c60716d7829 100644
--- a/libclc/opencl/lib/generic/math/ldexp.cl
+++ b/libclc/opencl/lib/generic/math/ldexp.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_ldexp.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/ldexp.h>
#define FUNCTION ldexp
#define __IMPL_FUNCTION(x) __clc_ldexp
diff --git a/libclc/opencl/lib/generic/math/lgamma.cl b/libclc/opencl/lib/generic/math/lgamma.cl
index 002a08153a3a3..253ce31c15771 100644
--- a/libclc/opencl/lib/generic/math/lgamma.cl
+++ b/libclc/opencl/lib/generic/math/lgamma.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_lgamma.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/lgamma.h>
#define FUNCTION lgamma
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/lgamma_r.cl b/libclc/opencl/lib/generic/math/lgamma_r.cl
index c44051cb4c39a..8753f6c75d8b1 100644
--- a/libclc/opencl/lib/generic/math/lgamma_r.cl
+++ b/libclc/opencl/lib/generic/math/lgamma_r.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_lgamma_r.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/lgamma_r.h>
#define FUNCTION lgamma_r
#define __CLC_BODY <clc/math/unary_def_with_int_ptr.inc>
diff --git a/libclc/opencl/lib/generic/math/log.cl b/libclc/opencl/lib/generic/math/log.cl
index 78430644a55ee..dbe3e35727033 100644
--- a/libclc/opencl/lib/generic/math/log.cl
+++ b/libclc/opencl/lib/generic/math/log.cl
@@ -8,7 +8,7 @@
#include <clc/clcmacro.h>
#include <clc/math/clc_log.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/log.h>
#define FUNCTION log
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/log10.cl b/libclc/opencl/lib/generic/math/log10.cl
index 01113e7c00c92..d5137a7cab7ab 100644
--- a/libclc/opencl/lib/generic/math/log10.cl
+++ b/libclc/opencl/lib/generic/math/log10.cl
@@ -8,7 +8,7 @@
#include <clc/clcmacro.h>
#include <clc/math/clc_log10.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/log10.h>
#define FUNCTION log10
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/log1p.cl b/libclc/opencl/lib/generic/math/log1p.cl
index 26c4df015bc88..d389ab72908c8 100644
--- a/libclc/opencl/lib/generic/math/log1p.cl
+++ b/libclc/opencl/lib/generic/math/log1p.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_log1p.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/log1p.h>
#define FUNCTION log1p
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/log2.cl b/libclc/opencl/lib/generic/math/log2.cl
index d70f16d6f7d89..d1433bc825813 100644
--- a/libclc/opencl/lib/generic/math/log2.cl
+++ b/libclc/opencl/lib/generic/math/log2.cl
@@ -8,7 +8,7 @@
#include <clc/clcmacro.h>
#include <clc/math/clc_log2.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/log2.h>
#define FUNCTION log2
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/logb.cl b/libclc/opencl/lib/generic/math/logb.cl
index 21046f2ac98cf..037380a26a727 100644
--- a/libclc/opencl/lib/generic/math/logb.cl
+++ b/libclc/opencl/lib/generic/math/logb.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_logb.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/logb.h>
#define FUNCTION logb
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/mad.cl b/libclc/opencl/lib/generic/math/mad.cl
index 39aa8e884cc03..3fe2dd9bed5fb 100644
--- a/libclc/opencl/lib/generic/math/mad.cl
+++ b/libclc/opencl/lib/generic/math/mad.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_mad.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/mad.h>
#define FUNCTION mad
#define __CLC_BODY <clc/shared/ternary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/maxmag.cl b/libclc/opencl/lib/generic/math/maxmag.cl
index cf4cfc7ded3a5..4f9dbeb8d27e7 100644
--- a/libclc/opencl/lib/generic/math/maxmag.cl
+++ b/libclc/opencl/lib/generic/math/maxmag.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_maxmag.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/maxmag.h>
#define FUNCTION maxmag
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/minmag.cl b/libclc/opencl/lib/generic/math/minmag.cl
index e636ca7e2c40a..efe72b6f545c2 100644
--- a/libclc/opencl/lib/generic/math/minmag.cl
+++ b/libclc/opencl/lib/generic/math/minmag.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_minmag.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/minmag.h>
#define FUNCTION minmag
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/modf.cl b/libclc/opencl/lib/generic/math/modf.cl
index 7ad3a2c7550d9..de6524e02f73f 100644
--- a/libclc/opencl/lib/generic/math/modf.cl
+++ b/libclc/opencl/lib/generic/math/modf.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_modf.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/modf.h>
#define FUNCTION modf
#define __CLC_BODY <clc/math/unary_def_with_ptr.inc>
diff --git a/libclc/opencl/lib/generic/math/native_cos.cl b/libclc/opencl/lib/generic/math/native_cos.cl
index d0df037716943..85944a03c5468 100644
--- a/libclc/opencl/lib/generic/math/native_cos.cl
+++ b/libclc/opencl/lib/generic/math/native_cos.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_cos.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_cos.h>
#define __FLOAT_ONLY
#define FUNCTION native_cos
diff --git a/libclc/opencl/lib/generic/math/native_divide.cl b/libclc/opencl/lib/generic/math/native_divide.cl
index 6bcc5ecf4d05b..8efd8cc21b5d8 100644
--- a/libclc/opencl/lib/generic/math/native_divide.cl
+++ b/libclc/opencl/lib/generic/math/native_divide.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_divide.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_divide.h>
#define __FLOAT_ONLY
#define FUNCTION native_divide
diff --git a/libclc/opencl/lib/generic/math/native_exp.cl b/libclc/opencl/lib/generic/math/native_exp.cl
index 23b72fc82f8c0..42208371e195c 100644
--- a/libclc/opencl/lib/generic/math/native_exp.cl
+++ b/libclc/opencl/lib/generic/math/native_exp.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_exp.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_exp.h>
#define __FLOAT_ONLY
#define FUNCTION native_exp
diff --git a/libclc/opencl/lib/generic/math/native_exp10.cl b/libclc/opencl/lib/generic/math/native_exp10.cl
index 76cbc57cb3ba5..aa2585ff4311d 100644
--- a/libclc/opencl/lib/generic/math/native_exp10.cl
+++ b/libclc/opencl/lib/generic/math/native_exp10.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_exp10.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_exp10.h>
#define __FLOAT_ONLY
#define FUNCTION native_exp10
diff --git a/libclc/opencl/lib/generic/math/native_exp2.cl b/libclc/opencl/lib/generic/math/native_exp2.cl
index 107db022b6e2b..8955b28b367cb 100644
--- a/libclc/opencl/lib/generic/math/native_exp2.cl
+++ b/libclc/opencl/lib/generic/math/native_exp2.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_exp2.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_exp2.h>
#define __FLOAT_ONLY
#define FUNCTION native_exp2
diff --git a/libclc/opencl/lib/generic/math/native_log.cl b/libclc/opencl/lib/generic/math/native_log.cl
index 3faf70674fac8..334f7c04e3899 100644
--- a/libclc/opencl/lib/generic/math/native_log.cl
+++ b/libclc/opencl/lib/generic/math/native_log.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_log.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_log.h>
#define __FLOAT_ONLY
#define FUNCTION native_log
diff --git a/libclc/opencl/lib/generic/math/native_log10.cl b/libclc/opencl/lib/generic/math/native_log10.cl
index e71ac4448df25..a65938ee4c6cb 100644
--- a/libclc/opencl/lib/generic/math/native_log10.cl
+++ b/libclc/opencl/lib/generic/math/native_log10.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_log10.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_log10.h>
#define __FLOAT_ONLY
#define FUNCTION native_log10
diff --git a/libclc/opencl/lib/generic/math/native_log2.cl b/libclc/opencl/lib/generic/math/native_log2.cl
index c971013c4021d..f10b533f91f40 100644
--- a/libclc/opencl/lib/generic/math/native_log2.cl
+++ b/libclc/opencl/lib/generic/math/native_log2.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_log2.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_log2.h>
#define __FLOAT_ONLY
#define FUNCTION native_log2
diff --git a/libclc/opencl/lib/generic/math/native_powr.cl b/libclc/opencl/lib/generic/math/native_powr.cl
index ffc7e5a174377..8301443cfbcfd 100644
--- a/libclc/opencl/lib/generic/math/native_powr.cl
+++ b/libclc/opencl/lib/generic/math/native_powr.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_powr.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_powr.h>
#define __FLOAT_ONLY
#define FUNCTION native_powr
diff --git a/libclc/opencl/lib/generic/math/native_recip.cl b/libclc/opencl/lib/generic/math/native_recip.cl
index cad339ecb4f78..145845b455147 100644
--- a/libclc/opencl/lib/generic/math/native_recip.cl
+++ b/libclc/opencl/lib/generic/math/native_recip.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_recip.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_recip.h>
#define __FLOAT_ONLY
#define FUNCTION native_recip
diff --git a/libclc/opencl/lib/generic/math/native_rsqrt.cl b/libclc/opencl/lib/generic/math/native_rsqrt.cl
index 69a387387f336..cbb5a754fc967 100644
--- a/libclc/opencl/lib/generic/math/native_rsqrt.cl
+++ b/libclc/opencl/lib/generic/math/native_rsqrt.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_rsqrt.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_rsqrt.h>
#define __FLOAT_ONLY
#define FUNCTION native_rsqrt
diff --git a/libclc/opencl/lib/generic/math/native_sin.cl b/libclc/opencl/lib/generic/math/native_sin.cl
index c1a3faed39a26..dfcc882614a63 100644
--- a/libclc/opencl/lib/generic/math/native_sin.cl
+++ b/libclc/opencl/lib/generic/math/native_sin.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_sin.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_sin.h>
#define __FLOAT_ONLY
#define FUNCTION native_sin
diff --git a/libclc/opencl/lib/generic/math/native_sqrt.cl b/libclc/opencl/lib/generic/math/native_sqrt.cl
index 5b5487cfea934..a0be41d33fa43 100644
--- a/libclc/opencl/lib/generic/math/native_sqrt.cl
+++ b/libclc/opencl/lib/generic/math/native_sqrt.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_sqrt.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_sqrt.h>
#define __FLOAT_ONLY
#define FUNCTION native_sqrt
diff --git a/libclc/opencl/lib/generic/math/native_tan.cl b/libclc/opencl/lib/generic/math/native_tan.cl
index 000d6c5f366a1..86eee4f5913f0 100644
--- a/libclc/opencl/lib/generic/math/native_tan.cl
+++ b/libclc/opencl/lib/generic/math/native_tan.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_native_tan.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/native_tan.h>
#define __FLOAT_ONLY
#define FUNCTION native_tan
diff --git a/libclc/opencl/lib/generic/math/nextafter.cl b/libclc/opencl/lib/generic/math/nextafter.cl
index 6fd52802941b1..9c30e5668a56b 100644
--- a/libclc/opencl/lib/generic/math/nextafter.cl
+++ b/libclc/opencl/lib/generic/math/nextafter.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_nextafter.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/nextafter.h>
#define FUNCTION nextafter
#define __IMPL_FUNCTION(x) __clc_nextafter
diff --git a/libclc/opencl/lib/generic/math/pow.cl b/libclc/opencl/lib/generic/math/pow.cl
index b3a77f5a2a71e..2fddb7e889649 100644
--- a/libclc/opencl/lib/generic/math/pow.cl
+++ b/libclc/opencl/lib/generic/math/pow.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_pow.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/pow.h>
#define FUNCTION pow
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/pown.cl b/libclc/opencl/lib/generic/math/pown.cl
index 115bae3406f0e..0a5ee893a45a1 100644
--- a/libclc/opencl/lib/generic/math/pown.cl
+++ b/libclc/opencl/lib/generic/math/pown.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_pown.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/pown.h>
#define FUNCTION pown
#define __CLC_BODY <clc/shared/binary_def_with_int_second_arg.inc>
diff --git a/libclc/opencl/lib/generic/math/powr.cl b/libclc/opencl/lib/generic/math/powr.cl
index 87707198aae15..13af03ff13274 100644
--- a/libclc/opencl/lib/generic/math/powr.cl
+++ b/libclc/opencl/lib/generic/math/powr.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_powr.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/powr.h>
#define FUNCTION powr
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/remainder.cl b/libclc/opencl/lib/generic/math/remainder.cl
index aeba5d59e89a9..224a66bc9b279 100644
--- a/libclc/opencl/lib/generic/math/remainder.cl
+++ b/libclc/opencl/lib/generic/math/remainder.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_remainder.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/remainder.h>
#define FUNCTION remainder
#define __CLC_BODY <clc/shared/binary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/remquo.cl b/libclc/opencl/lib/generic/math/remquo.cl
index 588c5f1cb1100..de102af58fe9f 100644
--- a/libclc/opencl/lib/generic/math/remquo.cl
+++ b/libclc/opencl/lib/generic/math/remquo.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_remquo.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/remquo.h>
#define __CLC_BODY <remquo.inc>
#include <clc/math/gentype.inc>
diff --git a/libclc/opencl/lib/generic/math/rint.cl b/libclc/opencl/lib/generic/math/rint.cl
index 84ce99c4d216c..489883c97c141 100644
--- a/libclc/opencl/lib/generic/math/rint.cl
+++ b/libclc/opencl/lib/generic/math/rint.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_rint.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/rint.h>
#define FUNCTION rint
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/rootn.cl b/libclc/opencl/lib/generic/math/rootn.cl
index 0e1acc95470df..e8dba17b9395d 100644
--- a/libclc/opencl/lib/generic/math/rootn.cl
+++ b/libclc/opencl/lib/generic/math/rootn.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_rootn.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/rootn.h>
#define FUNCTION rootn
#define __CLC_BODY <clc/shared/binary_def_with_int_second_arg.inc>
diff --git a/libclc/opencl/lib/generic/math/round.cl b/libclc/opencl/lib/generic/math/round.cl
index 0ce44e72b00aa..c45e681b1c222 100644
--- a/libclc/opencl/lib/generic/math/round.cl
+++ b/libclc/opencl/lib/generic/math/round.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_round.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/round.h>
#define FUNCTION round
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/rsqrt.cl b/libclc/opencl/lib/generic/math/rsqrt.cl
index 7d6dcfaa3de7d..47e4f450ed1a6 100644
--- a/libclc/opencl/lib/generic/math/rsqrt.cl
+++ b/libclc/opencl/lib/generic/math/rsqrt.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_rsqrt.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/rsqrt.h>
#define FUNCTION rsqrt
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/sin.cl b/libclc/opencl/lib/generic/math/sin.cl
index 293a2636c3070..ff7db2a5b3cb8 100644
--- a/libclc/opencl/lib/generic/math/sin.cl
+++ b/libclc/opencl/lib/generic/math/sin.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_sin.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/sin.h>
#define FUNCTION sin
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/sincos.cl b/libclc/opencl/lib/generic/math/sincos.cl
index d87da4d7df912..c8871fd2b0020 100644
--- a/libclc/opencl/lib/generic/math/sincos.cl
+++ b/libclc/opencl/lib/generic/math/sincos.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_sincos.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/sincos.h>
#define FUNCTION sincos
#define __CLC_BODY <clc/math/unary_def_with_ptr.inc>
diff --git a/libclc/opencl/lib/generic/math/sinh.cl b/libclc/opencl/lib/generic/math/sinh.cl
index aa559f9330889..bd6ea20e7e898 100644
--- a/libclc/opencl/lib/generic/math/sinh.cl
+++ b/libclc/opencl/lib/generic/math/sinh.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_sinh.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/sinh.h>
#define FUNCTION sinh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/sinpi.cl b/libclc/opencl/lib/generic/math/sinpi.cl
index 8b48426a0ef84..badecd0909856 100644
--- a/libclc/opencl/lib/generic/math/sinpi.cl
+++ b/libclc/opencl/lib/generic/math/sinpi.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_sinpi.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/sinpi.h>
#define FUNCTION sinpi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/sqrt.cl b/libclc/opencl/lib/generic/math/sqrt.cl
index fd031daf5bfbd..3b05b25864485 100644
--- a/libclc/opencl/lib/generic/math/sqrt.cl
+++ b/libclc/opencl/lib/generic/math/sqrt.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_sqrt.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/sqrt.h>
#define FUNCTION sqrt
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/tan.cl b/libclc/opencl/lib/generic/math/tan.cl
index 6df22b9c36959..95409fc5b092b 100644
--- a/libclc/opencl/lib/generic/math/tan.cl
+++ b/libclc/opencl/lib/generic/math/tan.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_tan.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/tan.h>
#define FUNCTION tan
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/tanh.cl b/libclc/opencl/lib/generic/math/tanh.cl
index ef7cb1ec5d861..a77878bb79667 100644
--- a/libclc/opencl/lib/generic/math/tanh.cl
+++ b/libclc/opencl/lib/generic/math/tanh.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_tanh.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/tanh.h>
#define FUNCTION tanh
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/tanpi.cl b/libclc/opencl/lib/generic/math/tanpi.cl
index 2195830faf32d..6b5805ec3cd04 100644
--- a/libclc/opencl/lib/generic/math/tanpi.cl
+++ b/libclc/opencl/lib/generic/math/tanpi.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_tanpi.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/tanpi.h>
#define FUNCTION tanpi
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/tgamma.cl b/libclc/opencl/lib/generic/math/tgamma.cl
index 634ed7a506118..8f35d22426a70 100644
--- a/libclc/opencl/lib/generic/math/tgamma.cl
+++ b/libclc/opencl/lib/generic/math/tgamma.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_tgamma.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/tgamma.h>
#define FUNCTION tgamma
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/math/trunc.cl b/libclc/opencl/lib/generic/math/trunc.cl
index 58f414dcc784c..ea56329bc8dea 100644
--- a/libclc/opencl/lib/generic/math/trunc.cl
+++ b/libclc/opencl/lib/generic/math/trunc.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/math/clc_trunc.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/trunc.h>
#define FUNCTION trunc
#define __CLC_BODY <clc/shared/unary_def.inc>
diff --git a/libclc/opencl/lib/generic/relational/all.cl b/libclc/opencl/lib/generic/relational/all.cl
index 43a3236bafe65..5ac4a465365a4 100644
--- a/libclc/opencl/lib/generic/relational/all.cl
+++ b/libclc/opencl/lib/generic/relational/all.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/all.h>
#include <clc/relational/clc_all.h>
#define ALL_ID(TYPE) _CLC_OVERLOAD _CLC_DEF int all(TYPE v)
diff --git a/libclc/opencl/lib/generic/relational/any.cl b/libclc/opencl/lib/generic/relational/any.cl
index ae78c623f53f1..507f2b170693e 100644
--- a/libclc/opencl/lib/generic/relational/any.cl
+++ b/libclc/opencl/lib/generic/relational/any.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/any.h>
#include <clc/relational/clc_any.h>
#define ANY_ID(TYPE) _CLC_OVERLOAD _CLC_DEF int any(TYPE v)
diff --git a/libclc/opencl/lib/generic/relational/bitselect.cl b/libclc/opencl/lib/generic/relational/bitselect.cl
index fc0a15768c5f5..0be7e5321caf0 100644
--- a/libclc/opencl/lib/generic/relational/bitselect.cl
+++ b/libclc/opencl/lib/generic/relational/bitselect.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/bitselect.h>
#include <clc/relational/clc_bitselect.h>
#define __CLC_BODY <bitselect.inc>
diff --git a/libclc/opencl/lib/generic/relational/isequal.cl b/libclc/opencl/lib/generic/relational/isequal.cl
index 71109d0e0bf3e..94f83f9452666 100644
--- a/libclc/opencl/lib/generic/relational/isequal.cl
+++ b/libclc/opencl/lib/generic/relational/isequal.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/isequal.h>
#include <clc/relational/clc_isequal.h>
#define FUNCTION isequal
diff --git a/libclc/opencl/lib/generic/relational/isfinite.cl b/libclc/opencl/lib/generic/relational/isfinite.cl
index 7ee3ff2262f54..695ffea806d5c 100644
--- a/libclc/opencl/lib/generic/relational/isfinite.cl
+++ b/libclc/opencl/lib/generic/relational/isfinite.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/isfinite.h>
#include <clc/relational/clc_isfinite.h>
#define FUNCTION isfinite
diff --git a/libclc/opencl/lib/generic/relational/isgreater.cl b/libclc/opencl/lib/generic/relational/isgreater.cl
index 13ecfa70fa4f6..fb46ff20ac608 100644
--- a/libclc/opencl/lib/generic/relational/isgreater.cl
+++ b/libclc/opencl/lib/generic/relational/isgreater.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/isgreater.h>
#include <clc/relational/clc_isgreater.h>
#define FUNCTION isgreater
diff --git a/libclc/opencl/lib/generic/relational/isgreaterequal.cl b/libclc/opencl/lib/generic/relational/isgreaterequal.cl
index 458c4a6f6b747..b8edde2a05b77 100644
--- a/libclc/opencl/lib/generic/relational/isgreaterequal.cl
+++ b/libclc/opencl/lib/generic/relational/isgreaterequal.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/isgreaterequal.h>
#include <clc/relational/clc_isgreaterequal.h>
#define FUNCTION isgreaterequal
diff --git a/libclc/opencl/lib/generic/relational/isinf.cl b/libclc/opencl/lib/generic/relational/isinf.cl
index 65e987940ff50..2c15f1f826762 100644
--- a/libclc/opencl/lib/generic/relational/isinf.cl
+++ b/libclc/opencl/lib/generic/relational/isinf.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/isinf.h>
#include <clc/relational/clc_isinf.h>
#define FUNCTION isinf
diff --git a/libclc/opencl/lib/generic/relational/isless.cl b/libclc/opencl/lib/generic/relational/isless.cl
index e1b931aede695..0af1f53e71042 100644
--- a/libclc/opencl/lib/generic/relational/isless.cl
+++ b/libclc/opencl/lib/generic/relational/isless.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/isless.h>
#include <clc/relational/clc_isless.h>
#define FUNCTION isless
diff --git a/libclc/opencl/lib/generic/relational/islessequal.cl b/libclc/opencl/lib/generic/relational/islessequal.cl
index 91d0891e21223..9e32afc718ab2 100644
--- a/libclc/opencl/lib/generic/relational/islessequal.cl
+++ b/libclc/opencl/lib/generic/relational/islessequal.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/islessequal.h>
#include <clc/relational/clc_islessequal.h>
#define FUNCTION islessequal
diff --git a/libclc/opencl/lib/generic/relational/islessgreater.cl b/libclc/opencl/lib/generic/relational/islessgreater.cl
index dc519cc602752..c36a857dc3dfc 100644
--- a/libclc/opencl/lib/generic/relational/islessgreater.cl
+++ b/libclc/opencl/lib/generic/relational/islessgreater.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/islessgreater.h>
#include <clc/relational/clc_islessgreater.h>
#define FUNCTION islessgreater
diff --git a/libclc/opencl/lib/generic/relational/isnan.cl b/libclc/opencl/lib/generic/relational/isnan.cl
index 6761851caffe4..8b03930c5312f 100644
--- a/libclc/opencl/lib/generic/relational/isnan.cl
+++ b/libclc/opencl/lib/generic/relational/isnan.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/isnan.h>
#include <clc/relational/clc_isnan.h>
#define FUNCTION isnan
diff --git a/libclc/opencl/lib/generic/relational/isnormal.cl b/libclc/opencl/lib/generic/relational/isnormal.cl
index 42f3e1f4f4349..4ba21cc3e17fc 100644
--- a/libclc/opencl/lib/generic/relational/isnormal.cl
+++ b/libclc/opencl/lib/generic/relational/isnormal.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/isnormal.h>
#include <clc/relational/clc_isnormal.h>
#define FUNCTION isnormal
diff --git a/libclc/opencl/lib/generic/relational/isnotequal.cl b/libclc/opencl/lib/generic/relational/isnotequal.cl
index f28317b8fe0f5..928923b9b2a5e 100644
--- a/libclc/opencl/lib/generic/relational/isnotequal.cl
+++ b/libclc/opencl/lib/generic/relational/isnotequal.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/isnotequal.h>
#include <clc/relational/clc_isnotequal.h>
#define FUNCTION isnotequal
diff --git a/libclc/opencl/lib/generic/relational/isordered.cl b/libclc/opencl/lib/generic/relational/isordered.cl
index 83117765d5261..60ca4d67ff1ea 100644
--- a/libclc/opencl/lib/generic/relational/isordered.cl
+++ b/libclc/opencl/lib/generic/relational/isordered.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/isordered.h>
#include <clc/relational/clc_isordered.h>
#define FUNCTION isordered
diff --git a/libclc/opencl/lib/generic/relational/isunordered.cl b/libclc/opencl/lib/generic/relational/isunordered.cl
index 26deb195a7406..3392d77856ced 100644
--- a/libclc/opencl/lib/generic/relational/isunordered.cl
+++ b/libclc/opencl/lib/generic/relational/isunordered.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/isunordered.h>
#include <clc/relational/clc_isunordered.h>
#define FUNCTION isunordered
diff --git a/libclc/opencl/lib/generic/relational/select.cl b/libclc/opencl/lib/generic/relational/select.cl
index c29109b1d3c2c..47a7b8e5ad114 100644
--- a/libclc/opencl/lib/generic/relational/select.cl
+++ b/libclc/opencl/lib/generic/relational/select.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/select.h>
#include <clc/relational/clc_select.h>
#include <clc/utils.h>
diff --git a/libclc/opencl/lib/generic/relational/signbit.cl b/libclc/opencl/lib/generic/relational/signbit.cl
index 2b58922bf8705..26feb8d43fa25 100644
--- a/libclc/opencl/lib/generic/relational/signbit.cl
+++ b/libclc/opencl/lib/generic/relational/signbit.cl
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/opencl/clc.h>
+#include <clc/opencl/relational/signbit.h>
#include <clc/relational/clc_signbit.h>
#define FUNCTION signbit
diff --git a/libclc/opencl/lib/spirv/math/fma.cl b/libclc/opencl/lib/spirv/math/fma.cl
index c027b4fcd8f12..83504f63772ca 100644
--- a/libclc/opencl/lib/spirv/math/fma.cl
+++ b/libclc/opencl/lib/spirv/math/fma.cl
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <clc/internal/math/clc_sw_fma.h>
-#include <clc/opencl/clc.h>
+#include <clc/opencl/math/fma.h>
#define __FLOAT_ONLY
#define FUNCTION fma
More information about the cfe-commits
mailing list