[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / libclc / r600 / lib / image / read_imagei.cl
blobb973aae94a078894c710b16789c3c1155b65b8f4
1 #include <clc/clc.h>
3 _CLC_DECL float4 __clc_read_imagef_tex(image2d_t, sampler_t, float2);
5 int4 __clc_reinterpret_v4f_to_v4i(float4 v) {
6 union {
7 int4 v4i;
8 float4 v4f;
9 } res = { .v4f = v};
10 return res.v4i;
13 _CLC_OVERLOAD _CLC_DEF int4 read_imagei(image2d_t image, sampler_t sampler,
14 int2 coord) {
15 float2 coord_float = (float2)(coord.x, coord.y);
16 return __clc_reinterpret_v4f_to_v4i(
17 __clc_read_imagef_tex(image, sampler, coord_float));
19 _CLC_OVERLOAD _CLC_DEF int4 read_imagei(image2d_t image, sampler_t sampler,
20 float2 coord) {
21 return __clc_reinterpret_v4f_to_v4i(
22 __clc_read_imagef_tex(image, sampler, coord));