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