From 32cf55aef3f83723616e27d149ea0186d73481b0 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 20 May 2025 09:51:30 +0100 Subject: [PATCH] [libclc] Reorganize OpenCL builtins (#140557) This commits moves all OpenCL builtins under a top-level 'opencl' directory, akin to how the CLC builtins are organized. This new structure aims to better convey the separation of the two layers and that 'CLC' is not a subset of OpenCL or a libclc target. In doing so this commit moves the location of the 'lib' directory to match CLC: libclc/generic/lib/ becomes libclc/opencl/lib/generic/. This allows us to remove some special casing in CMake and ensure a common directory structure. It also tries to better communicate that the OpenCL headers are libclc-specific OpenCL headers and should not be confused with or used as standard OpenCL headers. It does so by ensuring includes are of the form . It might be that we don't specifically need the libclc OpenCL headers and we simply could use clang's built-in declarations, but we can revisit that later. Aside from the code move, there is some code formatting and updating a couple of OpenCL builtin includes to use the readily available gentype helpers. This allows us to remove some '.inc' files. --- libclc/CMakeLists.txt | 53 ++-- libclc/clspv/lib/SOURCES | 73 ----- libclc/cmake/modules/AddLibclc.cmake | 11 +- .../generic/include/clc/atomic/atomic_dec.h | 12 - .../generic/include/clc/atomic/atomic_inc.h | 12 - libclc/generic/include/clc/clc.h | 267 ------------------ libclc/generic/include/clc/common/degrees.inc | 9 - libclc/generic/include/clc/common/radians.inc | 9 - libclc/generic/include/clc/image/image.h | 48 ---- .../generic/include/clc/image/image_defines.h | 57 ---- .../generic/include/clc/integer/add_sat.inc | 9 - .../generic/include/clc/integer/mad_sat.inc | 9 - libclc/generic/include/clc/integer/rotate.inc | 9 - .../generic/include/clc/integer/sub_sat.inc | 9 - libclc/generic/include/clc/integer/unary.inc | 9 - libclc/generic/include/clc/math/frexp.inc | 11 - .../include/clc/opencl}/as_type.h | 0 .../clc/opencl}/async/async_work_group_copy.h | 8 +- .../opencl}/async/async_work_group_copy.inc | 9 +- .../async/async_work_group_strided_copy.h | 8 +- .../async/async_work_group_strided_copy.inc | 8 +- .../include/clc/opencl}/async/prefetch.h | 4 +- .../include/clc/opencl}/async/prefetch.inc | 3 +- .../clc/opencl}/async/wait_group_events.h | 0 .../include/clc/opencl}/atomic/atom_add.h | 6 +- .../include/clc/opencl}/atomic/atom_and.h | 6 +- .../include/clc/opencl}/atomic/atom_cmpxchg.h | 0 .../include/clc/opencl}/atomic/atom_dec.h | 0 .../clc/opencl}/atomic/atom_decl_int32.inc | 0 .../clc/opencl}/atomic/atom_decl_int64.inc | 0 .../include/clc/opencl}/atomic/atom_inc.h | 0 .../include/clc/opencl}/atomic/atom_max.h | 6 +- .../include/clc/opencl}/atomic/atom_min.h | 6 +- .../include/clc/opencl}/atomic/atom_or.h | 6 +- .../include/clc/opencl}/atomic/atom_sub.h | 6 +- .../include/clc/opencl}/atomic/atom_xchg.h | 6 +- .../include/clc/opencl}/atomic/atom_xor.h | 6 +- .../include/clc/opencl}/atomic/atomic_add.h | 2 +- .../include/clc/opencl}/atomic/atomic_and.h | 2 +- .../clc/opencl}/atomic/atomic_cmpxchg.h | 8 +- .../include/clc/opencl/atomic/atomic_dec.h | 12 + .../clc/opencl}/atomic/atomic_decl.inc | 10 +- .../include/clc/opencl/atomic/atomic_inc.h | 12 + .../include/clc/opencl}/atomic/atomic_max.h | 2 +- .../include/clc/opencl}/atomic/atomic_min.h | 2 +- .../include/clc/opencl}/atomic/atomic_or.h | 2 +- .../include/clc/opencl}/atomic/atomic_sub.h | 2 +- .../include/clc/opencl}/atomic/atomic_xchg.h | 6 +- .../include/clc/opencl}/atomic/atomic_xor.h | 2 +- libclc/opencl/include/clc/opencl/clc.h | 267 ++++++++++++++++++ .../include/clc/opencl}/common/degrees.h | 6 +- .../include/clc/opencl}/common/mix.h | 2 +- .../include/clc/opencl}/common/mix.inc | 6 +- .../include/clc/opencl}/common/radians.h | 6 +- .../include/clc/opencl}/common/sign.h | 0 .../include/clc/opencl}/common/smoothstep.h | 2 +- .../include/clc/opencl}/common/smoothstep.inc | 10 +- .../include/clc/opencl}/common/step.h | 2 +- .../include/clc/opencl}/common/step.inc | 0 .../include/clc/opencl}/convert.h | 0 .../explicit_fence/explicit_memory_fence.h | 0 .../include/clc/opencl}/geometric/cross.h | 0 .../include/clc/opencl}/geometric/distance.h | 0 .../include/clc/opencl}/geometric/dot.h | 0 .../clc/opencl}/geometric/fast_distance.h | 0 .../clc/opencl}/geometric/fast_length.h | 0 .../clc/opencl}/geometric/fast_normalize.h | 0 .../include/clc/opencl}/geometric/length.h | 0 .../include/clc/opencl}/geometric/normalize.h | 0 .../opencl/include/clc/opencl/image/image.h | 48 ++++ .../include/clc/opencl/image/image_defines.h | 57 ++++ .../include/clc/opencl}/integer/abs.h | 2 +- .../include/clc/opencl}/integer/abs.inc | 0 .../include/clc/opencl}/integer/abs_diff.h | 2 +- .../include/clc/opencl}/integer/abs_diff.inc | 3 +- .../include/clc/opencl}/integer/add_sat.h | 6 +- .../include/clc/opencl}/integer/clz.h | 0 .../include/clc/opencl}/integer/ctz.h | 0 .../include/clc/opencl}/integer/hadd.h | 0 .../include/clc/opencl}/integer/mad24.h | 0 .../include/clc/opencl}/integer/mad_hi.h | 0 .../include/clc/opencl}/integer/mad_sat.h | 6 +- .../include/clc/opencl}/integer/mul24.h | 0 .../include/clc/opencl}/integer/mul_hi.h | 0 .../include/clc/opencl}/integer/popcount.h | 0 .../include/clc/opencl}/integer/rhadd.h | 0 .../include/clc/opencl}/integer/rotate.h | 6 +- .../include/clc/opencl}/integer/sub_sat.h | 6 +- .../include/clc/opencl}/integer/upsample.h | 0 .../include/clc/opencl}/math/acos.h | 0 .../include/clc/opencl}/math/acosh.h | 0 .../include/clc/opencl}/math/acospi.h | 0 .../include/clc/opencl}/math/asin.h | 0 .../include/clc/opencl}/math/asinh.h | 0 .../include/clc/opencl}/math/asinpi.h | 0 .../include/clc/opencl}/math/atan.h | 0 .../include/clc/opencl}/math/atan2.h | 0 .../include/clc/opencl}/math/atan2pi.h | 0 .../include/clc/opencl}/math/atanh.h | 0 .../include/clc/opencl}/math/atanpi.h | 0 .../include/clc/opencl}/math/cbrt.h | 0 .../include/clc/opencl}/math/ceil.h | 0 .../include/clc/opencl}/math/copysign.h | 0 .../include/clc/opencl}/math/cos.h | 0 .../include/clc/opencl}/math/cosh.h | 0 .../include/clc/opencl}/math/cospi.h | 0 .../include/clc/opencl}/math/erf.h | 0 .../include/clc/opencl}/math/erfc.h | 0 .../include/clc/opencl}/math/exp.h | 0 .../include/clc/opencl}/math/exp10.h | 0 .../include/clc/opencl}/math/exp2.h | 0 .../include/clc/opencl}/math/expm1.h | 0 .../include/clc/opencl}/math/fabs.h | 0 .../include/clc/opencl}/math/fdim.h | 0 .../include/clc/opencl}/math/floor.h | 0 .../include/clc/opencl}/math/fma.h | 0 .../include/clc/opencl}/math/fmax.h | 1 - .../include/clc/opencl}/math/fmin.h | 1 - .../include/clc/opencl}/math/fmod.h | 0 .../include/clc/opencl}/math/fract.h | 0 .../include/clc/opencl}/math/frexp.h | 2 +- .../opencl/include/clc/opencl/math/frexp.inc | 14 + .../include/clc/opencl}/math/half_cos.h | 0 .../include/clc/opencl}/math/half_divide.h | 0 .../include/clc/opencl}/math/half_exp.h | 0 .../include/clc/opencl}/math/half_exp10.h | 0 .../include/clc/opencl}/math/half_exp2.h | 0 .../include/clc/opencl}/math/half_log.h | 0 .../include/clc/opencl}/math/half_log10.h | 0 .../include/clc/opencl}/math/half_log2.h | 0 .../include/clc/opencl}/math/half_powr.h | 0 .../include/clc/opencl}/math/half_recip.h | 0 .../include/clc/opencl}/math/half_rsqrt.h | 0 .../include/clc/opencl}/math/half_sin.h | 0 .../include/clc/opencl}/math/half_sqrt.h | 0 .../include/clc/opencl}/math/half_tan.h | 0 .../include/clc/opencl}/math/hypot.h | 0 .../include/clc/opencl}/math/ilogb.h | 0 .../include/clc/opencl}/math/ldexp.h | 2 +- .../include/clc/opencl}/math/ldexp.inc | 0 .../include/clc/opencl}/math/lgamma.h | 0 .../include/clc/opencl}/math/lgamma_r.h | 0 .../include/clc/opencl}/math/log.h | 0 .../include/clc/opencl}/math/log10.h | 0 .../include/clc/opencl}/math/log1p.h | 0 .../include/clc/opencl}/math/log2.h | 0 .../include/clc/opencl}/math/logb.h | 0 .../include/clc/opencl}/math/mad.h | 0 .../include/clc/opencl}/math/maxmag.h | 0 .../include/clc/opencl}/math/minmag.h | 0 .../include/clc/opencl}/math/modf.h | 0 .../include/clc/opencl}/math/nan.h | 2 +- .../include/clc/opencl}/math/nan.inc | 0 .../include/clc/opencl}/math/native_cos.h | 0 .../include/clc/opencl}/math/native_divide.h | 0 .../include/clc/opencl}/math/native_exp.h | 0 .../include/clc/opencl}/math/native_exp10.h | 0 .../include/clc/opencl}/math/native_exp2.h | 0 .../include/clc/opencl}/math/native_log.h | 0 .../include/clc/opencl}/math/native_log10.h | 0 .../include/clc/opencl}/math/native_log2.h | 0 .../include/clc/opencl}/math/native_powr.h | 0 .../include/clc/opencl}/math/native_recip.h | 0 .../include/clc/opencl}/math/native_rsqrt.h | 0 .../include/clc/opencl}/math/native_sin.h | 0 .../include/clc/opencl}/math/native_sqrt.h | 0 .../include/clc/opencl}/math/native_tan.h | 0 .../include/clc/opencl}/math/nextafter.h | 0 .../include/clc/opencl}/math/pow.h | 0 .../include/clc/opencl}/math/pown.h | 0 .../include/clc/opencl}/math/powr.h | 0 .../include/clc/opencl}/math/remainder.h | 0 .../include/clc/opencl}/math/remquo.h | 0 .../include/clc/opencl}/math/rint.h | 0 .../include/clc/opencl}/math/rootn.h | 0 .../include/clc/opencl}/math/round.h | 0 .../include/clc/opencl}/math/rsqrt.h | 0 .../include/clc/opencl}/math/sin.h | 0 .../include/clc/opencl}/math/sincos.h | 0 .../include/clc/opencl}/math/sinh.h | 0 .../include/clc/opencl}/math/sinpi.h | 0 .../include/clc/opencl}/math/sqrt.h | 0 .../include/clc/opencl}/math/tan.h | 0 .../include/clc/opencl}/math/tanh.h | 0 .../include/clc/opencl}/math/tanpi.h | 0 .../include/clc/opencl}/math/tgamma.h | 0 .../include/clc/opencl}/math/trunc.h | 0 .../include/clc/opencl}/misc/shuffle.h | 0 .../include/clc/opencl}/misc/shuffle2.h | 28 +- .../include/clc/opencl}/relational/all.h | 15 +- .../include/clc/opencl}/relational/any.h | 15 +- .../clc/opencl}/relational/bitselect.h | 4 +- .../clc/opencl}/relational/bitselect.inc | 4 +- .../include/clc/opencl}/relational/isequal.h | 12 +- .../include/clc/opencl}/relational/isfinite.h | 0 .../clc/opencl}/relational/isgreater.h | 0 .../clc/opencl}/relational/isgreaterequal.h | 0 .../include/clc/opencl}/relational/isinf.h | 12 +- .../include/clc/opencl}/relational/isless.h | 0 .../clc/opencl}/relational/islessequal.h | 0 .../clc/opencl}/relational/islessgreater.h | 0 .../include/clc/opencl}/relational/isnan.h | 12 +- .../include/clc/opencl}/relational/isnormal.h | 0 .../clc/opencl}/relational/isnotequal.h | 0 .../clc/opencl}/relational/isordered.h | 0 .../clc/opencl}/relational/isunordered.h | 0 .../include/clc/opencl}/relational/select.h | 0 .../include/clc/opencl}/relational/signbit.h | 0 .../include/clc/opencl}/shared/clamp.h | 4 +- .../include/clc/opencl}/shared/clamp.inc | 7 +- .../include/clc/opencl}/shared/max.h | 4 +- .../include/clc/opencl}/shared/max.inc | 3 +- .../include/clc/opencl}/shared/min.h | 4 +- .../include/clc/opencl}/shared/min.inc | 3 +- .../include/clc/opencl}/shared/vload.h | 0 .../include/clc/opencl}/shared/vstore.h | 0 .../clc/opencl}/synchronization/barrier.h | 0 .../synchronization/cl_mem_fence_flags.h | 0 .../clc/opencl}/workitem/get_global_id.h | 0 .../clc/opencl}/workitem/get_global_offset.h | 0 .../clc/opencl}/workitem/get_global_size.h | 0 .../clc/opencl}/workitem/get_group_id.h | 0 .../clc/opencl}/workitem/get_local_id.h | 0 .../clc/opencl}/workitem/get_local_size.h | 0 .../clc/opencl}/workitem/get_num_groups.h | 0 .../clc/opencl}/workitem/get_work_dim.h | 0 .../lib => opencl/lib/amdgcn-amdhsa}/SOURCES | 0 .../workitem/get_global_size.cl | 5 +- .../amdgcn-amdhsa}/workitem/get_local_size.cl | 5 +- .../amdgcn-amdhsa}/workitem/get_num_groups.cl | 3 +- .../{amdgcn/lib => opencl/lib/amdgcn}/SOURCES | 0 .../minmax_helpers.ll | 0 .../lib/amdgcn}/mem_fence/fence.cl | 8 +- .../lib/amdgcn}/synchronization/barrier.cl | 2 +- .../lib/amdgcn}/workitem/get_global_offset.cl | 2 +- .../lib/amdgcn}/workitem/get_global_size.cl | 2 +- .../lib/amdgcn}/workitem/get_group_id.cl | 2 +- .../lib/amdgcn}/workitem/get_local_id.cl | 2 +- .../lib/amdgcn}/workitem/get_local_size.cl | 2 +- .../lib/amdgcn}/workitem/get_num_groups.cl | 2 +- .../lib/amdgcn}/workitem/get_work_dim.cl | 2 +- libclc/opencl/lib/clspv/SOURCES | 73 +++++ .../lib => opencl/lib/clspv}/math/fma.cl | 2 +- .../lib/clspv}/shared/vstore_half.cl | 2 +- .../lib/clspv}/shared/vstore_half.inc | 0 .../lib/clspv}/subnormal_config.cl | 2 +- .../lib => opencl/lib/generic}/SOURCES | 0 .../generic}/async/async_work_group_copy.cl | 2 +- .../generic}/async/async_work_group_copy.inc | 16 +- .../async/async_work_group_strided_copy.cl | 2 +- .../async/async_work_group_strided_copy.inc | 32 +-- .../lib/generic}/async/prefetch.cl | 2 +- .../lib/generic}/async/prefetch.inc | 3 +- .../lib/generic}/async/wait_group_events.cl | 2 +- .../lib/generic}/atomic/atom_add.cl | 2 +- .../lib/generic}/atomic/atom_and.cl | 2 +- .../lib/generic}/atomic/atom_cmpxchg.cl | 4 +- .../lib/generic}/atomic/atom_dec.cl | 6 +- .../lib/generic}/atomic/atom_inc.cl | 6 +- .../lib/generic}/atomic/atom_int32_binary.inc | 2 +- .../lib/generic}/atomic/atom_max.cl | 2 +- .../lib/generic}/atomic/atom_min.cl | 2 +- .../lib/generic}/atomic/atom_or.cl | 2 +- .../lib/generic}/atomic/atom_sub.cl | 2 +- .../lib/generic}/atomic/atom_xchg.cl | 2 +- .../lib/generic}/atomic/atom_xor.cl | 2 +- .../lib/generic}/atomic/atomic_add.cl | 10 +- .../lib/generic}/atomic/atomic_and.cl | 10 +- .../lib/generic}/atomic/atomic_cmpxchg.cl | 11 +- .../lib/generic}/atomic/atomic_dec.cl | 10 +- .../lib/generic}/atomic/atomic_inc.cl | 10 +- .../lib/generic}/atomic/atomic_max.cl | 10 +- .../lib/generic}/atomic/atomic_min.cl | 10 +- .../lib/generic}/atomic/atomic_or.cl | 10 +- .../lib/generic}/atomic/atomic_sub.cl | 10 +- .../lib/generic}/atomic/atomic_xchg.cl | 10 +- .../lib/generic}/atomic/atomic_xor.cl | 10 +- .../lib/generic}/common/degrees.cl | 2 +- .../lib => opencl/lib/generic}/common/mix.cl | 2 +- .../lib => opencl/lib/generic}/common/mix.inc | 0 .../lib/generic}/common/radians.cl | 2 +- .../lib => opencl/lib/generic}/common/sign.cl | 2 +- .../lib/generic}/common/smoothstep.cl | 2 +- .../lib => opencl/lib/generic}/common/step.cl | 10 +- .../lib/generic}/geometric/cross.cl | 2 +- .../lib/generic}/geometric/distance.cl | 2 +- .../lib/generic}/geometric/dot.cl | 2 +- .../lib/generic}/geometric/fast_distance.cl | 2 +- .../lib/generic}/geometric/fast_length.cl | 2 +- .../lib/generic}/geometric/fast_normalize.cl | 6 +- .../lib/generic}/geometric/fast_normalize.inc | 0 .../lib/generic}/geometric/length.cl | 2 +- .../lib/generic}/geometric/normalize.cl | 10 +- .../lib => opencl/lib/generic}/integer/abs.cl | 2 +- .../lib/generic}/integer/abs.inc | 0 .../lib/generic}/integer/abs_diff.cl | 2 +- .../lib/generic}/integer/abs_diff.inc | 3 +- .../lib/generic}/integer/add_sat.cl | 2 +- .../lib => opencl/lib/generic}/integer/clz.cl | 2 +- .../lib => opencl/lib/generic}/integer/ctz.cl | 2 +- .../lib/generic}/integer/hadd.cl | 2 +- .../lib/generic}/integer/mad24.cl | 2 +- .../lib/generic}/integer/mad_hi.cl | 2 +- .../lib/generic}/integer/mad_sat.cl | 2 +- .../lib/generic}/integer/mul24.cl | 2 +- .../lib/generic}/integer/mul_hi.cl | 2 +- .../lib/generic}/integer/popcount.cl | 2 +- .../lib/generic}/integer/rhadd.cl | 2 +- .../lib/generic}/integer/rotate.cl | 2 +- .../lib/generic}/integer/sub_sat.cl | 2 +- .../lib/generic}/integer/upsample.cl | 2 +- .../lib => opencl/lib/generic}/math/acos.cl | 2 +- .../lib => opencl/lib/generic}/math/acosh.cl | 2 +- .../lib => opencl/lib/generic}/math/acospi.cl | 2 +- .../lib => opencl/lib/generic}/math/asin.cl | 2 +- .../lib => opencl/lib/generic}/math/asinh.cl | 2 +- .../lib => opencl/lib/generic}/math/asinpi.cl | 2 +- .../lib => opencl/lib/generic}/math/atan.cl | 2 +- .../lib => opencl/lib/generic}/math/atan2.cl | 2 +- .../lib/generic}/math/atan2pi.cl | 2 +- .../lib => opencl/lib/generic}/math/atanh.cl | 2 +- .../lib => opencl/lib/generic}/math/atanpi.cl | 2 +- .../lib => opencl/lib/generic}/math/cbrt.cl | 2 +- .../lib => opencl/lib/generic}/math/ceil.cl | 2 +- .../lib/generic}/math/copysign.cl | 2 +- .../lib => opencl/lib/generic}/math/cos.cl | 2 +- .../lib => opencl/lib/generic}/math/cosh.cl | 2 +- .../lib => opencl/lib/generic}/math/cospi.cl | 2 +- .../lib => opencl/lib/generic}/math/erf.cl | 2 +- .../lib => opencl/lib/generic}/math/erfc.cl | 2 +- .../lib => opencl/lib/generic}/math/exp.cl | 2 +- .../lib => opencl/lib/generic}/math/exp10.cl | 2 +- .../lib => opencl/lib/generic}/math/exp2.cl | 2 +- .../lib => opencl/lib/generic}/math/expm1.cl | 2 +- .../lib => opencl/lib/generic}/math/fabs.cl | 2 +- .../lib => opencl/lib/generic}/math/fdim.cl | 2 +- .../lib => opencl/lib/generic}/math/floor.cl | 2 +- .../lib => opencl/lib/generic}/math/fma.cl | 2 +- .../lib => opencl/lib/generic}/math/fmax.cl | 2 +- .../lib => opencl/lib/generic}/math/fmax.inc | 0 .../lib => opencl/lib/generic}/math/fmin.cl | 2 +- .../lib => opencl/lib/generic}/math/fmin.inc | 0 .../lib => opencl/lib/generic}/math/fmod.cl | 2 +- .../lib => opencl/lib/generic}/math/fract.cl | 2 +- .../lib => opencl/lib/generic}/math/frexp.cl | 2 +- .../lib/generic}/math/half_cos.cl | 2 +- .../lib/generic}/math/half_divide.cl | 2 +- .../lib/generic}/math/half_exp.cl | 2 +- .../lib/generic}/math/half_exp10.cl | 2 +- .../lib/generic}/math/half_exp2.cl | 2 +- .../lib/generic}/math/half_log.cl | 2 +- .../lib/generic}/math/half_log10.cl | 2 +- .../lib/generic}/math/half_log2.cl | 2 +- .../lib/generic}/math/half_powr.cl | 2 +- .../lib/generic}/math/half_recip.cl | 2 +- .../lib/generic}/math/half_rsqrt.cl | 2 +- .../lib/generic}/math/half_sin.cl | 2 +- .../lib/generic}/math/half_sqrt.cl | 2 +- .../lib/generic}/math/half_tan.cl | 2 +- .../lib => opencl/lib/generic}/math/hypot.cl | 2 +- .../lib => opencl/lib/generic}/math/ilogb.cl | 2 +- .../lib => opencl/lib/generic}/math/ldexp.cl | 2 +- .../lib => opencl/lib/generic}/math/ldexp.inc | 0 .../lib => opencl/lib/generic}/math/lgamma.cl | 2 +- .../lib/generic}/math/lgamma_r.cl | 2 +- .../lib => opencl/lib/generic}/math/log.cl | 2 +- .../lib => opencl/lib/generic}/math/log10.cl | 2 +- .../lib => opencl/lib/generic}/math/log1p.cl | 2 +- .../lib => opencl/lib/generic}/math/log2.cl | 2 +- .../lib => opencl/lib/generic}/math/logb.cl | 2 +- .../lib => opencl/lib/generic}/math/mad.cl | 2 +- .../lib => opencl/lib/generic}/math/maxmag.cl | 2 +- .../lib => opencl/lib/generic}/math/minmag.cl | 2 +- .../lib => opencl/lib/generic}/math/modf.cl | 2 +- .../lib => opencl/lib/generic}/math/nan.cl | 0 .../lib => opencl/lib/generic}/math/nan.inc | 0 .../lib/generic}/math/native_cos.cl | 2 +- .../lib/generic}/math/native_divide.cl | 2 +- .../lib/generic}/math/native_exp.cl | 2 +- .../lib/generic}/math/native_exp10.cl | 2 +- .../lib/generic}/math/native_exp2.cl | 2 +- .../lib/generic}/math/native_log.cl | 2 +- .../lib/generic}/math/native_log10.cl | 2 +- .../lib/generic}/math/native_log2.cl | 2 +- .../lib/generic}/math/native_powr.cl | 2 +- .../lib/generic}/math/native_recip.cl | 2 +- .../lib/generic}/math/native_rsqrt.cl | 2 +- .../lib/generic}/math/native_sin.cl | 2 +- .../lib/generic}/math/native_sqrt.cl | 2 +- .../lib/generic}/math/native_tan.cl | 2 +- .../lib/generic}/math/nextafter.cl | 2 +- .../lib => opencl/lib/generic}/math/pow.cl | 2 +- .../lib => opencl/lib/generic}/math/pown.cl | 2 +- .../lib => opencl/lib/generic}/math/powr.cl | 2 +- .../lib/generic}/math/remainder.cl | 2 +- .../lib => opencl/lib/generic}/math/remquo.cl | 2 +- .../lib/generic}/math/remquo.inc | 0 .../lib => opencl/lib/generic}/math/rint.cl | 2 +- .../lib => opencl/lib/generic}/math/rootn.cl | 2 +- .../lib => opencl/lib/generic}/math/round.cl | 2 +- .../lib => opencl/lib/generic}/math/rsqrt.cl | 2 +- .../lib => opencl/lib/generic}/math/sin.cl | 2 +- .../lib => opencl/lib/generic}/math/sincos.cl | 2 +- .../lib => opencl/lib/generic}/math/sinh.cl | 2 +- .../lib => opencl/lib/generic}/math/sinpi.cl | 2 +- .../lib => opencl/lib/generic}/math/sqrt.cl | 2 +- .../lib => opencl/lib/generic}/math/tan.cl | 2 +- .../lib => opencl/lib/generic}/math/tanh.cl | 2 +- .../lib => opencl/lib/generic}/math/tanpi.cl | 2 +- .../lib => opencl/lib/generic}/math/tgamma.cl | 2 +- .../lib => opencl/lib/generic}/math/trunc.cl | 2 +- .../lib/generic}/misc/shuffle.cl | 2 +- .../lib/generic}/misc/shuffle2.cl | 2 +- .../lib/generic}/relational/all.cl | 2 +- .../lib/generic}/relational/any.cl | 2 +- .../lib/generic}/relational/binary_def.inc | 0 .../lib/generic}/relational/bitselect.cl | 2 +- .../lib/generic}/relational/bitselect.inc | 0 .../lib/generic}/relational/isequal.cl | 2 +- .../lib/generic}/relational/isfinite.cl | 2 +- .../lib/generic}/relational/isgreater.cl | 2 +- .../lib/generic}/relational/isgreaterequal.cl | 2 +- .../lib/generic}/relational/isinf.cl | 2 +- .../lib/generic}/relational/isless.cl | 2 +- .../lib/generic}/relational/islessequal.cl | 2 +- .../lib/generic}/relational/islessgreater.cl | 2 +- .../lib/generic}/relational/isnan.cl | 2 +- .../lib/generic}/relational/isnormal.cl | 2 +- .../lib/generic}/relational/isnotequal.cl | 2 +- .../lib/generic}/relational/isordered.cl | 2 +- .../lib/generic}/relational/isunordered.cl | 2 +- .../lib/generic}/relational/select.cl | 2 +- .../lib/generic}/relational/signbit.cl | 2 +- .../lib/generic}/relational/unary_def.inc | 0 .../lib/generic}/shared/clamp.cl | 2 +- .../lib/generic}/shared/clamp.inc | 7 +- .../lib => opencl/lib/generic}/shared/max.cl | 2 +- .../lib => opencl/lib/generic}/shared/max.inc | 0 .../lib => opencl/lib/generic}/shared/min.cl | 2 +- .../lib => opencl/lib/generic}/shared/min.inc | 0 .../lib/generic}/shared/vload.cl | 2 +- .../lib/generic}/shared/vload_half.inc | 0 .../lib/generic}/shared/vstore.cl | 2 +- .../lib/generic}/shared/vstore_half.inc | 0 .../lib/generic}/subnormal_config.cl | 10 +- .../lib/generic}/subnormal_disable.ll | 0 .../lib/generic}/subnormal_helper_func.ll | 0 .../lib/generic}/subnormal_use_default.ll | 0 .../lib/generic}/workitem/get_global_id.cl | 5 +- .../lib/generic}/workitem/get_global_size.cl | 4 +- .../lib => opencl/lib/ptx-nvidiacl}/SOURCES | 0 .../lib/ptx-nvidiacl}/mem_fence/fence.cl | 2 +- .../ptx-nvidiacl}/synchronization/barrier.cl | 2 +- .../ptx-nvidiacl}/workitem/get_global_id.cl | 2 +- .../ptx-nvidiacl}/workitem/get_group_id.cl | 14 +- .../ptx-nvidiacl}/workitem/get_local_id.cl | 14 +- .../ptx-nvidiacl}/workitem/get_local_size.cl | 14 +- .../ptx-nvidiacl}/workitem/get_num_groups.cl | 14 +- libclc/{r600/lib => opencl/lib/r600}/SOURCES | 0 .../{r600/lib => opencl/lib/r600}/SOURCES_3.9 | 0 .../r600}/image/get_image_attributes_impl.ll | 0 .../image/get_image_channel_data_type.cl | 8 +- .../r600}/image/get_image_channel_order.cl | 8 +- .../lib/r600}/image/get_image_depth.cl | 7 +- .../lib/r600}/image/get_image_dim.cl | 6 +- .../lib/r600}/image/get_image_height.cl | 8 +- .../lib/r600}/image/get_image_width.cl | 8 +- .../lib/r600}/image/read_image_impl.ll | 2 +- .../lib/r600}/image/read_imagef.cl | 2 +- .../lib/r600}/image/read_imagei.cl | 8 +- .../lib/r600}/image/read_imageui.cl | 8 +- .../lib/r600}/image/write_image_impl.ll | 2 +- .../lib/r600}/image/write_imagef.cl | 7 +- .../lib/r600}/image/write_imagei.cl | 7 +- .../lib/r600}/image/write_imageui.cl | 7 +- .../lib/r600}/synchronization/barrier.cl | 2 +- .../lib/r600}/workitem/get_global_offset.cl | 2 +- .../lib/r600}/workitem/get_global_size.cl | 2 +- .../lib/r600}/workitem/get_group_id.cl | 2 +- .../lib/r600}/workitem/get_local_id.cl | 2 +- .../lib/r600}/workitem/get_local_size.cl | 2 +- .../lib/r600}/workitem/get_num_groups.cl | 2 +- .../lib/r600}/workitem/get_work_dim.cl | 2 +- libclc/opencl/lib/spirv/SOURCES | 73 +++++ .../lib => opencl/lib/spirv}/math/fma.cl | 2 +- .../lib/spirv}/subnormal_config.cl | 2 +- libclc/spirv/lib/SOURCES | 73 ----- libclc/{generic/lib => utils}/gen_convert.py | 4 +- 488 files changed, 1142 insertions(+), 1188 deletions(-) delete mode 100644 libclc/clspv/lib/SOURCES delete mode 100644 libclc/generic/include/clc/atomic/atomic_dec.h delete mode 100644 libclc/generic/include/clc/atomic/atomic_inc.h delete mode 100644 libclc/generic/include/clc/clc.h delete mode 100644 libclc/generic/include/clc/common/degrees.inc delete mode 100644 libclc/generic/include/clc/common/radians.inc delete mode 100644 libclc/generic/include/clc/image/image.h delete mode 100644 libclc/generic/include/clc/image/image_defines.h delete mode 100644 libclc/generic/include/clc/integer/add_sat.inc delete mode 100644 libclc/generic/include/clc/integer/mad_sat.inc delete mode 100644 libclc/generic/include/clc/integer/rotate.inc delete mode 100644 libclc/generic/include/clc/integer/sub_sat.inc delete mode 100644 libclc/generic/include/clc/integer/unary.inc delete mode 100644 libclc/generic/include/clc/math/frexp.inc rename libclc/{generic/include/clc => opencl/include/clc/opencl}/as_type.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/async/async_work_group_copy.h (74%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/async/async_work_group_copy.inc (62%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/async/async_work_group_strided_copy.h (72%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/async/async_work_group_strided_copy.inc (74%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/async/prefetch.h (81%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/async/prefetch.inc (86%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/async/wait_group_events.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_add.h (83%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_and.h (84%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_cmpxchg.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_dec.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_decl_int32.inc (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_decl_int64.inc (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_inc.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_max.h (84%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_min.h (84%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_or.h (84%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_sub.h (83%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_xchg.h (84%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atom_xor.h (84%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atomic_add.h (89%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atomic_and.h (89%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atomic_cmpxchg.h (58%) create mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_dec.h rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atomic_decl.inc (61%) create mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_inc.h rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atomic_max.h (89%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atomic_min.h (89%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atomic_or.h (89%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atomic_sub.h (89%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atomic_xchg.h (69%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/atomic/atomic_xor.h (89%) create mode 100644 libclc/opencl/include/clc/opencl/clc.h rename libclc/{generic/include/clc => opencl/include/clc/opencl}/common/degrees.h (80%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/common/mix.h (89%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/common/mix.inc (77%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/common/radians.h (80%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/common/sign.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/common/smoothstep.h (88%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/common/smoothstep.inc (66%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/common/step.h (89%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/common/step.inc (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/convert.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/explicit_fence/explicit_memory_fence.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/geometric/cross.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/geometric/distance.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/geometric/dot.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/geometric/fast_distance.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/geometric/fast_length.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/geometric/fast_normalize.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/geometric/length.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/geometric/normalize.h (100%) create mode 100644 libclc/opencl/include/clc/opencl/image/image.h create mode 100644 libclc/opencl/include/clc/opencl/image/image_defines.h rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/abs.h (89%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/abs.inc (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/abs_diff.h (88%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/abs_diff.inc (86%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/add_sat.h (79%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/clz.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/ctz.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/hadd.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/mad24.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/mad_hi.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/mad_sat.h (79%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/mul24.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/mul_hi.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/popcount.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/rhadd.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/rotate.h (79%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/sub_sat.h (79%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/integer/upsample.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/acos.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/acosh.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/acospi.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/asin.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/asinh.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/asinpi.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/atan.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/atan2.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/atan2pi.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/atanh.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/atanpi.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/cbrt.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/ceil.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/copysign.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/cos.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/cosh.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/cospi.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/erf.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/erfc.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/exp.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/exp10.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/exp2.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/expm1.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/fabs.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/fdim.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/floor.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/fma.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/fmax.h (99%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/fmin.h (99%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/fmod.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/fract.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/frexp.h (89%) create mode 100644 libclc/opencl/include/clc/opencl/math/frexp.inc rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_cos.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_divide.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_exp.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_exp10.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_exp2.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_log.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_log10.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_log2.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_powr.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_recip.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_rsqrt.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_sin.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_sqrt.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/half_tan.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/hypot.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/ilogb.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/ldexp.h (89%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/ldexp.inc (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/lgamma.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/lgamma_r.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/log.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/log10.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/log1p.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/log2.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/logb.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/mad.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/maxmag.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/minmag.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/modf.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/nan.h (89%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/nan.inc (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_cos.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_divide.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_exp.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_exp10.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_exp2.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_log.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_log10.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_log2.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_powr.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_recip.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_rsqrt.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_sin.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_sqrt.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/native_tan.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/nextafter.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/pow.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/pown.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/powr.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/remainder.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/remquo.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/rint.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/rootn.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/round.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/rsqrt.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/sin.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/sincos.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/sinh.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/sinpi.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/sqrt.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/tan.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/tanh.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/tanpi.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/tgamma.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/math/trunc.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/misc/shuffle.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/misc/shuffle2.h (52%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/all.h (50%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/any.h (50%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/bitselect.h (79%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/bitselect.inc (76%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/isequal.h (61%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/isfinite.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/isgreater.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/isgreaterequal.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/isinf.h (61%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/isless.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/islessequal.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/islessgreater.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/isnan.h (61%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/isnormal.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/isnotequal.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/isordered.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/isunordered.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/select.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/relational/signbit.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/shared/clamp.h (81%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/shared/clamp.inc (62%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/shared/max.h (82%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/shared/max.inc (79%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/shared/min.h (82%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/shared/min.inc (79%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/shared/vload.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/shared/vstore.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/synchronization/barrier.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/synchronization/cl_mem_fence_flags.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/workitem/get_global_id.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/workitem/get_global_offset.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/workitem/get_global_size.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/workitem/get_group_id.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/workitem/get_local_id.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/workitem/get_local_size.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/workitem/get_num_groups.h (100%) rename libclc/{generic/include/clc => opencl/include/clc/opencl}/workitem/get_work_dim.h (100%) rename libclc/{amdgcn-amdhsa/lib => opencl/lib/amdgcn-amdhsa}/SOURCES (100%) rename libclc/{amdgcn-amdhsa/lib => opencl/lib/amdgcn-amdhsa}/workitem/get_global_size.cl (88%) rename libclc/{amdgcn-amdhsa/lib => opencl/lib/amdgcn-amdhsa}/workitem/get_local_size.cl (89%) rename libclc/{amdgcn-amdhsa/lib => opencl/lib/amdgcn-amdhsa}/workitem/get_num_groups.cl (95%) rename libclc/{amdgcn/lib => opencl/lib/amdgcn}/SOURCES (100%) rename libclc/{amdgcn/lib => opencl/lib/amdgcn}/cl_khr_int64_extended_atomics/minmax_helpers.ll (100%) rename libclc/{amdgcn/lib => opencl/lib/amdgcn}/mem_fence/fence.cl (86%) rename libclc/{amdgcn/lib => opencl/lib/amdgcn}/synchronization/barrier.cl (94%) rename libclc/{amdgcn/lib => opencl/lib/amdgcn}/workitem/get_global_offset.cl (96%) rename libclc/{amdgcn/lib => opencl/lib/amdgcn}/workitem/get_global_size.cl (95%) rename libclc/{amdgcn/lib => opencl/lib/amdgcn}/workitem/get_group_id.cl (95%) rename libclc/{amdgcn/lib => opencl/lib/amdgcn}/workitem/get_local_id.cl (95%) rename libclc/{amdgcn/lib => opencl/lib/amdgcn}/workitem/get_local_size.cl (96%) rename libclc/{amdgcn/lib => opencl/lib/amdgcn}/workitem/get_num_groups.cl (96%) rename libclc/{amdgcn/lib => opencl/lib/amdgcn}/workitem/get_work_dim.cl (96%) create mode 100644 libclc/opencl/lib/clspv/SOURCES rename libclc/{spirv/lib => opencl/lib/clspv}/math/fma.cl (94%) rename libclc/{clspv/lib => opencl/lib/clspv}/shared/vstore_half.cl (99%) rename libclc/{clspv/lib => opencl/lib/clspv}/shared/vstore_half.inc (100%) rename libclc/{spirv/lib => opencl/lib/clspv}/subnormal_config.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/SOURCES (100%) rename libclc/{generic/lib => opencl/lib/generic}/async/async_work_group_copy.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/async/async_work_group_copy.inc (60%) rename libclc/{generic/lib => opencl/lib/generic}/async/async_work_group_strided_copy.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/async/async_work_group_strided_copy.inc (67%) rename libclc/{generic/lib => opencl/lib/generic}/async/prefetch.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/async/prefetch.inc (86%) rename libclc/{generic/lib => opencl/lib/generic}/async/wait_group_events.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_add.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_and.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_cmpxchg.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_dec.cl (91%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_inc.cl (91%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_int32_binary.inc (96%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_max.cl (97%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_min.cl (97%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_or.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_sub.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_xchg.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atom_xor.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atomic_add.cl (63%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atomic_and.cl (63%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atomic_cmpxchg.cl (57%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atomic_dec.cl (63%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atomic_inc.cl (63%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atomic_max.cl (64%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atomic_min.cl (64%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atomic_or.cl (63%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atomic_sub.cl (63%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atomic_xchg.cl (73%) rename libclc/{generic/lib => opencl/lib/generic}/atomic/atomic_xor.cl (63%) rename libclc/{generic/lib => opencl/lib/generic}/common/degrees.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/common/mix.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/common/mix.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/common/radians.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/common/sign.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/common/smoothstep.cl (99%) rename libclc/{generic/lib => opencl/lib/generic}/common/step.cl (84%) rename libclc/{generic/lib => opencl/lib/generic}/geometric/cross.cl (97%) rename libclc/{generic/lib => opencl/lib/generic}/geometric/distance.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/geometric/dot.cl (98%) rename libclc/{generic/lib => opencl/lib/generic}/geometric/fast_distance.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/geometric/fast_length.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/geometric/fast_normalize.cl (82%) rename libclc/{generic/lib => opencl/lib/generic}/geometric/fast_normalize.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/geometric/length.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/geometric/normalize.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/abs.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/abs.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/integer/abs_diff.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/abs_diff.inc (87%) rename libclc/{generic/lib => opencl/lib/generic}/integer/add_sat.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/clz.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/ctz.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/integer/hadd.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/mad24.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/mad_hi.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/mad_sat.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/mul24.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/mul_hi.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/popcount.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/rhadd.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/rotate.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/sub_sat.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/integer/upsample.cl (98%) rename libclc/{generic/lib => opencl/lib/generic}/math/acos.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/acosh.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/acospi.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/asin.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/asinh.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/asinpi.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/atan.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/atan2.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/atan2pi.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/atanh.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/atanpi.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/cbrt.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/ceil.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/copysign.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/cos.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/cosh.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/cospi.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/erf.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/erfc.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/exp.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/exp10.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/exp2.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/expm1.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/fabs.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/fdim.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/floor.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/fma.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/math/fmax.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/fmax.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/math/fmin.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/fmin.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/math/fmod.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/fract.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/frexp.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_cos.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_divide.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_exp.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_exp10.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_exp2.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_log.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_log10.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_log2.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_powr.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_recip.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_rsqrt.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_sin.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_sqrt.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/half_tan.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/hypot.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/ilogb.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/ldexp.cl (97%) rename libclc/{generic/lib => opencl/lib/generic}/math/ldexp.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/math/lgamma.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/lgamma_r.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/log.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/log10.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/log1p.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/log2.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/logb.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/mad.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/math/maxmag.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/minmag.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/modf.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/nan.cl (100%) rename libclc/{generic/lib => opencl/lib/generic}/math/nan.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_cos.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_divide.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_exp.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_exp10.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_exp2.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_log.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_log10.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_log2.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_powr.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_recip.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_rsqrt.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_sin.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_sqrt.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/native_tan.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/math/nextafter.cl (97%) rename libclc/{generic/lib => opencl/lib/generic}/math/pow.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/pown.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/powr.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/remainder.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/remquo.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/math/remquo.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/math/rint.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/rootn.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/round.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/rsqrt.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/sin.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/sincos.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/sinh.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/sinpi.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/sqrt.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/tan.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/tanh.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/tanpi.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/tgamma.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/math/trunc.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/misc/shuffle.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/misc/shuffle2.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/relational/all.cl (97%) rename libclc/{generic/lib => opencl/lib/generic}/relational/any.cl (97%) rename libclc/{generic/lib => opencl/lib/generic}/relational/binary_def.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/relational/bitselect.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/relational/bitselect.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/relational/isequal.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/isfinite.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/isgreater.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/isgreaterequal.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/isinf.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/isless.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/islessequal.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/islessgreater.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/isnan.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/isnormal.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/isnotequal.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/isordered.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/isunordered.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/select.cl (96%) rename libclc/{generic/lib => opencl/lib/generic}/relational/signbit.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/relational/unary_def.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/shared/clamp.cl (95%) rename libclc/{generic/lib => opencl/lib/generic}/shared/clamp.inc (66%) rename libclc/{generic/lib => opencl/lib/generic}/shared/max.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/shared/max.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/shared/min.cl (94%) rename libclc/{generic/lib => opencl/lib/generic}/shared/min.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/shared/vload.cl (99%) rename libclc/{generic/lib => opencl/lib/generic}/shared/vload_half.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/shared/vstore.cl (99%) rename libclc/{generic/lib => opencl/lib/generic}/shared/vstore_half.inc (100%) rename libclc/{generic/lib => opencl/lib/generic}/subnormal_config.cl (76%) rename libclc/{generic/lib => opencl/lib/generic}/subnormal_disable.ll (100%) rename libclc/{generic/lib => opencl/lib/generic}/subnormal_helper_func.ll (100%) rename libclc/{generic/lib => opencl/lib/generic}/subnormal_use_default.ll (100%) rename libclc/{generic/lib => opencl/lib/generic}/workitem/get_global_id.cl (87%) rename libclc/{generic/lib => opencl/lib/generic}/workitem/get_global_size.cl (84%) rename libclc/{ptx-nvidiacl/lib => opencl/lib/ptx-nvidiacl}/SOURCES (100%) rename libclc/{ptx-nvidiacl/lib => opencl/lib/ptx-nvidiacl}/mem_fence/fence.cl (96%) rename libclc/{ptx-nvidiacl/lib => opencl/lib/ptx-nvidiacl}/synchronization/barrier.cl (94%) rename libclc/{ptx-nvidiacl/lib => opencl/lib/ptx-nvidiacl}/workitem/get_global_id.cl (94%) rename libclc/{ptx-nvidiacl/lib => opencl/lib/ptx-nvidiacl}/workitem/get_group_id.cl (67%) rename libclc/{ptx-nvidiacl/lib => opencl/lib/ptx-nvidiacl}/workitem/get_local_id.cl (68%) rename libclc/{ptx-nvidiacl/lib => opencl/lib/ptx-nvidiacl}/workitem/get_local_size.cl (68%) rename libclc/{ptx-nvidiacl/lib => opencl/lib/ptx-nvidiacl}/workitem/get_num_groups.cl (67%) rename libclc/{r600/lib => opencl/lib/r600}/SOURCES (100%) rename libclc/{r600/lib => opencl/lib/r600}/SOURCES_3.9 (100%) rename libclc/{r600/lib => opencl/lib/r600}/image/get_image_attributes_impl.ll (100%) rename libclc/{r600/lib => opencl/lib/r600}/image/get_image_channel_data_type.cl (77%) rename libclc/{r600/lib => opencl/lib/r600}/image/get_image_channel_order.cl (77%) rename libclc/{r600/lib => opencl/lib/r600}/image/get_image_depth.cl (76%) rename libclc/{r600/lib => opencl/lib/r600}/image/get_image_dim.cl (78%) rename libclc/{r600/lib => opencl/lib/r600}/image/get_image_height.cl (78%) rename libclc/{r600/lib => opencl/lib/r600}/image/get_image_width.cl (78%) rename libclc/{r600/lib => opencl/lib/r600}/image/read_image_impl.ll (97%) rename libclc/{r600/lib => opencl/lib/r600}/image/read_imagef.cl (96%) rename libclc/{r600/lib => opencl/lib/r600}/image/read_imagei.cl (85%) rename libclc/{r600/lib => opencl/lib/r600}/image/read_imageui.cl (85%) rename libclc/{r600/lib => opencl/lib/r600}/image/write_image_impl.ll (97%) rename libclc/{r600/lib => opencl/lib/r600}/image/write_imagef.cl (76%) rename libclc/{r600/lib => opencl/lib/r600}/image/write_imagei.cl (76%) rename libclc/{r600/lib => opencl/lib/r600}/image/write_imageui.cl (76%) rename libclc/{r600/lib => opencl/lib/r600}/synchronization/barrier.cl (95%) rename libclc/{r600/lib => opencl/lib/r600}/workitem/get_global_offset.cl (95%) rename libclc/{r600/lib => opencl/lib/r600}/workitem/get_global_size.cl (96%) rename libclc/{r600/lib => opencl/lib/r600}/workitem/get_group_id.cl (95%) rename libclc/{r600/lib => opencl/lib/r600}/workitem/get_local_id.cl (95%) rename libclc/{r600/lib => opencl/lib/r600}/workitem/get_local_size.cl (96%) rename libclc/{r600/lib => opencl/lib/r600}/workitem/get_num_groups.cl (96%) rename libclc/{r600/lib => opencl/lib/r600}/workitem/get_work_dim.cl (95%) create mode 100644 libclc/opencl/lib/spirv/SOURCES rename libclc/{clspv/lib => opencl/lib/spirv}/math/fma.cl (94%) rename libclc/{clspv/lib => opencl/lib/spirv}/subnormal_config.cl (95%) delete mode 100644 libclc/spirv/lib/SOURCES rename libclc/{generic/lib => utils}/gen_convert.py (99%) diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt index b0e7aac6f8f3..70b11df3b314 100644 --- a/libclc/CMakeLists.txt +++ b/libclc/CMakeLists.txt @@ -18,13 +18,14 @@ include( AddLibclc ) include( GNUInstallDirs ) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS - amdgcn-amdhsa/lib/SOURCES; - amdgcn/lib/SOURCES; - clspv/lib/SOURCES; - generic/lib/SOURCES; - ptx-nvidiacl/lib/SOURCES; - r600/lib/SOURCES; - spirv/lib/SOURCES; + # OpenCL libraries + opencl/lib/amdgcn-amdhsa/SOURCES; + opencl/lib/amdgcn/SOURCES; + opencl/lib/clspv/SOURCES; + opencl/lib/generic/SOURCES; + opencl/lib/ptx-nvidiacl/SOURCES; + opencl/lib/r600/SOURCES; + opencl/lib/spirv/SOURCES; # CLC internal libraries clc/lib/generic/SOURCES; clc/lib/amdgcn/SOURCES; @@ -227,7 +228,7 @@ if( ENABLE_RUNTIME_SUBNORMAL ) foreach( file IN ITEMS subnormal_use_default subnormal_disable ) link_bc( TARGET ${file} - INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/${file}.ll + INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/${file}.ll ) install( FILES $ @@ -237,7 +238,7 @@ if( ENABLE_RUNTIME_SUBNORMAL ) endif() find_package( Python3 REQUIRED COMPONENTS Interpreter ) -file( TO_CMAKE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/gen_convert.py script_loc ) +file( TO_CMAKE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/utils/gen_convert.py script_loc ) add_custom_command( OUTPUT convert.cl COMMAND ${Python3_EXECUTABLE} ${script_loc} > convert.cl @@ -283,20 +284,20 @@ set_source_files_properties( ${CMAKE_CURRENT_SOURCE_DIR}/clc/lib/amdgpu/math/clc_native_log10.cl ${CMAKE_CURRENT_SOURCE_DIR}/clc/lib/r600/math/clc_native_rsqrt.cl # OpenCL builtins - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_cos.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_divide.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_exp.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_exp10.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_exp2.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_log.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_log10.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_log2.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_powr.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_recip.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_rsqrt.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_sin.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_sqrt.cl - ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/math/native_tan.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_cos.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_divide.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_exp.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_exp10.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_exp2.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_log.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_log10.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_log2.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_powr.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_recip.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_rsqrt.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_sin.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_sqrt.cl + ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_tan.cl PROPERTIES COMPILE_OPTIONS -fapprox-func ) @@ -351,7 +352,6 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) libclc_configure_lib_source( clc_lib_files - CLC_INTERNAL LIB_ROOT_DIR clc DIRS ${clc_dirs} ) @@ -365,13 +365,14 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) else() list( APPEND opencl_gen_files convert.cl ) if ( NOT ENABLE_RUNTIME_SUBNORMAL ) - list( APPEND opencl_lib_files generic/lib/subnormal_use_default.ll ) + list( APPEND opencl_lib_files opencl/lib/generic/subnormal_use_default.ll ) endif() endif() endif() libclc_configure_lib_source( opencl_lib_files + LIB_ROOT_DIR opencl DIRS ${opencl_dirs} ) @@ -439,7 +440,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) ) list( APPEND build_flags - -I${CMAKE_CURRENT_SOURCE_DIR}/generic/include + -I${CMAKE_CURRENT_SOURCE_DIR}/opencl/include ) add_libclc_builtin_set( diff --git a/libclc/clspv/lib/SOURCES b/libclc/clspv/lib/SOURCES deleted file mode 100644 index d7cd36d09349..000000000000 --- a/libclc/clspv/lib/SOURCES +++ /dev/null @@ -1,73 +0,0 @@ -math/fma.cl -shared/vstore_half.cl -subnormal_config.cl -../../generic/lib/geometric/distance.cl -../../generic/lib/geometric/length.cl -../../generic/lib/math/acos.cl -../../generic/lib/math/acosh.cl -../../generic/lib/math/asinh.cl -../../generic/lib/math/acospi.cl -../../generic/lib/math/asin.cl -../../generic/lib/math/atan.cl -../../generic/lib/math/asinh.cl -../../generic/lib/math/asinpi.cl -../../generic/lib/math/atan2.cl -../../generic/lib/math/atan2pi.cl -../../generic/lib/math/atanh.cl -../../generic/lib/math/atanpi.cl -../../generic/lib/math/cbrt.cl -../../generic/lib/math/cos.cl -../../generic/lib/math/cosh.cl -../../generic/lib/math/cospi.cl -../../generic/lib/math/erf.cl -../../generic/lib/math/erfc.cl -../../generic/lib/math/exp.cl -../../generic/lib/math/exp10.cl -../../generic/lib/math/exp2.cl -../../generic/lib/math/expm1.cl -../../generic/lib/math/fdim.cl -../../generic/lib/math/fmod.cl -../../generic/lib/math/fract.cl -../../generic/lib/math/frexp.cl -../../generic/lib/math/half_cos.cl -../../generic/lib/math/half_divide.cl -../../generic/lib/math/half_exp.cl -../../generic/lib/math/half_exp10.cl -../../generic/lib/math/half_exp2.cl -../../generic/lib/math/half_log.cl -../../generic/lib/math/half_log10.cl -../../generic/lib/math/half_log2.cl -../../generic/lib/math/half_powr.cl -../../generic/lib/math/half_recip.cl -../../generic/lib/math/half_sin.cl -../../generic/lib/math/half_sqrt.cl -../../generic/lib/math/half_tan.cl -../../generic/lib/math/hypot.cl -../../generic/lib/math/ilogb.cl -../../generic/lib/math/ldexp.cl -../../generic/lib/math/lgamma.cl -../../generic/lib/math/lgamma_r.cl -../../generic/lib/math/log.cl -../../generic/lib/math/log10.cl -../../generic/lib/math/log1p.cl -../../generic/lib/math/log2.cl -../../generic/lib/math/logb.cl -../../generic/lib/math/maxmag.cl -../../generic/lib/math/minmag.cl -../../generic/lib/math/modf.cl -../../generic/lib/math/nan.cl -../../generic/lib/math/nextafter.cl -../../generic/lib/math/pow.cl -../../generic/lib/math/pown.cl -../../generic/lib/math/powr.cl -../../generic/lib/math/remainder.cl -../../generic/lib/math/remquo.cl -../../generic/lib/math/rootn.cl -../../generic/lib/math/sin.cl -../../generic/lib/math/sincos.cl -../../generic/lib/math/sinh.cl -../../generic/lib/math/sinpi.cl -../../generic/lib/math/tan.cl -../../generic/lib/math/tanh.cl -../../generic/lib/math/tanpi.cl -../../generic/lib/math/tgamma.cl diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake index d00b16a89966..597bb642655e 100644 --- a/libclc/cmake/modules/AddLibclc.cmake +++ b/libclc/cmake/modules/AddLibclc.cmake @@ -424,9 +424,6 @@ endfunction(add_libclc_builtin_set) # LIB_FILE_LIST may be pre-populated and is appended to. # # Arguments: -# * CLC_INTERNAL -# Pass if compiling the internal CLC builtin libraries, which have a -# different directory structure. # * LIB_ROOT_DIR # Root directory containing target's lib files, relative to libclc root # directory. If not provided, is set to '.'. @@ -436,7 +433,7 @@ endfunction(add_libclc_builtin_set) # subsequent ones. function(libclc_configure_lib_source LIB_FILE_LIST) cmake_parse_arguments(ARG - "CLC_INTERNAL" + "" "LIB_ROOT_DIR" "DIRS" ${ARGN} @@ -450,11 +447,7 @@ function(libclc_configure_lib_source LIB_FILE_LIST) set( source_list ) foreach( l IN LISTS ARG_DIRS ) foreach( s "SOURCES" "SOURCES_${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}" ) - if( ARG_CLC_INTERNAL ) - file( TO_CMAKE_PATH ${ARG_LIB_ROOT_DIR}/lib/${l}/${s} file_loc ) - else() - file( TO_CMAKE_PATH ${ARG_LIB_ROOT_DIR}/${l}/lib/${s} file_loc ) - endif() + file( TO_CMAKE_PATH ${ARG_LIB_ROOT_DIR}/lib/${l}/${s} file_loc ) file( TO_CMAKE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${file_loc} loc ) # Prepend the location to give higher priority to the specialized # implementation diff --git a/libclc/generic/include/clc/atomic/atomic_dec.h b/libclc/generic/include/clc/atomic/atomic_dec.h deleted file mode 100644 index aca1b95926a2..000000000000 --- a/libclc/generic/include/clc/atomic/atomic_dec.h +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL int atomic_dec (volatile local int *); -_CLC_OVERLOAD _CLC_DECL int atomic_dec (volatile global int *); -_CLC_OVERLOAD _CLC_DECL uint atomic_dec (volatile local uint *); -_CLC_OVERLOAD _CLC_DECL uint atomic_dec (volatile global uint *); diff --git a/libclc/generic/include/clc/atomic/atomic_inc.h b/libclc/generic/include/clc/atomic/atomic_inc.h deleted file mode 100644 index daf1d8feb2c5..000000000000 --- a/libclc/generic/include/clc/atomic/atomic_inc.h +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL int atomic_inc (volatile local int *); -_CLC_OVERLOAD _CLC_DECL int atomic_inc (volatile global int *); -_CLC_OVERLOAD _CLC_DECL uint atomic_inc (volatile local uint *); -_CLC_OVERLOAD _CLC_DECL uint atomic_inc (volatile global uint *); diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h deleted file mode 100644 index f4c0dc7c0bee..000000000000 --- a/libclc/generic/include/clc/clc.h +++ /dev/null @@ -1,267 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef __CLC_CLC_H__ -#define __CLC_CLC_H__ - -#ifndef cl_clang_storage_class_specifiers -#error Implementation requires cl_clang_storage_class_specifiers extension! -#endif - -#pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable - -#ifdef cl_khr_fp64 -#pragma OPENCL EXTENSION cl_khr_fp64 : enable -#endif - -#ifdef cl_khr_fp16 -#pragma OPENCL EXTENSION cl_khr_fp16 : enable -#endif - -/* Function Attributes */ -#include - -/* 6.1 Supported Data Types */ -#include - -/* 6.2.3 Explicit Conversions */ -#include - -/* 6.2.4.2 Reinterpreting Types Using as_type() and as_typen() */ -#include - -/* 6.11.1 Work-Item Functions */ -#include -#include -#include -#include -#include -#include -#include -#include - -/* 6.11.2 Math Functions */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* 6.11.2.1 Floating-point macros */ -#include - -/* 6.11.3 Integer Functions */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* 6.11.3 Integer Definitions */ -#include - -/* 6.11.2 and 6.11.3 Shared Integer/Math Functions */ -#include -#include -#include -#include -#include - -/* 6.11.4 Common Functions */ -#include -#include -#include -#include -#include -#include - -/* 6.11.5 Geometric Functions */ -#include -#include -#include -#include -#include -#include -#include -#include - -/* 6.11.6 Relational Functions */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* 6.11.8 Synchronization Functions */ -#include -#include - -/* 6.11.9 Explicit Memory Fence Functions */ -#include - -/* 6.11.10 Async Copy and Prefetch Functions */ -#include -#include -#include -#include - -/* 6.11.11 Atomic Functions */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* cl_khr_global_int32_base_atomics, cl_khr_local_int32_base_atomics and - * cl_khr_int64_base_atomics Extension Functions */ -#include -#include -#include -#include -#include -#include - -/* cl_khr_global_int32_extended_atomics, cl_khr_local_int32_extended_atomics and - * cl_khr_int64_extended_atomics Extension Functions */ -#include -#include -#include -#include -#include - -/* 6.12.12 Miscellaneous Vector Functions */ -#include -#include - -/* 6.11.13 Image Read and Write Functions */ -#include -#include - -#pragma OPENCL EXTENSION all : disable - -#endif // __CLC_CLC_H__ diff --git a/libclc/generic/include/clc/common/degrees.inc b/libclc/generic/include/clc/common/degrees.inc deleted file mode 100644 index d881decc9ca3..000000000000 --- a/libclc/generic/include/clc/common/degrees.inc +++ /dev/null @@ -1,9 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE degrees(__CLC_GENTYPE x); diff --git a/libclc/generic/include/clc/common/radians.inc b/libclc/generic/include/clc/common/radians.inc deleted file mode 100644 index 763225a87d5c..000000000000 --- a/libclc/generic/include/clc/common/radians.inc +++ /dev/null @@ -1,9 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE radians(__CLC_GENTYPE x); diff --git a/libclc/generic/include/clc/image/image.h b/libclc/generic/include/clc/image/image.h deleted file mode 100644 index 555ec3904c1f..000000000000 --- a/libclc/generic/include/clc/image/image.h +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#if defined(__opencl_c_images) - -_CLC_OVERLOAD _CLC_DECL int get_image_width (image2d_t image); -_CLC_OVERLOAD _CLC_DECL int get_image_width (image3d_t image); - -_CLC_OVERLOAD _CLC_DECL int get_image_height (image2d_t image); -_CLC_OVERLOAD _CLC_DECL int get_image_height (image3d_t image); - -_CLC_OVERLOAD _CLC_DECL int get_image_depth (image3d_t image); - -_CLC_OVERLOAD _CLC_DECL int get_image_channel_data_type (image2d_t image); -_CLC_OVERLOAD _CLC_DECL int get_image_channel_data_type (image3d_t image); - -_CLC_OVERLOAD _CLC_DECL int get_image_channel_order (image2d_t image); -_CLC_OVERLOAD _CLC_DECL int get_image_channel_order (image3d_t image); - -_CLC_OVERLOAD _CLC_DECL int2 get_image_dim (image2d_t image); -_CLC_OVERLOAD _CLC_DECL int4 get_image_dim (image3d_t image); - -_CLC_OVERLOAD _CLC_DECL void -write_imagef(image2d_t image, int2 coord, float4 color); -_CLC_OVERLOAD _CLC_DECL void -write_imagei(image2d_t image, int2 coord, int4 color); -_CLC_OVERLOAD _CLC_DECL void -write_imageui(image2d_t image, int2 coord, uint4 color); - -_CLC_OVERLOAD _CLC_DECL float4 -read_imagef(image2d_t image, sampler_t sampler, int2 coord); -_CLC_OVERLOAD _CLC_DECL float4 -read_imagef(image2d_t image, sampler_t sampler, float2 coord); -_CLC_OVERLOAD _CLC_DECL int4 -read_imagei(image2d_t image, sampler_t sampler, int2 coord); -_CLC_OVERLOAD _CLC_DECL int4 -read_imagei(image2d_t image, sampler_t sampler, float2 coord); -_CLC_OVERLOAD _CLC_DECL uint4 -read_imageui(image2d_t image, sampler_t sampler, int2 coord); -_CLC_OVERLOAD _CLC_DECL uint4 -read_imageui(image2d_t image, sampler_t sampler, float2 coord); - -#endif diff --git a/libclc/generic/include/clc/image/image_defines.h b/libclc/generic/include/clc/image/image_defines.h deleted file mode 100644 index 12fa43be82da..000000000000 --- a/libclc/generic/include/clc/image/image_defines.h +++ /dev/null @@ -1,57 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -/* get_image_channel_data_type flags */ -#define CLK_SNORM_INT8 0x10D0 -#define CLK_SNORM_INT16 0x10D1 -#define CLK_UNORM_INT8 0x10D2 -#define CLK_UNORM_INT16 0x10D3 -#define CLK_UNORM_SHORT_565 0x10D4 -#define CLK_UNORM_SHORT_555 0x10D5 -#define CLK_UNORM_SHORT_101010 0x10D6 -#define CLK_SIGNED_INT8 0x10D7 -#define CLK_SIGNED_INT16 0x10D8 -#define CLK_SIGNED_INT32 0x10D9 -#define CLK_UNSIGNED_INT8 0x10DA -#define CLK_UNSIGNED_INT16 0x10DB -#define CLK_UNSIGNED_INT32 0x10DC -#define CLK_HALF_FLOAT 0x10DD -#define CLK_FLOAT 0x10DE - -/* get_image_channel_order flags */ -#define CLK_R 0x10B0 -#define CLK_A 0x10B1 -#define CLK_RG 0x10B2 -#define CLK_RA 0x10B3 -#define CLK_RGB 0x10B4 -#define CLK_RGBA 0x10B5 -#define CLK_BGRA 0x10B6 -#define CLK_ARGB 0x10B7 -#define CLK_INTENSITY 0x10B8 -#define CLK_LUMINANCE 0x10B9 -#define CLK_Rx 0x10BA -#define CLK_RGx 0x10BB -#define CLK_RGBx 0x10BC - -/* sampler normalized coords */ -#define CLK_NORMALIZED_COORDS_FALSE 0x0000 -#define CLK_NORMALIZED_COORDS_TRUE 0x0001 -#define __CLC_NORMALIZED_COORDS_MASK 0x0001 - -/* sampler addressing mode */ -#define CLK_ADDRESS_NONE 0x0000 -#define CLK_ADDRESS_CLAMP_TO_EDGE 0x0002 -#define CLK_ADDRESS_CLAMP 0x0004 -#define CLK_ADDRESS_REPEAT 0x0006 -#define CLK_ADDRESS_MIRRORED_REPEAT 0x0008 -#define __CLC_ADDRESS_MASK 0x000E - -/* sampler filter mode */ -#define CLK_FILTER_NEAREST 0x0000 -#define CLK_FILTER_LINEAR 0x0010 -#define __CLC_FILTER_MASK 0x0010 diff --git a/libclc/generic/include/clc/integer/add_sat.inc b/libclc/generic/include/clc/integer/add_sat.inc deleted file mode 100644 index aa7de2c9ca33..000000000000 --- a/libclc/generic/include/clc/integer/add_sat.inc +++ /dev/null @@ -1,9 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE add_sat(__CLC_GENTYPE x, __CLC_GENTYPE y); diff --git a/libclc/generic/include/clc/integer/mad_sat.inc b/libclc/generic/include/clc/integer/mad_sat.inc deleted file mode 100644 index 4e6e0a4f19d1..000000000000 --- a/libclc/generic/include/clc/integer/mad_sat.inc +++ /dev/null @@ -1,9 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE mad_sat(__CLC_GENTYPE x, __CLC_GENTYPE y, __CLC_GENTYPE z); diff --git a/libclc/generic/include/clc/integer/rotate.inc b/libclc/generic/include/clc/integer/rotate.inc deleted file mode 100644 index af4782ceb3b3..000000000000 --- a/libclc/generic/include/clc/integer/rotate.inc +++ /dev/null @@ -1,9 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE rotate(__CLC_GENTYPE x, __CLC_GENTYPE y); diff --git a/libclc/generic/include/clc/integer/sub_sat.inc b/libclc/generic/include/clc/integer/sub_sat.inc deleted file mode 100644 index 222c191bb96d..000000000000 --- a/libclc/generic/include/clc/integer/sub_sat.inc +++ /dev/null @@ -1,9 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE sub_sat(__CLC_GENTYPE x, __CLC_GENTYPE y); diff --git a/libclc/generic/include/clc/integer/unary.inc b/libclc/generic/include/clc/integer/unary.inc deleted file mode 100644 index 5d742de00b71..000000000000 --- a/libclc/generic/include/clc/integer/unary.inc +++ /dev/null @@ -1,9 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x); diff --git a/libclc/generic/include/clc/math/frexp.inc b/libclc/generic/include/clc/math/frexp.inc deleted file mode 100644 index 63fe3cb90403..000000000000 --- a/libclc/generic/include/clc/math/frexp.inc +++ /dev/null @@ -1,11 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE frexp(__CLC_GENTYPE x, global __CLC_INTN *iptr); -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE frexp(__CLC_GENTYPE x, local __CLC_INTN *iptr); -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE frexp(__CLC_GENTYPE x, private __CLC_INTN *iptr); diff --git a/libclc/generic/include/clc/as_type.h b/libclc/opencl/include/clc/opencl/as_type.h similarity index 100% rename from libclc/generic/include/clc/as_type.h rename to libclc/opencl/include/clc/opencl/as_type.h diff --git a/libclc/generic/include/clc/async/async_work_group_copy.h b/libclc/opencl/include/clc/opencl/async/async_work_group_copy.h similarity index 74% rename from libclc/generic/include/clc/async/async_work_group_copy.h rename to libclc/opencl/include/clc/opencl/async/async_work_group_copy.h index 81da21cd94d5..14420b3c9eea 100644 --- a/libclc/generic/include/clc/async/async_work_group_copy.h +++ b/libclc/opencl/include/clc/opencl/async/async_work_group_copy.h @@ -8,18 +8,18 @@ #define __CLC_DST_ADDR_SPACE local #define __CLC_SRC_ADDR_SPACE global -#define __CLC_BODY +#define __CLC_BODY #include -#define __CLC_BODY +#define __CLC_BODY #include #undef __CLC_DST_ADDR_SPACE #undef __CLC_SRC_ADDR_SPACE #define __CLC_DST_ADDR_SPACE global #define __CLC_SRC_ADDR_SPACE local -#define __CLC_BODY +#define __CLC_BODY #include -#define __CLC_BODY +#define __CLC_BODY #include #undef __CLC_DST_ADDR_SPACE #undef __CLC_SRC_ADDR_SPACE diff --git a/libclc/generic/include/clc/async/async_work_group_copy.inc b/libclc/opencl/include/clc/opencl/async/async_work_group_copy.inc similarity index 62% rename from libclc/generic/include/clc/async/async_work_group_copy.inc rename to libclc/opencl/include/clc/opencl/async/async_work_group_copy.inc index 502c79f410df..cc4174970cb2 100644 --- a/libclc/generic/include/clc/async/async_work_group_copy.inc +++ b/libclc/opencl/include/clc/opencl/async/async_work_group_copy.inc @@ -6,8 +6,7 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DECL event_t async_work_group_copy( - __CLC_DST_ADDR_SPACE __CLC_GENTYPE *dst, - const __CLC_SRC_ADDR_SPACE __CLC_GENTYPE *src, - size_t num_gentypes, - event_t event); +_CLC_OVERLOAD _CLC_DECL event_t +async_work_group_copy(__CLC_DST_ADDR_SPACE __CLC_GENTYPE *dst, + const __CLC_SRC_ADDR_SPACE __CLC_GENTYPE *src, + size_t num_gentypes, event_t event); diff --git a/libclc/generic/include/clc/async/async_work_group_strided_copy.h b/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.h similarity index 72% rename from libclc/generic/include/clc/async/async_work_group_strided_copy.h rename to libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.h index a32e958f81ce..fd37e35f18c5 100644 --- a/libclc/generic/include/clc/async/async_work_group_strided_copy.h +++ b/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.h @@ -8,18 +8,18 @@ #define __CLC_DST_ADDR_SPACE local #define __CLC_SRC_ADDR_SPACE global -#define __CLC_BODY +#define __CLC_BODY #include -#define __CLC_BODY +#define __CLC_BODY #include #undef __CLC_DST_ADDR_SPACE #undef __CLC_SRC_ADDR_SPACE #define __CLC_DST_ADDR_SPACE global #define __CLC_SRC_ADDR_SPACE local -#define __CLC_BODY +#define __CLC_BODY #include -#define __CLC_BODY +#define __CLC_BODY #include #undef __CLC_DST_ADDR_SPACE #undef __CLC_SRC_ADDR_SPACE diff --git a/libclc/generic/include/clc/async/async_work_group_strided_copy.inc b/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.inc similarity index 74% rename from libclc/generic/include/clc/async/async_work_group_strided_copy.inc rename to libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.inc index d5a582d9ab90..9df894e4fa29 100644 --- a/libclc/generic/include/clc/async/async_work_group_strided_copy.inc +++ b/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.inc @@ -7,8 +7,6 @@ //===----------------------------------------------------------------------===// _CLC_OVERLOAD _CLC_DECL event_t async_work_group_strided_copy( - __CLC_DST_ADDR_SPACE __CLC_GENTYPE *dst, - const __CLC_SRC_ADDR_SPACE __CLC_GENTYPE *src, - size_t num_gentypes, - size_t stride, - event_t event); + __CLC_DST_ADDR_SPACE __CLC_GENTYPE *dst, + const __CLC_SRC_ADDR_SPACE __CLC_GENTYPE *src, size_t num_gentypes, + size_t stride, event_t event); diff --git a/libclc/generic/include/clc/async/prefetch.h b/libclc/opencl/include/clc/opencl/async/prefetch.h similarity index 81% rename from libclc/generic/include/clc/async/prefetch.h rename to libclc/opencl/include/clc/opencl/async/prefetch.h index 01fc9215fa5e..5075dcaee140 100644 --- a/libclc/generic/include/clc/async/prefetch.h +++ b/libclc/opencl/include/clc/opencl/async/prefetch.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/async/prefetch.inc b/libclc/opencl/include/clc/opencl/async/prefetch.inc similarity index 86% rename from libclc/generic/include/clc/async/prefetch.inc rename to libclc/opencl/include/clc/opencl/async/prefetch.inc index 6439e721a0b3..4a78778fa760 100644 --- a/libclc/generic/include/clc/async/prefetch.inc +++ b/libclc/opencl/include/clc/opencl/async/prefetch.inc @@ -6,4 +6,5 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DECL void prefetch(const global __CLC_GENTYPE *p, size_t num_gentypes); +_CLC_OVERLOAD _CLC_DECL void prefetch(const global __CLC_GENTYPE *p, + size_t num_gentypes); diff --git a/libclc/generic/include/clc/async/wait_group_events.h b/libclc/opencl/include/clc/opencl/async/wait_group_events.h similarity index 100% rename from libclc/generic/include/clc/async/wait_group_events.h rename to libclc/opencl/include/clc/opencl/async/wait_group_events.h diff --git a/libclc/generic/include/clc/atomic/atom_add.h b/libclc/opencl/include/clc/opencl/atomic/atom_add.h similarity index 83% rename from libclc/generic/include/clc/atomic/atom_add.h rename to libclc/opencl/include/clc/opencl/atomic/atom_add.h index b6eff1dea241..62c73d99371f 100644 --- a/libclc/generic/include/clc/atomic/atom_add.h +++ b/libclc/opencl/include/clc/opencl/atomic/atom_add.h @@ -9,16 +9,16 @@ #ifdef cl_khr_global_int32_base_atomics #define __CLC_FUNCTION atom_add #define __CLC_ADDRESS_SPACE global -#include +#include #endif // cl_khr_global_int32_base_atomics #ifdef cl_khr_local_int32_base_atomics #define __CLC_FUNCTION atom_add #define __CLC_ADDRESS_SPACE local -#include +#include #endif // cl_khr_local_int32_base_atomics #ifdef cl_khr_int64_base_atomics #define __CLC_FUNCTION atom_add -#include +#include #endif // cl_khr_int64_base_atomics diff --git a/libclc/generic/include/clc/atomic/atom_and.h b/libclc/opencl/include/clc/opencl/atomic/atom_and.h similarity index 84% rename from libclc/generic/include/clc/atomic/atom_and.h rename to libclc/opencl/include/clc/opencl/atomic/atom_and.h index 96c4ebb126da..9dd9466f62f8 100644 --- a/libclc/generic/include/clc/atomic/atom_and.h +++ b/libclc/opencl/include/clc/opencl/atomic/atom_and.h @@ -9,16 +9,16 @@ #ifdef cl_khr_global_int32_extended_atomics #define __CLC_FUNCTION atom_and #define __CLC_ADDRESS_SPACE global -#include +#include #endif // cl_khr_global_int32_extended_atomics #ifdef cl_khr_local_int32_extended_atomics #define __CLC_FUNCTION atom_and #define __CLC_ADDRESS_SPACE local -#include +#include #endif // cl_khr_local_int32_extended_atomics #ifdef cl_khr_int64_extended_atomics #define __CLC_FUNCTION atom_and -#include +#include #endif // cl_khr_int64_extended_atomics diff --git a/libclc/generic/include/clc/atomic/atom_cmpxchg.h b/libclc/opencl/include/clc/opencl/atomic/atom_cmpxchg.h similarity index 100% rename from libclc/generic/include/clc/atomic/atom_cmpxchg.h rename to libclc/opencl/include/clc/opencl/atomic/atom_cmpxchg.h diff --git a/libclc/generic/include/clc/atomic/atom_dec.h b/libclc/opencl/include/clc/opencl/atomic/atom_dec.h similarity index 100% rename from libclc/generic/include/clc/atomic/atom_dec.h rename to libclc/opencl/include/clc/opencl/atomic/atom_dec.h diff --git a/libclc/generic/include/clc/atomic/atom_decl_int32.inc b/libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc similarity index 100% rename from libclc/generic/include/clc/atomic/atom_decl_int32.inc rename to libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc diff --git a/libclc/generic/include/clc/atomic/atom_decl_int64.inc b/libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc similarity index 100% rename from libclc/generic/include/clc/atomic/atom_decl_int64.inc rename to libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc diff --git a/libclc/generic/include/clc/atomic/atom_inc.h b/libclc/opencl/include/clc/opencl/atomic/atom_inc.h similarity index 100% rename from libclc/generic/include/clc/atomic/atom_inc.h rename to libclc/opencl/include/clc/opencl/atomic/atom_inc.h diff --git a/libclc/generic/include/clc/atomic/atom_max.h b/libclc/opencl/include/clc/opencl/atomic/atom_max.h similarity index 84% rename from libclc/generic/include/clc/atomic/atom_max.h rename to libclc/opencl/include/clc/opencl/atomic/atom_max.h index 8cb601be5d6e..00b47e6b14fd 100644 --- a/libclc/generic/include/clc/atomic/atom_max.h +++ b/libclc/opencl/include/clc/opencl/atomic/atom_max.h @@ -9,16 +9,16 @@ #ifdef cl_khr_global_int32_extended_atomics #define __CLC_FUNCTION atom_max #define __CLC_ADDRESS_SPACE global -#include +#include #endif // cl_khr_global_int32_extended_atomics #ifdef cl_khr_local_int32_extended_atomics #define __CLC_FUNCTION atom_max #define __CLC_ADDRESS_SPACE local -#include +#include #endif // cl_khr_local_int32_extended_atomics #ifdef cl_khr_int64_extended_atomics #define __CLC_FUNCTION atom_max -#include +#include #endif // cl_khr_int64_extended_atomics diff --git a/libclc/generic/include/clc/atomic/atom_min.h b/libclc/opencl/include/clc/opencl/atomic/atom_min.h similarity index 84% rename from libclc/generic/include/clc/atomic/atom_min.h rename to libclc/opencl/include/clc/opencl/atomic/atom_min.h index 67853c999b2e..40bed0dc086f 100644 --- a/libclc/generic/include/clc/atomic/atom_min.h +++ b/libclc/opencl/include/clc/opencl/atomic/atom_min.h @@ -9,16 +9,16 @@ #ifdef cl_khr_global_int32_extended_atomics #define __CLC_FUNCTION atom_min #define __CLC_ADDRESS_SPACE global -#include +#include #endif // cl_khr_global_int32_extended_atomics #ifdef cl_khr_local_int32_extended_atomics #define __CLC_FUNCTION atom_min #define __CLC_ADDRESS_SPACE local -#include +#include #endif // cl_khr_local_int32_extended_atomics #ifdef cl_khr_int64_extended_atomics #define __CLC_FUNCTION atom_min -#include +#include #endif // cl_khr_int64_extended_atomics diff --git a/libclc/generic/include/clc/atomic/atom_or.h b/libclc/opencl/include/clc/opencl/atomic/atom_or.h similarity index 84% rename from libclc/generic/include/clc/atomic/atom_or.h rename to libclc/opencl/include/clc/opencl/atomic/atom_or.h index 7930ab0c5692..2c0beb850b4d 100644 --- a/libclc/generic/include/clc/atomic/atom_or.h +++ b/libclc/opencl/include/clc/opencl/atomic/atom_or.h @@ -9,16 +9,16 @@ #ifdef cl_khr_global_int32_extended_atomics #define __CLC_FUNCTION atom_or #define __CLC_ADDRESS_SPACE global -#include +#include #endif // cl_khr_global_int32_extended_atomics #ifdef cl_khr_local_int32_extended_atomics #define __CLC_FUNCTION atom_or #define __CLC_ADDRESS_SPACE local -#include +#include #endif // cl_khr_local_int32_extended_atomics #ifdef cl_khr_int64_extended_atomics #define __CLC_FUNCTION atom_or -#include +#include #endif // cl_khr_int64_extended_atomics diff --git a/libclc/generic/include/clc/atomic/atom_sub.h b/libclc/opencl/include/clc/opencl/atomic/atom_sub.h similarity index 83% rename from libclc/generic/include/clc/atomic/atom_sub.h rename to libclc/opencl/include/clc/opencl/atomic/atom_sub.h index 11eb25524c21..36074aaef5a3 100644 --- a/libclc/generic/include/clc/atomic/atom_sub.h +++ b/libclc/opencl/include/clc/opencl/atomic/atom_sub.h @@ -9,16 +9,16 @@ #ifdef cl_khr_global_int32_base_atomics #define __CLC_FUNCTION atom_sub #define __CLC_ADDRESS_SPACE global -#include +#include #endif // cl_khr_global_int32_base_atomics #ifdef cl_khr_local_int32_base_atomics #define __CLC_FUNCTION atom_sub #define __CLC_ADDRESS_SPACE local -#include +#include #endif // cl_khr_local_int32_base_atomics #ifdef cl_khr_int64_base_atomics #define __CLC_FUNCTION atom_sub -#include +#include #endif // cl_khr_int64_base_atomics diff --git a/libclc/generic/include/clc/atomic/atom_xchg.h b/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h similarity index 84% rename from libclc/generic/include/clc/atomic/atom_xchg.h rename to libclc/opencl/include/clc/opencl/atomic/atom_xchg.h index 4a46536c2451..a5043aa4109e 100644 --- a/libclc/generic/include/clc/atomic/atom_xchg.h +++ b/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h @@ -9,16 +9,16 @@ #ifdef cl_khr_global_int32_base_atomics #define __CLC_FUNCTION atom_xchg #define __CLC_ADDRESS_SPACE global -#include +#include #endif // cl_khr_global_int32_base_atomics #ifdef cl_khr_local_int32_base_atomics #define __CLC_FUNCTION atom_xchg #define __CLC_ADDRESS_SPACE local -#include +#include #endif // cl_khr_local_int32_base_atomics #ifdef cl_khr_int64_base_atomics #define __CLC_FUNCTION atom_xchg -#include +#include #endif // cl_khr_int64_base_atomics diff --git a/libclc/generic/include/clc/atomic/atom_xor.h b/libclc/opencl/include/clc/opencl/atomic/atom_xor.h similarity index 84% rename from libclc/generic/include/clc/atomic/atom_xor.h rename to libclc/opencl/include/clc/opencl/atomic/atom_xor.h index ad8ae554e15a..0c4b456b8f23 100644 --- a/libclc/generic/include/clc/atomic/atom_xor.h +++ b/libclc/opencl/include/clc/opencl/atomic/atom_xor.h @@ -9,16 +9,16 @@ #ifdef cl_khr_global_int32_extended_atomics #define __CLC_FUNCTION atom_xor #define __CLC_ADDRESS_SPACE global -#include +#include #endif // cl_khr_global_int32_extended_atomics #ifdef cl_khr_local_int32_extended_atomics #define __CLC_FUNCTION atom_xor #define __CLC_ADDRESS_SPACE local -#include +#include #endif // cl_khr_local_int32_extended_atomics #ifdef cl_khr_int64_extended_atomics #define __CLC_FUNCTION atom_xor -#include +#include #endif // cl_khr_int64_extended_atomics diff --git a/libclc/generic/include/clc/atomic/atomic_add.h b/libclc/opencl/include/clc/opencl/atomic/atomic_add.h similarity index 89% rename from libclc/generic/include/clc/atomic/atomic_add.h rename to libclc/opencl/include/clc/opencl/atomic/atomic_add.h index 59ed14557b69..937def3f4a2a 100644 --- a/libclc/generic/include/clc/atomic/atomic_add.h +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_add.h @@ -7,4 +7,4 @@ //===----------------------------------------------------------------------===// #define __CLC_FUNCTION atomic_add -#include +#include diff --git a/libclc/generic/include/clc/atomic/atomic_and.h b/libclc/opencl/include/clc/opencl/atomic/atomic_and.h similarity index 89% rename from libclc/generic/include/clc/atomic/atomic_and.h rename to libclc/opencl/include/clc/opencl/atomic/atomic_and.h index 366396a5f26a..5f353f40318f 100644 --- a/libclc/generic/include/clc/atomic/atomic_and.h +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_and.h @@ -7,4 +7,4 @@ //===----------------------------------------------------------------------===// #define __CLC_FUNCTION atomic_and -#include +#include diff --git a/libclc/generic/include/clc/atomic/atomic_cmpxchg.h b/libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h similarity index 58% rename from libclc/generic/include/clc/atomic/atomic_cmpxchg.h rename to libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h index f49269777564..fc7975910cb2 100644 --- a/libclc/generic/include/clc/atomic/atomic_cmpxchg.h +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg (volatile local int *, int, int); -_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg (volatile global int *, int, int); -_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg (volatile local uint *, uint, uint); -_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg (volatile global uint *, uint, uint); +_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg(volatile local int *, int, int); +_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg(volatile global int *, int, int); +_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg(volatile local uint *, uint, uint); +_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg(volatile global uint *, uint, uint); diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_dec.h b/libclc/opencl/include/clc/opencl/atomic/atomic_dec.h new file mode 100644 index 000000000000..354a721003f5 --- /dev/null +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_dec.h @@ -0,0 +1,12 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +_CLC_OVERLOAD _CLC_DECL int atomic_dec(volatile local int *); +_CLC_OVERLOAD _CLC_DECL int atomic_dec(volatile global int *); +_CLC_OVERLOAD _CLC_DECL uint atomic_dec(volatile local uint *); +_CLC_OVERLOAD _CLC_DECL uint atomic_dec(volatile global uint *); diff --git a/libclc/generic/include/clc/atomic/atomic_decl.inc b/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc similarity index 61% rename from libclc/generic/include/clc/atomic/atomic_decl.inc rename to libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc index b6540b37d1ab..0cfd4c3eab5f 100644 --- a/libclc/generic/include/clc/atomic/atomic_decl.inc +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#define __CLC_DECLARE_ATOMIC(ADDRSPACE, TYPE) \ - _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION (volatile ADDRSPACE TYPE *, TYPE); +#define __CLC_DECLARE_ATOMIC(ADDRSPACE, TYPE) \ + _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION(volatile ADDRSPACE TYPE *, TYPE); -#define __CLC_DECLARE_ATOMIC_ADDRSPACE(TYPE) \ - __CLC_DECLARE_ATOMIC(global, TYPE) \ - __CLC_DECLARE_ATOMIC(local, TYPE) +#define __CLC_DECLARE_ATOMIC_ADDRSPACE(TYPE) \ + __CLC_DECLARE_ATOMIC(global, TYPE) \ + __CLC_DECLARE_ATOMIC(local, TYPE) __CLC_DECLARE_ATOMIC_ADDRSPACE(int) __CLC_DECLARE_ATOMIC_ADDRSPACE(uint) diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_inc.h b/libclc/opencl/include/clc/opencl/atomic/atomic_inc.h new file mode 100644 index 000000000000..2b81c23bf0e5 --- /dev/null +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_inc.h @@ -0,0 +1,12 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +_CLC_OVERLOAD _CLC_DECL int atomic_inc(volatile local int *); +_CLC_OVERLOAD _CLC_DECL int atomic_inc(volatile global int *); +_CLC_OVERLOAD _CLC_DECL uint atomic_inc(volatile local uint *); +_CLC_OVERLOAD _CLC_DECL uint atomic_inc(volatile global uint *); diff --git a/libclc/generic/include/clc/atomic/atomic_max.h b/libclc/opencl/include/clc/opencl/atomic/atomic_max.h similarity index 89% rename from libclc/generic/include/clc/atomic/atomic_max.h rename to libclc/opencl/include/clc/opencl/atomic/atomic_max.h index 4d96e948e6c8..13832423cfee 100644 --- a/libclc/generic/include/clc/atomic/atomic_max.h +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_max.h @@ -7,4 +7,4 @@ //===----------------------------------------------------------------------===// #define __CLC_FUNCTION atomic_max -#include +#include diff --git a/libclc/generic/include/clc/atomic/atomic_min.h b/libclc/opencl/include/clc/opencl/atomic/atomic_min.h similarity index 89% rename from libclc/generic/include/clc/atomic/atomic_min.h rename to libclc/opencl/include/clc/opencl/atomic/atomic_min.h index 5f3dcc4e7cdc..3bd47a3f7837 100644 --- a/libclc/generic/include/clc/atomic/atomic_min.h +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_min.h @@ -7,4 +7,4 @@ //===----------------------------------------------------------------------===// #define __CLC_FUNCTION atomic_min -#include +#include diff --git a/libclc/generic/include/clc/atomic/atomic_or.h b/libclc/opencl/include/clc/opencl/atomic/atomic_or.h similarity index 89% rename from libclc/generic/include/clc/atomic/atomic_or.h rename to libclc/opencl/include/clc/opencl/atomic/atomic_or.h index 5af595dcdd66..13f84ea49a5a 100644 --- a/libclc/generic/include/clc/atomic/atomic_or.h +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_or.h @@ -7,4 +7,4 @@ //===----------------------------------------------------------------------===// #define __CLC_FUNCTION atomic_or -#include +#include diff --git a/libclc/generic/include/clc/atomic/atomic_sub.h b/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h similarity index 89% rename from libclc/generic/include/clc/atomic/atomic_sub.h rename to libclc/opencl/include/clc/opencl/atomic/atomic_sub.h index 2712a8ad2a4a..eedc9d0e7605 100644 --- a/libclc/generic/include/clc/atomic/atomic_sub.h +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h @@ -7,4 +7,4 @@ //===----------------------------------------------------------------------===// #define __CLC_FUNCTION atomic_sub -#include +#include diff --git a/libclc/generic/include/clc/atomic/atomic_xchg.h b/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h similarity index 69% rename from libclc/generic/include/clc/atomic/atomic_xchg.h rename to libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h index 050aec887b0e..ec322d56e23d 100644 --- a/libclc/generic/include/clc/atomic/atomic_xchg.h +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h @@ -8,6 +8,6 @@ #define __CLC_FUNCTION atomic_xchg -_CLC_OVERLOAD _CLC_DECL float __CLC_FUNCTION (volatile local float *, float); -_CLC_OVERLOAD _CLC_DECL float __CLC_FUNCTION (volatile global float *, float); -#include +_CLC_OVERLOAD _CLC_DECL float __CLC_FUNCTION(volatile local float *, float); +_CLC_OVERLOAD _CLC_DECL float __CLC_FUNCTION(volatile global float *, float); +#include diff --git a/libclc/generic/include/clc/atomic/atomic_xor.h b/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h similarity index 89% rename from libclc/generic/include/clc/atomic/atomic_xor.h rename to libclc/opencl/include/clc/opencl/atomic/atomic_xor.h index 699299ca00a3..6f6b4564fdf3 100644 --- a/libclc/generic/include/clc/atomic/atomic_xor.h +++ b/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h @@ -7,4 +7,4 @@ //===----------------------------------------------------------------------===// #define __CLC_FUNCTION atomic_xor -#include +#include diff --git a/libclc/opencl/include/clc/opencl/clc.h b/libclc/opencl/include/clc/opencl/clc.h new file mode 100644 index 000000000000..0116a12932c9 --- /dev/null +++ b/libclc/opencl/include/clc/opencl/clc.h @@ -0,0 +1,267 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef __CLC_OPENCL_CLC_H__ +#define __CLC_OPENCL_CLC_H__ + +#ifndef cl_clang_storage_class_specifiers +#error Implementation requires cl_clang_storage_class_specifiers extension! +#endif + +#pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable + +#ifdef cl_khr_fp64 +#pragma OPENCL EXTENSION cl_khr_fp64 : enable +#endif + +#ifdef cl_khr_fp16 +#pragma OPENCL EXTENSION cl_khr_fp16 : enable +#endif + +/* Function Attributes */ +#include + +/* 6.1 Supported Data Types */ +#include + +/* 6.2.3 Explicit Conversions */ +#include + +/* 6.2.4.2 Reinterpreting Types Using as_type() and as_typen() */ +#include + +/* 6.11.1 Work-Item Functions */ +#include +#include +#include +#include +#include +#include +#include +#include + +/* 6.11.2 Math Functions */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* 6.11.2.1 Floating-point macros */ +#include + +/* 6.11.3 Integer Functions */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* 6.11.3 Integer Definitions */ +#include + +/* 6.11.2 and 6.11.3 Shared Integer/Math Functions */ +#include +#include +#include +#include +#include + +/* 6.11.4 Common Functions */ +#include +#include +#include +#include +#include +#include + +/* 6.11.5 Geometric Functions */ +#include +#include +#include +#include +#include +#include +#include +#include + +/* 6.11.6 Relational Functions */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* 6.11.8 Synchronization Functions */ +#include +#include + +/* 6.11.9 Explicit Memory Fence Functions */ +#include + +/* 6.11.10 Async Copy and Prefetch Functions */ +#include +#include +#include +#include + +/* 6.11.11 Atomic Functions */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* cl_khr_global_int32_base_atomics, cl_khr_local_int32_base_atomics and + * cl_khr_int64_base_atomics Extension Functions */ +#include +#include +#include +#include +#include +#include + +/* cl_khr_global_int32_extended_atomics, cl_khr_local_int32_extended_atomics and + * cl_khr_int64_extended_atomics Extension Functions */ +#include +#include +#include +#include +#include + +/* 6.12.12 Miscellaneous Vector Functions */ +#include +#include + +/* 6.11.13 Image Read and Write Functions */ +#include +#include + +#pragma OPENCL EXTENSION all : disable + +#endif // __CLC_OPENCL_CLC_H__ diff --git a/libclc/generic/include/clc/common/degrees.h b/libclc/opencl/include/clc/opencl/common/degrees.h similarity index 80% rename from libclc/generic/include/clc/common/degrees.h rename to libclc/opencl/include/clc/opencl/common/degrees.h index b895a4cbeeeb..f442c5fbda85 100644 --- a/libclc/generic/include/clc/common/degrees.h +++ b/libclc/opencl/include/clc/opencl/common/degrees.h @@ -6,5 +6,9 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_FUNCTION degrees +#define __CLC_BODY + #include + +#undef __CLC_FUNCTION diff --git a/libclc/generic/include/clc/common/mix.h b/libclc/opencl/include/clc/opencl/common/mix.h similarity index 89% rename from libclc/generic/include/clc/common/mix.h rename to libclc/opencl/include/clc/opencl/common/mix.h index 51504282c1ae..76aeaaba665a 100644 --- a/libclc/generic/include/clc/common/mix.h +++ b/libclc/opencl/include/clc/opencl/common/mix.h @@ -6,5 +6,5 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/common/mix.inc b/libclc/opencl/include/clc/opencl/common/mix.inc similarity index 77% rename from libclc/generic/include/clc/common/mix.inc rename to libclc/opencl/include/clc/opencl/common/mix.inc index 87167fcd19ec..2b8350f5baae 100644 --- a/libclc/generic/include/clc/common/mix.inc +++ b/libclc/opencl/include/clc/opencl/common/mix.inc @@ -6,8 +6,10 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE mix(__CLC_GENTYPE a, __CLC_GENTYPE b, __CLC_GENTYPE c); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE mix(__CLC_GENTYPE a, __CLC_GENTYPE b, + __CLC_GENTYPE c); #ifndef __CLC_SCALAR -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE mix(__CLC_GENTYPE a, __CLC_GENTYPE b, __CLC_SCALAR_GENTYPE c); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE mix(__CLC_GENTYPE a, __CLC_GENTYPE b, + __CLC_SCALAR_GENTYPE c); #endif diff --git a/libclc/generic/include/clc/common/radians.h b/libclc/opencl/include/clc/opencl/common/radians.h similarity index 80% rename from libclc/generic/include/clc/common/radians.h rename to libclc/opencl/include/clc/opencl/common/radians.h index f683e97778f2..2772f7c2f0ae 100644 --- a/libclc/generic/include/clc/common/radians.h +++ b/libclc/opencl/include/clc/opencl/common/radians.h @@ -6,5 +6,9 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_FUNCTION radians +#define __CLC_BODY + #include + +#undef __CLC_FUNCTION diff --git a/libclc/generic/include/clc/common/sign.h b/libclc/opencl/include/clc/opencl/common/sign.h similarity index 100% rename from libclc/generic/include/clc/common/sign.h rename to libclc/opencl/include/clc/opencl/common/sign.h diff --git a/libclc/generic/include/clc/common/smoothstep.h b/libclc/opencl/include/clc/opencl/common/smoothstep.h similarity index 88% rename from libclc/generic/include/clc/common/smoothstep.h rename to libclc/opencl/include/clc/opencl/common/smoothstep.h index 05c3a51ccddb..87a642f8947a 100644 --- a/libclc/generic/include/clc/common/smoothstep.h +++ b/libclc/opencl/include/clc/opencl/common/smoothstep.h @@ -6,5 +6,5 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/common/smoothstep.inc b/libclc/opencl/include/clc/opencl/common/smoothstep.inc similarity index 66% rename from libclc/generic/include/clc/common/smoothstep.inc rename to libclc/opencl/include/clc/opencl/common/smoothstep.inc index 2efaa2494c85..4547483364ba 100644 --- a/libclc/generic/include/clc/common/smoothstep.inc +++ b/libclc/opencl/include/clc/opencl/common/smoothstep.inc @@ -6,9 +6,13 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE smoothstep(__CLC_GENTYPE edge0, __CLC_GENTYPE edge1, __CLC_GENTYPE x); -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE smoothstep(float edge0, float edge1, __CLC_GENTYPE x); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE smoothstep(__CLC_GENTYPE edge0, + __CLC_GENTYPE edge1, + __CLC_GENTYPE x); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE smoothstep(float edge0, float edge1, + __CLC_GENTYPE x); #ifdef cl_khr_fp64 -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE smoothstep(double edge0, double edge1, __CLC_GENTYPE x); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE smoothstep(double edge0, double edge1, + __CLC_GENTYPE x); #endif diff --git a/libclc/generic/include/clc/common/step.h b/libclc/opencl/include/clc/opencl/common/step.h similarity index 89% rename from libclc/generic/include/clc/common/step.h rename to libclc/opencl/include/clc/opencl/common/step.h index 8c663c981975..d25a66f16ac3 100644 --- a/libclc/generic/include/clc/common/step.h +++ b/libclc/opencl/include/clc/opencl/common/step.h @@ -6,5 +6,5 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/common/step.inc b/libclc/opencl/include/clc/opencl/common/step.inc similarity index 100% rename from libclc/generic/include/clc/common/step.inc rename to libclc/opencl/include/clc/opencl/common/step.inc diff --git a/libclc/generic/include/clc/convert.h b/libclc/opencl/include/clc/opencl/convert.h similarity index 100% rename from libclc/generic/include/clc/convert.h rename to libclc/opencl/include/clc/opencl/convert.h diff --git a/libclc/generic/include/clc/explicit_fence/explicit_memory_fence.h b/libclc/opencl/include/clc/opencl/explicit_fence/explicit_memory_fence.h similarity index 100% rename from libclc/generic/include/clc/explicit_fence/explicit_memory_fence.h rename to libclc/opencl/include/clc/opencl/explicit_fence/explicit_memory_fence.h diff --git a/libclc/generic/include/clc/geometric/cross.h b/libclc/opencl/include/clc/opencl/geometric/cross.h similarity index 100% rename from libclc/generic/include/clc/geometric/cross.h rename to libclc/opencl/include/clc/opencl/geometric/cross.h diff --git a/libclc/generic/include/clc/geometric/distance.h b/libclc/opencl/include/clc/opencl/geometric/distance.h similarity index 100% rename from libclc/generic/include/clc/geometric/distance.h rename to libclc/opencl/include/clc/opencl/geometric/distance.h diff --git a/libclc/generic/include/clc/geometric/dot.h b/libclc/opencl/include/clc/opencl/geometric/dot.h similarity index 100% rename from libclc/generic/include/clc/geometric/dot.h rename to libclc/opencl/include/clc/opencl/geometric/dot.h diff --git a/libclc/generic/include/clc/geometric/fast_distance.h b/libclc/opencl/include/clc/opencl/geometric/fast_distance.h similarity index 100% rename from libclc/generic/include/clc/geometric/fast_distance.h rename to libclc/opencl/include/clc/opencl/geometric/fast_distance.h diff --git a/libclc/generic/include/clc/geometric/fast_length.h b/libclc/opencl/include/clc/opencl/geometric/fast_length.h similarity index 100% rename from libclc/generic/include/clc/geometric/fast_length.h rename to libclc/opencl/include/clc/opencl/geometric/fast_length.h diff --git a/libclc/generic/include/clc/geometric/fast_normalize.h b/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h similarity index 100% rename from libclc/generic/include/clc/geometric/fast_normalize.h rename to libclc/opencl/include/clc/opencl/geometric/fast_normalize.h diff --git a/libclc/generic/include/clc/geometric/length.h b/libclc/opencl/include/clc/opencl/geometric/length.h similarity index 100% rename from libclc/generic/include/clc/geometric/length.h rename to libclc/opencl/include/clc/opencl/geometric/length.h diff --git a/libclc/generic/include/clc/geometric/normalize.h b/libclc/opencl/include/clc/opencl/geometric/normalize.h similarity index 100% rename from libclc/generic/include/clc/geometric/normalize.h rename to libclc/opencl/include/clc/opencl/geometric/normalize.h diff --git a/libclc/opencl/include/clc/opencl/image/image.h b/libclc/opencl/include/clc/opencl/image/image.h new file mode 100644 index 000000000000..6435f3430e2f --- /dev/null +++ b/libclc/opencl/include/clc/opencl/image/image.h @@ -0,0 +1,48 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#if defined(__opencl_c_images) + +_CLC_OVERLOAD _CLC_DECL int get_image_width(image2d_t image); +_CLC_OVERLOAD _CLC_DECL int get_image_width(image3d_t image); + +_CLC_OVERLOAD _CLC_DECL int get_image_height(image2d_t image); +_CLC_OVERLOAD _CLC_DECL int get_image_height(image3d_t image); + +_CLC_OVERLOAD _CLC_DECL int get_image_depth(image3d_t image); + +_CLC_OVERLOAD _CLC_DECL int get_image_channel_data_type(image2d_t image); +_CLC_OVERLOAD _CLC_DECL int get_image_channel_data_type(image3d_t image); + +_CLC_OVERLOAD _CLC_DECL int get_image_channel_order(image2d_t image); +_CLC_OVERLOAD _CLC_DECL int get_image_channel_order(image3d_t image); + +_CLC_OVERLOAD _CLC_DECL int2 get_image_dim(image2d_t image); +_CLC_OVERLOAD _CLC_DECL int4 get_image_dim(image3d_t image); + +_CLC_OVERLOAD _CLC_DECL void write_imagef(image2d_t image, int2 coord, + float4 color); +_CLC_OVERLOAD _CLC_DECL void write_imagei(image2d_t image, int2 coord, + int4 color); +_CLC_OVERLOAD _CLC_DECL void write_imageui(image2d_t image, int2 coord, + uint4 color); + +_CLC_OVERLOAD _CLC_DECL float4 read_imagef(image2d_t image, sampler_t sampler, + int2 coord); +_CLC_OVERLOAD _CLC_DECL float4 read_imagef(image2d_t image, sampler_t sampler, + float2 coord); +_CLC_OVERLOAD _CLC_DECL int4 read_imagei(image2d_t image, sampler_t sampler, + int2 coord); +_CLC_OVERLOAD _CLC_DECL int4 read_imagei(image2d_t image, sampler_t sampler, + float2 coord); +_CLC_OVERLOAD _CLC_DECL uint4 read_imageui(image2d_t image, sampler_t sampler, + int2 coord); +_CLC_OVERLOAD _CLC_DECL uint4 read_imageui(image2d_t image, sampler_t sampler, + float2 coord); + +#endif diff --git a/libclc/opencl/include/clc/opencl/image/image_defines.h b/libclc/opencl/include/clc/opencl/image/image_defines.h new file mode 100644 index 000000000000..f3589fdc4a89 --- /dev/null +++ b/libclc/opencl/include/clc/opencl/image/image_defines.h @@ -0,0 +1,57 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +/* get_image_channel_data_type flags */ +#define CLK_SNORM_INT8 0x10D0 +#define CLK_SNORM_INT16 0x10D1 +#define CLK_UNORM_INT8 0x10D2 +#define CLK_UNORM_INT16 0x10D3 +#define CLK_UNORM_SHORT_565 0x10D4 +#define CLK_UNORM_SHORT_555 0x10D5 +#define CLK_UNORM_SHORT_101010 0x10D6 +#define CLK_SIGNED_INT8 0x10D7 +#define CLK_SIGNED_INT16 0x10D8 +#define CLK_SIGNED_INT32 0x10D9 +#define CLK_UNSIGNED_INT8 0x10DA +#define CLK_UNSIGNED_INT16 0x10DB +#define CLK_UNSIGNED_INT32 0x10DC +#define CLK_HALF_FLOAT 0x10DD +#define CLK_FLOAT 0x10DE + +/* get_image_channel_order flags */ +#define CLK_R 0x10B0 +#define CLK_A 0x10B1 +#define CLK_RG 0x10B2 +#define CLK_RA 0x10B3 +#define CLK_RGB 0x10B4 +#define CLK_RGBA 0x10B5 +#define CLK_BGRA 0x10B6 +#define CLK_ARGB 0x10B7 +#define CLK_INTENSITY 0x10B8 +#define CLK_LUMINANCE 0x10B9 +#define CLK_Rx 0x10BA +#define CLK_RGx 0x10BB +#define CLK_RGBx 0x10BC + +/* sampler normalized coords */ +#define CLK_NORMALIZED_COORDS_FALSE 0x0000 +#define CLK_NORMALIZED_COORDS_TRUE 0x0001 +#define __CLC_NORMALIZED_COORDS_MASK 0x0001 + +/* sampler addressing mode */ +#define CLK_ADDRESS_NONE 0x0000 +#define CLK_ADDRESS_CLAMP_TO_EDGE 0x0002 +#define CLK_ADDRESS_CLAMP 0x0004 +#define CLK_ADDRESS_REPEAT 0x0006 +#define CLK_ADDRESS_MIRRORED_REPEAT 0x0008 +#define __CLC_ADDRESS_MASK 0x000E + +/* sampler filter mode */ +#define CLK_FILTER_NEAREST 0x0000 +#define CLK_FILTER_LINEAR 0x0010 +#define __CLC_FILTER_MASK 0x0010 diff --git a/libclc/generic/include/clc/integer/abs.h b/libclc/opencl/include/clc/opencl/integer/abs.h similarity index 89% rename from libclc/generic/include/clc/integer/abs.h rename to libclc/opencl/include/clc/opencl/integer/abs.h index df5e23e08d8c..22ba40fb40d4 100644 --- a/libclc/generic/include/clc/integer/abs.h +++ b/libclc/opencl/include/clc/opencl/integer/abs.h @@ -6,5 +6,5 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/integer/abs.inc b/libclc/opencl/include/clc/opencl/integer/abs.inc similarity index 100% rename from libclc/generic/include/clc/integer/abs.inc rename to libclc/opencl/include/clc/opencl/integer/abs.inc diff --git a/libclc/generic/include/clc/integer/abs_diff.h b/libclc/opencl/include/clc/opencl/integer/abs_diff.h similarity index 88% rename from libclc/generic/include/clc/integer/abs_diff.h rename to libclc/opencl/include/clc/opencl/integer/abs_diff.h index 0005e0da7645..f22cc4d88afc 100644 --- a/libclc/generic/include/clc/integer/abs_diff.h +++ b/libclc/opencl/include/clc/opencl/integer/abs_diff.h @@ -6,5 +6,5 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/integer/abs_diff.inc b/libclc/opencl/include/clc/opencl/integer/abs_diff.inc similarity index 86% rename from libclc/generic/include/clc/integer/abs_diff.inc rename to libclc/opencl/include/clc/opencl/integer/abs_diff.inc index e99f9d686bbe..41873854021e 100644 --- a/libclc/generic/include/clc/integer/abs_diff.inc +++ b/libclc/opencl/include/clc/opencl/integer/abs_diff.inc @@ -6,4 +6,5 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DECL __CLC_U_GENTYPE abs_diff(__CLC_GENTYPE x, __CLC_GENTYPE y); +_CLC_OVERLOAD _CLC_DECL __CLC_U_GENTYPE abs_diff(__CLC_GENTYPE x, + __CLC_GENTYPE y); diff --git a/libclc/generic/include/clc/integer/add_sat.h b/libclc/opencl/include/clc/opencl/integer/add_sat.h similarity index 79% rename from libclc/generic/include/clc/integer/add_sat.h rename to libclc/opencl/include/clc/opencl/integer/add_sat.h index 9ef8affd9fc6..1982d1190800 100644 --- a/libclc/generic/include/clc/integer/add_sat.h +++ b/libclc/opencl/include/clc/opencl/integer/add_sat.h @@ -6,5 +6,9 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_FUNCTION add_sat +#define __CLC_BODY + #include + +#undef __CLC_FUNCTION diff --git a/libclc/generic/include/clc/integer/clz.h b/libclc/opencl/include/clc/opencl/integer/clz.h similarity index 100% rename from libclc/generic/include/clc/integer/clz.h rename to libclc/opencl/include/clc/opencl/integer/clz.h diff --git a/libclc/generic/include/clc/integer/ctz.h b/libclc/opencl/include/clc/opencl/integer/ctz.h similarity index 100% rename from libclc/generic/include/clc/integer/ctz.h rename to libclc/opencl/include/clc/opencl/integer/ctz.h diff --git a/libclc/generic/include/clc/integer/hadd.h b/libclc/opencl/include/clc/opencl/integer/hadd.h similarity index 100% rename from libclc/generic/include/clc/integer/hadd.h rename to libclc/opencl/include/clc/opencl/integer/hadd.h diff --git a/libclc/generic/include/clc/integer/mad24.h b/libclc/opencl/include/clc/opencl/integer/mad24.h similarity index 100% rename from libclc/generic/include/clc/integer/mad24.h rename to libclc/opencl/include/clc/opencl/integer/mad24.h diff --git a/libclc/generic/include/clc/integer/mad_hi.h b/libclc/opencl/include/clc/opencl/integer/mad_hi.h similarity index 100% rename from libclc/generic/include/clc/integer/mad_hi.h rename to libclc/opencl/include/clc/opencl/integer/mad_hi.h diff --git a/libclc/generic/include/clc/integer/mad_sat.h b/libclc/opencl/include/clc/opencl/integer/mad_sat.h similarity index 79% rename from libclc/generic/include/clc/integer/mad_sat.h rename to libclc/opencl/include/clc/opencl/integer/mad_sat.h index e404b6438dfb..0a9fd7869a6f 100644 --- a/libclc/generic/include/clc/integer/mad_sat.h +++ b/libclc/opencl/include/clc/opencl/integer/mad_sat.h @@ -6,5 +6,9 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_FUNCTION mad_sat +#define __CLC_BODY + #include + +#undef __CLC_FUNCTION diff --git a/libclc/generic/include/clc/integer/mul24.h b/libclc/opencl/include/clc/opencl/integer/mul24.h similarity index 100% rename from libclc/generic/include/clc/integer/mul24.h rename to libclc/opencl/include/clc/opencl/integer/mul24.h diff --git a/libclc/generic/include/clc/integer/mul_hi.h b/libclc/opencl/include/clc/opencl/integer/mul_hi.h similarity index 100% rename from libclc/generic/include/clc/integer/mul_hi.h rename to libclc/opencl/include/clc/opencl/integer/mul_hi.h diff --git a/libclc/generic/include/clc/integer/popcount.h b/libclc/opencl/include/clc/opencl/integer/popcount.h similarity index 100% rename from libclc/generic/include/clc/integer/popcount.h rename to libclc/opencl/include/clc/opencl/integer/popcount.h diff --git a/libclc/generic/include/clc/integer/rhadd.h b/libclc/opencl/include/clc/opencl/integer/rhadd.h similarity index 100% rename from libclc/generic/include/clc/integer/rhadd.h rename to libclc/opencl/include/clc/opencl/integer/rhadd.h diff --git a/libclc/generic/include/clc/integer/rotate.h b/libclc/opencl/include/clc/opencl/integer/rotate.h similarity index 79% rename from libclc/generic/include/clc/integer/rotate.h rename to libclc/opencl/include/clc/opencl/integer/rotate.h index 9209f6e6ab32..1e4de24cbf31 100644 --- a/libclc/generic/include/clc/integer/rotate.h +++ b/libclc/opencl/include/clc/opencl/integer/rotate.h @@ -6,5 +6,9 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_FUNCTION rotate +#define __CLC_BODY + #include + +#undef __CLC_FUNCTION diff --git a/libclc/generic/include/clc/integer/sub_sat.h b/libclc/opencl/include/clc/opencl/integer/sub_sat.h similarity index 79% rename from libclc/generic/include/clc/integer/sub_sat.h rename to libclc/opencl/include/clc/opencl/integer/sub_sat.h index 6a30bd110ae7..ee5d8c78f3eb 100644 --- a/libclc/generic/include/clc/integer/sub_sat.h +++ b/libclc/opencl/include/clc/opencl/integer/sub_sat.h @@ -6,5 +6,9 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_FUNCTION sub_sat +#define __CLC_BODY + #include + +#undef __CLC_FUNCTION diff --git a/libclc/generic/include/clc/integer/upsample.h b/libclc/opencl/include/clc/opencl/integer/upsample.h similarity index 100% rename from libclc/generic/include/clc/integer/upsample.h rename to libclc/opencl/include/clc/opencl/integer/upsample.h diff --git a/libclc/generic/include/clc/math/acos.h b/libclc/opencl/include/clc/opencl/math/acos.h similarity index 100% rename from libclc/generic/include/clc/math/acos.h rename to libclc/opencl/include/clc/opencl/math/acos.h diff --git a/libclc/generic/include/clc/math/acosh.h b/libclc/opencl/include/clc/opencl/math/acosh.h similarity index 100% rename from libclc/generic/include/clc/math/acosh.h rename to libclc/opencl/include/clc/opencl/math/acosh.h diff --git a/libclc/generic/include/clc/math/acospi.h b/libclc/opencl/include/clc/opencl/math/acospi.h similarity index 100% rename from libclc/generic/include/clc/math/acospi.h rename to libclc/opencl/include/clc/opencl/math/acospi.h diff --git a/libclc/generic/include/clc/math/asin.h b/libclc/opencl/include/clc/opencl/math/asin.h similarity index 100% rename from libclc/generic/include/clc/math/asin.h rename to libclc/opencl/include/clc/opencl/math/asin.h diff --git a/libclc/generic/include/clc/math/asinh.h b/libclc/opencl/include/clc/opencl/math/asinh.h similarity index 100% rename from libclc/generic/include/clc/math/asinh.h rename to libclc/opencl/include/clc/opencl/math/asinh.h diff --git a/libclc/generic/include/clc/math/asinpi.h b/libclc/opencl/include/clc/opencl/math/asinpi.h similarity index 100% rename from libclc/generic/include/clc/math/asinpi.h rename to libclc/opencl/include/clc/opencl/math/asinpi.h diff --git a/libclc/generic/include/clc/math/atan.h b/libclc/opencl/include/clc/opencl/math/atan.h similarity index 100% rename from libclc/generic/include/clc/math/atan.h rename to libclc/opencl/include/clc/opencl/math/atan.h diff --git a/libclc/generic/include/clc/math/atan2.h b/libclc/opencl/include/clc/opencl/math/atan2.h similarity index 100% rename from libclc/generic/include/clc/math/atan2.h rename to libclc/opencl/include/clc/opencl/math/atan2.h diff --git a/libclc/generic/include/clc/math/atan2pi.h b/libclc/opencl/include/clc/opencl/math/atan2pi.h similarity index 100% rename from libclc/generic/include/clc/math/atan2pi.h rename to libclc/opencl/include/clc/opencl/math/atan2pi.h diff --git a/libclc/generic/include/clc/math/atanh.h b/libclc/opencl/include/clc/opencl/math/atanh.h similarity index 100% rename from libclc/generic/include/clc/math/atanh.h rename to libclc/opencl/include/clc/opencl/math/atanh.h diff --git a/libclc/generic/include/clc/math/atanpi.h b/libclc/opencl/include/clc/opencl/math/atanpi.h similarity index 100% rename from libclc/generic/include/clc/math/atanpi.h rename to libclc/opencl/include/clc/opencl/math/atanpi.h diff --git a/libclc/generic/include/clc/math/cbrt.h b/libclc/opencl/include/clc/opencl/math/cbrt.h similarity index 100% rename from libclc/generic/include/clc/math/cbrt.h rename to libclc/opencl/include/clc/opencl/math/cbrt.h diff --git a/libclc/generic/include/clc/math/ceil.h b/libclc/opencl/include/clc/opencl/math/ceil.h similarity index 100% rename from libclc/generic/include/clc/math/ceil.h rename to libclc/opencl/include/clc/opencl/math/ceil.h diff --git a/libclc/generic/include/clc/math/copysign.h b/libclc/opencl/include/clc/opencl/math/copysign.h similarity index 100% rename from libclc/generic/include/clc/math/copysign.h rename to libclc/opencl/include/clc/opencl/math/copysign.h diff --git a/libclc/generic/include/clc/math/cos.h b/libclc/opencl/include/clc/opencl/math/cos.h similarity index 100% rename from libclc/generic/include/clc/math/cos.h rename to libclc/opencl/include/clc/opencl/math/cos.h diff --git a/libclc/generic/include/clc/math/cosh.h b/libclc/opencl/include/clc/opencl/math/cosh.h similarity index 100% rename from libclc/generic/include/clc/math/cosh.h rename to libclc/opencl/include/clc/opencl/math/cosh.h diff --git a/libclc/generic/include/clc/math/cospi.h b/libclc/opencl/include/clc/opencl/math/cospi.h similarity index 100% rename from libclc/generic/include/clc/math/cospi.h rename to libclc/opencl/include/clc/opencl/math/cospi.h diff --git a/libclc/generic/include/clc/math/erf.h b/libclc/opencl/include/clc/opencl/math/erf.h similarity index 100% rename from libclc/generic/include/clc/math/erf.h rename to libclc/opencl/include/clc/opencl/math/erf.h diff --git a/libclc/generic/include/clc/math/erfc.h b/libclc/opencl/include/clc/opencl/math/erfc.h similarity index 100% rename from libclc/generic/include/clc/math/erfc.h rename to libclc/opencl/include/clc/opencl/math/erfc.h diff --git a/libclc/generic/include/clc/math/exp.h b/libclc/opencl/include/clc/opencl/math/exp.h similarity index 100% rename from libclc/generic/include/clc/math/exp.h rename to libclc/opencl/include/clc/opencl/math/exp.h diff --git a/libclc/generic/include/clc/math/exp10.h b/libclc/opencl/include/clc/opencl/math/exp10.h similarity index 100% rename from libclc/generic/include/clc/math/exp10.h rename to libclc/opencl/include/clc/opencl/math/exp10.h diff --git a/libclc/generic/include/clc/math/exp2.h b/libclc/opencl/include/clc/opencl/math/exp2.h similarity index 100% rename from libclc/generic/include/clc/math/exp2.h rename to libclc/opencl/include/clc/opencl/math/exp2.h diff --git a/libclc/generic/include/clc/math/expm1.h b/libclc/opencl/include/clc/opencl/math/expm1.h similarity index 100% rename from libclc/generic/include/clc/math/expm1.h rename to libclc/opencl/include/clc/opencl/math/expm1.h diff --git a/libclc/generic/include/clc/math/fabs.h b/libclc/opencl/include/clc/opencl/math/fabs.h similarity index 100% rename from libclc/generic/include/clc/math/fabs.h rename to libclc/opencl/include/clc/opencl/math/fabs.h diff --git a/libclc/generic/include/clc/math/fdim.h b/libclc/opencl/include/clc/opencl/math/fdim.h similarity index 100% rename from libclc/generic/include/clc/math/fdim.h rename to libclc/opencl/include/clc/opencl/math/fdim.h diff --git a/libclc/generic/include/clc/math/floor.h b/libclc/opencl/include/clc/opencl/math/floor.h similarity index 100% rename from libclc/generic/include/clc/math/floor.h rename to libclc/opencl/include/clc/opencl/math/floor.h diff --git a/libclc/generic/include/clc/math/fma.h b/libclc/opencl/include/clc/opencl/math/fma.h similarity index 100% rename from libclc/generic/include/clc/math/fma.h rename to libclc/opencl/include/clc/opencl/math/fma.h diff --git a/libclc/generic/include/clc/math/fmax.h b/libclc/opencl/include/clc/opencl/math/fmax.h similarity index 99% rename from libclc/generic/include/clc/math/fmax.h rename to libclc/opencl/include/clc/opencl/math/fmax.h index 6c943370e28d..2144bb334f1a 100644 --- a/libclc/generic/include/clc/math/fmax.h +++ b/libclc/opencl/include/clc/opencl/math/fmax.h @@ -12,4 +12,3 @@ #include #undef __CLC_FUNCTION - diff --git a/libclc/generic/include/clc/math/fmin.h b/libclc/opencl/include/clc/opencl/math/fmin.h similarity index 99% rename from libclc/generic/include/clc/math/fmin.h rename to libclc/opencl/include/clc/opencl/math/fmin.h index 45d83909cef5..5a2af3725bf2 100644 --- a/libclc/generic/include/clc/math/fmin.h +++ b/libclc/opencl/include/clc/opencl/math/fmin.h @@ -12,4 +12,3 @@ #include #undef __CLC_FUNCTION - diff --git a/libclc/generic/include/clc/math/fmod.h b/libclc/opencl/include/clc/opencl/math/fmod.h similarity index 100% rename from libclc/generic/include/clc/math/fmod.h rename to libclc/opencl/include/clc/opencl/math/fmod.h diff --git a/libclc/generic/include/clc/math/fract.h b/libclc/opencl/include/clc/opencl/math/fract.h similarity index 100% rename from libclc/generic/include/clc/math/fract.h rename to libclc/opencl/include/clc/opencl/math/fract.h diff --git a/libclc/generic/include/clc/math/frexp.h b/libclc/opencl/include/clc/opencl/math/frexp.h similarity index 89% rename from libclc/generic/include/clc/math/frexp.h rename to libclc/opencl/include/clc/opencl/math/frexp.h index d62d92bd8fa9..a03aefbf6089 100644 --- a/libclc/generic/include/clc/math/frexp.h +++ b/libclc/opencl/include/clc/opencl/math/frexp.h @@ -6,5 +6,5 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/opencl/include/clc/opencl/math/frexp.inc b/libclc/opencl/include/clc/opencl/math/frexp.inc new file mode 100644 index 000000000000..620db6063610 --- /dev/null +++ b/libclc/opencl/include/clc/opencl/math/frexp.inc @@ -0,0 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE frexp(__CLC_GENTYPE x, + global __CLC_INTN *iptr); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE frexp(__CLC_GENTYPE x, + local __CLC_INTN *iptr); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE frexp(__CLC_GENTYPE x, + private __CLC_INTN *iptr); diff --git a/libclc/generic/include/clc/math/half_cos.h b/libclc/opencl/include/clc/opencl/math/half_cos.h similarity index 100% rename from libclc/generic/include/clc/math/half_cos.h rename to libclc/opencl/include/clc/opencl/math/half_cos.h diff --git a/libclc/generic/include/clc/math/half_divide.h b/libclc/opencl/include/clc/opencl/math/half_divide.h similarity index 100% rename from libclc/generic/include/clc/math/half_divide.h rename to libclc/opencl/include/clc/opencl/math/half_divide.h diff --git a/libclc/generic/include/clc/math/half_exp.h b/libclc/opencl/include/clc/opencl/math/half_exp.h similarity index 100% rename from libclc/generic/include/clc/math/half_exp.h rename to libclc/opencl/include/clc/opencl/math/half_exp.h diff --git a/libclc/generic/include/clc/math/half_exp10.h b/libclc/opencl/include/clc/opencl/math/half_exp10.h similarity index 100% rename from libclc/generic/include/clc/math/half_exp10.h rename to libclc/opencl/include/clc/opencl/math/half_exp10.h diff --git a/libclc/generic/include/clc/math/half_exp2.h b/libclc/opencl/include/clc/opencl/math/half_exp2.h similarity index 100% rename from libclc/generic/include/clc/math/half_exp2.h rename to libclc/opencl/include/clc/opencl/math/half_exp2.h diff --git a/libclc/generic/include/clc/math/half_log.h b/libclc/opencl/include/clc/opencl/math/half_log.h similarity index 100% rename from libclc/generic/include/clc/math/half_log.h rename to libclc/opencl/include/clc/opencl/math/half_log.h diff --git a/libclc/generic/include/clc/math/half_log10.h b/libclc/opencl/include/clc/opencl/math/half_log10.h similarity index 100% rename from libclc/generic/include/clc/math/half_log10.h rename to libclc/opencl/include/clc/opencl/math/half_log10.h diff --git a/libclc/generic/include/clc/math/half_log2.h b/libclc/opencl/include/clc/opencl/math/half_log2.h similarity index 100% rename from libclc/generic/include/clc/math/half_log2.h rename to libclc/opencl/include/clc/opencl/math/half_log2.h diff --git a/libclc/generic/include/clc/math/half_powr.h b/libclc/opencl/include/clc/opencl/math/half_powr.h similarity index 100% rename from libclc/generic/include/clc/math/half_powr.h rename to libclc/opencl/include/clc/opencl/math/half_powr.h diff --git a/libclc/generic/include/clc/math/half_recip.h b/libclc/opencl/include/clc/opencl/math/half_recip.h similarity index 100% rename from libclc/generic/include/clc/math/half_recip.h rename to libclc/opencl/include/clc/opencl/math/half_recip.h diff --git a/libclc/generic/include/clc/math/half_rsqrt.h b/libclc/opencl/include/clc/opencl/math/half_rsqrt.h similarity index 100% rename from libclc/generic/include/clc/math/half_rsqrt.h rename to libclc/opencl/include/clc/opencl/math/half_rsqrt.h diff --git a/libclc/generic/include/clc/math/half_sin.h b/libclc/opencl/include/clc/opencl/math/half_sin.h similarity index 100% rename from libclc/generic/include/clc/math/half_sin.h rename to libclc/opencl/include/clc/opencl/math/half_sin.h diff --git a/libclc/generic/include/clc/math/half_sqrt.h b/libclc/opencl/include/clc/opencl/math/half_sqrt.h similarity index 100% rename from libclc/generic/include/clc/math/half_sqrt.h rename to libclc/opencl/include/clc/opencl/math/half_sqrt.h diff --git a/libclc/generic/include/clc/math/half_tan.h b/libclc/opencl/include/clc/opencl/math/half_tan.h similarity index 100% rename from libclc/generic/include/clc/math/half_tan.h rename to libclc/opencl/include/clc/opencl/math/half_tan.h diff --git a/libclc/generic/include/clc/math/hypot.h b/libclc/opencl/include/clc/opencl/math/hypot.h similarity index 100% rename from libclc/generic/include/clc/math/hypot.h rename to libclc/opencl/include/clc/opencl/math/hypot.h diff --git a/libclc/generic/include/clc/math/ilogb.h b/libclc/opencl/include/clc/opencl/math/ilogb.h similarity index 100% rename from libclc/generic/include/clc/math/ilogb.h rename to libclc/opencl/include/clc/opencl/math/ilogb.h diff --git a/libclc/generic/include/clc/math/ldexp.h b/libclc/opencl/include/clc/opencl/math/ldexp.h similarity index 89% rename from libclc/generic/include/clc/math/ldexp.h rename to libclc/opencl/include/clc/opencl/math/ldexp.h index 804b4edd67c3..6dcd2a9548d0 100644 --- a/libclc/generic/include/clc/math/ldexp.h +++ b/libclc/opencl/include/clc/opencl/math/ldexp.h @@ -6,5 +6,5 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/math/ldexp.inc b/libclc/opencl/include/clc/opencl/math/ldexp.inc similarity index 100% rename from libclc/generic/include/clc/math/ldexp.inc rename to libclc/opencl/include/clc/opencl/math/ldexp.inc diff --git a/libclc/generic/include/clc/math/lgamma.h b/libclc/opencl/include/clc/opencl/math/lgamma.h similarity index 100% rename from libclc/generic/include/clc/math/lgamma.h rename to libclc/opencl/include/clc/opencl/math/lgamma.h diff --git a/libclc/generic/include/clc/math/lgamma_r.h b/libclc/opencl/include/clc/opencl/math/lgamma_r.h similarity index 100% rename from libclc/generic/include/clc/math/lgamma_r.h rename to libclc/opencl/include/clc/opencl/math/lgamma_r.h diff --git a/libclc/generic/include/clc/math/log.h b/libclc/opencl/include/clc/opencl/math/log.h similarity index 100% rename from libclc/generic/include/clc/math/log.h rename to libclc/opencl/include/clc/opencl/math/log.h diff --git a/libclc/generic/include/clc/math/log10.h b/libclc/opencl/include/clc/opencl/math/log10.h similarity index 100% rename from libclc/generic/include/clc/math/log10.h rename to libclc/opencl/include/clc/opencl/math/log10.h diff --git a/libclc/generic/include/clc/math/log1p.h b/libclc/opencl/include/clc/opencl/math/log1p.h similarity index 100% rename from libclc/generic/include/clc/math/log1p.h rename to libclc/opencl/include/clc/opencl/math/log1p.h diff --git a/libclc/generic/include/clc/math/log2.h b/libclc/opencl/include/clc/opencl/math/log2.h similarity index 100% rename from libclc/generic/include/clc/math/log2.h rename to libclc/opencl/include/clc/opencl/math/log2.h diff --git a/libclc/generic/include/clc/math/logb.h b/libclc/opencl/include/clc/opencl/math/logb.h similarity index 100% rename from libclc/generic/include/clc/math/logb.h rename to libclc/opencl/include/clc/opencl/math/logb.h diff --git a/libclc/generic/include/clc/math/mad.h b/libclc/opencl/include/clc/opencl/math/mad.h similarity index 100% rename from libclc/generic/include/clc/math/mad.h rename to libclc/opencl/include/clc/opencl/math/mad.h diff --git a/libclc/generic/include/clc/math/maxmag.h b/libclc/opencl/include/clc/opencl/math/maxmag.h similarity index 100% rename from libclc/generic/include/clc/math/maxmag.h rename to libclc/opencl/include/clc/opencl/math/maxmag.h diff --git a/libclc/generic/include/clc/math/minmag.h b/libclc/opencl/include/clc/opencl/math/minmag.h similarity index 100% rename from libclc/generic/include/clc/math/minmag.h rename to libclc/opencl/include/clc/opencl/math/minmag.h diff --git a/libclc/generic/include/clc/math/modf.h b/libclc/opencl/include/clc/opencl/math/modf.h similarity index 100% rename from libclc/generic/include/clc/math/modf.h rename to libclc/opencl/include/clc/opencl/math/modf.h diff --git a/libclc/generic/include/clc/math/nan.h b/libclc/opencl/include/clc/opencl/math/nan.h similarity index 89% rename from libclc/generic/include/clc/math/nan.h rename to libclc/opencl/include/clc/opencl/math/nan.h index ccd209ffe442..c5be0af945a5 100644 --- a/libclc/generic/include/clc/math/nan.h +++ b/libclc/opencl/include/clc/opencl/math/nan.h @@ -6,5 +6,5 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/math/nan.inc b/libclc/opencl/include/clc/opencl/math/nan.inc similarity index 100% rename from libclc/generic/include/clc/math/nan.inc rename to libclc/opencl/include/clc/opencl/math/nan.inc diff --git a/libclc/generic/include/clc/math/native_cos.h b/libclc/opencl/include/clc/opencl/math/native_cos.h similarity index 100% rename from libclc/generic/include/clc/math/native_cos.h rename to libclc/opencl/include/clc/opencl/math/native_cos.h diff --git a/libclc/generic/include/clc/math/native_divide.h b/libclc/opencl/include/clc/opencl/math/native_divide.h similarity index 100% rename from libclc/generic/include/clc/math/native_divide.h rename to libclc/opencl/include/clc/opencl/math/native_divide.h diff --git a/libclc/generic/include/clc/math/native_exp.h b/libclc/opencl/include/clc/opencl/math/native_exp.h similarity index 100% rename from libclc/generic/include/clc/math/native_exp.h rename to libclc/opencl/include/clc/opencl/math/native_exp.h diff --git a/libclc/generic/include/clc/math/native_exp10.h b/libclc/opencl/include/clc/opencl/math/native_exp10.h similarity index 100% rename from libclc/generic/include/clc/math/native_exp10.h rename to libclc/opencl/include/clc/opencl/math/native_exp10.h diff --git a/libclc/generic/include/clc/math/native_exp2.h b/libclc/opencl/include/clc/opencl/math/native_exp2.h similarity index 100% rename from libclc/generic/include/clc/math/native_exp2.h rename to libclc/opencl/include/clc/opencl/math/native_exp2.h diff --git a/libclc/generic/include/clc/math/native_log.h b/libclc/opencl/include/clc/opencl/math/native_log.h similarity index 100% rename from libclc/generic/include/clc/math/native_log.h rename to libclc/opencl/include/clc/opencl/math/native_log.h diff --git a/libclc/generic/include/clc/math/native_log10.h b/libclc/opencl/include/clc/opencl/math/native_log10.h similarity index 100% rename from libclc/generic/include/clc/math/native_log10.h rename to libclc/opencl/include/clc/opencl/math/native_log10.h diff --git a/libclc/generic/include/clc/math/native_log2.h b/libclc/opencl/include/clc/opencl/math/native_log2.h similarity index 100% rename from libclc/generic/include/clc/math/native_log2.h rename to libclc/opencl/include/clc/opencl/math/native_log2.h diff --git a/libclc/generic/include/clc/math/native_powr.h b/libclc/opencl/include/clc/opencl/math/native_powr.h similarity index 100% rename from libclc/generic/include/clc/math/native_powr.h rename to libclc/opencl/include/clc/opencl/math/native_powr.h diff --git a/libclc/generic/include/clc/math/native_recip.h b/libclc/opencl/include/clc/opencl/math/native_recip.h similarity index 100% rename from libclc/generic/include/clc/math/native_recip.h rename to libclc/opencl/include/clc/opencl/math/native_recip.h diff --git a/libclc/generic/include/clc/math/native_rsqrt.h b/libclc/opencl/include/clc/opencl/math/native_rsqrt.h similarity index 100% rename from libclc/generic/include/clc/math/native_rsqrt.h rename to libclc/opencl/include/clc/opencl/math/native_rsqrt.h diff --git a/libclc/generic/include/clc/math/native_sin.h b/libclc/opencl/include/clc/opencl/math/native_sin.h similarity index 100% rename from libclc/generic/include/clc/math/native_sin.h rename to libclc/opencl/include/clc/opencl/math/native_sin.h diff --git a/libclc/generic/include/clc/math/native_sqrt.h b/libclc/opencl/include/clc/opencl/math/native_sqrt.h similarity index 100% rename from libclc/generic/include/clc/math/native_sqrt.h rename to libclc/opencl/include/clc/opencl/math/native_sqrt.h diff --git a/libclc/generic/include/clc/math/native_tan.h b/libclc/opencl/include/clc/opencl/math/native_tan.h similarity index 100% rename from libclc/generic/include/clc/math/native_tan.h rename to libclc/opencl/include/clc/opencl/math/native_tan.h diff --git a/libclc/generic/include/clc/math/nextafter.h b/libclc/opencl/include/clc/opencl/math/nextafter.h similarity index 100% rename from libclc/generic/include/clc/math/nextafter.h rename to libclc/opencl/include/clc/opencl/math/nextafter.h diff --git a/libclc/generic/include/clc/math/pow.h b/libclc/opencl/include/clc/opencl/math/pow.h similarity index 100% rename from libclc/generic/include/clc/math/pow.h rename to libclc/opencl/include/clc/opencl/math/pow.h diff --git a/libclc/generic/include/clc/math/pown.h b/libclc/opencl/include/clc/opencl/math/pown.h similarity index 100% rename from libclc/generic/include/clc/math/pown.h rename to libclc/opencl/include/clc/opencl/math/pown.h diff --git a/libclc/generic/include/clc/math/powr.h b/libclc/opencl/include/clc/opencl/math/powr.h similarity index 100% rename from libclc/generic/include/clc/math/powr.h rename to libclc/opencl/include/clc/opencl/math/powr.h diff --git a/libclc/generic/include/clc/math/remainder.h b/libclc/opencl/include/clc/opencl/math/remainder.h similarity index 100% rename from libclc/generic/include/clc/math/remainder.h rename to libclc/opencl/include/clc/opencl/math/remainder.h diff --git a/libclc/generic/include/clc/math/remquo.h b/libclc/opencl/include/clc/opencl/math/remquo.h similarity index 100% rename from libclc/generic/include/clc/math/remquo.h rename to libclc/opencl/include/clc/opencl/math/remquo.h diff --git a/libclc/generic/include/clc/math/rint.h b/libclc/opencl/include/clc/opencl/math/rint.h similarity index 100% rename from libclc/generic/include/clc/math/rint.h rename to libclc/opencl/include/clc/opencl/math/rint.h diff --git a/libclc/generic/include/clc/math/rootn.h b/libclc/opencl/include/clc/opencl/math/rootn.h similarity index 100% rename from libclc/generic/include/clc/math/rootn.h rename to libclc/opencl/include/clc/opencl/math/rootn.h diff --git a/libclc/generic/include/clc/math/round.h b/libclc/opencl/include/clc/opencl/math/round.h similarity index 100% rename from libclc/generic/include/clc/math/round.h rename to libclc/opencl/include/clc/opencl/math/round.h diff --git a/libclc/generic/include/clc/math/rsqrt.h b/libclc/opencl/include/clc/opencl/math/rsqrt.h similarity index 100% rename from libclc/generic/include/clc/math/rsqrt.h rename to libclc/opencl/include/clc/opencl/math/rsqrt.h diff --git a/libclc/generic/include/clc/math/sin.h b/libclc/opencl/include/clc/opencl/math/sin.h similarity index 100% rename from libclc/generic/include/clc/math/sin.h rename to libclc/opencl/include/clc/opencl/math/sin.h diff --git a/libclc/generic/include/clc/math/sincos.h b/libclc/opencl/include/clc/opencl/math/sincos.h similarity index 100% rename from libclc/generic/include/clc/math/sincos.h rename to libclc/opencl/include/clc/opencl/math/sincos.h diff --git a/libclc/generic/include/clc/math/sinh.h b/libclc/opencl/include/clc/opencl/math/sinh.h similarity index 100% rename from libclc/generic/include/clc/math/sinh.h rename to libclc/opencl/include/clc/opencl/math/sinh.h diff --git a/libclc/generic/include/clc/math/sinpi.h b/libclc/opencl/include/clc/opencl/math/sinpi.h similarity index 100% rename from libclc/generic/include/clc/math/sinpi.h rename to libclc/opencl/include/clc/opencl/math/sinpi.h diff --git a/libclc/generic/include/clc/math/sqrt.h b/libclc/opencl/include/clc/opencl/math/sqrt.h similarity index 100% rename from libclc/generic/include/clc/math/sqrt.h rename to libclc/opencl/include/clc/opencl/math/sqrt.h diff --git a/libclc/generic/include/clc/math/tan.h b/libclc/opencl/include/clc/opencl/math/tan.h similarity index 100% rename from libclc/generic/include/clc/math/tan.h rename to libclc/opencl/include/clc/opencl/math/tan.h diff --git a/libclc/generic/include/clc/math/tanh.h b/libclc/opencl/include/clc/opencl/math/tanh.h similarity index 100% rename from libclc/generic/include/clc/math/tanh.h rename to libclc/opencl/include/clc/opencl/math/tanh.h diff --git a/libclc/generic/include/clc/math/tanpi.h b/libclc/opencl/include/clc/opencl/math/tanpi.h similarity index 100% rename from libclc/generic/include/clc/math/tanpi.h rename to libclc/opencl/include/clc/opencl/math/tanpi.h diff --git a/libclc/generic/include/clc/math/tgamma.h b/libclc/opencl/include/clc/opencl/math/tgamma.h similarity index 100% rename from libclc/generic/include/clc/math/tgamma.h rename to libclc/opencl/include/clc/opencl/math/tgamma.h diff --git a/libclc/generic/include/clc/math/trunc.h b/libclc/opencl/include/clc/opencl/math/trunc.h similarity index 100% rename from libclc/generic/include/clc/math/trunc.h rename to libclc/opencl/include/clc/opencl/math/trunc.h diff --git a/libclc/generic/include/clc/misc/shuffle.h b/libclc/opencl/include/clc/opencl/misc/shuffle.h similarity index 100% rename from libclc/generic/include/clc/misc/shuffle.h rename to libclc/opencl/include/clc/opencl/misc/shuffle.h diff --git a/libclc/generic/include/clc/misc/shuffle2.h b/libclc/opencl/include/clc/opencl/misc/shuffle2.h similarity index 52% rename from libclc/generic/include/clc/misc/shuffle2.h rename to libclc/opencl/include/clc/opencl/misc/shuffle2.h index 93845f89911b..fa33f6058d58 100644 --- a/libclc/generic/include/clc/misc/shuffle2.h +++ b/libclc/opencl/include/clc/opencl/misc/shuffle2.h @@ -6,24 +6,24 @@ // //===----------------------------------------------------------------------===// -#define _CLC_SHUFFLE2_DECL(TYPE, MASKTYPE, RETTYPE) \ +#define _CLC_SHUFFLE2_DECL(TYPE, MASKTYPE, RETTYPE) \ _CLC_OVERLOAD _CLC_DECL RETTYPE shuffle2(TYPE x, TYPE y, MASKTYPE mask); -//Return type is same base type as the input type, with the same vector size as the mask. -//Elements in the mask must be the same size (number of bits) as the input value. -//E.g. char8 ret = shuffle2(char2 x, char2 y, uchar8 mask); +// Return type is same base type as the input type, with the same vector size as +// the mask. Elements in the mask must be the same size (number of bits) as the +// input value. E.g. char8 ret = shuffle2(char2 x, char2 y, uchar8 mask); -#define _CLC_VECTOR_SHUFFLE2_MASKSIZE(INBASE, INTYPE, MASKTYPE) \ - _CLC_SHUFFLE2_DECL(INTYPE, MASKTYPE##2, INBASE##2) \ - _CLC_SHUFFLE2_DECL(INTYPE, MASKTYPE##4, INBASE##4) \ - _CLC_SHUFFLE2_DECL(INTYPE, MASKTYPE##8, INBASE##8) \ - _CLC_SHUFFLE2_DECL(INTYPE, MASKTYPE##16, INBASE##16) \ +#define _CLC_VECTOR_SHUFFLE2_MASKSIZE(INBASE, INTYPE, MASKTYPE) \ + _CLC_SHUFFLE2_DECL(INTYPE, MASKTYPE##2, INBASE##2) \ + _CLC_SHUFFLE2_DECL(INTYPE, MASKTYPE##4, INBASE##4) \ + _CLC_SHUFFLE2_DECL(INTYPE, MASKTYPE##8, INBASE##8) \ + _CLC_SHUFFLE2_DECL(INTYPE, MASKTYPE##16, INBASE##16) -#define _CLC_VECTOR_SHUFFLE2_INSIZE(TYPE, MASKTYPE) \ - _CLC_VECTOR_SHUFFLE2_MASKSIZE(TYPE, TYPE##2, MASKTYPE) \ - _CLC_VECTOR_SHUFFLE2_MASKSIZE(TYPE, TYPE##4, MASKTYPE) \ - _CLC_VECTOR_SHUFFLE2_MASKSIZE(TYPE, TYPE##8, MASKTYPE) \ - _CLC_VECTOR_SHUFFLE2_MASKSIZE(TYPE, TYPE##16, MASKTYPE) \ +#define _CLC_VECTOR_SHUFFLE2_INSIZE(TYPE, MASKTYPE) \ + _CLC_VECTOR_SHUFFLE2_MASKSIZE(TYPE, TYPE##2, MASKTYPE) \ + _CLC_VECTOR_SHUFFLE2_MASKSIZE(TYPE, TYPE##4, MASKTYPE) \ + _CLC_VECTOR_SHUFFLE2_MASKSIZE(TYPE, TYPE##8, MASKTYPE) \ + _CLC_VECTOR_SHUFFLE2_MASKSIZE(TYPE, TYPE##16, MASKTYPE) _CLC_VECTOR_SHUFFLE2_INSIZE(char, uchar) _CLC_VECTOR_SHUFFLE2_INSIZE(short, ushort) diff --git a/libclc/generic/include/clc/relational/all.h b/libclc/opencl/include/clc/opencl/relational/all.h similarity index 50% rename from libclc/generic/include/clc/relational/all.h rename to libclc/opencl/include/clc/opencl/relational/all.h index a52afe813f5a..31c8e895f666 100644 --- a/libclc/generic/include/clc/relational/all.h +++ b/libclc/opencl/include/clc/opencl/relational/all.h @@ -6,15 +6,14 @@ // //===----------------------------------------------------------------------===// -#define _CLC_ALL_DECL(TYPE) \ - _CLC_OVERLOAD _CLC_DECL int all(TYPE v); +#define _CLC_ALL_DECL(TYPE) _CLC_OVERLOAD _CLC_DECL int all(TYPE v); -#define _CLC_VECTOR_ALL_DECL(TYPE) \ - _CLC_ALL_DECL(TYPE) \ - _CLC_ALL_DECL(TYPE##2) \ - _CLC_ALL_DECL(TYPE##3) \ - _CLC_ALL_DECL(TYPE##4) \ - _CLC_ALL_DECL(TYPE##8) \ +#define _CLC_VECTOR_ALL_DECL(TYPE) \ + _CLC_ALL_DECL(TYPE) \ + _CLC_ALL_DECL(TYPE##2) \ + _CLC_ALL_DECL(TYPE##3) \ + _CLC_ALL_DECL(TYPE##4) \ + _CLC_ALL_DECL(TYPE##8) \ _CLC_ALL_DECL(TYPE##16) _CLC_VECTOR_ALL_DECL(char) diff --git a/libclc/generic/include/clc/relational/any.h b/libclc/opencl/include/clc/opencl/relational/any.h similarity index 50% rename from libclc/generic/include/clc/relational/any.h rename to libclc/opencl/include/clc/opencl/relational/any.h index 4839135de06f..9c227e8f1600 100644 --- a/libclc/generic/include/clc/relational/any.h +++ b/libclc/opencl/include/clc/opencl/relational/any.h @@ -6,15 +6,14 @@ // //===----------------------------------------------------------------------===// -#define _CLC_ANY_DECL(TYPE) \ - _CLC_OVERLOAD _CLC_DECL int any(TYPE v); +#define _CLC_ANY_DECL(TYPE) _CLC_OVERLOAD _CLC_DECL int any(TYPE v); -#define _CLC_VECTOR_ANY_DECL(TYPE) \ - _CLC_ANY_DECL(TYPE) \ - _CLC_ANY_DECL(TYPE##2) \ - _CLC_ANY_DECL(TYPE##3) \ - _CLC_ANY_DECL(TYPE##4) \ - _CLC_ANY_DECL(TYPE##8) \ +#define _CLC_VECTOR_ANY_DECL(TYPE) \ + _CLC_ANY_DECL(TYPE) \ + _CLC_ANY_DECL(TYPE##2) \ + _CLC_ANY_DECL(TYPE##3) \ + _CLC_ANY_DECL(TYPE##4) \ + _CLC_ANY_DECL(TYPE##8) \ _CLC_ANY_DECL(TYPE##16) _CLC_VECTOR_ANY_DECL(char) diff --git a/libclc/generic/include/clc/relational/bitselect.h b/libclc/opencl/include/clc/opencl/relational/bitselect.h similarity index 79% rename from libclc/generic/include/clc/relational/bitselect.h rename to libclc/opencl/include/clc/opencl/relational/bitselect.h index 25cb0c2fd924..7a39d5468e5f 100644 --- a/libclc/generic/include/clc/relational/bitselect.h +++ b/libclc/opencl/include/clc/opencl/relational/bitselect.h @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/relational/bitselect.inc b/libclc/opencl/include/clc/opencl/relational/bitselect.inc similarity index 76% rename from libclc/generic/include/clc/relational/bitselect.inc rename to libclc/opencl/include/clc/opencl/relational/bitselect.inc index d7708da2a9a4..d821bb86a140 100644 --- a/libclc/generic/include/clc/relational/bitselect.inc +++ b/libclc/opencl/include/clc/opencl/relational/bitselect.inc @@ -6,4 +6,6 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE bitselect(__CLC_GENTYPE x, __CLC_GENTYPE y, __CLC_GENTYPE z); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE bitselect(__CLC_GENTYPE x, + __CLC_GENTYPE y, + __CLC_GENTYPE z); diff --git a/libclc/generic/include/clc/relational/isequal.h b/libclc/opencl/include/clc/opencl/relational/isequal.h similarity index 61% rename from libclc/generic/include/clc/relational/isequal.h rename to libclc/opencl/include/clc/opencl/relational/isequal.h index 29e5cf9829fa..090b9928ede2 100644 --- a/libclc/generic/include/clc/relational/isequal.h +++ b/libclc/opencl/include/clc/opencl/relational/isequal.h @@ -6,14 +6,14 @@ // //===----------------------------------------------------------------------===// -#define _CLC_ISEQUAL_DECL(TYPE, RETTYPE) \ +#define _CLC_ISEQUAL_DECL(TYPE, RETTYPE) \ _CLC_OVERLOAD _CLC_DECL RETTYPE isequal(TYPE x, TYPE y); -#define _CLC_VECTOR_ISEQUAL_DECL(TYPE, RETTYPE) \ - _CLC_ISEQUAL_DECL(TYPE##2, RETTYPE##2) \ - _CLC_ISEQUAL_DECL(TYPE##3, RETTYPE##3) \ - _CLC_ISEQUAL_DECL(TYPE##4, RETTYPE##4) \ - _CLC_ISEQUAL_DECL(TYPE##8, RETTYPE##8) \ +#define _CLC_VECTOR_ISEQUAL_DECL(TYPE, RETTYPE) \ + _CLC_ISEQUAL_DECL(TYPE##2, RETTYPE##2) \ + _CLC_ISEQUAL_DECL(TYPE##3, RETTYPE##3) \ + _CLC_ISEQUAL_DECL(TYPE##4, RETTYPE##4) \ + _CLC_ISEQUAL_DECL(TYPE##8, RETTYPE##8) \ _CLC_ISEQUAL_DECL(TYPE##16, RETTYPE##16) _CLC_ISEQUAL_DECL(float, int) diff --git a/libclc/generic/include/clc/relational/isfinite.h b/libclc/opencl/include/clc/opencl/relational/isfinite.h similarity index 100% rename from libclc/generic/include/clc/relational/isfinite.h rename to libclc/opencl/include/clc/opencl/relational/isfinite.h diff --git a/libclc/generic/include/clc/relational/isgreater.h b/libclc/opencl/include/clc/opencl/relational/isgreater.h similarity index 100% rename from libclc/generic/include/clc/relational/isgreater.h rename to libclc/opencl/include/clc/opencl/relational/isgreater.h diff --git a/libclc/generic/include/clc/relational/isgreaterequal.h b/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h similarity index 100% rename from libclc/generic/include/clc/relational/isgreaterequal.h rename to libclc/opencl/include/clc/opencl/relational/isgreaterequal.h diff --git a/libclc/generic/include/clc/relational/isinf.h b/libclc/opencl/include/clc/opencl/relational/isinf.h similarity index 61% rename from libclc/generic/include/clc/relational/isinf.h rename to libclc/opencl/include/clc/opencl/relational/isinf.h index 4a026b4b0365..da38b01e364b 100644 --- a/libclc/generic/include/clc/relational/isinf.h +++ b/libclc/opencl/include/clc/opencl/relational/isinf.h @@ -6,14 +6,14 @@ // //===----------------------------------------------------------------------===// -#define _CLC_ISINF_DECL(RET_TYPE, ARG_TYPE) \ +#define _CLC_ISINF_DECL(RET_TYPE, ARG_TYPE) \ _CLC_OVERLOAD _CLC_DECL RET_TYPE isinf(ARG_TYPE); -#define _CLC_VECTOR_ISINF_DECL(RET_TYPE, ARG_TYPE) \ - _CLC_ISINF_DECL(RET_TYPE##2, ARG_TYPE##2) \ - _CLC_ISINF_DECL(RET_TYPE##3, ARG_TYPE##3) \ - _CLC_ISINF_DECL(RET_TYPE##4, ARG_TYPE##4) \ - _CLC_ISINF_DECL(RET_TYPE##8, ARG_TYPE##8) \ +#define _CLC_VECTOR_ISINF_DECL(RET_TYPE, ARG_TYPE) \ + _CLC_ISINF_DECL(RET_TYPE##2, ARG_TYPE##2) \ + _CLC_ISINF_DECL(RET_TYPE##3, ARG_TYPE##3) \ + _CLC_ISINF_DECL(RET_TYPE##4, ARG_TYPE##4) \ + _CLC_ISINF_DECL(RET_TYPE##8, ARG_TYPE##8) \ _CLC_ISINF_DECL(RET_TYPE##16, ARG_TYPE##16) _CLC_ISINF_DECL(int, float) diff --git a/libclc/generic/include/clc/relational/isless.h b/libclc/opencl/include/clc/opencl/relational/isless.h similarity index 100% rename from libclc/generic/include/clc/relational/isless.h rename to libclc/opencl/include/clc/opencl/relational/isless.h diff --git a/libclc/generic/include/clc/relational/islessequal.h b/libclc/opencl/include/clc/opencl/relational/islessequal.h similarity index 100% rename from libclc/generic/include/clc/relational/islessequal.h rename to libclc/opencl/include/clc/opencl/relational/islessequal.h diff --git a/libclc/generic/include/clc/relational/islessgreater.h b/libclc/opencl/include/clc/opencl/relational/islessgreater.h similarity index 100% rename from libclc/generic/include/clc/relational/islessgreater.h rename to libclc/opencl/include/clc/opencl/relational/islessgreater.h diff --git a/libclc/generic/include/clc/relational/isnan.h b/libclc/opencl/include/clc/opencl/relational/isnan.h similarity index 61% rename from libclc/generic/include/clc/relational/isnan.h rename to libclc/opencl/include/clc/opencl/relational/isnan.h index e8033d60f3c1..e712d6a5d93a 100644 --- a/libclc/generic/include/clc/relational/isnan.h +++ b/libclc/opencl/include/clc/opencl/relational/isnan.h @@ -6,14 +6,14 @@ // //===----------------------------------------------------------------------===// -#define _CLC_ISNAN_DECL(RET_TYPE, ARG_TYPE) \ +#define _CLC_ISNAN_DECL(RET_TYPE, ARG_TYPE) \ _CLC_OVERLOAD _CLC_DECL RET_TYPE isnan(ARG_TYPE); -#define _CLC_VECTOR_ISNAN_DECL(RET_TYPE, ARG_TYPE) \ - _CLC_ISNAN_DECL(RET_TYPE##2, ARG_TYPE##2) \ - _CLC_ISNAN_DECL(RET_TYPE##3, ARG_TYPE##3) \ - _CLC_ISNAN_DECL(RET_TYPE##4, ARG_TYPE##4) \ - _CLC_ISNAN_DECL(RET_TYPE##8, ARG_TYPE##8) \ +#define _CLC_VECTOR_ISNAN_DECL(RET_TYPE, ARG_TYPE) \ + _CLC_ISNAN_DECL(RET_TYPE##2, ARG_TYPE##2) \ + _CLC_ISNAN_DECL(RET_TYPE##3, ARG_TYPE##3) \ + _CLC_ISNAN_DECL(RET_TYPE##4, ARG_TYPE##4) \ + _CLC_ISNAN_DECL(RET_TYPE##8, ARG_TYPE##8) \ _CLC_ISNAN_DECL(RET_TYPE##16, ARG_TYPE##16) _CLC_ISNAN_DECL(int, float) diff --git a/libclc/generic/include/clc/relational/isnormal.h b/libclc/opencl/include/clc/opencl/relational/isnormal.h similarity index 100% rename from libclc/generic/include/clc/relational/isnormal.h rename to libclc/opencl/include/clc/opencl/relational/isnormal.h diff --git a/libclc/generic/include/clc/relational/isnotequal.h b/libclc/opencl/include/clc/opencl/relational/isnotequal.h similarity index 100% rename from libclc/generic/include/clc/relational/isnotequal.h rename to libclc/opencl/include/clc/opencl/relational/isnotequal.h diff --git a/libclc/generic/include/clc/relational/isordered.h b/libclc/opencl/include/clc/opencl/relational/isordered.h similarity index 100% rename from libclc/generic/include/clc/relational/isordered.h rename to libclc/opencl/include/clc/opencl/relational/isordered.h diff --git a/libclc/generic/include/clc/relational/isunordered.h b/libclc/opencl/include/clc/opencl/relational/isunordered.h similarity index 100% rename from libclc/generic/include/clc/relational/isunordered.h rename to libclc/opencl/include/clc/opencl/relational/isunordered.h diff --git a/libclc/generic/include/clc/relational/select.h b/libclc/opencl/include/clc/opencl/relational/select.h similarity index 100% rename from libclc/generic/include/clc/relational/select.h rename to libclc/opencl/include/clc/opencl/relational/select.h diff --git a/libclc/generic/include/clc/relational/signbit.h b/libclc/opencl/include/clc/opencl/relational/signbit.h similarity index 100% rename from libclc/generic/include/clc/relational/signbit.h rename to libclc/opencl/include/clc/opencl/relational/signbit.h diff --git a/libclc/generic/include/clc/shared/clamp.h b/libclc/opencl/include/clc/opencl/shared/clamp.h similarity index 81% rename from libclc/generic/include/clc/shared/clamp.h rename to libclc/opencl/include/clc/opencl/shared/clamp.h index 06d2282cebc6..4fe7897f5601 100644 --- a/libclc/generic/include/clc/shared/clamp.h +++ b/libclc/opencl/include/clc/opencl/shared/clamp.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/shared/clamp.inc b/libclc/opencl/include/clc/opencl/shared/clamp.inc similarity index 62% rename from libclc/generic/include/clc/shared/clamp.inc rename to libclc/opencl/include/clc/opencl/shared/clamp.inc index fdf7ac742b42..75dec9c258e8 100644 --- a/libclc/generic/include/clc/shared/clamp.inc +++ b/libclc/opencl/include/clc/opencl/shared/clamp.inc @@ -6,8 +6,11 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE clamp(__CLC_GENTYPE x, __CLC_GENTYPE y, __CLC_GENTYPE z); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE clamp(__CLC_GENTYPE x, __CLC_GENTYPE y, + __CLC_GENTYPE z); #ifndef __CLC_SCALAR -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE clamp(__CLC_GENTYPE x, __CLC_SCALAR_GENTYPE y, __CLC_SCALAR_GENTYPE z); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE clamp(__CLC_GENTYPE x, + __CLC_SCALAR_GENTYPE y, + __CLC_SCALAR_GENTYPE z); #endif diff --git a/libclc/generic/include/clc/shared/max.h b/libclc/opencl/include/clc/opencl/shared/max.h similarity index 82% rename from libclc/generic/include/clc/shared/max.h rename to libclc/opencl/include/clc/opencl/shared/max.h index 0b56e56f4aee..5ff01ba8082a 100644 --- a/libclc/generic/include/clc/shared/max.h +++ b/libclc/opencl/include/clc/opencl/shared/max.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/shared/max.inc b/libclc/opencl/include/clc/opencl/shared/max.inc similarity index 79% rename from libclc/generic/include/clc/shared/max.inc rename to libclc/opencl/include/clc/opencl/shared/max.inc index 19f3e2d174e3..98610dfdb101 100644 --- a/libclc/generic/include/clc/shared/max.inc +++ b/libclc/opencl/include/clc/opencl/shared/max.inc @@ -9,5 +9,6 @@ _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE max(__CLC_GENTYPE a, __CLC_GENTYPE b); #ifndef __CLC_SCALAR -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE max(__CLC_GENTYPE a, __CLC_SCALAR_GENTYPE b); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE max(__CLC_GENTYPE a, + __CLC_SCALAR_GENTYPE b); #endif diff --git a/libclc/generic/include/clc/shared/min.h b/libclc/opencl/include/clc/opencl/shared/min.h similarity index 82% rename from libclc/generic/include/clc/shared/min.h rename to libclc/opencl/include/clc/opencl/shared/min.h index 090fae265188..573f837685be 100644 --- a/libclc/generic/include/clc/shared/min.h +++ b/libclc/opencl/include/clc/opencl/shared/min.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#define __CLC_BODY +#define __CLC_BODY #include -#define __CLC_BODY +#define __CLC_BODY #include diff --git a/libclc/generic/include/clc/shared/min.inc b/libclc/opencl/include/clc/opencl/shared/min.inc similarity index 79% rename from libclc/generic/include/clc/shared/min.inc rename to libclc/opencl/include/clc/opencl/shared/min.inc index e4e46c436b36..3140b637f395 100644 --- a/libclc/generic/include/clc/shared/min.inc +++ b/libclc/opencl/include/clc/opencl/shared/min.inc @@ -9,5 +9,6 @@ _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE min(__CLC_GENTYPE a, __CLC_GENTYPE b); #ifndef __CLC_SCALAR -_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE min(__CLC_GENTYPE a, __CLC_SCALAR_GENTYPE b); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE min(__CLC_GENTYPE a, + __CLC_SCALAR_GENTYPE b); #endif diff --git a/libclc/generic/include/clc/shared/vload.h b/libclc/opencl/include/clc/opencl/shared/vload.h similarity index 100% rename from libclc/generic/include/clc/shared/vload.h rename to libclc/opencl/include/clc/opencl/shared/vload.h diff --git a/libclc/generic/include/clc/shared/vstore.h b/libclc/opencl/include/clc/opencl/shared/vstore.h similarity index 100% rename from libclc/generic/include/clc/shared/vstore.h rename to libclc/opencl/include/clc/opencl/shared/vstore.h diff --git a/libclc/generic/include/clc/synchronization/barrier.h b/libclc/opencl/include/clc/opencl/synchronization/barrier.h similarity index 100% rename from libclc/generic/include/clc/synchronization/barrier.h rename to libclc/opencl/include/clc/opencl/synchronization/barrier.h diff --git a/libclc/generic/include/clc/synchronization/cl_mem_fence_flags.h b/libclc/opencl/include/clc/opencl/synchronization/cl_mem_fence_flags.h similarity index 100% rename from libclc/generic/include/clc/synchronization/cl_mem_fence_flags.h rename to libclc/opencl/include/clc/opencl/synchronization/cl_mem_fence_flags.h diff --git a/libclc/generic/include/clc/workitem/get_global_id.h b/libclc/opencl/include/clc/opencl/workitem/get_global_id.h similarity index 100% rename from libclc/generic/include/clc/workitem/get_global_id.h rename to libclc/opencl/include/clc/opencl/workitem/get_global_id.h diff --git a/libclc/generic/include/clc/workitem/get_global_offset.h b/libclc/opencl/include/clc/opencl/workitem/get_global_offset.h similarity index 100% rename from libclc/generic/include/clc/workitem/get_global_offset.h rename to libclc/opencl/include/clc/opencl/workitem/get_global_offset.h diff --git a/libclc/generic/include/clc/workitem/get_global_size.h b/libclc/opencl/include/clc/opencl/workitem/get_global_size.h similarity index 100% rename from libclc/generic/include/clc/workitem/get_global_size.h rename to libclc/opencl/include/clc/opencl/workitem/get_global_size.h diff --git a/libclc/generic/include/clc/workitem/get_group_id.h b/libclc/opencl/include/clc/opencl/workitem/get_group_id.h similarity index 100% rename from libclc/generic/include/clc/workitem/get_group_id.h rename to libclc/opencl/include/clc/opencl/workitem/get_group_id.h diff --git a/libclc/generic/include/clc/workitem/get_local_id.h b/libclc/opencl/include/clc/opencl/workitem/get_local_id.h similarity index 100% rename from libclc/generic/include/clc/workitem/get_local_id.h rename to libclc/opencl/include/clc/opencl/workitem/get_local_id.h diff --git a/libclc/generic/include/clc/workitem/get_local_size.h b/libclc/opencl/include/clc/opencl/workitem/get_local_size.h similarity index 100% rename from libclc/generic/include/clc/workitem/get_local_size.h rename to libclc/opencl/include/clc/opencl/workitem/get_local_size.h diff --git a/libclc/generic/include/clc/workitem/get_num_groups.h b/libclc/opencl/include/clc/opencl/workitem/get_num_groups.h similarity index 100% rename from libclc/generic/include/clc/workitem/get_num_groups.h rename to libclc/opencl/include/clc/opencl/workitem/get_num_groups.h diff --git a/libclc/generic/include/clc/workitem/get_work_dim.h b/libclc/opencl/include/clc/opencl/workitem/get_work_dim.h similarity index 100% rename from libclc/generic/include/clc/workitem/get_work_dim.h rename to libclc/opencl/include/clc/opencl/workitem/get_work_dim.h diff --git a/libclc/amdgcn-amdhsa/lib/SOURCES b/libclc/opencl/lib/amdgcn-amdhsa/SOURCES similarity index 100% rename from libclc/amdgcn-amdhsa/lib/SOURCES rename to libclc/opencl/lib/amdgcn-amdhsa/SOURCES diff --git a/libclc/amdgcn-amdhsa/lib/workitem/get_global_size.cl b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl similarity index 88% rename from libclc/amdgcn-amdhsa/lib/workitem/get_global_size.cl rename to libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl index 6d48a4011711..2d7fea91233a 100644 --- a/libclc/amdgcn-amdhsa/lib/workitem/get_global_size.cl +++ b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #if __clang_major__ >= 8 #define CONST_AS __constant @@ -20,7 +20,8 @@ #define __dispatch_ptr __builtin_amdgcn_dispatch_ptr #else #define __dispatch_ptr __clc_amdgcn_dispatch_ptr -CONST_AS uchar * __clc_amdgcn_dispatch_ptr(void) __asm("llvm.amdgcn.dispatch.ptr"); +CONST_AS uchar * +__clc_amdgcn_dispatch_ptr(void) __asm("llvm.amdgcn.dispatch.ptr"); #endif _CLC_DEF _CLC_OVERLOAD size_t get_global_size(uint dim) { diff --git a/libclc/amdgcn-amdhsa/lib/workitem/get_local_size.cl b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl similarity index 89% rename from libclc/amdgcn-amdhsa/lib/workitem/get_local_size.cl rename to libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl index 5ef8e1fd4435..84552e2e08fd 100644 --- a/libclc/amdgcn-amdhsa/lib/workitem/get_local_size.cl +++ b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #if __clang_major__ >= 8 #define CONST_AS __constant @@ -20,7 +20,8 @@ #define __dispatch_ptr __builtin_amdgcn_dispatch_ptr #else #define __dispatch_ptr __clc_amdgcn_dispatch_ptr -CONST_AS char * __clc_amdgcn_dispatch_ptr(void) __asm("llvm.amdgcn.dispatch.ptr"); +CONST_AS char * +__clc_amdgcn_dispatch_ptr(void) __asm("llvm.amdgcn.dispatch.ptr"); #endif _CLC_DEF _CLC_OVERLOAD size_t get_local_size(uint dim) { diff --git a/libclc/amdgcn-amdhsa/lib/workitem/get_num_groups.cl b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_num_groups.cl similarity index 95% rename from libclc/amdgcn-amdhsa/lib/workitem/get_num_groups.cl rename to libclc/opencl/lib/amdgcn-amdhsa/workitem/get_num_groups.cl index 2ef5197cd1fd..1ed16736376f 100644 --- a/libclc/amdgcn-amdhsa/lib/workitem/get_num_groups.cl +++ b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_num_groups.cl @@ -6,8 +6,7 @@ // //===----------------------------------------------------------------------===// - -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_num_groups(uint dim) { size_t global_size = get_global_size(dim); diff --git a/libclc/amdgcn/lib/SOURCES b/libclc/opencl/lib/amdgcn/SOURCES similarity index 100% rename from libclc/amdgcn/lib/SOURCES rename to libclc/opencl/lib/amdgcn/SOURCES diff --git a/libclc/amdgcn/lib/cl_khr_int64_extended_atomics/minmax_helpers.ll b/libclc/opencl/lib/amdgcn/cl_khr_int64_extended_atomics/minmax_helpers.ll similarity index 100% rename from libclc/amdgcn/lib/cl_khr_int64_extended_atomics/minmax_helpers.ll rename to libclc/opencl/lib/amdgcn/cl_khr_int64_extended_atomics/minmax_helpers.ll diff --git a/libclc/amdgcn/lib/mem_fence/fence.cl b/libclc/opencl/lib/amdgcn/mem_fence/fence.cl similarity index 86% rename from libclc/amdgcn/lib/mem_fence/fence.cl rename to libclc/opencl/lib/amdgcn/mem_fence/fence.cl index 8d3492ed9122..5c5029a63cfc 100644 --- a/libclc/amdgcn/lib/mem_fence/fence.cl +++ b/libclc/opencl/lib/amdgcn/mem_fence/fence.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include void __clc_amdgcn_s_waitcnt(unsigned flags); @@ -19,10 +19,10 @@ void __clc_amdgcn_s_waitcnt(unsigned flags); // Newer clang supports __builtin_amdgcn_s_waitcnt #if __clang_major__ >= 5 -# define __waitcnt(x) __builtin_amdgcn_s_waitcnt(x) +#define __waitcnt(x) __builtin_amdgcn_s_waitcnt(x) #else -# define __waitcnt(x) __clc_amdgcn_s_waitcnt(x) -_CLC_DEF void __clc_amdgcn_s_waitcnt(unsigned) __asm("llvm.amdgcn.s.waitcnt"); +#define __waitcnt(x) __clc_amdgcn_s_waitcnt(x) +_CLC_DEF void __clc_amdgcn_s_waitcnt(unsigned) __asm("llvm.amdgcn.s.waitcnt"); #endif _CLC_DEF _CLC_OVERLOAD void mem_fence(cl_mem_fence_flags flags) { diff --git a/libclc/amdgcn/lib/synchronization/barrier.cl b/libclc/opencl/lib/amdgcn/synchronization/barrier.cl similarity index 94% rename from libclc/amdgcn/lib/synchronization/barrier.cl rename to libclc/opencl/lib/amdgcn/synchronization/barrier.cl index 248b9c1462b0..f7c41aafa83c 100644 --- a/libclc/amdgcn/lib/synchronization/barrier.cl +++ b/libclc/opencl/lib/amdgcn/synchronization/barrier.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD void barrier(cl_mem_fence_flags flags) { mem_fence(flags); diff --git a/libclc/amdgcn/lib/workitem/get_global_offset.cl b/libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl similarity index 96% rename from libclc/amdgcn/lib/workitem/get_global_offset.cl rename to libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl index 240dd806734d..a1b3ce419279 100644 --- a/libclc/amdgcn/lib/workitem/get_global_offset.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #if __clang_major__ >= 8 #define CONST_AS __constant diff --git a/libclc/amdgcn/lib/workitem/get_global_size.cl b/libclc/opencl/lib/amdgcn/workitem/get_global_size.cl similarity index 95% rename from libclc/amdgcn/lib/workitem/get_global_size.cl rename to libclc/opencl/lib/amdgcn/workitem/get_global_size.cl index 9626d5f3e80e..8f1507765f93 100644 --- a/libclc/amdgcn/lib/workitem/get_global_size.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_global_size.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_global_size(uint dim) { switch (dim) { diff --git a/libclc/amdgcn/lib/workitem/get_group_id.cl b/libclc/opencl/lib/amdgcn/workitem/get_group_id.cl similarity index 95% rename from libclc/amdgcn/lib/workitem/get_group_id.cl rename to libclc/opencl/lib/amdgcn/workitem/get_group_id.cl index d4ad33df9519..446cc63ab759 100644 --- a/libclc/amdgcn/lib/workitem/get_group_id.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_group_id.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_group_id(uint dim) { switch (dim) { diff --git a/libclc/amdgcn/lib/workitem/get_local_id.cl b/libclc/opencl/lib/amdgcn/workitem/get_local_id.cl similarity index 95% rename from libclc/amdgcn/lib/workitem/get_local_id.cl rename to libclc/opencl/lib/amdgcn/workitem/get_local_id.cl index 01709e0cf84c..cd07d8645cd5 100644 --- a/libclc/amdgcn/lib/workitem/get_local_id.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_local_id.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_local_id(uint dim) { switch (dim) { diff --git a/libclc/amdgcn/lib/workitem/get_local_size.cl b/libclc/opencl/lib/amdgcn/workitem/get_local_size.cl similarity index 96% rename from libclc/amdgcn/lib/workitem/get_local_size.cl rename to libclc/opencl/lib/amdgcn/workitem/get_local_size.cl index 9cb0dc7316a2..cec2d358df8a 100644 --- a/libclc/amdgcn/lib/workitem/get_local_size.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_local_size.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include uint __clc_amdgcn_get_local_size_x(void) __asm("llvm.r600.read.local.size.x"); uint __clc_amdgcn_get_local_size_y(void) __asm("llvm.r600.read.local.size.y"); diff --git a/libclc/amdgcn/lib/workitem/get_num_groups.cl b/libclc/opencl/lib/amdgcn/workitem/get_num_groups.cl similarity index 96% rename from libclc/amdgcn/lib/workitem/get_num_groups.cl rename to libclc/opencl/lib/amdgcn/workitem/get_num_groups.cl index 90bcc328aa00..0d8f0b873658 100644 --- a/libclc/amdgcn/lib/workitem/get_num_groups.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_num_groups.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include uint __clc_amdgcn_get_num_groups_x(void) __asm("llvm.r600.read.ngroups.x"); uint __clc_amdgcn_get_num_groups_y(void) __asm("llvm.r600.read.ngroups.y"); diff --git a/libclc/amdgcn/lib/workitem/get_work_dim.cl b/libclc/opencl/lib/amdgcn/workitem/get_work_dim.cl similarity index 96% rename from libclc/amdgcn/lib/workitem/get_work_dim.cl rename to libclc/opencl/lib/amdgcn/workitem/get_work_dim.cl index 2f6e3d320950..8ca8b0b61ce5 100644 --- a/libclc/amdgcn/lib/workitem/get_work_dim.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_work_dim.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #if __clang_major__ >= 8 #define CONST_AS __constant diff --git a/libclc/opencl/lib/clspv/SOURCES b/libclc/opencl/lib/clspv/SOURCES new file mode 100644 index 000000000000..0a142ed3e604 --- /dev/null +++ b/libclc/opencl/lib/clspv/SOURCES @@ -0,0 +1,73 @@ +math/fma.cl +shared/vstore_half.cl +subnormal_config.cl +../generic/geometric/distance.cl +../generic/geometric/length.cl +../generic/math/acos.cl +../generic/math/acosh.cl +../generic/math/asinh.cl +../generic/math/acospi.cl +../generic/math/asin.cl +../generic/math/atan.cl +../generic/math/asinh.cl +../generic/math/asinpi.cl +../generic/math/atan2.cl +../generic/math/atan2pi.cl +../generic/math/atanh.cl +../generic/math/atanpi.cl +../generic/math/cbrt.cl +../generic/math/cos.cl +../generic/math/cosh.cl +../generic/math/cospi.cl +../generic/math/erf.cl +../generic/math/erfc.cl +../generic/math/exp.cl +../generic/math/exp10.cl +../generic/math/exp2.cl +../generic/math/expm1.cl +../generic/math/fdim.cl +../generic/math/fmod.cl +../generic/math/fract.cl +../generic/math/frexp.cl +../generic/math/half_cos.cl +../generic/math/half_divide.cl +../generic/math/half_exp.cl +../generic/math/half_exp10.cl +../generic/math/half_exp2.cl +../generic/math/half_log.cl +../generic/math/half_log10.cl +../generic/math/half_log2.cl +../generic/math/half_powr.cl +../generic/math/half_recip.cl +../generic/math/half_sin.cl +../generic/math/half_sqrt.cl +../generic/math/half_tan.cl +../generic/math/hypot.cl +../generic/math/ilogb.cl +../generic/math/ldexp.cl +../generic/math/lgamma.cl +../generic/math/lgamma_r.cl +../generic/math/log.cl +../generic/math/log10.cl +../generic/math/log1p.cl +../generic/math/log2.cl +../generic/math/logb.cl +../generic/math/maxmag.cl +../generic/math/minmag.cl +../generic/math/modf.cl +../generic/math/nan.cl +../generic/math/nextafter.cl +../generic/math/pow.cl +../generic/math/pown.cl +../generic/math/powr.cl +../generic/math/remainder.cl +../generic/math/remquo.cl +../generic/math/rootn.cl +../generic/math/sin.cl +../generic/math/sincos.cl +../generic/math/sinh.cl +../generic/math/sinpi.cl +../generic/math/tan.cl +../generic/math/tanh.cl +../generic/math/tanpi.cl +../generic/math/tgamma.cl diff --git a/libclc/spirv/lib/math/fma.cl b/libclc/opencl/lib/clspv/math/fma.cl similarity index 94% rename from libclc/spirv/lib/math/fma.cl rename to libclc/opencl/lib/clspv/math/fma.cl index 0f3e4222dc55..272201812122 100644 --- a/libclc/spirv/lib/math/fma.cl +++ b/libclc/opencl/lib/clspv/math/fma.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include _CLC_DEFINE_TERNARY_BUILTIN(float, fma, __clc_sw_fma, float, float, float) diff --git a/libclc/clspv/lib/shared/vstore_half.cl b/libclc/opencl/lib/clspv/shared/vstore_half.cl similarity index 99% rename from libclc/clspv/lib/shared/vstore_half.cl rename to libclc/opencl/lib/clspv/shared/vstore_half.cl index ee74e5d028fa..1694ebeebe68 100644 --- a/libclc/clspv/lib/shared/vstore_half.cl +++ b/libclc/opencl/lib/clspv/shared/vstore_half.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable diff --git a/libclc/clspv/lib/shared/vstore_half.inc b/libclc/opencl/lib/clspv/shared/vstore_half.inc similarity index 100% rename from libclc/clspv/lib/shared/vstore_half.inc rename to libclc/opencl/lib/clspv/shared/vstore_half.inc diff --git a/libclc/spirv/lib/subnormal_config.cl b/libclc/opencl/lib/clspv/subnormal_config.cl similarity index 95% rename from libclc/spirv/lib/subnormal_config.cl rename to libclc/opencl/lib/clspv/subnormal_config.cl index ef0e1d774244..77d60ab9cbbd 100644 --- a/libclc/spirv/lib/subnormal_config.cl +++ b/libclc/opencl/lib/clspv/subnormal_config.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include _CLC_DEF bool __clc_fp16_subnormals_supported() { return false; } diff --git a/libclc/generic/lib/SOURCES b/libclc/opencl/lib/generic/SOURCES similarity index 100% rename from libclc/generic/lib/SOURCES rename to libclc/opencl/lib/generic/SOURCES diff --git a/libclc/generic/lib/async/async_work_group_copy.cl b/libclc/opencl/lib/generic/async/async_work_group_copy.cl similarity index 95% rename from libclc/generic/lib/async/async_work_group_copy.cl rename to libclc/opencl/lib/generic/async/async_work_group_copy.cl index 3ade4e9db958..a0b9d7d1f52e 100644 --- a/libclc/generic/lib/async/async_work_group_copy.cl +++ b/libclc/opencl/lib/generic/async/async_work_group_copy.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #define __CLC_BODY #include diff --git a/libclc/generic/lib/async/async_work_group_copy.inc b/libclc/opencl/lib/generic/async/async_work_group_copy.inc similarity index 60% rename from libclc/generic/lib/async/async_work_group_copy.inc rename to libclc/opencl/lib/generic/async/async_work_group_copy.inc index d21cc8e238bf..f238ae668442 100644 --- a/libclc/generic/lib/async/async_work_group_copy.inc +++ b/libclc/opencl/lib/generic/async/async_work_group_copy.inc @@ -6,20 +6,16 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DEF event_t async_work_group_copy( - local __CLC_GENTYPE *dst, - const global __CLC_GENTYPE *src, - size_t num_gentypes, - event_t event) { +_CLC_OVERLOAD _CLC_DEF event_t +async_work_group_copy(local __CLC_GENTYPE *dst, const global __CLC_GENTYPE *src, + size_t num_gentypes, event_t event) { return async_work_group_strided_copy(dst, src, num_gentypes, 1, event); } -_CLC_OVERLOAD _CLC_DEF event_t async_work_group_copy( - global __CLC_GENTYPE *dst, - const local __CLC_GENTYPE *src, - size_t num_gentypes, - event_t event) { +_CLC_OVERLOAD _CLC_DEF event_t +async_work_group_copy(global __CLC_GENTYPE *dst, const local __CLC_GENTYPE *src, + size_t num_gentypes, event_t event) { return async_work_group_strided_copy(dst, src, num_gentypes, 1, event); } diff --git a/libclc/generic/lib/async/async_work_group_strided_copy.cl b/libclc/opencl/lib/generic/async/async_work_group_strided_copy.cl similarity index 95% rename from libclc/generic/lib/async/async_work_group_strided_copy.cl rename to libclc/opencl/lib/generic/async/async_work_group_strided_copy.cl index 899ed0a4e3aa..ac4d1da3bc21 100644 --- a/libclc/generic/lib/async/async_work_group_strided_copy.cl +++ b/libclc/opencl/lib/generic/async/async_work_group_strided_copy.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #define __CLC_BODY #include diff --git a/libclc/generic/lib/async/async_work_group_strided_copy.inc b/libclc/opencl/lib/generic/async/async_work_group_strided_copy.inc similarity index 67% rename from libclc/generic/lib/async/async_work_group_strided_copy.inc rename to libclc/opencl/lib/generic/async/async_work_group_strided_copy.inc index 218e7355ebb0..3a3f36a7d042 100644 --- a/libclc/generic/lib/async/async_work_group_strided_copy.inc +++ b/libclc/opencl/lib/generic/async/async_work_group_strided_copy.inc @@ -6,35 +6,27 @@ // //===----------------------------------------------------------------------===// -#define STRIDED_COPY(dst, src, num_gentypes, dst_stride, src_stride) \ - size_t size = get_local_size(0) * get_local_size(1) * get_local_size(2); \ - size_t id = (get_local_size(1) * get_local_size(2) * get_local_id(0)) + \ - (get_local_size(2) * get_local_id(1)) + \ - get_local_id(2); \ - size_t i; \ - \ - for (i = id; i < num_gentypes; i += size) { \ - dst[i * dst_stride] = src[i * src_stride]; \ +#define STRIDED_COPY(dst, src, num_gentypes, dst_stride, src_stride) \ + size_t size = get_local_size(0) * get_local_size(1) * get_local_size(2); \ + size_t id = (get_local_size(1) * get_local_size(2) * get_local_id(0)) + \ + (get_local_size(2) * get_local_id(1)) + get_local_id(2); \ + size_t i; \ + \ + for (i = id; i < num_gentypes; i += size) { \ + dst[i * dst_stride] = src[i * src_stride]; \ } - _CLC_OVERLOAD _CLC_DEF event_t async_work_group_strided_copy( - local __CLC_GENTYPE *dst, - const global __CLC_GENTYPE *src, - size_t num_gentypes, - size_t src_stride, - event_t event) { + local __CLC_GENTYPE *dst, const global __CLC_GENTYPE *src, + size_t num_gentypes, size_t src_stride, event_t event) { STRIDED_COPY(dst, src, num_gentypes, 1, src_stride); return event; } _CLC_OVERLOAD _CLC_DEF event_t async_work_group_strided_copy( - global __CLC_GENTYPE *dst, - const local __CLC_GENTYPE *src, - size_t num_gentypes, - size_t dst_stride, - event_t event) { + global __CLC_GENTYPE *dst, const local __CLC_GENTYPE *src, + size_t num_gentypes, size_t dst_stride, event_t event) { STRIDED_COPY(dst, src, num_gentypes, dst_stride, 1); return event; diff --git a/libclc/generic/lib/async/prefetch.cl b/libclc/opencl/lib/generic/async/prefetch.cl similarity index 94% rename from libclc/generic/lib/async/prefetch.cl rename to libclc/opencl/lib/generic/async/prefetch.cl index 8c819d8210d9..7903550e89e4 100644 --- a/libclc/generic/lib/async/prefetch.cl +++ b/libclc/opencl/lib/generic/async/prefetch.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #define __CLC_BODY #include diff --git a/libclc/generic/lib/async/prefetch.inc b/libclc/opencl/lib/generic/async/prefetch.inc similarity index 86% rename from libclc/generic/lib/async/prefetch.inc rename to libclc/opencl/lib/generic/async/prefetch.inc index a9bca307c3d0..b952c532dc28 100644 --- a/libclc/generic/lib/async/prefetch.inc +++ b/libclc/opencl/lib/generic/async/prefetch.inc @@ -6,4 +6,5 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DEF void prefetch(const global __CLC_GENTYPE *p, size_t num_gentypes) { } +_CLC_OVERLOAD _CLC_DEF void prefetch(const global __CLC_GENTYPE *p, + size_t num_gentypes) {} diff --git a/libclc/generic/lib/async/wait_group_events.cl b/libclc/opencl/lib/generic/async/wait_group_events.cl similarity index 95% rename from libclc/generic/lib/async/wait_group_events.cl rename to libclc/opencl/lib/generic/async/wait_group_events.cl index 09c989cdb5ee..e353e48cfe09 100644 --- a/libclc/generic/lib/async/wait_group_events.cl +++ b/libclc/opencl/lib/generic/async/wait_group_events.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD void wait_group_events(int num_events, event_t *event_list) { diff --git a/libclc/generic/lib/atomic/atom_add.cl b/libclc/opencl/lib/generic/atomic/atom_add.cl similarity index 96% rename from libclc/generic/lib/atomic/atom_add.cl rename to libclc/opencl/lib/generic/atomic/atom_add.cl index 282b24dcbd1c..9f60881c2717 100644 --- a/libclc/generic/lib/atomic/atom_add.cl +++ b/libclc/opencl/lib/generic/atomic/atom_add.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #ifdef cl_khr_global_int32_base_atomics #define __CLC_ATOMIC_OP add diff --git a/libclc/generic/lib/atomic/atom_and.cl b/libclc/opencl/lib/generic/atomic/atom_and.cl similarity index 96% rename from libclc/generic/lib/atomic/atom_and.cl rename to libclc/opencl/lib/generic/atomic/atom_and.cl index 2c95d2a7780c..2653296d29e4 100644 --- a/libclc/generic/lib/atomic/atom_and.cl +++ b/libclc/opencl/lib/generic/atomic/atom_and.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #ifdef cl_khr_global_int32_extended_atomics #define __CLC_ATOMIC_OP and diff --git a/libclc/generic/lib/atomic/atom_cmpxchg.cl b/libclc/opencl/lib/generic/atomic/atom_cmpxchg.cl similarity index 94% rename from libclc/generic/lib/atomic/atom_cmpxchg.cl rename to libclc/opencl/lib/generic/atomic/atom_cmpxchg.cl index e29707af84cb..f129be9809e5 100644 --- a/libclc/generic/lib/atomic/atom_cmpxchg.cl +++ b/libclc/opencl/lib/generic/atomic/atom_cmpxchg.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include -#include +#include +#include #define IMPL(AS, TYPE) \ _CLC_OVERLOAD _CLC_DEF TYPE atom_cmpxchg(volatile AS TYPE *p, TYPE cmp, \ diff --git a/libclc/generic/lib/atomic/atom_dec.cl b/libclc/opencl/lib/generic/atomic/atom_dec.cl similarity index 91% rename from libclc/generic/lib/atomic/atom_dec.cl rename to libclc/opencl/lib/generic/atomic/atom_dec.cl index 8fb5495397d6..2df721cae365 100644 --- a/libclc/generic/lib/atomic/atom_dec.cl +++ b/libclc/opencl/lib/generic/atomic/atom_dec.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include -#include -#include +#include +#include +#include #define IMPL(AS, TYPE) \ _CLC_OVERLOAD _CLC_DEF TYPE atom_dec(volatile AS TYPE *p) { \ diff --git a/libclc/generic/lib/atomic/atom_inc.cl b/libclc/opencl/lib/generic/atomic/atom_inc.cl similarity index 91% rename from libclc/generic/lib/atomic/atom_inc.cl rename to libclc/opencl/lib/generic/atomic/atom_inc.cl index c74df54eb489..dc7699a47802 100644 --- a/libclc/generic/lib/atomic/atom_inc.cl +++ b/libclc/opencl/lib/generic/atomic/atom_inc.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include -#include -#include +#include +#include +#include #define IMPL(AS, TYPE) \ _CLC_OVERLOAD _CLC_DEF TYPE atom_inc(volatile AS TYPE *p) { \ diff --git a/libclc/generic/lib/atomic/atom_int32_binary.inc b/libclc/opencl/lib/generic/atomic/atom_int32_binary.inc similarity index 96% rename from libclc/generic/lib/atomic/atom_int32_binary.inc rename to libclc/opencl/lib/generic/atomic/atom_int32_binary.inc index 81e6a8ebc7c8..bee20d914642 100644 --- a/libclc/generic/lib/atomic/atom_int32_binary.inc +++ b/libclc/opencl/lib/generic/atomic/atom_int32_binary.inc @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define __CLC_ATOM_IMPL(AS, TYPE) \ diff --git a/libclc/generic/lib/atomic/atom_max.cl b/libclc/opencl/lib/generic/atomic/atom_max.cl similarity index 97% rename from libclc/generic/lib/atomic/atom_max.cl rename to libclc/opencl/lib/generic/atomic/atom_max.cl index 9427732fe7a4..744f39f6cb49 100644 --- a/libclc/generic/lib/atomic/atom_max.cl +++ b/libclc/opencl/lib/generic/atomic/atom_max.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #ifdef cl_khr_global_int32_extended_atomics #define __CLC_ATOMIC_OP max diff --git a/libclc/generic/lib/atomic/atom_min.cl b/libclc/opencl/lib/generic/atomic/atom_min.cl similarity index 97% rename from libclc/generic/lib/atomic/atom_min.cl rename to libclc/opencl/lib/generic/atomic/atom_min.cl index 881e83293291..75e5fb02e128 100644 --- a/libclc/generic/lib/atomic/atom_min.cl +++ b/libclc/opencl/lib/generic/atomic/atom_min.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #ifdef cl_khr_global_int32_extended_atomics #define __CLC_ATOMIC_OP min diff --git a/libclc/generic/lib/atomic/atom_or.cl b/libclc/opencl/lib/generic/atomic/atom_or.cl similarity index 96% rename from libclc/generic/lib/atomic/atom_or.cl rename to libclc/opencl/lib/generic/atomic/atom_or.cl index a9f9bb782fb2..4b1ecac95d87 100644 --- a/libclc/generic/lib/atomic/atom_or.cl +++ b/libclc/opencl/lib/generic/atomic/atom_or.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #ifdef cl_khr_global_int32_extended_atomics #define __CLC_ATOMIC_OP or diff --git a/libclc/generic/lib/atomic/atom_sub.cl b/libclc/opencl/lib/generic/atomic/atom_sub.cl similarity index 96% rename from libclc/generic/lib/atomic/atom_sub.cl rename to libclc/opencl/lib/generic/atomic/atom_sub.cl index 1951f985688b..24c7e85ca73a 100644 --- a/libclc/generic/lib/atomic/atom_sub.cl +++ b/libclc/opencl/lib/generic/atomic/atom_sub.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #ifdef cl_khr_global_int32_base_atomics #define __CLC_ATOMIC_OP sub diff --git a/libclc/generic/lib/atomic/atom_xchg.cl b/libclc/opencl/lib/generic/atomic/atom_xchg.cl similarity index 96% rename from libclc/generic/lib/atomic/atom_xchg.cl rename to libclc/opencl/lib/generic/atomic/atom_xchg.cl index 6e9ef796d9c0..f14b18070deb 100644 --- a/libclc/generic/lib/atomic/atom_xchg.cl +++ b/libclc/opencl/lib/generic/atomic/atom_xchg.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #ifdef cl_khr_global_int32_base_atomics #define __CLC_ATOMIC_OP xchg diff --git a/libclc/generic/lib/atomic/atom_xor.cl b/libclc/opencl/lib/generic/atomic/atom_xor.cl similarity index 96% rename from libclc/generic/lib/atomic/atom_xor.cl rename to libclc/opencl/lib/generic/atomic/atom_xor.cl index bfa978d4b9a1..9373fae2487d 100644 --- a/libclc/generic/lib/atomic/atom_xor.cl +++ b/libclc/opencl/lib/generic/atomic/atom_xor.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #ifdef cl_khr_global_int32_extended_atomics #define __CLC_ATOMIC_OP xor diff --git a/libclc/generic/lib/atomic/atomic_add.cl b/libclc/opencl/lib/generic/atomic/atomic_add.cl similarity index 63% rename from libclc/generic/lib/atomic/atomic_add.cl rename to libclc/opencl/lib/generic/atomic/atomic_add.cl index 0f8a7e1d9880..cb3935cc4f8a 100644 --- a/libclc/generic/lib/atomic/atomic_add.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_add.cl @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include +#include -#define IMPL(TYPE, AS) \ -_CLC_OVERLOAD _CLC_DEF TYPE atomic_add(volatile AS TYPE *p, TYPE val) { \ - return __sync_fetch_and_add(p, val); \ -} +#define IMPL(TYPE, AS) \ + _CLC_OVERLOAD _CLC_DEF TYPE atomic_add(volatile AS TYPE *p, TYPE val) { \ + return __sync_fetch_and_add(p, val); \ + } IMPL(int, global) IMPL(unsigned int, global) diff --git a/libclc/generic/lib/atomic/atomic_and.cl b/libclc/opencl/lib/generic/atomic/atomic_and.cl similarity index 63% rename from libclc/generic/lib/atomic/atomic_and.cl rename to libclc/opencl/lib/generic/atomic/atomic_and.cl index a151a8daf464..f5b6e97246c6 100644 --- a/libclc/generic/lib/atomic/atomic_and.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_and.cl @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include +#include -#define IMPL(TYPE, AS) \ -_CLC_OVERLOAD _CLC_DEF TYPE atomic_and(volatile AS TYPE *p, TYPE val) { \ - return __sync_fetch_and_and(p, val); \ -} +#define IMPL(TYPE, AS) \ + _CLC_OVERLOAD _CLC_DEF TYPE atomic_and(volatile AS TYPE *p, TYPE val) { \ + return __sync_fetch_and_and(p, val); \ + } IMPL(int, global) IMPL(unsigned int, global) diff --git a/libclc/generic/lib/atomic/atomic_cmpxchg.cl b/libclc/opencl/lib/generic/atomic/atomic_cmpxchg.cl similarity index 57% rename from libclc/generic/lib/atomic/atomic_cmpxchg.cl rename to libclc/opencl/lib/generic/atomic/atomic_cmpxchg.cl index 0541007535ce..c2227ea5207d 100644 --- a/libclc/generic/lib/atomic/atomic_cmpxchg.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_cmpxchg.cl @@ -6,12 +6,13 @@ // //===----------------------------------------------------------------------===// -#include +#include -#define IMPL(TYPE, AS) \ -_CLC_OVERLOAD _CLC_DEF TYPE atomic_cmpxchg(volatile AS TYPE *p, TYPE cmp, TYPE val) { \ - return __sync_val_compare_and_swap(p, cmp, val); \ -} +#define IMPL(TYPE, AS) \ + _CLC_OVERLOAD _CLC_DEF TYPE atomic_cmpxchg(volatile AS TYPE *p, TYPE cmp, \ + TYPE val) { \ + return __sync_val_compare_and_swap(p, cmp, val); \ + } IMPL(int, global) IMPL(unsigned int, global) diff --git a/libclc/generic/lib/atomic/atomic_dec.cl b/libclc/opencl/lib/generic/atomic/atomic_dec.cl similarity index 63% rename from libclc/generic/lib/atomic/atomic_dec.cl rename to libclc/opencl/lib/generic/atomic/atomic_dec.cl index 4ebfd11e8dff..d67f6382fd07 100644 --- a/libclc/generic/lib/atomic/atomic_dec.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_dec.cl @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include +#include -#define IMPL(TYPE, AS) \ -_CLC_OVERLOAD _CLC_DEF TYPE atomic_dec(volatile AS TYPE *p) { \ - return __sync_fetch_and_sub(p, (TYPE)1); \ -} +#define IMPL(TYPE, AS) \ + _CLC_OVERLOAD _CLC_DEF TYPE atomic_dec(volatile AS TYPE *p) { \ + return __sync_fetch_and_sub(p, (TYPE)1); \ + } IMPL(int, global) IMPL(unsigned int, global) diff --git a/libclc/generic/lib/atomic/atomic_inc.cl b/libclc/opencl/lib/generic/atomic/atomic_inc.cl similarity index 63% rename from libclc/generic/lib/atomic/atomic_inc.cl rename to libclc/opencl/lib/generic/atomic/atomic_inc.cl index c9820fd4c78c..989c45c0e5d8 100644 --- a/libclc/generic/lib/atomic/atomic_inc.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_inc.cl @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include +#include -#define IMPL(TYPE, AS) \ -_CLC_OVERLOAD _CLC_DEF TYPE atomic_inc(volatile AS TYPE *p) { \ - return __sync_fetch_and_add(p, (TYPE)1); \ -} +#define IMPL(TYPE, AS) \ + _CLC_OVERLOAD _CLC_DEF TYPE atomic_inc(volatile AS TYPE *p) { \ + return __sync_fetch_and_add(p, (TYPE)1); \ + } IMPL(int, global) IMPL(unsigned int, global) diff --git a/libclc/generic/lib/atomic/atomic_max.cl b/libclc/opencl/lib/generic/atomic/atomic_max.cl similarity index 64% rename from libclc/generic/lib/atomic/atomic_max.cl rename to libclc/opencl/lib/generic/atomic/atomic_max.cl index 698d8d713b7e..dbd5aa049c5e 100644 --- a/libclc/generic/lib/atomic/atomic_max.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_max.cl @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include +#include -#define IMPL(TYPE, AS, OP) \ -_CLC_OVERLOAD _CLC_DEF TYPE atomic_max(volatile AS TYPE *p, TYPE val) { \ - return __sync_fetch_and_##OP(p, val); \ -} +#define IMPL(TYPE, AS, OP) \ + _CLC_OVERLOAD _CLC_DEF TYPE atomic_max(volatile AS TYPE *p, TYPE val) { \ + return __sync_fetch_and_##OP(p, val); \ + } IMPL(int, global, max) IMPL(unsigned int, global, umax) diff --git a/libclc/generic/lib/atomic/atomic_min.cl b/libclc/opencl/lib/generic/atomic/atomic_min.cl similarity index 64% rename from libclc/generic/lib/atomic/atomic_min.cl rename to libclc/opencl/lib/generic/atomic/atomic_min.cl index c0a7e3b92840..d43f74c82ffc 100644 --- a/libclc/generic/lib/atomic/atomic_min.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_min.cl @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include +#include -#define IMPL(TYPE, AS, OP) \ -_CLC_OVERLOAD _CLC_DEF TYPE atomic_min(volatile AS TYPE *p, TYPE val) { \ - return __sync_fetch_and_##OP(p, val); \ -} +#define IMPL(TYPE, AS, OP) \ + _CLC_OVERLOAD _CLC_DEF TYPE atomic_min(volatile AS TYPE *p, TYPE val) { \ + return __sync_fetch_and_##OP(p, val); \ + } IMPL(int, global, min) IMPL(unsigned int, global, umin) diff --git a/libclc/generic/lib/atomic/atomic_or.cl b/libclc/opencl/lib/generic/atomic/atomic_or.cl similarity index 63% rename from libclc/generic/lib/atomic/atomic_or.cl rename to libclc/opencl/lib/generic/atomic/atomic_or.cl index 0ec0792703ff..dac7eb66033b 100644 --- a/libclc/generic/lib/atomic/atomic_or.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_or.cl @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include +#include -#define IMPL(TYPE, AS) \ -_CLC_OVERLOAD _CLC_DEF TYPE atomic_or(volatile AS TYPE *p, TYPE val) { \ - return __sync_fetch_and_or(p, val); \ -} +#define IMPL(TYPE, AS) \ + _CLC_OVERLOAD _CLC_DEF TYPE atomic_or(volatile AS TYPE *p, TYPE val) { \ + return __sync_fetch_and_or(p, val); \ + } IMPL(int, global) IMPL(unsigned int, global) diff --git a/libclc/generic/lib/atomic/atomic_sub.cl b/libclc/opencl/lib/generic/atomic/atomic_sub.cl similarity index 63% rename from libclc/generic/lib/atomic/atomic_sub.cl rename to libclc/opencl/lib/generic/atomic/atomic_sub.cl index 8e43e8594558..5ebe1f0b1369 100644 --- a/libclc/generic/lib/atomic/atomic_sub.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_sub.cl @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include +#include -#define IMPL(TYPE, AS) \ -_CLC_OVERLOAD _CLC_DEF TYPE atomic_sub(volatile AS TYPE *p, TYPE val) { \ - return __sync_fetch_and_sub(p, val); \ -} +#define IMPL(TYPE, AS) \ + _CLC_OVERLOAD _CLC_DEF TYPE atomic_sub(volatile AS TYPE *p, TYPE val) { \ + return __sync_fetch_and_sub(p, val); \ + } IMPL(int, global) IMPL(unsigned int, global) diff --git a/libclc/generic/lib/atomic/atomic_xchg.cl b/libclc/opencl/lib/generic/atomic/atomic_xchg.cl similarity index 73% rename from libclc/generic/lib/atomic/atomic_xchg.cl rename to libclc/opencl/lib/generic/atomic/atomic_xchg.cl index 464f23f08806..b3f631c21aec 100644 --- a/libclc/generic/lib/atomic/atomic_xchg.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_xchg.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_OVERLOAD _CLC_DEF float atomic_xchg(volatile global float *p, float val) { return as_float(atomic_xchg((volatile global uint *)p, as_uint(val))); @@ -16,10 +16,10 @@ _CLC_OVERLOAD _CLC_DEF float atomic_xchg(volatile local float *p, float val) { return as_float(atomic_xchg((volatile local uint *)p, as_uint(val))); } -#define IMPL(TYPE, AS) \ -_CLC_OVERLOAD _CLC_DEF TYPE atomic_xchg(volatile AS TYPE *p, TYPE val) { \ - return __sync_swap_4(p, val); \ -} +#define IMPL(TYPE, AS) \ + _CLC_OVERLOAD _CLC_DEF TYPE atomic_xchg(volatile AS TYPE *p, TYPE val) { \ + return __sync_swap_4(p, val); \ + } IMPL(int, global) IMPL(unsigned int, global) diff --git a/libclc/generic/lib/atomic/atomic_xor.cl b/libclc/opencl/lib/generic/atomic/atomic_xor.cl similarity index 63% rename from libclc/generic/lib/atomic/atomic_xor.cl rename to libclc/opencl/lib/generic/atomic/atomic_xor.cl index b2f7594dd36e..864e22b77453 100644 --- a/libclc/generic/lib/atomic/atomic_xor.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_xor.cl @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include +#include -#define IMPL(TYPE, AS) \ -_CLC_OVERLOAD _CLC_DEF TYPE atomic_xor(volatile AS TYPE *p, TYPE val) { \ - return __sync_fetch_and_xor(p, val); \ -} +#define IMPL(TYPE, AS) \ + _CLC_OVERLOAD _CLC_DEF TYPE atomic_xor(volatile AS TYPE *p, TYPE val) { \ + return __sync_fetch_and_xor(p, val); \ + } IMPL(int, global) IMPL(unsigned int, global) diff --git a/libclc/generic/lib/common/degrees.cl b/libclc/opencl/lib/generic/common/degrees.cl similarity index 96% rename from libclc/generic/lib/common/degrees.cl rename to libclc/opencl/lib/generic/common/degrees.cl index a6e77457fd44..8b17fe432129 100644 --- a/libclc/generic/lib/common/degrees.cl +++ b/libclc/opencl/lib/generic/common/degrees.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include _CLC_DEFINE_UNARY_BUILTIN(float, degrees, __clc_degrees, float) diff --git a/libclc/generic/lib/common/mix.cl b/libclc/opencl/lib/generic/common/mix.cl similarity index 94% rename from libclc/generic/lib/common/mix.cl rename to libclc/opencl/lib/generic/common/mix.cl index 5a365e073230..cc95dcd3b615 100644 --- a/libclc/generic/lib/common/mix.cl +++ b/libclc/opencl/lib/generic/common/mix.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __CLC_BODY #include diff --git a/libclc/generic/lib/common/mix.inc b/libclc/opencl/lib/generic/common/mix.inc similarity index 100% rename from libclc/generic/lib/common/mix.inc rename to libclc/opencl/lib/generic/common/mix.inc diff --git a/libclc/generic/lib/common/radians.cl b/libclc/opencl/lib/generic/common/radians.cl similarity index 96% rename from libclc/generic/lib/common/radians.cl rename to libclc/opencl/lib/generic/common/radians.cl index 17caa948939f..1c58c6c4da6f 100644 --- a/libclc/generic/lib/common/radians.cl +++ b/libclc/opencl/lib/generic/common/radians.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include _CLC_DEFINE_UNARY_BUILTIN(float, radians, __clc_radians, float) diff --git a/libclc/generic/lib/common/sign.cl b/libclc/opencl/lib/generic/common/sign.cl similarity index 94% rename from libclc/generic/lib/common/sign.cl rename to libclc/opencl/lib/generic/common/sign.cl index b33cdac3001d..0acab050af59 100644 --- a/libclc/generic/lib/common/sign.cl +++ b/libclc/opencl/lib/generic/common/sign.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include #define FUNCTION sign #define __CLC_BODY diff --git a/libclc/generic/lib/common/smoothstep.cl b/libclc/opencl/lib/generic/common/smoothstep.cl similarity index 99% rename from libclc/generic/lib/common/smoothstep.cl rename to libclc/opencl/lib/generic/common/smoothstep.cl index 16bf1b2ce952..30ed1451ff30 100644 --- a/libclc/generic/lib/common/smoothstep.cl +++ b/libclc/opencl/lib/generic/common/smoothstep.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include #define SMOOTHSTEP_SINGLE_DEF(X_TYPE) \ _CLC_OVERLOAD _CLC_DEF X_TYPE smoothstep(X_TYPE edge0, X_TYPE edge1, \ diff --git a/libclc/generic/lib/common/step.cl b/libclc/opencl/lib/generic/common/step.cl similarity index 84% rename from libclc/generic/lib/common/step.cl rename to libclc/opencl/lib/generic/common/step.cl index 4bf116624577..99e69963c37b 100644 --- a/libclc/generic/lib/common/step.cl +++ b/libclc/opencl/lib/generic/common/step.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include _CLC_OVERLOAD _CLC_DEF float step(float edge, float x) { return x < edge ? 0.0f : 1.0f; @@ -20,10 +20,10 @@ _CLC_V_S_V_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, float, step, float, float); #ifdef cl_khr_fp64 #pragma OPENCL EXTENSION cl_khr_fp64 : enable -#define STEP_DEF(edge_type, x_type) \ - _CLC_OVERLOAD _CLC_DEF x_type step(edge_type edge, x_type x) { \ - return x < edge ? 0.0 : 1.0; \ - } +#define STEP_DEF(edge_type, x_type) \ + _CLC_OVERLOAD _CLC_DEF x_type step(edge_type edge, x_type x) { \ + return x < edge ? 0.0 : 1.0; \ + } STEP_DEF(double, double); diff --git a/libclc/generic/lib/geometric/cross.cl b/libclc/opencl/lib/generic/geometric/cross.cl similarity index 97% rename from libclc/generic/lib/geometric/cross.cl rename to libclc/opencl/lib/generic/geometric/cross.cl index 842670bb3e80..bd4f86bb15d8 100644 --- a/libclc/generic/lib/geometric/cross.cl +++ b/libclc/opencl/lib/generic/geometric/cross.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include _CLC_OVERLOAD _CLC_DEF float3 cross(float3 p0, float3 p1) { return __clc_cross(p0, p1); diff --git a/libclc/generic/lib/geometric/distance.cl b/libclc/opencl/lib/generic/geometric/distance.cl similarity index 94% rename from libclc/generic/lib/geometric/distance.cl rename to libclc/opencl/lib/generic/geometric/distance.cl index 2416ad1352aa..b2194abd60e9 100644 --- a/libclc/generic/lib/geometric/distance.cl +++ b/libclc/opencl/lib/generic/geometric/distance.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION distance #define __CLC_BODY diff --git a/libclc/generic/lib/geometric/dot.cl b/libclc/opencl/lib/generic/geometric/dot.cl similarity index 98% rename from libclc/generic/lib/geometric/dot.cl rename to libclc/opencl/lib/generic/geometric/dot.cl index 60469c94d47b..72d30ea53f8c 100644 --- a/libclc/generic/lib/geometric/dot.cl +++ b/libclc/opencl/lib/generic/geometric/dot.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include _CLC_OVERLOAD _CLC_DEF float dot(float p0, float p1) { return __clc_dot(p0, p1); diff --git a/libclc/generic/lib/geometric/fast_distance.cl b/libclc/opencl/lib/generic/geometric/fast_distance.cl similarity index 95% rename from libclc/generic/lib/geometric/fast_distance.cl rename to libclc/opencl/lib/generic/geometric/fast_distance.cl index 589c79496506..2a19418a175b 100644 --- a/libclc/generic/lib/geometric/fast_distance.cl +++ b/libclc/opencl/lib/generic/geometric/fast_distance.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION fast_distance diff --git a/libclc/generic/lib/geometric/fast_length.cl b/libclc/opencl/lib/generic/geometric/fast_length.cl similarity index 95% rename from libclc/generic/lib/geometric/fast_length.cl rename to libclc/opencl/lib/generic/geometric/fast_length.cl index 11e817299805..3af751af5425 100644 --- a/libclc/generic/lib/geometric/fast_length.cl +++ b/libclc/opencl/lib/generic/geometric/fast_length.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION fast_length diff --git a/libclc/generic/lib/geometric/fast_normalize.cl b/libclc/opencl/lib/generic/geometric/fast_normalize.cl similarity index 82% rename from libclc/generic/lib/geometric/fast_normalize.cl rename to libclc/opencl/lib/generic/geometric/fast_normalize.cl index 585400d2200f..d6d140f3c406 100644 --- a/libclc/generic/lib/geometric/fast_normalize.cl +++ b/libclc/opencl/lib/generic/geometric/fast_normalize.cl @@ -6,11 +6,9 @@ // //===----------------------------------------------------------------------===// -#include +#include -_CLC_OVERLOAD _CLC_DEF float fast_normalize(float p) { - return normalize(p); -} +_CLC_OVERLOAD _CLC_DEF float fast_normalize(float p) { return normalize(p); } #define __CLC_BODY #define __FLOAT_ONLY diff --git a/libclc/generic/lib/geometric/fast_normalize.inc b/libclc/opencl/lib/generic/geometric/fast_normalize.inc similarity index 100% rename from libclc/generic/lib/geometric/fast_normalize.inc rename to libclc/opencl/lib/generic/geometric/fast_normalize.inc diff --git a/libclc/generic/lib/geometric/length.cl b/libclc/opencl/lib/generic/geometric/length.cl similarity index 94% rename from libclc/generic/lib/geometric/length.cl rename to libclc/opencl/lib/generic/geometric/length.cl index 3a4e286e9a0f..5645ade4c917 100644 --- a/libclc/generic/lib/geometric/length.cl +++ b/libclc/opencl/lib/generic/geometric/length.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION length #define __CLC_BODY diff --git a/libclc/generic/lib/geometric/normalize.cl b/libclc/opencl/lib/generic/geometric/normalize.cl similarity index 94% rename from libclc/generic/lib/geometric/normalize.cl rename to libclc/opencl/lib/generic/geometric/normalize.cl index 36c1f6468753..e1e51b306a1b 100644 --- a/libclc/generic/lib/geometric/normalize.cl +++ b/libclc/opencl/lib/generic/geometric/normalize.cl @@ -6,11 +6,9 @@ // //===----------------------------------------------------------------------===// -#include +#include -_CLC_OVERLOAD _CLC_DEF float normalize(float p) { - return sign(p); -} +_CLC_OVERLOAD _CLC_DEF float normalize(float p) { return sign(p); } _CLC_OVERLOAD _CLC_DEF float2 normalize(float2 p) { if (all(p == (float2)0.0F)) @@ -76,9 +74,7 @@ _CLC_OVERLOAD _CLC_DEF float4 normalize(float4 p) { #pragma OPENCL EXTENSION cl_khr_fp64 : enable -_CLC_OVERLOAD _CLC_DEF double normalize(double p) { - return sign(p); -} +_CLC_OVERLOAD _CLC_DEF double normalize(double p) { return sign(p); } _CLC_OVERLOAD _CLC_DEF double2 normalize(double2 p) { if (all(p == (double2)0.0)) diff --git a/libclc/generic/lib/integer/abs.cl b/libclc/opencl/lib/generic/integer/abs.cl similarity index 94% rename from libclc/generic/lib/integer/abs.cl rename to libclc/opencl/lib/generic/integer/abs.cl index 7a7aa32e2784..5d354d97e71c 100644 --- a/libclc/generic/lib/integer/abs.cl +++ b/libclc/opencl/lib/generic/integer/abs.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __CLC_BODY #include diff --git a/libclc/generic/lib/integer/abs.inc b/libclc/opencl/lib/generic/integer/abs.inc similarity index 100% rename from libclc/generic/lib/integer/abs.inc rename to libclc/opencl/lib/generic/integer/abs.inc diff --git a/libclc/generic/lib/integer/abs_diff.cl b/libclc/opencl/lib/generic/integer/abs_diff.cl similarity index 94% rename from libclc/generic/lib/integer/abs_diff.cl rename to libclc/opencl/lib/generic/integer/abs_diff.cl index 552f61e1d1ae..73d6631b3a4a 100644 --- a/libclc/generic/lib/integer/abs_diff.cl +++ b/libclc/opencl/lib/generic/integer/abs_diff.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __CLC_BODY #include diff --git a/libclc/generic/lib/integer/abs_diff.inc b/libclc/opencl/lib/generic/integer/abs_diff.inc similarity index 87% rename from libclc/generic/lib/integer/abs_diff.inc rename to libclc/opencl/lib/generic/integer/abs_diff.inc index 57de34422b18..0f515202cd89 100644 --- a/libclc/generic/lib/integer/abs_diff.inc +++ b/libclc/opencl/lib/generic/integer/abs_diff.inc @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DEF __CLC_U_GENTYPE abs_diff(__CLC_GENTYPE x, __CLC_GENTYPE y) { +_CLC_OVERLOAD _CLC_DEF __CLC_U_GENTYPE abs_diff(__CLC_GENTYPE x, + __CLC_GENTYPE y) { return __clc_abs_diff(x, y); } diff --git a/libclc/generic/lib/integer/add_sat.cl b/libclc/opencl/lib/generic/integer/add_sat.cl similarity index 94% rename from libclc/generic/lib/integer/add_sat.cl rename to libclc/opencl/lib/generic/integer/add_sat.cl index 080cc6d57f7d..8fe1d32a8221 100644 --- a/libclc/generic/lib/integer/add_sat.cl +++ b/libclc/opencl/lib/generic/integer/add_sat.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION add_sat #define __CLC_BODY diff --git a/libclc/generic/lib/integer/clz.cl b/libclc/opencl/lib/generic/integer/clz.cl similarity index 94% rename from libclc/generic/lib/integer/clz.cl rename to libclc/opencl/lib/generic/integer/clz.cl index bc2e7e2a2912..cf12a9838c6d 100644 --- a/libclc/generic/lib/integer/clz.cl +++ b/libclc/opencl/lib/generic/integer/clz.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION clz #define __CLC_BODY diff --git a/libclc/generic/lib/integer/ctz.cl b/libclc/opencl/lib/generic/integer/ctz.cl similarity index 95% rename from libclc/generic/lib/integer/ctz.cl rename to libclc/opencl/lib/generic/integer/ctz.cl index 44978e161740..1b0470e08fd3 100644 --- a/libclc/generic/lib/integer/ctz.cl +++ b/libclc/opencl/lib/generic/integer/ctz.cl @@ -8,8 +8,8 @@ #if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 -#include #include +#include #define FUNCTION ctz #define __CLC_BODY diff --git a/libclc/generic/lib/integer/hadd.cl b/libclc/opencl/lib/generic/integer/hadd.cl similarity index 94% rename from libclc/generic/lib/integer/hadd.cl rename to libclc/opencl/lib/generic/integer/hadd.cl index b89e17463f07..100cb7bf207a 100644 --- a/libclc/generic/lib/integer/hadd.cl +++ b/libclc/opencl/lib/generic/integer/hadd.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION hadd #define __CLC_BODY diff --git a/libclc/generic/lib/integer/mad24.cl b/libclc/opencl/lib/generic/integer/mad24.cl similarity index 94% rename from libclc/generic/lib/integer/mad24.cl rename to libclc/opencl/lib/generic/integer/mad24.cl index 59aea1baa33b..d42873f1dd15 100644 --- a/libclc/generic/lib/integer/mad24.cl +++ b/libclc/opencl/lib/generic/integer/mad24.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION mad24 #define __CLC_BODY diff --git a/libclc/generic/lib/integer/mad_hi.cl b/libclc/opencl/lib/generic/integer/mad_hi.cl similarity index 94% rename from libclc/generic/lib/integer/mad_hi.cl rename to libclc/opencl/lib/generic/integer/mad_hi.cl index 5fa3a44ea4ee..68e610d400cc 100644 --- a/libclc/generic/lib/integer/mad_hi.cl +++ b/libclc/opencl/lib/generic/integer/mad_hi.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION mad_hi #define __CLC_BODY diff --git a/libclc/generic/lib/integer/mad_sat.cl b/libclc/opencl/lib/generic/integer/mad_sat.cl similarity index 94% rename from libclc/generic/lib/integer/mad_sat.cl rename to libclc/opencl/lib/generic/integer/mad_sat.cl index d7a933313700..d9daf56632b0 100644 --- a/libclc/generic/lib/integer/mad_sat.cl +++ b/libclc/opencl/lib/generic/integer/mad_sat.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION mad_sat #define __CLC_BODY diff --git a/libclc/generic/lib/integer/mul24.cl b/libclc/opencl/lib/generic/integer/mul24.cl similarity index 94% rename from libclc/generic/lib/integer/mul24.cl rename to libclc/opencl/lib/generic/integer/mul24.cl index ec32ada5d6c6..b0a9ff80f352 100644 --- a/libclc/generic/lib/integer/mul24.cl +++ b/libclc/opencl/lib/generic/integer/mul24.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION mul24 #define __CLC_BODY diff --git a/libclc/generic/lib/integer/mul_hi.cl b/libclc/opencl/lib/generic/integer/mul_hi.cl similarity index 94% rename from libclc/generic/lib/integer/mul_hi.cl rename to libclc/opencl/lib/generic/integer/mul_hi.cl index 152bc3fa72c9..40cb359f5b29 100644 --- a/libclc/generic/lib/integer/mul_hi.cl +++ b/libclc/opencl/lib/generic/integer/mul_hi.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION mul_hi #define __CLC_BODY diff --git a/libclc/generic/lib/integer/popcount.cl b/libclc/opencl/lib/generic/integer/popcount.cl similarity index 94% rename from libclc/generic/lib/integer/popcount.cl rename to libclc/opencl/lib/generic/integer/popcount.cl index 35f57f50c801..a349f454813e 100644 --- a/libclc/generic/lib/integer/popcount.cl +++ b/libclc/opencl/lib/generic/integer/popcount.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION popcount #define __CLC_BODY diff --git a/libclc/generic/lib/integer/rhadd.cl b/libclc/opencl/lib/generic/integer/rhadd.cl similarity index 94% rename from libclc/generic/lib/integer/rhadd.cl rename to libclc/opencl/lib/generic/integer/rhadd.cl index 86d3286658b4..539def845488 100644 --- a/libclc/generic/lib/integer/rhadd.cl +++ b/libclc/opencl/lib/generic/integer/rhadd.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION rhadd #define __CLC_BODY diff --git a/libclc/generic/lib/integer/rotate.cl b/libclc/opencl/lib/generic/integer/rotate.cl similarity index 94% rename from libclc/generic/lib/integer/rotate.cl rename to libclc/opencl/lib/generic/integer/rotate.cl index 8de40e84e24f..a340ccf77b2e 100644 --- a/libclc/generic/lib/integer/rotate.cl +++ b/libclc/opencl/lib/generic/integer/rotate.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION rotate #define __CLC_BODY diff --git a/libclc/generic/lib/integer/sub_sat.cl b/libclc/opencl/lib/generic/integer/sub_sat.cl similarity index 94% rename from libclc/generic/lib/integer/sub_sat.cl rename to libclc/opencl/lib/generic/integer/sub_sat.cl index 7938376acb5a..46596724358a 100644 --- a/libclc/generic/lib/integer/sub_sat.cl +++ b/libclc/opencl/lib/generic/integer/sub_sat.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION sub_sat #define __CLC_BODY diff --git a/libclc/generic/lib/integer/upsample.cl b/libclc/opencl/lib/generic/integer/upsample.cl similarity index 98% rename from libclc/generic/lib/integer/upsample.cl rename to libclc/opencl/lib/generic/integer/upsample.cl index 46831f5db2af..32cb3cffc9eb 100644 --- a/libclc/generic/lib/integer/upsample.cl +++ b/libclc/opencl/lib/generic/integer/upsample.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __CLC_UPSAMPLE_IMPL(BGENTYPE, GENTYPE, UGENTYPE) \ _CLC_OVERLOAD _CLC_DEF BGENTYPE upsample(GENTYPE hi, UGENTYPE lo) { \ diff --git a/libclc/generic/lib/math/acos.cl b/libclc/opencl/lib/generic/math/acos.cl similarity index 94% rename from libclc/generic/lib/math/acos.cl rename to libclc/opencl/lib/generic/math/acos.cl index 85119b437b4c..3d290225a2c2 100644 --- a/libclc/generic/lib/math/acos.cl +++ b/libclc/opencl/lib/generic/math/acos.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION acos #define __CLC_BODY diff --git a/libclc/generic/lib/math/acosh.cl b/libclc/opencl/lib/generic/math/acosh.cl similarity index 94% rename from libclc/generic/lib/math/acosh.cl rename to libclc/opencl/lib/generic/math/acosh.cl index 7df6b87703f5..fea40caa3e20 100644 --- a/libclc/generic/lib/math/acosh.cl +++ b/libclc/opencl/lib/generic/math/acosh.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION acosh #define __CLC_BODY diff --git a/libclc/generic/lib/math/acospi.cl b/libclc/opencl/lib/generic/math/acospi.cl similarity index 94% rename from libclc/generic/lib/math/acospi.cl rename to libclc/opencl/lib/generic/math/acospi.cl index d8e774481d41..6c5ba2982ed0 100644 --- a/libclc/generic/lib/math/acospi.cl +++ b/libclc/opencl/lib/generic/math/acospi.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION acospi #define __CLC_BODY diff --git a/libclc/generic/lib/math/asin.cl b/libclc/opencl/lib/generic/math/asin.cl similarity index 94% rename from libclc/generic/lib/math/asin.cl rename to libclc/opencl/lib/generic/math/asin.cl index 58e4b7440d6f..b8d02cef7d3a 100644 --- a/libclc/generic/lib/math/asin.cl +++ b/libclc/opencl/lib/generic/math/asin.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION asin #define __CLC_BODY diff --git a/libclc/generic/lib/math/asinh.cl b/libclc/opencl/lib/generic/math/asinh.cl similarity index 94% rename from libclc/generic/lib/math/asinh.cl rename to libclc/opencl/lib/generic/math/asinh.cl index 84ba61d052b8..f043a33fe317 100644 --- a/libclc/generic/lib/math/asinh.cl +++ b/libclc/opencl/lib/generic/math/asinh.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION asinh #define __CLC_BODY diff --git a/libclc/generic/lib/math/asinpi.cl b/libclc/opencl/lib/generic/math/asinpi.cl similarity index 94% rename from libclc/generic/lib/math/asinpi.cl rename to libclc/opencl/lib/generic/math/asinpi.cl index bf232ef89e60..688da90337ea 100644 --- a/libclc/generic/lib/math/asinpi.cl +++ b/libclc/opencl/lib/generic/math/asinpi.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION asinpi #define __CLC_BODY diff --git a/libclc/generic/lib/math/atan.cl b/libclc/opencl/lib/generic/math/atan.cl similarity index 94% rename from libclc/generic/lib/math/atan.cl rename to libclc/opencl/lib/generic/math/atan.cl index b0a466aee5e1..006fc9e65d45 100644 --- a/libclc/generic/lib/math/atan.cl +++ b/libclc/opencl/lib/generic/math/atan.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION atan #define __CLC_BODY diff --git a/libclc/generic/lib/math/atan2.cl b/libclc/opencl/lib/generic/math/atan2.cl similarity index 95% rename from libclc/generic/lib/math/atan2.cl rename to libclc/opencl/lib/generic/math/atan2.cl index 20651c1ec1bf..ae277e7dc956 100644 --- a/libclc/generic/lib/math/atan2.cl +++ b/libclc/opencl/lib/generic/math/atan2.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include #define FUNCTION atan2 #define __CLC_BODY diff --git a/libclc/generic/lib/math/atan2pi.cl b/libclc/opencl/lib/generic/math/atan2pi.cl similarity index 95% rename from libclc/generic/lib/math/atan2pi.cl rename to libclc/opencl/lib/generic/math/atan2pi.cl index 316db1d6c9c4..06f0974d4325 100644 --- a/libclc/generic/lib/math/atan2pi.cl +++ b/libclc/opencl/lib/generic/math/atan2pi.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include #define FUNCTION atan2pi #define __CLC_BODY diff --git a/libclc/generic/lib/math/atanh.cl b/libclc/opencl/lib/generic/math/atanh.cl similarity index 94% rename from libclc/generic/lib/math/atanh.cl rename to libclc/opencl/lib/generic/math/atanh.cl index 5d92cdbd2adf..ad4c54b81d21 100644 --- a/libclc/generic/lib/math/atanh.cl +++ b/libclc/opencl/lib/generic/math/atanh.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION atanh #define __CLC_BODY diff --git a/libclc/generic/lib/math/atanpi.cl b/libclc/opencl/lib/generic/math/atanpi.cl similarity index 94% rename from libclc/generic/lib/math/atanpi.cl rename to libclc/opencl/lib/generic/math/atanpi.cl index 4337bdf3f660..3eba081d1b3f 100644 --- a/libclc/generic/lib/math/atanpi.cl +++ b/libclc/opencl/lib/generic/math/atanpi.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION atanpi #define __CLC_BODY diff --git a/libclc/generic/lib/math/cbrt.cl b/libclc/opencl/lib/generic/math/cbrt.cl similarity index 94% rename from libclc/generic/lib/math/cbrt.cl rename to libclc/opencl/lib/generic/math/cbrt.cl index 4bd5efd4ef7c..edccc1aaa187 100644 --- a/libclc/generic/lib/math/cbrt.cl +++ b/libclc/opencl/lib/generic/math/cbrt.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION cbrt #define __CLC_BODY diff --git a/libclc/generic/lib/math/ceil.cl b/libclc/opencl/lib/generic/math/ceil.cl similarity index 94% rename from libclc/generic/lib/math/ceil.cl rename to libclc/opencl/lib/generic/math/ceil.cl index 00635dcb5507..981fa80a4443 100644 --- a/libclc/generic/lib/math/ceil.cl +++ b/libclc/opencl/lib/generic/math/ceil.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION ceil #define __CLC_BODY diff --git a/libclc/generic/lib/math/copysign.cl b/libclc/opencl/lib/generic/math/copysign.cl similarity index 94% rename from libclc/generic/lib/math/copysign.cl rename to libclc/opencl/lib/generic/math/copysign.cl index e38aa035d7bf..9a34aa3ea94f 100644 --- a/libclc/generic/lib/math/copysign.cl +++ b/libclc/opencl/lib/generic/math/copysign.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION copysign #define __CLC_BODY diff --git a/libclc/generic/lib/math/cos.cl b/libclc/opencl/lib/generic/math/cos.cl similarity index 94% rename from libclc/generic/lib/math/cos.cl rename to libclc/opencl/lib/generic/math/cos.cl index 5b97c6a6f379..01f419ebc287 100644 --- a/libclc/generic/lib/math/cos.cl +++ b/libclc/opencl/lib/generic/math/cos.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION cos #define __CLC_BODY diff --git a/libclc/generic/lib/math/cosh.cl b/libclc/opencl/lib/generic/math/cosh.cl similarity index 94% rename from libclc/generic/lib/math/cosh.cl rename to libclc/opencl/lib/generic/math/cosh.cl index 870c56029f33..c2ee2375ce5a 100644 --- a/libclc/generic/lib/math/cosh.cl +++ b/libclc/opencl/lib/generic/math/cosh.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION cosh #define __CLC_BODY diff --git a/libclc/generic/lib/math/cospi.cl b/libclc/opencl/lib/generic/math/cospi.cl similarity index 94% rename from libclc/generic/lib/math/cospi.cl rename to libclc/opencl/lib/generic/math/cospi.cl index f78935664c65..05de33f74373 100644 --- a/libclc/generic/lib/math/cospi.cl +++ b/libclc/opencl/lib/generic/math/cospi.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION cospi #define __CLC_BODY diff --git a/libclc/generic/lib/math/erf.cl b/libclc/opencl/lib/generic/math/erf.cl similarity index 94% rename from libclc/generic/lib/math/erf.cl rename to libclc/opencl/lib/generic/math/erf.cl index 78c34fe0188f..ba60e4c47355 100644 --- a/libclc/generic/lib/math/erf.cl +++ b/libclc/opencl/lib/generic/math/erf.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION erf #define __CLC_BODY diff --git a/libclc/generic/lib/math/erfc.cl b/libclc/opencl/lib/generic/math/erfc.cl similarity index 94% rename from libclc/generic/lib/math/erfc.cl rename to libclc/opencl/lib/generic/math/erfc.cl index 84d578611012..4624a0452566 100644 --- a/libclc/generic/lib/math/erfc.cl +++ b/libclc/opencl/lib/generic/math/erfc.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION erfc #define __CLC_BODY diff --git a/libclc/generic/lib/math/exp.cl b/libclc/opencl/lib/generic/math/exp.cl similarity index 94% rename from libclc/generic/lib/math/exp.cl rename to libclc/opencl/lib/generic/math/exp.cl index cebd630e52ab..8b20e26716a3 100644 --- a/libclc/generic/lib/math/exp.cl +++ b/libclc/opencl/lib/generic/math/exp.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION exp #define __CLC_BODY diff --git a/libclc/generic/lib/math/exp10.cl b/libclc/opencl/lib/generic/math/exp10.cl similarity index 94% rename from libclc/generic/lib/math/exp10.cl rename to libclc/opencl/lib/generic/math/exp10.cl index 79544b26fa53..d5bcf1960d7d 100644 --- a/libclc/generic/lib/math/exp10.cl +++ b/libclc/opencl/lib/generic/math/exp10.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION exp10 #define __CLC_BODY diff --git a/libclc/generic/lib/math/exp2.cl b/libclc/opencl/lib/generic/math/exp2.cl similarity index 94% rename from libclc/generic/lib/math/exp2.cl rename to libclc/opencl/lib/generic/math/exp2.cl index 465c39174a73..130dbbd77be8 100644 --- a/libclc/generic/lib/math/exp2.cl +++ b/libclc/opencl/lib/generic/math/exp2.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION exp2 #define __CLC_BODY diff --git a/libclc/generic/lib/math/expm1.cl b/libclc/opencl/lib/generic/math/expm1.cl similarity index 94% rename from libclc/generic/lib/math/expm1.cl rename to libclc/opencl/lib/generic/math/expm1.cl index b4eed66d692b..26c3eac9e678 100644 --- a/libclc/generic/lib/math/expm1.cl +++ b/libclc/opencl/lib/generic/math/expm1.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION expm1 #define __CLC_BODY diff --git a/libclc/generic/lib/math/fabs.cl b/libclc/opencl/lib/generic/math/fabs.cl similarity index 94% rename from libclc/generic/lib/math/fabs.cl rename to libclc/opencl/lib/generic/math/fabs.cl index 2723fae8b05c..4f9cf117a85f 100644 --- a/libclc/generic/lib/math/fabs.cl +++ b/libclc/opencl/lib/generic/math/fabs.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION fabs #define __CLC_BODY diff --git a/libclc/generic/lib/math/fdim.cl b/libclc/opencl/lib/generic/math/fdim.cl similarity index 94% rename from libclc/generic/lib/math/fdim.cl rename to libclc/opencl/lib/generic/math/fdim.cl index dc078d42fd59..6b9a46c1bbe1 100644 --- a/libclc/generic/lib/math/fdim.cl +++ b/libclc/opencl/lib/generic/math/fdim.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION fdim #define __CLC_BODY diff --git a/libclc/generic/lib/math/floor.cl b/libclc/opencl/lib/generic/math/floor.cl similarity index 94% rename from libclc/generic/lib/math/floor.cl rename to libclc/opencl/lib/generic/math/floor.cl index d74a50d3a22a..9d5f5691a705 100644 --- a/libclc/generic/lib/math/floor.cl +++ b/libclc/opencl/lib/generic/math/floor.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION floor #define __CLC_BODY diff --git a/libclc/generic/lib/math/fma.cl b/libclc/opencl/lib/generic/math/fma.cl similarity index 96% rename from libclc/generic/lib/math/fma.cl rename to libclc/opencl/lib/generic/math/fma.cl index db162e1e417d..ee3395bb2c64 100644 --- a/libclc/generic/lib/math/fma.cl +++ b/libclc/opencl/lib/generic/math/fma.cl @@ -6,10 +6,10 @@ // //===----------------------------------------------------------------------===// -#include #include #include #include +#include _CLC_DEFINE_TERNARY_BUILTIN(float, fma, __clc_fma, float, float, float) diff --git a/libclc/generic/lib/math/fmax.cl b/libclc/opencl/lib/generic/math/fmax.cl similarity index 94% rename from libclc/generic/lib/math/fmax.cl rename to libclc/opencl/lib/generic/math/fmax.cl index 6ad5901eab73..6bc22823757a 100644 --- a/libclc/generic/lib/math/fmax.cl +++ b/libclc/opencl/lib/generic/math/fmax.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION fmax #define __CLC_BODY diff --git a/libclc/generic/lib/math/fmax.inc b/libclc/opencl/lib/generic/math/fmax.inc similarity index 100% rename from libclc/generic/lib/math/fmax.inc rename to libclc/opencl/lib/generic/math/fmax.inc diff --git a/libclc/generic/lib/math/fmin.cl b/libclc/opencl/lib/generic/math/fmin.cl similarity index 94% rename from libclc/generic/lib/math/fmin.cl rename to libclc/opencl/lib/generic/math/fmin.cl index bb42a2a6d647..2aea160b975e 100644 --- a/libclc/generic/lib/math/fmin.cl +++ b/libclc/opencl/lib/generic/math/fmin.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION fmin #define __CLC_BODY diff --git a/libclc/generic/lib/math/fmin.inc b/libclc/opencl/lib/generic/math/fmin.inc similarity index 100% rename from libclc/generic/lib/math/fmin.inc rename to libclc/opencl/lib/generic/math/fmin.inc diff --git a/libclc/generic/lib/math/fmod.cl b/libclc/opencl/lib/generic/math/fmod.cl similarity index 94% rename from libclc/generic/lib/math/fmod.cl rename to libclc/opencl/lib/generic/math/fmod.cl index 07f880486c0f..ddd071fdab95 100644 --- a/libclc/generic/lib/math/fmod.cl +++ b/libclc/opencl/lib/generic/math/fmod.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION fmod #define __CLC_BODY diff --git a/libclc/generic/lib/math/fract.cl b/libclc/opencl/lib/generic/math/fract.cl similarity index 94% rename from libclc/generic/lib/math/fract.cl rename to libclc/opencl/lib/generic/math/fract.cl index 54a2cf841166..c3e8b0afee78 100644 --- a/libclc/generic/lib/math/fract.cl +++ b/libclc/opencl/lib/generic/math/fract.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION fract #define __CLC_BODY diff --git a/libclc/generic/lib/math/frexp.cl b/libclc/opencl/lib/generic/math/frexp.cl similarity index 94% rename from libclc/generic/lib/math/frexp.cl rename to libclc/opencl/lib/generic/math/frexp.cl index 355e284524fa..940a8e37b5b5 100644 --- a/libclc/generic/lib/math/frexp.cl +++ b/libclc/opencl/lib/generic/math/frexp.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION frexp #define __CLC_BODY diff --git a/libclc/generic/lib/math/half_cos.cl b/libclc/opencl/lib/generic/math/half_cos.cl similarity index 95% rename from libclc/generic/lib/math/half_cos.cl rename to libclc/opencl/lib/generic/math/half_cos.cl index 1e49ebe8ce73..5bb91b8addbc 100644 --- a/libclc/generic/lib/math/half_cos.cl +++ b/libclc/opencl/lib/generic/math/half_cos.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_cos diff --git a/libclc/generic/lib/math/half_divide.cl b/libclc/opencl/lib/generic/math/half_divide.cl similarity index 95% rename from libclc/generic/lib/math/half_divide.cl rename to libclc/opencl/lib/generic/math/half_divide.cl index 29b5679f428e..8b5d8eddd67a 100644 --- a/libclc/generic/lib/math/half_divide.cl +++ b/libclc/opencl/lib/generic/math/half_divide.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_divide diff --git a/libclc/generic/lib/math/half_exp.cl b/libclc/opencl/lib/generic/math/half_exp.cl similarity index 95% rename from libclc/generic/lib/math/half_exp.cl rename to libclc/opencl/lib/generic/math/half_exp.cl index 219b26219010..97507ab2e189 100644 --- a/libclc/generic/lib/math/half_exp.cl +++ b/libclc/opencl/lib/generic/math/half_exp.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_exp diff --git a/libclc/generic/lib/math/half_exp10.cl b/libclc/opencl/lib/generic/math/half_exp10.cl similarity index 95% rename from libclc/generic/lib/math/half_exp10.cl rename to libclc/opencl/lib/generic/math/half_exp10.cl index 64132c0f9398..6925035d05f7 100644 --- a/libclc/generic/lib/math/half_exp10.cl +++ b/libclc/opencl/lib/generic/math/half_exp10.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_exp10 diff --git a/libclc/generic/lib/math/half_exp2.cl b/libclc/opencl/lib/generic/math/half_exp2.cl similarity index 95% rename from libclc/generic/lib/math/half_exp2.cl rename to libclc/opencl/lib/generic/math/half_exp2.cl index 9fddc5eb096e..5bd244482ffa 100644 --- a/libclc/generic/lib/math/half_exp2.cl +++ b/libclc/opencl/lib/generic/math/half_exp2.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_exp2 diff --git a/libclc/generic/lib/math/half_log.cl b/libclc/opencl/lib/generic/math/half_log.cl similarity index 95% rename from libclc/generic/lib/math/half_log.cl rename to libclc/opencl/lib/generic/math/half_log.cl index b3d2c2711776..28c696416698 100644 --- a/libclc/generic/lib/math/half_log.cl +++ b/libclc/opencl/lib/generic/math/half_log.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_log diff --git a/libclc/generic/lib/math/half_log10.cl b/libclc/opencl/lib/generic/math/half_log10.cl similarity index 95% rename from libclc/generic/lib/math/half_log10.cl rename to libclc/opencl/lib/generic/math/half_log10.cl index 8ef6d463b3f9..fcd0a818308c 100644 --- a/libclc/generic/lib/math/half_log10.cl +++ b/libclc/opencl/lib/generic/math/half_log10.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_log10 diff --git a/libclc/generic/lib/math/half_log2.cl b/libclc/opencl/lib/generic/math/half_log2.cl similarity index 95% rename from libclc/generic/lib/math/half_log2.cl rename to libclc/opencl/lib/generic/math/half_log2.cl index a343dbae36d7..05214e6f5a62 100644 --- a/libclc/generic/lib/math/half_log2.cl +++ b/libclc/opencl/lib/generic/math/half_log2.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_log2 diff --git a/libclc/generic/lib/math/half_powr.cl b/libclc/opencl/lib/generic/math/half_powr.cl similarity index 95% rename from libclc/generic/lib/math/half_powr.cl rename to libclc/opencl/lib/generic/math/half_powr.cl index 03c4ca7a0177..3562d3e286fa 100644 --- a/libclc/generic/lib/math/half_powr.cl +++ b/libclc/opencl/lib/generic/math/half_powr.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_powr diff --git a/libclc/generic/lib/math/half_recip.cl b/libclc/opencl/lib/generic/math/half_recip.cl similarity index 95% rename from libclc/generic/lib/math/half_recip.cl rename to libclc/opencl/lib/generic/math/half_recip.cl index 70f7625c43f5..e2650662372c 100644 --- a/libclc/generic/lib/math/half_recip.cl +++ b/libclc/opencl/lib/generic/math/half_recip.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_recip diff --git a/libclc/generic/lib/math/half_rsqrt.cl b/libclc/opencl/lib/generic/math/half_rsqrt.cl similarity index 95% rename from libclc/generic/lib/math/half_rsqrt.cl rename to libclc/opencl/lib/generic/math/half_rsqrt.cl index 3fc788d80906..4f287d72d641 100644 --- a/libclc/generic/lib/math/half_rsqrt.cl +++ b/libclc/opencl/lib/generic/math/half_rsqrt.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_rsqrt diff --git a/libclc/generic/lib/math/half_sin.cl b/libclc/opencl/lib/generic/math/half_sin.cl similarity index 95% rename from libclc/generic/lib/math/half_sin.cl rename to libclc/opencl/lib/generic/math/half_sin.cl index 6fab611610fb..c1e569618510 100644 --- a/libclc/generic/lib/math/half_sin.cl +++ b/libclc/opencl/lib/generic/math/half_sin.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_sin diff --git a/libclc/generic/lib/math/half_sqrt.cl b/libclc/opencl/lib/generic/math/half_sqrt.cl similarity index 95% rename from libclc/generic/lib/math/half_sqrt.cl rename to libclc/opencl/lib/generic/math/half_sqrt.cl index e96e127a89b3..c327881a553b 100644 --- a/libclc/generic/lib/math/half_sqrt.cl +++ b/libclc/opencl/lib/generic/math/half_sqrt.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_sqrt diff --git a/libclc/generic/lib/math/half_tan.cl b/libclc/opencl/lib/generic/math/half_tan.cl similarity index 95% rename from libclc/generic/lib/math/half_tan.cl rename to libclc/opencl/lib/generic/math/half_tan.cl index ddfcfae4ff99..0d16b08dc223 100644 --- a/libclc/generic/lib/math/half_tan.cl +++ b/libclc/opencl/lib/generic/math/half_tan.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION half_tan diff --git a/libclc/generic/lib/math/hypot.cl b/libclc/opencl/lib/generic/math/hypot.cl similarity index 94% rename from libclc/generic/lib/math/hypot.cl rename to libclc/opencl/lib/generic/math/hypot.cl index ff95bd20f6d4..3ac2983efc4b 100644 --- a/libclc/generic/lib/math/hypot.cl +++ b/libclc/opencl/lib/generic/math/hypot.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION hypot #define __CLC_BODY diff --git a/libclc/generic/lib/math/ilogb.cl b/libclc/opencl/lib/generic/math/ilogb.cl similarity index 94% rename from libclc/generic/lib/math/ilogb.cl rename to libclc/opencl/lib/generic/math/ilogb.cl index 9e3795a524b2..147f82d95d1f 100644 --- a/libclc/generic/lib/math/ilogb.cl +++ b/libclc/opencl/lib/generic/math/ilogb.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION ilogb #define __CLC_BODY diff --git a/libclc/generic/lib/math/ldexp.cl b/libclc/opencl/lib/generic/math/ldexp.cl similarity index 97% rename from libclc/generic/lib/math/ldexp.cl rename to libclc/opencl/lib/generic/math/ldexp.cl index 4dbb58fe3d5b..e3b9b2b3f136 100644 --- a/libclc/generic/lib/math/ldexp.cl +++ b/libclc/opencl/lib/generic/math/ldexp.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include _CLC_DEFINE_BINARY_BUILTIN_NO_SCALARIZE(float, ldexp, __clc_ldexp, float, int) diff --git a/libclc/generic/lib/math/ldexp.inc b/libclc/opencl/lib/generic/math/ldexp.inc similarity index 100% rename from libclc/generic/lib/math/ldexp.inc rename to libclc/opencl/lib/generic/math/ldexp.inc diff --git a/libclc/generic/lib/math/lgamma.cl b/libclc/opencl/lib/generic/math/lgamma.cl similarity index 94% rename from libclc/generic/lib/math/lgamma.cl rename to libclc/opencl/lib/generic/math/lgamma.cl index e9cc76e2220e..002a08153a3a 100644 --- a/libclc/generic/lib/math/lgamma.cl +++ b/libclc/opencl/lib/generic/math/lgamma.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION lgamma #define __CLC_BODY diff --git a/libclc/generic/lib/math/lgamma_r.cl b/libclc/opencl/lib/generic/math/lgamma_r.cl similarity index 94% rename from libclc/generic/lib/math/lgamma_r.cl rename to libclc/opencl/lib/generic/math/lgamma_r.cl index 66fdb741ca65..c44051cb4c39 100644 --- a/libclc/generic/lib/math/lgamma_r.cl +++ b/libclc/opencl/lib/generic/math/lgamma_r.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION lgamma_r #define __CLC_BODY diff --git a/libclc/generic/lib/math/log.cl b/libclc/opencl/lib/generic/math/log.cl similarity index 94% rename from libclc/generic/lib/math/log.cl rename to libclc/opencl/lib/generic/math/log.cl index 43d3fdc8d20c..78430644a55e 100644 --- a/libclc/generic/lib/math/log.cl +++ b/libclc/opencl/lib/generic/math/log.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include #define FUNCTION log #define __CLC_BODY diff --git a/libclc/generic/lib/math/log10.cl b/libclc/opencl/lib/generic/math/log10.cl similarity index 94% rename from libclc/generic/lib/math/log10.cl rename to libclc/opencl/lib/generic/math/log10.cl index db405d4929d2..01113e7c00c9 100644 --- a/libclc/generic/lib/math/log10.cl +++ b/libclc/opencl/lib/generic/math/log10.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include #define FUNCTION log10 #define __CLC_BODY diff --git a/libclc/generic/lib/math/log1p.cl b/libclc/opencl/lib/generic/math/log1p.cl similarity index 94% rename from libclc/generic/lib/math/log1p.cl rename to libclc/opencl/lib/generic/math/log1p.cl index 47245d1178a5..26c4df015bc8 100644 --- a/libclc/generic/lib/math/log1p.cl +++ b/libclc/opencl/lib/generic/math/log1p.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION log1p #define __CLC_BODY diff --git a/libclc/generic/lib/math/log2.cl b/libclc/opencl/lib/generic/math/log2.cl similarity index 94% rename from libclc/generic/lib/math/log2.cl rename to libclc/opencl/lib/generic/math/log2.cl index 6e54f433f359..d70f16d6f7d8 100644 --- a/libclc/generic/lib/math/log2.cl +++ b/libclc/opencl/lib/generic/math/log2.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include #define FUNCTION log2 #define __CLC_BODY diff --git a/libclc/generic/lib/math/logb.cl b/libclc/opencl/lib/generic/math/logb.cl similarity index 94% rename from libclc/generic/lib/math/logb.cl rename to libclc/opencl/lib/generic/math/logb.cl index 25e676ef98fb..21046f2ac98c 100644 --- a/libclc/generic/lib/math/logb.cl +++ b/libclc/opencl/lib/generic/math/logb.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION logb #define __CLC_BODY diff --git a/libclc/generic/lib/math/mad.cl b/libclc/opencl/lib/generic/math/mad.cl similarity index 96% rename from libclc/generic/lib/math/mad.cl rename to libclc/opencl/lib/generic/math/mad.cl index 611dca19f1d8..20e690309445 100644 --- a/libclc/generic/lib/math/mad.cl +++ b/libclc/opencl/lib/generic/math/mad.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include _CLC_DEFINE_TERNARY_BUILTIN(float, mad, __clc_mad, float, float, float) diff --git a/libclc/generic/lib/math/maxmag.cl b/libclc/opencl/lib/generic/math/maxmag.cl similarity index 94% rename from libclc/generic/lib/math/maxmag.cl rename to libclc/opencl/lib/generic/math/maxmag.cl index 720fc027177a..cf4cfc7ded3a 100644 --- a/libclc/generic/lib/math/maxmag.cl +++ b/libclc/opencl/lib/generic/math/maxmag.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION maxmag #define __CLC_BODY diff --git a/libclc/generic/lib/math/minmag.cl b/libclc/opencl/lib/generic/math/minmag.cl similarity index 94% rename from libclc/generic/lib/math/minmag.cl rename to libclc/opencl/lib/generic/math/minmag.cl index 37536584f8f8..e636ca7e2c40 100644 --- a/libclc/generic/lib/math/minmag.cl +++ b/libclc/opencl/lib/generic/math/minmag.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION minmag #define __CLC_BODY diff --git a/libclc/generic/lib/math/modf.cl b/libclc/opencl/lib/generic/math/modf.cl similarity index 94% rename from libclc/generic/lib/math/modf.cl rename to libclc/opencl/lib/generic/math/modf.cl index cf4eaa8012b5..7ad3a2c7550d 100644 --- a/libclc/generic/lib/math/modf.cl +++ b/libclc/opencl/lib/generic/math/modf.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION modf #define __CLC_BODY diff --git a/libclc/generic/lib/math/nan.cl b/libclc/opencl/lib/generic/math/nan.cl similarity index 100% rename from libclc/generic/lib/math/nan.cl rename to libclc/opencl/lib/generic/math/nan.cl diff --git a/libclc/generic/lib/math/nan.inc b/libclc/opencl/lib/generic/math/nan.inc similarity index 100% rename from libclc/generic/lib/math/nan.inc rename to libclc/opencl/lib/generic/math/nan.inc diff --git a/libclc/generic/lib/math/native_cos.cl b/libclc/opencl/lib/generic/math/native_cos.cl similarity index 95% rename from libclc/generic/lib/math/native_cos.cl rename to libclc/opencl/lib/generic/math/native_cos.cl index 0f4d46c1d73e..d0df03771694 100644 --- a/libclc/generic/lib/math/native_cos.cl +++ b/libclc/opencl/lib/generic/math/native_cos.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_cos diff --git a/libclc/generic/lib/math/native_divide.cl b/libclc/opencl/lib/generic/math/native_divide.cl similarity index 95% rename from libclc/generic/lib/math/native_divide.cl rename to libclc/opencl/lib/generic/math/native_divide.cl index a4d9b830b551..6bcc5ecf4d05 100644 --- a/libclc/generic/lib/math/native_divide.cl +++ b/libclc/opencl/lib/generic/math/native_divide.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_divide diff --git a/libclc/generic/lib/math/native_exp.cl b/libclc/opencl/lib/generic/math/native_exp.cl similarity index 95% rename from libclc/generic/lib/math/native_exp.cl rename to libclc/opencl/lib/generic/math/native_exp.cl index c1d08ec2c7e1..23b72fc82f8c 100644 --- a/libclc/generic/lib/math/native_exp.cl +++ b/libclc/opencl/lib/generic/math/native_exp.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_exp diff --git a/libclc/generic/lib/math/native_exp10.cl b/libclc/opencl/lib/generic/math/native_exp10.cl similarity index 95% rename from libclc/generic/lib/math/native_exp10.cl rename to libclc/opencl/lib/generic/math/native_exp10.cl index a7f3711cbedf..76cbc57cb3ba 100644 --- a/libclc/generic/lib/math/native_exp10.cl +++ b/libclc/opencl/lib/generic/math/native_exp10.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_exp10 diff --git a/libclc/generic/lib/math/native_exp2.cl b/libclc/opencl/lib/generic/math/native_exp2.cl similarity index 95% rename from libclc/generic/lib/math/native_exp2.cl rename to libclc/opencl/lib/generic/math/native_exp2.cl index ceb570733b97..107db022b6e2 100644 --- a/libclc/generic/lib/math/native_exp2.cl +++ b/libclc/opencl/lib/generic/math/native_exp2.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_exp2 diff --git a/libclc/generic/lib/math/native_log.cl b/libclc/opencl/lib/generic/math/native_log.cl similarity index 95% rename from libclc/generic/lib/math/native_log.cl rename to libclc/opencl/lib/generic/math/native_log.cl index adc2ff495f8b..3faf70674fac 100644 --- a/libclc/generic/lib/math/native_log.cl +++ b/libclc/opencl/lib/generic/math/native_log.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_log diff --git a/libclc/generic/lib/math/native_log10.cl b/libclc/opencl/lib/generic/math/native_log10.cl similarity index 95% rename from libclc/generic/lib/math/native_log10.cl rename to libclc/opencl/lib/generic/math/native_log10.cl index f63292124f3b..e71ac4448df2 100644 --- a/libclc/generic/lib/math/native_log10.cl +++ b/libclc/opencl/lib/generic/math/native_log10.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_log10 diff --git a/libclc/generic/lib/math/native_log2.cl b/libclc/opencl/lib/generic/math/native_log2.cl similarity index 95% rename from libclc/generic/lib/math/native_log2.cl rename to libclc/opencl/lib/generic/math/native_log2.cl index 6b079872b1e0..c971013c4021 100644 --- a/libclc/generic/lib/math/native_log2.cl +++ b/libclc/opencl/lib/generic/math/native_log2.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_log2 diff --git a/libclc/generic/lib/math/native_powr.cl b/libclc/opencl/lib/generic/math/native_powr.cl similarity index 95% rename from libclc/generic/lib/math/native_powr.cl rename to libclc/opencl/lib/generic/math/native_powr.cl index 31a650b79b60..ffc7e5a17437 100644 --- a/libclc/generic/lib/math/native_powr.cl +++ b/libclc/opencl/lib/generic/math/native_powr.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_powr diff --git a/libclc/generic/lib/math/native_recip.cl b/libclc/opencl/lib/generic/math/native_recip.cl similarity index 95% rename from libclc/generic/lib/math/native_recip.cl rename to libclc/opencl/lib/generic/math/native_recip.cl index 3c844495046f..cad339ecb4f7 100644 --- a/libclc/generic/lib/math/native_recip.cl +++ b/libclc/opencl/lib/generic/math/native_recip.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_recip diff --git a/libclc/generic/lib/math/native_rsqrt.cl b/libclc/opencl/lib/generic/math/native_rsqrt.cl similarity index 95% rename from libclc/generic/lib/math/native_rsqrt.cl rename to libclc/opencl/lib/generic/math/native_rsqrt.cl index cb49b2d1d670..69a387387f33 100644 --- a/libclc/generic/lib/math/native_rsqrt.cl +++ b/libclc/opencl/lib/generic/math/native_rsqrt.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_rsqrt diff --git a/libclc/generic/lib/math/native_sin.cl b/libclc/opencl/lib/generic/math/native_sin.cl similarity index 95% rename from libclc/generic/lib/math/native_sin.cl rename to libclc/opencl/lib/generic/math/native_sin.cl index 50265b393627..c1a3faed39a2 100644 --- a/libclc/generic/lib/math/native_sin.cl +++ b/libclc/opencl/lib/generic/math/native_sin.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_sin diff --git a/libclc/generic/lib/math/native_sqrt.cl b/libclc/opencl/lib/generic/math/native_sqrt.cl similarity index 95% rename from libclc/generic/lib/math/native_sqrt.cl rename to libclc/opencl/lib/generic/math/native_sqrt.cl index 4cd022e8bbeb..5b5487cfea93 100644 --- a/libclc/generic/lib/math/native_sqrt.cl +++ b/libclc/opencl/lib/generic/math/native_sqrt.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_sqrt diff --git a/libclc/generic/lib/math/native_tan.cl b/libclc/opencl/lib/generic/math/native_tan.cl similarity index 95% rename from libclc/generic/lib/math/native_tan.cl rename to libclc/opencl/lib/generic/math/native_tan.cl index 2b474ed46a5b..000d6c5f366a 100644 --- a/libclc/generic/lib/math/native_tan.cl +++ b/libclc/opencl/lib/generic/math/native_tan.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __FLOAT_ONLY #define FUNCTION native_tan diff --git a/libclc/generic/lib/math/nextafter.cl b/libclc/opencl/lib/generic/math/nextafter.cl similarity index 97% rename from libclc/generic/lib/math/nextafter.cl rename to libclc/opencl/lib/generic/math/nextafter.cl index 3dbe22492478..ecb187c53069 100644 --- a/libclc/generic/lib/math/nextafter.cl +++ b/libclc/opencl/lib/generic/math/nextafter.cl @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include _CLC_DEFINE_BINARY_BUILTIN_NO_SCALARIZE(float, nextafter, __clc_nextafter, float, float) diff --git a/libclc/generic/lib/math/pow.cl b/libclc/opencl/lib/generic/math/pow.cl similarity index 94% rename from libclc/generic/lib/math/pow.cl rename to libclc/opencl/lib/generic/math/pow.cl index a997d32e16f5..b3a77f5a2a71 100644 --- a/libclc/generic/lib/math/pow.cl +++ b/libclc/opencl/lib/generic/math/pow.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION pow #define __CLC_BODY diff --git a/libclc/generic/lib/math/pown.cl b/libclc/opencl/lib/generic/math/pown.cl similarity index 94% rename from libclc/generic/lib/math/pown.cl rename to libclc/opencl/lib/generic/math/pown.cl index 8c077f7aae14..a2ed523a41f7 100644 --- a/libclc/generic/lib/math/pown.cl +++ b/libclc/opencl/lib/generic/math/pown.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION pown #define __CLC_BODY diff --git a/libclc/generic/lib/math/powr.cl b/libclc/opencl/lib/generic/math/powr.cl similarity index 94% rename from libclc/generic/lib/math/powr.cl rename to libclc/opencl/lib/generic/math/powr.cl index 8b3df54a2434..87707198aae1 100644 --- a/libclc/generic/lib/math/powr.cl +++ b/libclc/opencl/lib/generic/math/powr.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION powr #define __CLC_BODY diff --git a/libclc/generic/lib/math/remainder.cl b/libclc/opencl/lib/generic/math/remainder.cl similarity index 94% rename from libclc/generic/lib/math/remainder.cl rename to libclc/opencl/lib/generic/math/remainder.cl index b5f96c2cd603..aeba5d59e89a 100644 --- a/libclc/generic/lib/math/remainder.cl +++ b/libclc/opencl/lib/generic/math/remainder.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION remainder #define __CLC_BODY diff --git a/libclc/generic/lib/math/remquo.cl b/libclc/opencl/lib/generic/math/remquo.cl similarity index 96% rename from libclc/generic/lib/math/remquo.cl rename to libclc/opencl/lib/generic/math/remquo.cl index d0c4b16ed7c3..94e7664edb4f 100644 --- a/libclc/generic/lib/math/remquo.cl +++ b/libclc/opencl/lib/generic/math/remquo.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define __CLC_BODY #define __CLC_ADDRESS_SPACE global diff --git a/libclc/generic/lib/math/remquo.inc b/libclc/opencl/lib/generic/math/remquo.inc similarity index 100% rename from libclc/generic/lib/math/remquo.inc rename to libclc/opencl/lib/generic/math/remquo.inc diff --git a/libclc/generic/lib/math/rint.cl b/libclc/opencl/lib/generic/math/rint.cl similarity index 94% rename from libclc/generic/lib/math/rint.cl rename to libclc/opencl/lib/generic/math/rint.cl index b84438067a9c..84ce99c4d216 100644 --- a/libclc/generic/lib/math/rint.cl +++ b/libclc/opencl/lib/generic/math/rint.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION rint #define __CLC_BODY diff --git a/libclc/generic/lib/math/rootn.cl b/libclc/opencl/lib/generic/math/rootn.cl similarity index 94% rename from libclc/generic/lib/math/rootn.cl rename to libclc/opencl/lib/generic/math/rootn.cl index b14248636e14..9f737151b390 100644 --- a/libclc/generic/lib/math/rootn.cl +++ b/libclc/opencl/lib/generic/math/rootn.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION rootn #define __CLC_BODY diff --git a/libclc/generic/lib/math/round.cl b/libclc/opencl/lib/generic/math/round.cl similarity index 94% rename from libclc/generic/lib/math/round.cl rename to libclc/opencl/lib/generic/math/round.cl index bf1ced1e8abc..0ce44e72b00a 100644 --- a/libclc/generic/lib/math/round.cl +++ b/libclc/opencl/lib/generic/math/round.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION round #define __CLC_BODY diff --git a/libclc/generic/lib/math/rsqrt.cl b/libclc/opencl/lib/generic/math/rsqrt.cl similarity index 94% rename from libclc/generic/lib/math/rsqrt.cl rename to libclc/opencl/lib/generic/math/rsqrt.cl index b2ba9ad6fc0b..7d6dcfaa3de7 100644 --- a/libclc/generic/lib/math/rsqrt.cl +++ b/libclc/opencl/lib/generic/math/rsqrt.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION rsqrt #define __CLC_BODY diff --git a/libclc/generic/lib/math/sin.cl b/libclc/opencl/lib/generic/math/sin.cl similarity index 94% rename from libclc/generic/lib/math/sin.cl rename to libclc/opencl/lib/generic/math/sin.cl index 76728cfb1c5e..293a2636c307 100644 --- a/libclc/generic/lib/math/sin.cl +++ b/libclc/opencl/lib/generic/math/sin.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION sin #define __CLC_BODY diff --git a/libclc/generic/lib/math/sincos.cl b/libclc/opencl/lib/generic/math/sincos.cl similarity index 94% rename from libclc/generic/lib/math/sincos.cl rename to libclc/opencl/lib/generic/math/sincos.cl index 25e620cf2a38..d87da4d7df91 100644 --- a/libclc/generic/lib/math/sincos.cl +++ b/libclc/opencl/lib/generic/math/sincos.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION sincos #define __CLC_BODY diff --git a/libclc/generic/lib/math/sinh.cl b/libclc/opencl/lib/generic/math/sinh.cl similarity index 94% rename from libclc/generic/lib/math/sinh.cl rename to libclc/opencl/lib/generic/math/sinh.cl index 305f9bf647ff..aa559f933088 100644 --- a/libclc/generic/lib/math/sinh.cl +++ b/libclc/opencl/lib/generic/math/sinh.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION sinh #define __CLC_BODY diff --git a/libclc/generic/lib/math/sinpi.cl b/libclc/opencl/lib/generic/math/sinpi.cl similarity index 94% rename from libclc/generic/lib/math/sinpi.cl rename to libclc/opencl/lib/generic/math/sinpi.cl index 223e7db14211..8b48426a0ef8 100644 --- a/libclc/generic/lib/math/sinpi.cl +++ b/libclc/opencl/lib/generic/math/sinpi.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION sinpi #define __CLC_BODY diff --git a/libclc/generic/lib/math/sqrt.cl b/libclc/opencl/lib/generic/math/sqrt.cl similarity index 94% rename from libclc/generic/lib/math/sqrt.cl rename to libclc/opencl/lib/generic/math/sqrt.cl index 7e4618602548..fd031daf5bfb 100644 --- a/libclc/generic/lib/math/sqrt.cl +++ b/libclc/opencl/lib/generic/math/sqrt.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION sqrt #define __CLC_BODY diff --git a/libclc/generic/lib/math/tan.cl b/libclc/opencl/lib/generic/math/tan.cl similarity index 94% rename from libclc/generic/lib/math/tan.cl rename to libclc/opencl/lib/generic/math/tan.cl index 883e33139561..6df22b9c3695 100644 --- a/libclc/generic/lib/math/tan.cl +++ b/libclc/opencl/lib/generic/math/tan.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION tan #define __CLC_BODY diff --git a/libclc/generic/lib/math/tanh.cl b/libclc/opencl/lib/generic/math/tanh.cl similarity index 94% rename from libclc/generic/lib/math/tanh.cl rename to libclc/opencl/lib/generic/math/tanh.cl index f576910f16de..ef7cb1ec5d86 100644 --- a/libclc/generic/lib/math/tanh.cl +++ b/libclc/opencl/lib/generic/math/tanh.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION tanh #define __CLC_BODY diff --git a/libclc/generic/lib/math/tanpi.cl b/libclc/opencl/lib/generic/math/tanpi.cl similarity index 94% rename from libclc/generic/lib/math/tanpi.cl rename to libclc/opencl/lib/generic/math/tanpi.cl index 8015d32adb38..2195830faf32 100644 --- a/libclc/generic/lib/math/tanpi.cl +++ b/libclc/opencl/lib/generic/math/tanpi.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION tanpi #define __CLC_BODY diff --git a/libclc/generic/lib/math/tgamma.cl b/libclc/opencl/lib/generic/math/tgamma.cl similarity index 94% rename from libclc/generic/lib/math/tgamma.cl rename to libclc/opencl/lib/generic/math/tgamma.cl index e400883d55d7..634ed7a50611 100644 --- a/libclc/generic/lib/math/tgamma.cl +++ b/libclc/opencl/lib/generic/math/tgamma.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION tgamma #define __CLC_BODY diff --git a/libclc/generic/lib/math/trunc.cl b/libclc/opencl/lib/generic/math/trunc.cl similarity index 94% rename from libclc/generic/lib/math/trunc.cl rename to libclc/opencl/lib/generic/math/trunc.cl index d668f39f2334..58f414dcc784 100644 --- a/libclc/generic/lib/math/trunc.cl +++ b/libclc/opencl/lib/generic/math/trunc.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION trunc #define __CLC_BODY diff --git a/libclc/generic/lib/misc/shuffle.cl b/libclc/opencl/lib/generic/misc/shuffle.cl similarity index 95% rename from libclc/generic/lib/misc/shuffle.cl rename to libclc/opencl/lib/generic/misc/shuffle.cl index 44bcb36bde0e..f8c5d16d2194 100644 --- a/libclc/generic/lib/misc/shuffle.cl +++ b/libclc/opencl/lib/generic/misc/shuffle.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION shuffle diff --git a/libclc/generic/lib/misc/shuffle2.cl b/libclc/opencl/lib/generic/misc/shuffle2.cl similarity index 95% rename from libclc/generic/lib/misc/shuffle2.cl rename to libclc/opencl/lib/generic/misc/shuffle2.cl index 718f5580b732..74487d07db3d 100644 --- a/libclc/generic/lib/misc/shuffle2.cl +++ b/libclc/opencl/lib/generic/misc/shuffle2.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include #define FUNCTION shuffle2 diff --git a/libclc/generic/lib/relational/all.cl b/libclc/opencl/lib/generic/relational/all.cl similarity index 97% rename from libclc/generic/lib/relational/all.cl rename to libclc/opencl/lib/generic/relational/all.cl index f5fd9af54966..43a3236bafe6 100644 --- a/libclc/generic/lib/relational/all.cl +++ b/libclc/opencl/lib/generic/relational/all.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define ALL_ID(TYPE) _CLC_OVERLOAD _CLC_DEF int all(TYPE v) diff --git a/libclc/generic/lib/relational/any.cl b/libclc/opencl/lib/generic/relational/any.cl similarity index 97% rename from libclc/generic/lib/relational/any.cl rename to libclc/opencl/lib/generic/relational/any.cl index c661b90cebc5..ae78c623f53f 100644 --- a/libclc/generic/lib/relational/any.cl +++ b/libclc/opencl/lib/generic/relational/any.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define ANY_ID(TYPE) _CLC_OVERLOAD _CLC_DEF int any(TYPE v) diff --git a/libclc/generic/lib/relational/binary_def.inc b/libclc/opencl/lib/generic/relational/binary_def.inc similarity index 100% rename from libclc/generic/lib/relational/binary_def.inc rename to libclc/opencl/lib/generic/relational/binary_def.inc diff --git a/libclc/generic/lib/relational/bitselect.cl b/libclc/opencl/lib/generic/relational/bitselect.cl similarity index 95% rename from libclc/generic/lib/relational/bitselect.cl rename to libclc/opencl/lib/generic/relational/bitselect.cl index 2dd1191cfd65..fc0a15768c5f 100644 --- a/libclc/generic/lib/relational/bitselect.cl +++ b/libclc/opencl/lib/generic/relational/bitselect.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define __CLC_BODY diff --git a/libclc/generic/lib/relational/bitselect.inc b/libclc/opencl/lib/generic/relational/bitselect.inc similarity index 100% rename from libclc/generic/lib/relational/bitselect.inc rename to libclc/opencl/lib/generic/relational/bitselect.inc diff --git a/libclc/generic/lib/relational/isequal.cl b/libclc/opencl/lib/generic/relational/isequal.cl similarity index 94% rename from libclc/generic/lib/relational/isequal.cl rename to libclc/opencl/lib/generic/relational/isequal.cl index 31f06adee00d..71109d0e0bf3 100644 --- a/libclc/generic/lib/relational/isequal.cl +++ b/libclc/opencl/lib/generic/relational/isequal.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION isequal diff --git a/libclc/generic/lib/relational/isfinite.cl b/libclc/opencl/lib/generic/relational/isfinite.cl similarity index 94% rename from libclc/generic/lib/relational/isfinite.cl rename to libclc/opencl/lib/generic/relational/isfinite.cl index 180bf9990173..7ee3ff2262f5 100644 --- a/libclc/generic/lib/relational/isfinite.cl +++ b/libclc/opencl/lib/generic/relational/isfinite.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION isfinite diff --git a/libclc/generic/lib/relational/isgreater.cl b/libclc/opencl/lib/generic/relational/isgreater.cl similarity index 94% rename from libclc/generic/lib/relational/isgreater.cl rename to libclc/opencl/lib/generic/relational/isgreater.cl index 012ad7a5cdb3..13ecfa70fa4f 100644 --- a/libclc/generic/lib/relational/isgreater.cl +++ b/libclc/opencl/lib/generic/relational/isgreater.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION isgreater diff --git a/libclc/generic/lib/relational/isgreaterequal.cl b/libclc/opencl/lib/generic/relational/isgreaterequal.cl similarity index 94% rename from libclc/generic/lib/relational/isgreaterequal.cl rename to libclc/opencl/lib/generic/relational/isgreaterequal.cl index 24fca170a167..458c4a6f6b74 100644 --- a/libclc/generic/lib/relational/isgreaterequal.cl +++ b/libclc/opencl/lib/generic/relational/isgreaterequal.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION isgreaterequal diff --git a/libclc/generic/lib/relational/isinf.cl b/libclc/opencl/lib/generic/relational/isinf.cl similarity index 94% rename from libclc/generic/lib/relational/isinf.cl rename to libclc/opencl/lib/generic/relational/isinf.cl index e295d1421547..65e987940ff5 100644 --- a/libclc/generic/lib/relational/isinf.cl +++ b/libclc/opencl/lib/generic/relational/isinf.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION isinf diff --git a/libclc/generic/lib/relational/isless.cl b/libclc/opencl/lib/generic/relational/isless.cl similarity index 94% rename from libclc/generic/lib/relational/isless.cl rename to libclc/opencl/lib/generic/relational/isless.cl index 3b295c11e1c4..e1b931aede69 100644 --- a/libclc/generic/lib/relational/isless.cl +++ b/libclc/opencl/lib/generic/relational/isless.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION isless diff --git a/libclc/generic/lib/relational/islessequal.cl b/libclc/opencl/lib/generic/relational/islessequal.cl similarity index 94% rename from libclc/generic/lib/relational/islessequal.cl rename to libclc/opencl/lib/generic/relational/islessequal.cl index 270165fe5e17..91d0891e2122 100644 --- a/libclc/generic/lib/relational/islessequal.cl +++ b/libclc/opencl/lib/generic/relational/islessequal.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION islessequal diff --git a/libclc/generic/lib/relational/islessgreater.cl b/libclc/opencl/lib/generic/relational/islessgreater.cl similarity index 94% rename from libclc/generic/lib/relational/islessgreater.cl rename to libclc/opencl/lib/generic/relational/islessgreater.cl index 2755aa5a7460..dc519cc60275 100644 --- a/libclc/generic/lib/relational/islessgreater.cl +++ b/libclc/opencl/lib/generic/relational/islessgreater.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION islessgreater diff --git a/libclc/generic/lib/relational/isnan.cl b/libclc/opencl/lib/generic/relational/isnan.cl similarity index 94% rename from libclc/generic/lib/relational/isnan.cl rename to libclc/opencl/lib/generic/relational/isnan.cl index 1a78c909bec7..6761851caffe 100644 --- a/libclc/generic/lib/relational/isnan.cl +++ b/libclc/opencl/lib/generic/relational/isnan.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION isnan diff --git a/libclc/generic/lib/relational/isnormal.cl b/libclc/opencl/lib/generic/relational/isnormal.cl similarity index 94% rename from libclc/generic/lib/relational/isnormal.cl rename to libclc/opencl/lib/generic/relational/isnormal.cl index 84a031b6bc56..42f3e1f4f434 100644 --- a/libclc/generic/lib/relational/isnormal.cl +++ b/libclc/opencl/lib/generic/relational/isnormal.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION isnormal diff --git a/libclc/generic/lib/relational/isnotequal.cl b/libclc/opencl/lib/generic/relational/isnotequal.cl similarity index 94% rename from libclc/generic/lib/relational/isnotequal.cl rename to libclc/opencl/lib/generic/relational/isnotequal.cl index e5c168aca832..f28317b8fe0f 100644 --- a/libclc/generic/lib/relational/isnotequal.cl +++ b/libclc/opencl/lib/generic/relational/isnotequal.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION isnotequal diff --git a/libclc/generic/lib/relational/isordered.cl b/libclc/opencl/lib/generic/relational/isordered.cl similarity index 94% rename from libclc/generic/lib/relational/isordered.cl rename to libclc/opencl/lib/generic/relational/isordered.cl index 563cf3d4780a..83117765d526 100644 --- a/libclc/generic/lib/relational/isordered.cl +++ b/libclc/opencl/lib/generic/relational/isordered.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION isordered diff --git a/libclc/generic/lib/relational/isunordered.cl b/libclc/opencl/lib/generic/relational/isunordered.cl similarity index 94% rename from libclc/generic/lib/relational/isunordered.cl rename to libclc/opencl/lib/generic/relational/isunordered.cl index fb707bb74e5f..26deb195a740 100644 --- a/libclc/generic/lib/relational/isunordered.cl +++ b/libclc/opencl/lib/generic/relational/isunordered.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION isunordered diff --git a/libclc/generic/lib/relational/select.cl b/libclc/opencl/lib/generic/relational/select.cl similarity index 96% rename from libclc/generic/lib/relational/select.cl rename to libclc/opencl/lib/generic/relational/select.cl index a39aaf4bce40..c29109b1d3c2 100644 --- a/libclc/generic/lib/relational/select.cl +++ b/libclc/opencl/lib/generic/relational/select.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #include diff --git a/libclc/generic/lib/relational/signbit.cl b/libclc/opencl/lib/generic/relational/signbit.cl similarity index 94% rename from libclc/generic/lib/relational/signbit.cl rename to libclc/opencl/lib/generic/relational/signbit.cl index 4828c2596bad..2b58922bf870 100644 --- a/libclc/generic/lib/relational/signbit.cl +++ b/libclc/opencl/lib/generic/relational/signbit.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define FUNCTION signbit diff --git a/libclc/generic/lib/relational/unary_def.inc b/libclc/opencl/lib/generic/relational/unary_def.inc similarity index 100% rename from libclc/generic/lib/relational/unary_def.inc rename to libclc/opencl/lib/generic/relational/unary_def.inc diff --git a/libclc/generic/lib/shared/clamp.cl b/libclc/opencl/lib/generic/shared/clamp.cl similarity index 95% rename from libclc/generic/lib/shared/clamp.cl rename to libclc/opencl/lib/generic/shared/clamp.cl index caaa0acb0656..4d00f6f8c3a6 100644 --- a/libclc/generic/lib/shared/clamp.cl +++ b/libclc/opencl/lib/generic/shared/clamp.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define __CLC_BODY diff --git a/libclc/generic/lib/shared/clamp.inc b/libclc/opencl/lib/generic/shared/clamp.inc similarity index 66% rename from libclc/generic/lib/shared/clamp.inc rename to libclc/opencl/lib/generic/shared/clamp.inc index f3ef4476377d..f79a4da67f55 100644 --- a/libclc/generic/lib/shared/clamp.inc +++ b/libclc/opencl/lib/generic/shared/clamp.inc @@ -6,12 +6,15 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE clamp(__CLC_GENTYPE x, __CLC_GENTYPE y, __CLC_GENTYPE z) { +_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE clamp(__CLC_GENTYPE x, __CLC_GENTYPE y, + __CLC_GENTYPE z) { return __clc_clamp(x, y, z); } #ifndef __CLC_SCALAR -_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE clamp(__CLC_GENTYPE x, __CLC_SCALAR_GENTYPE y, __CLC_SCALAR_GENTYPE z) { +_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE clamp(__CLC_GENTYPE x, + __CLC_SCALAR_GENTYPE y, + __CLC_SCALAR_GENTYPE z) { return __clc_clamp(x, y, z); } #endif diff --git a/libclc/generic/lib/shared/max.cl b/libclc/opencl/lib/generic/shared/max.cl similarity index 94% rename from libclc/generic/lib/shared/max.cl rename to libclc/opencl/lib/generic/shared/max.cl index 9ea532eca6b0..59f0b7e3b4c8 100644 --- a/libclc/generic/lib/shared/max.cl +++ b/libclc/opencl/lib/generic/shared/max.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define __CLC_BODY diff --git a/libclc/generic/lib/shared/max.inc b/libclc/opencl/lib/generic/shared/max.inc similarity index 100% rename from libclc/generic/lib/shared/max.inc rename to libclc/opencl/lib/generic/shared/max.inc diff --git a/libclc/generic/lib/shared/min.cl b/libclc/opencl/lib/generic/shared/min.cl similarity index 94% rename from libclc/generic/lib/shared/min.cl rename to libclc/opencl/lib/generic/shared/min.cl index f7d043f224f8..6c491c5eb1cb 100644 --- a/libclc/generic/lib/shared/min.cl +++ b/libclc/opencl/lib/generic/shared/min.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #include #define __CLC_BODY diff --git a/libclc/generic/lib/shared/min.inc b/libclc/opencl/lib/generic/shared/min.inc similarity index 100% rename from libclc/generic/lib/shared/min.inc rename to libclc/opencl/lib/generic/shared/min.inc diff --git a/libclc/generic/lib/shared/vload.cl b/libclc/opencl/lib/generic/shared/vload.cl similarity index 99% rename from libclc/generic/lib/shared/vload.cl rename to libclc/opencl/lib/generic/shared/vload.cl index dd3a0ada456e..41f3629443e7 100644 --- a/libclc/generic/lib/shared/vload.cl +++ b/libclc/opencl/lib/generic/shared/vload.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #define VLOAD_VECTORIZE(PRIM_TYPE, ADDR_SPACE) \ typedef PRIM_TYPE##2 less_aligned_##ADDR_SPACE##PRIM_TYPE##2 \ diff --git a/libclc/generic/lib/shared/vload_half.inc b/libclc/opencl/lib/generic/shared/vload_half.inc similarity index 100% rename from libclc/generic/lib/shared/vload_half.inc rename to libclc/opencl/lib/generic/shared/vload_half.inc diff --git a/libclc/generic/lib/shared/vstore.cl b/libclc/opencl/lib/generic/shared/vstore.cl similarity index 99% rename from libclc/generic/lib/shared/vstore.cl rename to libclc/opencl/lib/generic/shared/vstore.cl index 5d039d07f5e2..78d5865aa1d1 100644 --- a/libclc/generic/lib/shared/vstore.cl +++ b/libclc/opencl/lib/generic/shared/vstore.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable diff --git a/libclc/generic/lib/shared/vstore_half.inc b/libclc/opencl/lib/generic/shared/vstore_half.inc similarity index 100% rename from libclc/generic/lib/shared/vstore_half.inc rename to libclc/opencl/lib/generic/shared/vstore_half.inc diff --git a/libclc/generic/lib/subnormal_config.cl b/libclc/opencl/lib/generic/subnormal_config.cl similarity index 76% rename from libclc/generic/lib/subnormal_config.cl rename to libclc/opencl/lib/generic/subnormal_config.cl index a77886800ba6..a32af9b0cf2e 100644 --- a/libclc/generic/lib/subnormal_config.cl +++ b/libclc/opencl/lib/generic/subnormal_config.cl @@ -6,16 +6,12 @@ // //===----------------------------------------------------------------------===// -#include #include +#include -_CLC_DEF bool __clc_fp16_subnormals_supported() { - return false; -} +_CLC_DEF bool __clc_fp16_subnormals_supported() { return false; } -_CLC_DEF bool __clc_fp32_subnormals_supported() { - return false; -} +_CLC_DEF bool __clc_fp32_subnormals_supported() { return false; } _CLC_DEF bool __clc_fp64_subnormals_supported() { return !__clc_subnormals_disabled(); diff --git a/libclc/generic/lib/subnormal_disable.ll b/libclc/opencl/lib/generic/subnormal_disable.ll similarity index 100% rename from libclc/generic/lib/subnormal_disable.ll rename to libclc/opencl/lib/generic/subnormal_disable.ll diff --git a/libclc/generic/lib/subnormal_helper_func.ll b/libclc/opencl/lib/generic/subnormal_helper_func.ll similarity index 100% rename from libclc/generic/lib/subnormal_helper_func.ll rename to libclc/opencl/lib/generic/subnormal_helper_func.ll diff --git a/libclc/generic/lib/subnormal_use_default.ll b/libclc/opencl/lib/generic/subnormal_use_default.ll similarity index 100% rename from libclc/generic/lib/subnormal_use_default.ll rename to libclc/opencl/lib/generic/subnormal_use_default.ll diff --git a/libclc/generic/lib/workitem/get_global_id.cl b/libclc/opencl/lib/generic/workitem/get_global_id.cl similarity index 87% rename from libclc/generic/lib/workitem/get_global_id.cl rename to libclc/opencl/lib/generic/workitem/get_global_id.cl index c1f384734e4d..26c3bf528cd4 100644 --- a/libclc/generic/lib/workitem/get_global_id.cl +++ b/libclc/opencl/lib/generic/workitem/get_global_id.cl @@ -6,8 +6,9 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_global_id(uint dim) { - return get_group_id(dim) * get_local_size(dim) + get_local_id(dim) + get_global_offset(dim); + return get_group_id(dim) * get_local_size(dim) + get_local_id(dim) + + get_global_offset(dim); } diff --git a/libclc/generic/lib/workitem/get_global_size.cl b/libclc/opencl/lib/generic/workitem/get_global_size.cl similarity index 84% rename from libclc/generic/lib/workitem/get_global_size.cl rename to libclc/opencl/lib/generic/workitem/get_global_size.cl index 909d2b013c95..747115d52488 100644 --- a/libclc/generic/lib/workitem/get_global_size.cl +++ b/libclc/opencl/lib/generic/workitem/get_global_size.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_global_size(uint dim) { - return get_num_groups(dim)*get_local_size(dim); + return get_num_groups(dim) * get_local_size(dim); } diff --git a/libclc/ptx-nvidiacl/lib/SOURCES b/libclc/opencl/lib/ptx-nvidiacl/SOURCES similarity index 100% rename from libclc/ptx-nvidiacl/lib/SOURCES rename to libclc/opencl/lib/ptx-nvidiacl/SOURCES diff --git a/libclc/ptx-nvidiacl/lib/mem_fence/fence.cl b/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl similarity index 96% rename from libclc/ptx-nvidiacl/lib/mem_fence/fence.cl rename to libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl index 85ab3b427aaa..284a0517d330 100644 --- a/libclc/ptx-nvidiacl/lib/mem_fence/fence.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD void mem_fence(cl_mem_fence_flags flags) { if (flags & (CLK_GLOBAL_MEM_FENCE | CLK_LOCAL_MEM_FENCE)) diff --git a/libclc/ptx-nvidiacl/lib/synchronization/barrier.cl b/libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl similarity index 94% rename from libclc/ptx-nvidiacl/lib/synchronization/barrier.cl rename to libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl index e10e15f44f68..173d771ccaa3 100644 --- a/libclc/ptx-nvidiacl/lib/synchronization/barrier.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD void barrier(cl_mem_fence_flags flags) { __syncthreads(); diff --git a/libclc/ptx-nvidiacl/lib/workitem/get_global_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_global_id.cl similarity index 94% rename from libclc/ptx-nvidiacl/lib/workitem/get_global_id.cl rename to libclc/opencl/lib/ptx-nvidiacl/workitem/get_global_id.cl index 0db82fbb7ac6..2f1f7cd4250f 100644 --- a/libclc/ptx-nvidiacl/lib/workitem/get_global_id.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_global_id.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_global_id(uint dim) { return get_group_id(dim) * get_local_size(dim) + get_local_id(dim); diff --git a/libclc/ptx-nvidiacl/lib/workitem/get_group_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_group_id.cl similarity index 67% rename from libclc/ptx-nvidiacl/lib/workitem/get_group_id.cl rename to libclc/opencl/lib/ptx-nvidiacl/workitem/get_group_id.cl index b9908ccb78e8..0dad4c2061fe 100644 --- a/libclc/ptx-nvidiacl/lib/workitem/get_group_id.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_group_id.cl @@ -6,13 +6,17 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_group_id(uint dim) { switch (dim) { - case 0: return __nvvm_read_ptx_sreg_ctaid_x(); - case 1: return __nvvm_read_ptx_sreg_ctaid_y(); - case 2: return __nvvm_read_ptx_sreg_ctaid_z(); - default: return 0; + case 0: + return __nvvm_read_ptx_sreg_ctaid_x(); + case 1: + return __nvvm_read_ptx_sreg_ctaid_y(); + case 2: + return __nvvm_read_ptx_sreg_ctaid_z(); + default: + return 0; } } diff --git a/libclc/ptx-nvidiacl/lib/workitem/get_local_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_id.cl similarity index 68% rename from libclc/ptx-nvidiacl/lib/workitem/get_local_id.cl rename to libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_id.cl index 1b36032ca97b..199b4610bdb7 100644 --- a/libclc/ptx-nvidiacl/lib/workitem/get_local_id.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_id.cl @@ -6,13 +6,17 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_local_id(uint dim) { switch (dim) { - case 0: return __nvvm_read_ptx_sreg_tid_x(); - case 1: return __nvvm_read_ptx_sreg_tid_y(); - case 2: return __nvvm_read_ptx_sreg_tid_z(); - default: return 0; + case 0: + return __nvvm_read_ptx_sreg_tid_x(); + case 1: + return __nvvm_read_ptx_sreg_tid_y(); + case 2: + return __nvvm_read_ptx_sreg_tid_z(); + default: + return 0; } } diff --git a/libclc/ptx-nvidiacl/lib/workitem/get_local_size.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_size.cl similarity index 68% rename from libclc/ptx-nvidiacl/lib/workitem/get_local_size.cl rename to libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_size.cl index dee134e614f2..a93fa0a3c964 100644 --- a/libclc/ptx-nvidiacl/lib/workitem/get_local_size.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_size.cl @@ -6,13 +6,17 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_local_size(uint dim) { switch (dim) { - case 0: return __nvvm_read_ptx_sreg_ntid_x(); - case 1: return __nvvm_read_ptx_sreg_ntid_y(); - case 2: return __nvvm_read_ptx_sreg_ntid_z(); - default: return 0; + case 0: + return __nvvm_read_ptx_sreg_ntid_x(); + case 1: + return __nvvm_read_ptx_sreg_ntid_y(); + case 2: + return __nvvm_read_ptx_sreg_ntid_z(); + default: + return 0; } } diff --git a/libclc/ptx-nvidiacl/lib/workitem/get_num_groups.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_groups.cl similarity index 67% rename from libclc/ptx-nvidiacl/lib/workitem/get_num_groups.cl rename to libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_groups.cl index 25cae3c9716e..4c934968df86 100644 --- a/libclc/ptx-nvidiacl/lib/workitem/get_num_groups.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_groups.cl @@ -6,13 +6,17 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_num_groups(uint dim) { switch (dim) { - case 0: return __nvvm_read_ptx_sreg_nctaid_x(); - case 1: return __nvvm_read_ptx_sreg_nctaid_y(); - case 2: return __nvvm_read_ptx_sreg_nctaid_z(); - default: return 0; + case 0: + return __nvvm_read_ptx_sreg_nctaid_x(); + case 1: + return __nvvm_read_ptx_sreg_nctaid_y(); + case 2: + return __nvvm_read_ptx_sreg_nctaid_z(); + default: + return 0; } } diff --git a/libclc/r600/lib/SOURCES b/libclc/opencl/lib/r600/SOURCES similarity index 100% rename from libclc/r600/lib/SOURCES rename to libclc/opencl/lib/r600/SOURCES diff --git a/libclc/r600/lib/SOURCES_3.9 b/libclc/opencl/lib/r600/SOURCES_3.9 similarity index 100% rename from libclc/r600/lib/SOURCES_3.9 rename to libclc/opencl/lib/r600/SOURCES_3.9 diff --git a/libclc/r600/lib/image/get_image_attributes_impl.ll b/libclc/opencl/lib/r600/image/get_image_attributes_impl.ll similarity index 100% rename from libclc/r600/lib/image/get_image_attributes_impl.ll rename to libclc/opencl/lib/r600/image/get_image_attributes_impl.ll diff --git a/libclc/r600/lib/image/get_image_channel_data_type.cl b/libclc/opencl/lib/r600/image/get_image_channel_data_type.cl similarity index 77% rename from libclc/r600/lib/image/get_image_channel_data_type.cl rename to libclc/opencl/lib/r600/image/get_image_channel_data_type.cl index d04cfd42a058..813572ae5d2d 100644 --- a/libclc/r600/lib/image/get_image_channel_data_type.cl +++ b/libclc/opencl/lib/r600/image/get_image_channel_data_type.cl @@ -6,16 +6,14 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL int __clc_get_image_channel_data_type_2d(image2d_t); _CLC_DECL int __clc_get_image_channel_data_type_3d(image3d_t); -_CLC_OVERLOAD _CLC_DEF int -get_image_channel_data_type(image2d_t image) { +_CLC_OVERLOAD _CLC_DEF int get_image_channel_data_type(image2d_t image) { return __clc_get_image_channel_data_type_2d(image); } -_CLC_OVERLOAD _CLC_DEF int -get_image_channel_data_type(image3d_t image) { +_CLC_OVERLOAD _CLC_DEF int get_image_channel_data_type(image3d_t image) { return __clc_get_image_channel_data_type_3d(image); } diff --git a/libclc/r600/lib/image/get_image_channel_order.cl b/libclc/opencl/lib/r600/image/get_image_channel_order.cl similarity index 77% rename from libclc/r600/lib/image/get_image_channel_order.cl rename to libclc/opencl/lib/r600/image/get_image_channel_order.cl index 164804fa147c..0e5882b15507 100644 --- a/libclc/r600/lib/image/get_image_channel_order.cl +++ b/libclc/opencl/lib/r600/image/get_image_channel_order.cl @@ -6,16 +6,14 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL int __clc_get_image_channel_order_2d(image2d_t); _CLC_DECL int __clc_get_image_channel_order_3d(image3d_t); -_CLC_OVERLOAD _CLC_DEF int -get_image_channel_order(image2d_t image) { +_CLC_OVERLOAD _CLC_DEF int get_image_channel_order(image2d_t image) { return __clc_get_image_channel_order_2d(image); } -_CLC_OVERLOAD _CLC_DEF int -get_image_channel_order(image3d_t image) { +_CLC_OVERLOAD _CLC_DEF int get_image_channel_order(image3d_t image) { return __clc_get_image_channel_order_3d(image); } diff --git a/libclc/r600/lib/image/get_image_depth.cl b/libclc/opencl/lib/r600/image/get_image_depth.cl similarity index 76% rename from libclc/r600/lib/image/get_image_depth.cl rename to libclc/opencl/lib/r600/image/get_image_depth.cl index dd4b3747172b..431889b6ca25 100644 --- a/libclc/r600/lib/image/get_image_depth.cl +++ b/libclc/opencl/lib/r600/image/get_image_depth.cl @@ -6,11 +6,10 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL int __clc_get_image_depth_3d(image3d_t); -_CLC_OVERLOAD _CLC_DEF int -get_image_depth(image3d_t image) { - return __clc_get_image_depth_3d(image); +_CLC_OVERLOAD _CLC_DEF int get_image_depth(image3d_t image) { + return __clc_get_image_depth_3d(image); } diff --git a/libclc/r600/lib/image/get_image_dim.cl b/libclc/opencl/lib/r600/image/get_image_dim.cl similarity index 78% rename from libclc/r600/lib/image/get_image_dim.cl rename to libclc/opencl/lib/r600/image/get_image_dim.cl index 1cb8d4d3a6dc..5a123425a291 100644 --- a/libclc/r600/lib/image/get_image_dim.cl +++ b/libclc/opencl/lib/r600/image/get_image_dim.cl @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include +#include -_CLC_OVERLOAD _CLC_DEF int2 get_image_dim (image2d_t image) { +_CLC_OVERLOAD _CLC_DEF int2 get_image_dim(image2d_t image) { return (int2)(get_image_width(image), get_image_height(image)); } -_CLC_OVERLOAD _CLC_DEF int4 get_image_dim (image3d_t image) { +_CLC_OVERLOAD _CLC_DEF int4 get_image_dim(image3d_t image) { return (int4)(get_image_width(image), get_image_height(image), get_image_depth(image), 0); } diff --git a/libclc/r600/lib/image/get_image_height.cl b/libclc/opencl/lib/r600/image/get_image_height.cl similarity index 78% rename from libclc/r600/lib/image/get_image_height.cl rename to libclc/opencl/lib/r600/image/get_image_height.cl index 2d869e318314..0c498bed8e60 100644 --- a/libclc/r600/lib/image/get_image_height.cl +++ b/libclc/opencl/lib/r600/image/get_image_height.cl @@ -6,16 +6,14 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL int __clc_get_image_height_2d(image2d_t); _CLC_DECL int __clc_get_image_height_3d(image3d_t); -_CLC_OVERLOAD _CLC_DEF int -get_image_height(image2d_t image) { +_CLC_OVERLOAD _CLC_DEF int get_image_height(image2d_t image) { return __clc_get_image_height_2d(image); } -_CLC_OVERLOAD _CLC_DEF int -get_image_height(image3d_t image) { +_CLC_OVERLOAD _CLC_DEF int get_image_height(image3d_t image) { return __clc_get_image_height_3d(image); } diff --git a/libclc/r600/lib/image/get_image_width.cl b/libclc/opencl/lib/r600/image/get_image_width.cl similarity index 78% rename from libclc/r600/lib/image/get_image_width.cl rename to libclc/opencl/lib/r600/image/get_image_width.cl index a0c68f15e006..c54f66176e76 100644 --- a/libclc/r600/lib/image/get_image_width.cl +++ b/libclc/opencl/lib/r600/image/get_image_width.cl @@ -6,16 +6,14 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL int __clc_get_image_width_2d(image2d_t); _CLC_DECL int __clc_get_image_width_3d(image3d_t); -_CLC_OVERLOAD _CLC_DEF int -get_image_width(image2d_t image) { +_CLC_OVERLOAD _CLC_DEF int get_image_width(image2d_t image) { return __clc_get_image_width_2d(image); } -_CLC_OVERLOAD _CLC_DEF int -get_image_width(image3d_t image) { +_CLC_OVERLOAD _CLC_DEF int get_image_width(image3d_t image) { return __clc_get_image_width_3d(image); } diff --git a/libclc/r600/lib/image/read_image_impl.ll b/libclc/opencl/lib/r600/image/read_image_impl.ll similarity index 97% rename from libclc/r600/lib/image/read_image_impl.ll rename to libclc/opencl/lib/r600/image/read_image_impl.ll index 9187469b191f..00b80b63f4f7 100644 --- a/libclc/r600/lib/image/read_image_impl.ll +++ b/libclc/opencl/lib/r600/image/read_image_impl.ll @@ -17,7 +17,7 @@ declare i32 @llvm.OpenCL.sampler.get.resource.id(i32) readnone define <4 x float> @__clc_v4f_from_v2f(<2 x float> %v) alwaysinline { %e0 = extractelement <2 x float> %v, i32 0 %e1 = extractelement <2 x float> %v, i32 1 - %res.0 = insertelement <4 x float> undef, float %e0, i32 0 + %res.0 = insertelement <4 x float> poison, float %e0, i32 0 %res.1 = insertelement <4 x float> %res.0, float %e1, i32 1 %res.2 = insertelement <4 x float> %res.1, float 0.0, i32 2 %res.3 = insertelement <4 x float> %res.2, float 0.0, i32 3 diff --git a/libclc/r600/lib/image/read_imagef.cl b/libclc/opencl/lib/r600/image/read_imagef.cl similarity index 96% rename from libclc/r600/lib/image/read_imagef.cl rename to libclc/opencl/lib/r600/image/read_imagef.cl index 010f3cd59e1f..54983363e33c 100644 --- a/libclc/r600/lib/image/read_imagef.cl +++ b/libclc/opencl/lib/r600/image/read_imagef.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL float4 __clc_read_imagef_tex(image2d_t, sampler_t, float2); diff --git a/libclc/r600/lib/image/read_imagei.cl b/libclc/opencl/lib/r600/image/read_imagei.cl similarity index 85% rename from libclc/r600/lib/image/read_imagei.cl rename to libclc/opencl/lib/r600/image/read_imagei.cl index fbdf4f7f7c58..918a444f90a1 100644 --- a/libclc/r600/lib/image/read_imagei.cl +++ b/libclc/opencl/lib/r600/image/read_imagei.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL float4 __clc_read_imagef_tex(image2d_t, sampler_t, float2); @@ -14,7 +14,7 @@ int4 __clc_reinterpret_v4f_to_v4i(float4 v) { union { int4 v4i; float4 v4f; - } res = { .v4f = v}; + } res = {.v4f = v}; return res.v4i; } @@ -22,10 +22,10 @@ _CLC_OVERLOAD _CLC_DEF int4 read_imagei(image2d_t image, sampler_t sampler, int2 coord) { float2 coord_float = (float2)(coord.x, coord.y); return __clc_reinterpret_v4f_to_v4i( - __clc_read_imagef_tex(image, sampler, coord_float)); + __clc_read_imagef_tex(image, sampler, coord_float)); } _CLC_OVERLOAD _CLC_DEF int4 read_imagei(image2d_t image, sampler_t sampler, float2 coord) { return __clc_reinterpret_v4f_to_v4i( - __clc_read_imagef_tex(image, sampler, coord)); + __clc_read_imagef_tex(image, sampler, coord)); } diff --git a/libclc/r600/lib/image/read_imageui.cl b/libclc/opencl/lib/r600/image/read_imageui.cl similarity index 85% rename from libclc/r600/lib/image/read_imageui.cl rename to libclc/opencl/lib/r600/image/read_imageui.cl index bd0024776fe1..8236b542ea0e 100644 --- a/libclc/r600/lib/image/read_imageui.cl +++ b/libclc/opencl/lib/r600/image/read_imageui.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL float4 __clc_read_imagef_tex(image2d_t, sampler_t, float2); @@ -14,7 +14,7 @@ uint4 __clc_reinterpret_v4f_to_v4ui(float4 v) { union { uint4 v4ui; float4 v4f; - } res = { .v4f = v}; + } res = {.v4f = v}; return res.v4ui; } @@ -22,10 +22,10 @@ _CLC_OVERLOAD _CLC_DEF uint4 read_imageui(image2d_t image, sampler_t sampler, int2 coord) { float2 coord_float = (float2)(coord.x, coord.y); return __clc_reinterpret_v4f_to_v4ui( - __clc_read_imagef_tex(image, sampler, coord_float)); + __clc_read_imagef_tex(image, sampler, coord_float)); } _CLC_OVERLOAD _CLC_DEF uint4 read_imageui(image2d_t image, sampler_t sampler, float2 coord) { return __clc_reinterpret_v4f_to_v4ui( - __clc_read_imagef_tex(image, sampler, coord)); + __clc_read_imagef_tex(image, sampler, coord)); } diff --git a/libclc/r600/lib/image/write_image_impl.ll b/libclc/opencl/lib/r600/image/write_image_impl.ll similarity index 97% rename from libclc/r600/lib/image/write_image_impl.ll rename to libclc/opencl/lib/r600/image/write_image_impl.ll index f3dea44c7927..0759f0e2f944 100644 --- a/libclc/r600/lib/image/write_image_impl.ll +++ b/libclc/opencl/lib/r600/image/write_image_impl.ll @@ -23,7 +23,7 @@ define void @__clc_write_imageui_2d( ; Coordinate int2 -> int4. %e0 = extractelement <2 x i32> %coord, i32 0 %e1 = extractelement <2 x i32> %coord, i32 1 - %coord.0 = insertelement <4 x i32> undef, i32 %e0, i32 0 + %coord.0 = insertelement <4 x i32> poison, i32 %e0, i32 0 %coord.1 = insertelement <4 x i32> %coord.0, i32 %e1, i32 1 %coord.2 = insertelement <4 x i32> %coord.1, i32 0, i32 2 %coord.3 = insertelement <4 x i32> %coord.2, i32 0, i32 3 diff --git a/libclc/r600/lib/image/write_imagef.cl b/libclc/opencl/lib/r600/image/write_imagef.cl similarity index 76% rename from libclc/r600/lib/image/write_imagef.cl rename to libclc/opencl/lib/r600/image/write_imagef.cl index cd16dceb0f19..d9784f5322c9 100644 --- a/libclc/r600/lib/image/write_imagef.cl +++ b/libclc/opencl/lib/r600/image/write_imagef.cl @@ -6,12 +6,11 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL void __clc_write_imagef_2d(image2d_t image, int2 coord, float4 color); -_CLC_OVERLOAD _CLC_DEF void -write_imagef(image2d_t image, int2 coord, float4 color) -{ +_CLC_OVERLOAD _CLC_DEF void write_imagef(image2d_t image, int2 coord, + float4 color) { __clc_write_imagef_2d(image, coord, color); } diff --git a/libclc/r600/lib/image/write_imagei.cl b/libclc/opencl/lib/r600/image/write_imagei.cl similarity index 76% rename from libclc/r600/lib/image/write_imagei.cl rename to libclc/opencl/lib/r600/image/write_imagei.cl index dae95e0743a2..ced65184071b 100644 --- a/libclc/r600/lib/image/write_imagei.cl +++ b/libclc/opencl/lib/r600/image/write_imagei.cl @@ -6,12 +6,11 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL void __clc_write_imagei_2d(image2d_t image, int2 coord, int4 color); -_CLC_OVERLOAD _CLC_DEF void -write_imagei(image2d_t image, int2 coord, int4 color) -{ +_CLC_OVERLOAD _CLC_DEF void write_imagei(image2d_t image, int2 coord, + int4 color) { __clc_write_imagei_2d(image, coord, color); } diff --git a/libclc/r600/lib/image/write_imageui.cl b/libclc/opencl/lib/r600/image/write_imageui.cl similarity index 76% rename from libclc/r600/lib/image/write_imageui.cl rename to libclc/opencl/lib/r600/image/write_imageui.cl index 3524ad57e5b1..ef2ee5a835ec 100644 --- a/libclc/r600/lib/image/write_imageui.cl +++ b/libclc/opencl/lib/r600/image/write_imageui.cl @@ -6,12 +6,11 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL void __clc_write_imageui_2d(image2d_t image, int2 coord, uint4 color); -_CLC_OVERLOAD _CLC_DEF void -write_imageui(image2d_t image, int2 coord, uint4 color) -{ +_CLC_OVERLOAD _CLC_DEF void write_imageui(image2d_t image, int2 coord, + uint4 color) { __clc_write_imageui_2d(image, coord, color); } diff --git a/libclc/r600/lib/synchronization/barrier.cl b/libclc/opencl/lib/r600/synchronization/barrier.cl similarity index 95% rename from libclc/r600/lib/synchronization/barrier.cl rename to libclc/opencl/lib/r600/synchronization/barrier.cl index c235be90b7f1..83438efa2649 100644 --- a/libclc/r600/lib/synchronization/barrier.cl +++ b/libclc/opencl/lib/r600/synchronization/barrier.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF void __clc_r600_barrier(void) __asm("llvm.r600.group.barrier"); diff --git a/libclc/r600/lib/workitem/get_global_offset.cl b/libclc/opencl/lib/r600/workitem/get_global_offset.cl similarity index 95% rename from libclc/r600/lib/workitem/get_global_offset.cl rename to libclc/opencl/lib/r600/workitem/get_global_offset.cl index 1c47108df9a6..cc42fe4beef0 100644 --- a/libclc/r600/lib/workitem/get_global_offset.cl +++ b/libclc/opencl/lib/r600/workitem/get_global_offset.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD uint get_global_offset(uint dim) { __attribute__((address_space(7))) uint *ptr = diff --git a/libclc/r600/lib/workitem/get_global_size.cl b/libclc/opencl/lib/r600/workitem/get_global_size.cl similarity index 96% rename from libclc/r600/lib/workitem/get_global_size.cl rename to libclc/opencl/lib/r600/workitem/get_global_size.cl index b95accc8d830..1c93568f80c7 100644 --- a/libclc/r600/lib/workitem/get_global_size.cl +++ b/libclc/opencl/lib/r600/workitem/get_global_size.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include uint __clc_r600_get_global_size_x(void) __asm("llvm.r600.read.global.size.x"); uint __clc_r600_get_global_size_y(void) __asm("llvm.r600.read.global.size.y"); diff --git a/libclc/r600/lib/workitem/get_group_id.cl b/libclc/opencl/lib/r600/workitem/get_group_id.cl similarity index 95% rename from libclc/r600/lib/workitem/get_group_id.cl rename to libclc/opencl/lib/r600/workitem/get_group_id.cl index b31431e903ae..c771e835cda1 100644 --- a/libclc/r600/lib/workitem/get_group_id.cl +++ b/libclc/opencl/lib/r600/workitem/get_group_id.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD uint get_group_id(uint dim) { switch (dim) { diff --git a/libclc/r600/lib/workitem/get_local_id.cl b/libclc/opencl/lib/r600/workitem/get_local_id.cl similarity index 95% rename from libclc/r600/lib/workitem/get_local_id.cl rename to libclc/opencl/lib/r600/workitem/get_local_id.cl index 2241715c2c70..9d8e044812f2 100644 --- a/libclc/r600/lib/workitem/get_local_id.cl +++ b/libclc/opencl/lib/r600/workitem/get_local_id.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD uint get_local_id(uint dim) { switch (dim) { diff --git a/libclc/r600/lib/workitem/get_local_size.cl b/libclc/opencl/lib/r600/workitem/get_local_size.cl similarity index 96% rename from libclc/r600/lib/workitem/get_local_size.cl rename to libclc/opencl/lib/r600/workitem/get_local_size.cl index 97e6b41ca7c6..3755cf5e8b0e 100644 --- a/libclc/r600/lib/workitem/get_local_size.cl +++ b/libclc/opencl/lib/r600/workitem/get_local_size.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include uint __clc_r600_get_local_size_x(void) __asm("llvm.r600.read.local.size.x"); uint __clc_r600_get_local_size_y(void) __asm("llvm.r600.read.local.size.y"); diff --git a/libclc/r600/lib/workitem/get_num_groups.cl b/libclc/opencl/lib/r600/workitem/get_num_groups.cl similarity index 96% rename from libclc/r600/lib/workitem/get_num_groups.cl rename to libclc/opencl/lib/r600/workitem/get_num_groups.cl index 564189daf4fb..088a055aabfc 100644 --- a/libclc/r600/lib/workitem/get_num_groups.cl +++ b/libclc/opencl/lib/r600/workitem/get_num_groups.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include uint __clc_r600_get_num_groups_x(void) __asm("llvm.r600.read.ngroups.x"); uint __clc_r600_get_num_groups_y(void) __asm("llvm.r600.read.ngroups.y"); diff --git a/libclc/r600/lib/workitem/get_work_dim.cl b/libclc/opencl/lib/r600/workitem/get_work_dim.cl similarity index 95% rename from libclc/r600/lib/workitem/get_work_dim.cl rename to libclc/opencl/lib/r600/workitem/get_work_dim.cl index 0fadbe34e17d..b59dd3af6c33 100644 --- a/libclc/r600/lib/workitem/get_work_dim.cl +++ b/libclc/opencl/lib/r600/workitem/get_work_dim.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD uint get_work_dim(void) { __attribute__((address_space(7))) uint *ptr = diff --git a/libclc/opencl/lib/spirv/SOURCES b/libclc/opencl/lib/spirv/SOURCES new file mode 100644 index 000000000000..0aa923978e9f --- /dev/null +++ b/libclc/opencl/lib/spirv/SOURCES @@ -0,0 +1,73 @@ +subnormal_config.cl +../generic/async/async_work_group_strided_copy.cl +../generic/async/wait_group_events.cl +../generic/common/degrees.cl +../generic/common/mix.cl +../generic/common/radians.cl +../generic/common/sign.cl +../generic/common/smoothstep.cl +../generic/common/step.cl +../generic/geometric/cross.cl +../generic/geometric/distance.cl +../generic/geometric/dot.cl +../generic/geometric/fast_distance.cl +../generic/geometric/fast_length.cl +../generic/geometric/fast_normalize.cl +../generic/geometric/length.cl +../generic/geometric/normalize.cl +../generic/integer/rotate.cl +../generic/integer/mad_sat.cl +../generic/math/acos.cl +../generic/math/acosh.cl +../generic/math/acospi.cl +../generic/math/asin.cl +../generic/math/asinh.cl +../generic/math/asinpi.cl +../generic/math/atan.cl +../generic/math/atan2.cl +../generic/math/atan2pi.cl +../generic/math/atanh.cl +../generic/math/atanpi.cl +../generic/math/cbrt.cl +../generic/math/cos.cl +../generic/math/cosh.cl +../generic/math/cospi.cl +../generic/math/erf.cl +../generic/math/erfc.cl +../generic/math/exp.cl +../generic/math/expm1.cl +../generic/math/exp2.cl +../generic/math/exp10.cl +math/fma.cl +../generic/math/fmod.cl +../generic/math/fract.cl +../generic/math/frexp.cl +../generic/math/half_rsqrt.cl +../generic/math/half_sqrt.cl +../generic/math/hypot.cl +../generic/math/ilogb.cl +../generic/math/ldexp.cl +../generic/math/lgamma.cl +../generic/math/lgamma_r.cl +../generic/math/log.cl +../generic/math/log10.cl +../generic/math/log1p.cl +../generic/math/log2.cl +../generic/math/logb.cl +../generic/math/modf.cl +../generic/math/pow.cl +../generic/math/pown.cl +../generic/math/powr.cl +../generic/math/remainder.cl +../generic/math/remquo.cl +../generic/math/rootn.cl +../generic/math/sin.cl +../generic/math/sincos.cl +../generic/math/sinh.cl +../generic/math/sinpi.cl +../generic/math/tan.cl +../generic/math/tanh.cl +../generic/math/tanpi.cl +../generic/math/tgamma.cl +../generic/shared/vload.cl +../generic/shared/vstore.cl diff --git a/libclc/clspv/lib/math/fma.cl b/libclc/opencl/lib/spirv/math/fma.cl similarity index 94% rename from libclc/clspv/lib/math/fma.cl rename to libclc/opencl/lib/spirv/math/fma.cl index 0f3e4222dc55..272201812122 100644 --- a/libclc/clspv/lib/math/fma.cl +++ b/libclc/opencl/lib/spirv/math/fma.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include #include +#include _CLC_DEFINE_TERNARY_BUILTIN(float, fma, __clc_sw_fma, float, float, float) diff --git a/libclc/clspv/lib/subnormal_config.cl b/libclc/opencl/lib/spirv/subnormal_config.cl similarity index 95% rename from libclc/clspv/lib/subnormal_config.cl rename to libclc/opencl/lib/spirv/subnormal_config.cl index ef0e1d774244..77d60ab9cbbd 100644 --- a/libclc/clspv/lib/subnormal_config.cl +++ b/libclc/opencl/lib/spirv/subnormal_config.cl @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include #include +#include _CLC_DEF bool __clc_fp16_subnormals_supported() { return false; } diff --git a/libclc/spirv/lib/SOURCES b/libclc/spirv/lib/SOURCES deleted file mode 100644 index f3852ebe3e3e..000000000000 --- a/libclc/spirv/lib/SOURCES +++ /dev/null @@ -1,73 +0,0 @@ -subnormal_config.cl -../../generic/lib/async/async_work_group_strided_copy.cl -../../generic/lib/async/wait_group_events.cl -../../generic/lib/common/degrees.cl -../../generic/lib/common/mix.cl -../../generic/lib/common/radians.cl -../../generic/lib/common/sign.cl -../../generic/lib/common/smoothstep.cl -../../generic/lib/common/step.cl -../../generic/lib/geometric/cross.cl -../../generic/lib/geometric/distance.cl -../../generic/lib/geometric/dot.cl -../../generic/lib/geometric/fast_distance.cl -../../generic/lib/geometric/fast_length.cl -../../generic/lib/geometric/fast_normalize.cl -../../generic/lib/geometric/length.cl -../../generic/lib/geometric/normalize.cl -../../generic/lib/integer/rotate.cl -../../generic/lib/integer/mad_sat.cl -../../generic/lib/math/acos.cl -../../generic/lib/math/acosh.cl -../../generic/lib/math/acospi.cl -../../generic/lib/math/asin.cl -../../generic/lib/math/asinh.cl -../../generic/lib/math/asinpi.cl -../../generic/lib/math/atan.cl -../../generic/lib/math/atan2.cl -../../generic/lib/math/atan2pi.cl -../../generic/lib/math/atanh.cl -../../generic/lib/math/atanpi.cl -../../generic/lib/math/cbrt.cl -../../generic/lib/math/cos.cl -../../generic/lib/math/cosh.cl -../../generic/lib/math/cospi.cl -../../generic/lib/math/erf.cl -../../generic/lib/math/erfc.cl -../../generic/lib/math/exp.cl -../../generic/lib/math/expm1.cl -../../generic/lib/math/exp2.cl -../../generic/lib/math/exp10.cl -math/fma.cl -../../generic/lib/math/fmod.cl -../../generic/lib/math/fract.cl -../../generic/lib/math/frexp.cl -../../generic/lib/math/half_rsqrt.cl -../../generic/lib/math/half_sqrt.cl -../../generic/lib/math/hypot.cl -../../generic/lib/math/ilogb.cl -../../generic/lib/math/ldexp.cl -../../generic/lib/math/lgamma.cl -../../generic/lib/math/lgamma_r.cl -../../generic/lib/math/log.cl -../../generic/lib/math/log10.cl -../../generic/lib/math/log1p.cl -../../generic/lib/math/log2.cl -../../generic/lib/math/logb.cl -../../generic/lib/math/modf.cl -../../generic/lib/math/pow.cl -../../generic/lib/math/pown.cl -../../generic/lib/math/powr.cl -../../generic/lib/math/remainder.cl -../../generic/lib/math/remquo.cl -../../generic/lib/math/rootn.cl -../../generic/lib/math/sin.cl -../../generic/lib/math/sincos.cl -../../generic/lib/math/sinh.cl -../../generic/lib/math/sinpi.cl -../../generic/lib/math/tan.cl -../../generic/lib/math/tanh.cl -../../generic/lib/math/tanpi.cl -../../generic/lib/math/tgamma.cl -../../generic/lib/shared/vload.cl -../../generic/lib/shared/vstore.cl diff --git a/libclc/generic/lib/gen_convert.py b/libclc/utils/gen_convert.py similarity index 99% rename from libclc/generic/lib/gen_convert.py rename to libclc/utils/gen_convert.py index b8c7050095fc..02893dbad6a3 100644 --- a/libclc/generic/lib/gen_convert.py +++ b/libclc/utils/gen_convert.py @@ -167,7 +167,7 @@ def conditional_guard(src, dst): nl = "\n" includes = [] if not clc: - includes = [""] + includes = [""] else: includes = sorted( [ @@ -355,7 +355,6 @@ def generate_saturated_conversion(src, dst, size): print(" return x;") elif src in float_types: - # Conversion from float to int print( f""" {dstn} y = __clc_convert_{dstn}(x); @@ -364,7 +363,6 @@ def generate_saturated_conversion(src, dst, size): return y;""" ) else: - # Integer to integer convesion with sizeof(src) == sizeof(dst) if sizeof_type[src] == sizeof_type[dst]: if src in unsigned_types: