HIP: Heterogenous-computing Interface for Portability
texture_functions.h
1 /*
2 Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved.
3 
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10 
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
21 */
22 
23 #ifndef HIP_INCLUDE_HIP_HCC_DETAIL_TEXTURE_FUNCTIONS_H
24 #define HIP_INCLUDE_HIP_HCC_DETAIL_TEXTURE_FUNCTIONS_H
25 
26 #include <hc.hpp>
27 #include <hc_short_vector.hpp>
29 
30 union TData {
31  hc::short_vector::float4::vector_value_type f;
32  hc::short_vector::int4::vector_value_type i;
33  hc::short_vector::uint4::vector_value_type u;
34 };
35 
36 #define __TEXTURE_FUNCTIONS_DECL__ static __inline__ __device__
37 
38 
39 #if (__hcc_workweek__ >= 18114)
40 #define ADDRESS_SPACE_CONSTANT __attribute__((address_space(4)))
41 #else
42 #define ADDRESS_SPACE_CONSTANT __attribute__((address_space(2)))
43 #endif
44 
45 #define TEXTURE_PARAMETERS_INIT \
46  unsigned int ADDRESS_SPACE_CONSTANT* i = (unsigned int ADDRESS_SPACE_CONSTANT*)textureObject; \
47  unsigned int ADDRESS_SPACE_CONSTANT* s = i + HIP_SAMPLER_OBJECT_OFFSET_DWORD; \
48  TData texel;
49 #define TEXTURE_REF_PARAMETERS_INIT \
50  unsigned int ADDRESS_SPACE_CONSTANT* i = (unsigned int ADDRESS_SPACE_CONSTANT*)texRef.textureObject; \
51  unsigned int ADDRESS_SPACE_CONSTANT* s = i + HIP_SAMPLER_OBJECT_OFFSET_DWORD; \
52  TData texel;
53 #define TEXTURE_SET_FLOAT *retVal = texel.f.x;
54 
55 #define TEXTURE_SET_SIGNED *retVal = texel.i.x;
56 
57 #define TEXTURE_SET_UNSIGNED *retVal = texel.u.x;
58 
59 #define TEXTURE_SET_FLOAT_X retVal->x = texel.f.x;
60 
61 #define TEXTURE_SET_SIGNED_X retVal->x = texel.i.x;
62 
63 #define TEXTURE_SET_UNSIGNED_X retVal->x = texel.u.x;
64 
65 #define TEXTURE_SET_FLOAT_XY \
66  retVal->x = texel.f.x; \
67  retVal->y = texel.f.y;
68 
69 #define TEXTURE_SET_SIGNED_XY \
70  retVal->x = texel.i.x; \
71  retVal->y = texel.i.y;
72 
73 #define TEXTURE_SET_UNSIGNED_XY \
74  retVal->x = texel.u.x; \
75  retVal->y = texel.u.y;
76 
77 #define TEXTURE_SET_FLOAT_XYZW \
78  retVal->x = texel.f.x; \
79  retVal->y = texel.f.y; \
80  retVal->z = texel.f.z; \
81  retVal->w = texel.f.w;
82 
83 #define TEXTURE_SET_SIGNED_XYZW \
84  retVal->x = texel.i.x; \
85  retVal->y = texel.i.y; \
86  retVal->z = texel.i.z; \
87  retVal->w = texel.i.w;
88 
89 #define TEXTURE_SET_UNSIGNED_XYZW \
90  retVal->x = texel.u.x; \
91  retVal->y = texel.u.y; \
92  retVal->z = texel.u.z; \
93  retVal->w = texel.u.w;
94 
95 #define TEXTURE_RETURN_CHAR return texel.i.x;
96 
97 #define TEXTURE_RETURN_UCHAR return texel.u.x;
98 
99 #define TEXTURE_RETURN_SHORT return texel.i.x;
100 
101 #define TEXTURE_RETURN_USHORT return texel.u.x;
102 
103 #define TEXTURE_RETURN_INT return texel.i.x;
104 
105 #define TEXTURE_RETURN_UINT return texel.u.x;
106 
107 #define TEXTURE_RETURN_FLOAT return texel.f.x;
108 
109 #define TEXTURE_RETURN_SIGNED return texel.i.x;
110 
111 #define TEXTURE_RETURN_UNSIGNED return texel.u.x;
112 
113 #define TEXTURE_RETURN_CHAR_X return char1(texel.i.x);
114 
115 #define TEXTURE_RETURN_UCHAR_X return uchar1(texel.u.x);
116 
117 #define TEXTURE_RETURN_SHORT_X return short1(texel.i.x);
118 
119 #define TEXTURE_RETURN_USHORT_X return ushort1(texel.u.x);
120 
121 #define TEXTURE_RETURN_INT_X return int1(texel.i.x);
122 
123 #define TEXTURE_RETURN_UINT_X return uint1(texel.u.x);
124 
125 #define TEXTURE_RETURN_FLOAT_X return float1(texel.f.x);
126 
127 #define TEXTURE_RETURN_CHAR_XY return char2(texel.i.x, texel.i.y);
128 
129 #define TEXTURE_RETURN_UCHAR_XY return uchar2(texel.u.x, texel.u.y);
130 
131 #define TEXTURE_RETURN_SHORT_XY return short2(texel.i.x, texel.i.y);
132 
133 #define TEXTURE_RETURN_USHORT_XY return ushort2(texel.u.x, texel.u.y);
134 
135 #define TEXTURE_RETURN_INT_XY return int2(texel.i.x, texel.i.y);
136 
137 #define TEXTURE_RETURN_UINT_XY return uint2(texel.u.x, texel.u.y);
138 
139 #define TEXTURE_RETURN_FLOAT_XY return float2(texel.f.x, texel.f.y);
140 
141 #define TEXTURE_RETURN_CHAR_XYZW return char4(texel.i.x, texel.i.y, texel.i.z, texel.i.w);
142 
143 #define TEXTURE_RETURN_UCHAR_XYZW return uchar4(texel.u.x, texel.u.y, texel.u.z, texel.u.w);
144 
145 #define TEXTURE_RETURN_SHORT_XYZW return short4(texel.i.x, texel.i.y, texel.i.z, texel.i.w);
146 
147 #define TEXTURE_RETURN_USHORT_XYZW return ushort4(texel.u.x, texel.u.y, texel.u.z, texel.u.w);
148 
149 #define TEXTURE_RETURN_INT_XYZW return int4(texel.i.x, texel.i.y, texel.i.z, texel.i.w);
150 
151 #define TEXTURE_RETURN_UINT_XYZW return uint4(texel.u.x, texel.u.y, texel.u.z, texel.u.w);
152 
153 #define TEXTURE_RETURN_FLOAT_XYZW return float4(texel.f.x, texel.f.y, texel.f.z, texel.f.w);
154 
155 extern "C" {
156 hc::short_vector::float4::vector_value_type __ockl_image_sample_1D(unsigned int ADDRESS_SPACE_CONSTANT* i,
157  unsigned int ADDRESS_SPACE_CONSTANT* s,
158  float c)[[hc]];
159 
160 hc::short_vector::float4::vector_value_type __ockl_image_sample_1Da(
161  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
162  hc::short_vector::float2::vector_value_type c)[[hc]];
163 
164 hc::short_vector::float4::vector_value_type __ockl_image_sample_2D(
165  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
166  hc::short_vector::float2::vector_value_type c)[[hc]];
167 
168 
169 hc::short_vector::float4::vector_value_type __ockl_image_sample_2Da(
170  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
171  hc::short_vector::float4::vector_value_type c)[[hc]];
172 
173 float __ockl_image_sample_2Dad(unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
174  hc::short_vector::float4::vector_value_type c)[[hc]];
175 
176 float __ockl_image_sample_2Dd(unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
177  hc::short_vector::float2::vector_value_type c)[[hc]];
178 
179 hc::short_vector::float4::vector_value_type __ockl_image_sample_3D(
180  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
181  hc::short_vector::float4::vector_value_type c)[[hc]];
182 
183 hc::short_vector::float4::vector_value_type __ockl_image_sample_grad_1D(
184  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s, float c, float dx,
185  float dy)[[hc]];
186 
187 hc::short_vector::float4::vector_value_type __ockl_image_sample_grad_1Da(
188  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
189  hc::short_vector::float2::vector_value_type c, float dx, float dy)[[hc]];
190 
191 hc::short_vector::float4::vector_value_type __ockl_image_sample_grad_2D(
192  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
193  hc::short_vector::float2::vector_value_type c, hc::short_vector::float2::vector_value_type dx,
194  hc::short_vector::float2::vector_value_type dy)[[hc]];
195 
196 hc::short_vector::float4::vector_value_type __ockl_image_sample_grad_2Da(
197  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
198  hc::short_vector::float4::vector_value_type c, hc::short_vector::float2::vector_value_type dx,
199  hc::short_vector::float2::vector_value_type dy)[[hc]];
200 
201 float __ockl_image_sample_grad_2Dad(unsigned int ADDRESS_SPACE_CONSTANT* i,
202  unsigned int ADDRESS_SPACE_CONSTANT* s,
203  hc::short_vector::float4::vector_value_type c,
204  hc::short_vector::float2::vector_value_type dx,
205  hc::short_vector::float2::vector_value_type dy)[[hc]];
206 
207 float __ockl_image_sample_grad_2Dd(unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
208  hc::short_vector::float2::vector_value_type c,
209  hc::short_vector::float2::vector_value_type dx,
210  hc::short_vector::float2::vector_value_type dy)[[hc]];
211 
212 hc::short_vector::float4::vector_value_type __ockl_image_sample_grad_3D(
213  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
214  hc::short_vector::float4::vector_value_type c, hc::short_vector::float4::vector_value_type dx,
215  hc::short_vector::float4::vector_value_type dy)[[hc]];
216 
217 hc::short_vector::float4::vector_value_type __ockl_image_sample_lod_1D(
218  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s, float c, float l)[[hc]];
219 
220 hc::short_vector::float4::vector_value_type __ockl_image_sample_lod_1Da(
221  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
222  hc::short_vector::float2::vector_value_type c, float l)[[hc]];
223 
224 hc::short_vector::float4::vector_value_type __ockl_image_sample_lod_2D(
225  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
226  hc::short_vector::float2::vector_value_type c, float l)[[hc]];
227 
228 hc::short_vector::float4::vector_value_type __ockl_image_sample_lod_2Da(
229  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
230  hc::short_vector::float4::vector_value_type c, float l)[[hc]];
231 
232 float __ockl_image_sample_lod_2Dad(unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
233  hc::short_vector::float4::vector_value_type c, float l)[[hc]];
234 
235 float __ockl_image_sample_lod_2Dd(unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
236  hc::short_vector::float2::vector_value_type c, float l)[[hc]];
237 
238 hc::short_vector::float4::vector_value_type __ockl_image_sample_lod_3D(
239  unsigned int ADDRESS_SPACE_CONSTANT* i, unsigned int ADDRESS_SPACE_CONSTANT* s,
240  hc::short_vector::float4::vector_value_type c, float l)[[hc]];
241 }
242 
244 // Texture object APIs
246 
247 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(char* retVal, hipTextureObject_t textureObject, int x) {
248  TEXTURE_PARAMETERS_INIT;
249  texel.f = __ockl_image_sample_1D(i, s, x);
250  TEXTURE_SET_SIGNED;
251 }
252 
253 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(char1* retVal, hipTextureObject_t textureObject, int x) {
254  TEXTURE_PARAMETERS_INIT;
255  texel.f = __ockl_image_sample_1D(i, s, x);
256  TEXTURE_SET_SIGNED_X;
257 }
258 
259 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(char2* retVal, hipTextureObject_t textureObject, int x) {
260  TEXTURE_PARAMETERS_INIT;
261  texel.f = __ockl_image_sample_1D(i, s, x);
262  TEXTURE_SET_SIGNED_XY;
263 }
264 
265 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(char4* retVal, hipTextureObject_t textureObject, int x) {
266  TEXTURE_PARAMETERS_INIT;
267  texel.f = __ockl_image_sample_1D(i, s, x);
268  TEXTURE_SET_SIGNED_XYZW;
269 }
270 
271 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(unsigned char* retVal, hipTextureObject_t textureObject,
272  int x) {
273  TEXTURE_PARAMETERS_INIT;
274  texel.f = __ockl_image_sample_1D(i, s, x);
275  TEXTURE_SET_UNSIGNED;
276 }
277 
278 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(uchar1* retVal, hipTextureObject_t textureObject,
279  int x) {
280  TEXTURE_PARAMETERS_INIT;
281  texel.f = __ockl_image_sample_1D(i, s, x);
282  TEXTURE_SET_UNSIGNED_X;
283 }
284 
285 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(uchar2* retVal, hipTextureObject_t textureObject,
286  int x) {
287  TEXTURE_PARAMETERS_INIT;
288  texel.f = __ockl_image_sample_1D(i, s, x);
289  TEXTURE_SET_UNSIGNED_XY;
290 }
291 
292 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(uchar4* retVal, hipTextureObject_t textureObject,
293  int x) {
294  TEXTURE_PARAMETERS_INIT;
295  texel.f = __ockl_image_sample_1D(i, s, x);
296  TEXTURE_SET_UNSIGNED_XYZW;
297 }
298 
299 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(short* retVal, hipTextureObject_t textureObject, int x) {
300  TEXTURE_PARAMETERS_INIT;
301  texel.f = __ockl_image_sample_1D(i, s, x);
302  TEXTURE_SET_SIGNED;
303 }
304 
305 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(short1* retVal, hipTextureObject_t textureObject,
306  int x) {
307  TEXTURE_PARAMETERS_INIT;
308  texel.f = __ockl_image_sample_1D(i, s, x);
309  TEXTURE_SET_SIGNED_X;
310 }
311 
312 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(short2* retVal, hipTextureObject_t textureObject,
313  int x) {
314  TEXTURE_PARAMETERS_INIT;
315  texel.f = __ockl_image_sample_1D(i, s, x);
316  TEXTURE_SET_SIGNED_XY;
317 }
318 
319 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(short4* retVal, hipTextureObject_t textureObject,
320  int x) {
321  TEXTURE_PARAMETERS_INIT;
322  texel.f = __ockl_image_sample_1D(i, s, x);
323  TEXTURE_SET_SIGNED_XYZW;
324 }
325 
326 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(unsigned short* retVal, hipTextureObject_t textureObject,
327  int x) {
328  TEXTURE_PARAMETERS_INIT;
329  texel.f = __ockl_image_sample_1D(i, s, x);
330  TEXTURE_SET_SIGNED;
331 }
332 
333 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(ushort1* retVal, hipTextureObject_t textureObject,
334  int x) {
335  TEXTURE_PARAMETERS_INIT;
336  texel.f = __ockl_image_sample_1D(i, s, x);
337  TEXTURE_SET_UNSIGNED_X;
338 }
339 
340 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(ushort2* retVal, hipTextureObject_t textureObject,
341  int x) {
342  TEXTURE_PARAMETERS_INIT;
343  texel.f = __ockl_image_sample_1D(i, s, x);
344  TEXTURE_SET_UNSIGNED_XY;
345 }
346 
347 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(ushort4* retVal, hipTextureObject_t textureObject,
348  int x) {
349  TEXTURE_PARAMETERS_INIT;
350  texel.f = __ockl_image_sample_1D(i, s, x);
351  TEXTURE_SET_UNSIGNED_XYZW;
352 }
353 
354 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(int* retVal, hipTextureObject_t textureObject, int x) {
355  TEXTURE_PARAMETERS_INIT;
356  texel.f = __ockl_image_sample_1D(i, s, x);
357  TEXTURE_SET_SIGNED;
358 }
359 
360 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(int1* retVal, hipTextureObject_t textureObject, int x) {
361  TEXTURE_PARAMETERS_INIT;
362  texel.f = __ockl_image_sample_1D(i, s, x);
363  TEXTURE_SET_SIGNED_X;
364 }
365 
366 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(int2* retVal, hipTextureObject_t textureObject, int x) {
367  TEXTURE_PARAMETERS_INIT;
368  texel.f = __ockl_image_sample_1D(i, s, x);
369  TEXTURE_SET_SIGNED_XY;
370 }
371 
372 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(int4* retVal, hipTextureObject_t textureObject, int x) {
373  TEXTURE_PARAMETERS_INIT;
374  texel.f = __ockl_image_sample_1D(i, s, x);
375  TEXTURE_SET_SIGNED_XYZW;
376 }
377 
378 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(unsigned int* retVal, hipTextureObject_t textureObject,
379  int x) {
380  TEXTURE_PARAMETERS_INIT;
381  texel.f = __ockl_image_sample_1D(i, s, x);
382  TEXTURE_SET_UNSIGNED;
383 }
384 
385 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(uint1* retVal, hipTextureObject_t textureObject, int x) {
386  TEXTURE_PARAMETERS_INIT;
387  texel.f = __ockl_image_sample_1D(i, s, x);
388  TEXTURE_SET_UNSIGNED_X;
389 }
390 
391 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(uint2* retVal, hipTextureObject_t textureObject, int x) {
392  TEXTURE_PARAMETERS_INIT;
393  texel.f = __ockl_image_sample_1D(i, s, x);
394  TEXTURE_SET_UNSIGNED_XY;
395 }
396 
397 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(uint4* retVal, hipTextureObject_t textureObject, int x) {
398  TEXTURE_PARAMETERS_INIT;
399  texel.f = __ockl_image_sample_1D(i, s, x);
400  TEXTURE_SET_UNSIGNED_XYZW;
401 }
402 
403 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(float* retVal, hipTextureObject_t textureObject, int x) {
404  TEXTURE_PARAMETERS_INIT;
405  texel.f = __ockl_image_sample_1D(i, s, x);
406  TEXTURE_SET_FLOAT;
407 }
408 
409 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(float1* retVal, hipTextureObject_t textureObject,
410  int x) {
411  TEXTURE_PARAMETERS_INIT;
412  texel.f = __ockl_image_sample_1D(i, s, x);
413  TEXTURE_SET_FLOAT_X;
414 }
415 
416 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(float2* retVal, hipTextureObject_t textureObject,
417  int x) {
418  TEXTURE_PARAMETERS_INIT;
419  texel.f = __ockl_image_sample_1D(i, s, x);
420  TEXTURE_SET_FLOAT_XY;
421 }
422 
423 __TEXTURE_FUNCTIONS_DECL__ void tex1Dfetch(float4* retVal, hipTextureObject_t textureObject,
424  int x) {
425  TEXTURE_PARAMETERS_INIT;
426  texel.f = __ockl_image_sample_1D(i, s, x);
427  TEXTURE_SET_FLOAT_XYZW;
428 }
429 
430 template <class T>
431 __TEXTURE_FUNCTIONS_DECL__ T tex1Dfetch(hipTextureObject_t textureObject, int x) {
432  T ret;
433  tex1Dfetch(&ret, textureObject, x);
434  return ret;
435 }
436 
438 __TEXTURE_FUNCTIONS_DECL__ void tex1D(char* retVal, hipTextureObject_t textureObject, float x) {
439  TEXTURE_PARAMETERS_INIT;
440  texel.f = __ockl_image_sample_1D(i, s, x);
441  TEXTURE_SET_SIGNED;
442 }
443 
444 __TEXTURE_FUNCTIONS_DECL__ void tex1D(char1* retVal, hipTextureObject_t textureObject, float x) {
445  TEXTURE_PARAMETERS_INIT;
446  texel.f = __ockl_image_sample_1D(i, s, x);
447  TEXTURE_SET_SIGNED_X;
448 }
449 
450 __TEXTURE_FUNCTIONS_DECL__ void tex1D(char2* retVal, hipTextureObject_t textureObject, float x) {
451  TEXTURE_PARAMETERS_INIT;
452  texel.f = __ockl_image_sample_1D(i, s, x);
453  TEXTURE_SET_SIGNED_XY;
454 }
455 
456 __TEXTURE_FUNCTIONS_DECL__ void tex1D(char4* retVal, hipTextureObject_t textureObject, float x) {
457  TEXTURE_PARAMETERS_INIT;
458  texel.f = __ockl_image_sample_1D(i, s, x);
459  TEXTURE_SET_SIGNED_XYZW;
460 }
461 
462 __TEXTURE_FUNCTIONS_DECL__ void tex1D(unsigned char* retVal, hipTextureObject_t textureObject,
463  float x) {
464  TEXTURE_PARAMETERS_INIT;
465  texel.f = __ockl_image_sample_1D(i, s, x);
466  TEXTURE_SET_UNSIGNED;
467 }
468 
469 __TEXTURE_FUNCTIONS_DECL__ void tex1D(uchar1* retVal, hipTextureObject_t textureObject, float x) {
470  TEXTURE_PARAMETERS_INIT;
471  texel.f = __ockl_image_sample_1D(i, s, x);
472  TEXTURE_SET_UNSIGNED_X;
473 }
474 
475 __TEXTURE_FUNCTIONS_DECL__ void tex1D(uchar2* retVal, hipTextureObject_t textureObject, float x) {
476  TEXTURE_PARAMETERS_INIT;
477  texel.f = __ockl_image_sample_1D(i, s, x);
478  TEXTURE_SET_UNSIGNED_XY;
479 }
480 
481 __TEXTURE_FUNCTIONS_DECL__ void tex1D(uchar4* retVal, hipTextureObject_t textureObject, float x) {
482  TEXTURE_PARAMETERS_INIT;
483  texel.f = __ockl_image_sample_1D(i, s, x);
484  TEXTURE_SET_UNSIGNED_XYZW;
485 }
486 
487 __TEXTURE_FUNCTIONS_DECL__ void tex1D(short* retVal, hipTextureObject_t textureObject, float x) {
488  TEXTURE_PARAMETERS_INIT;
489  texel.f = __ockl_image_sample_1D(i, s, x);
490  TEXTURE_SET_SIGNED;
491 }
492 
493 __TEXTURE_FUNCTIONS_DECL__ void tex1D(short1* retVal, hipTextureObject_t textureObject, float x) {
494  TEXTURE_PARAMETERS_INIT;
495  texel.f = __ockl_image_sample_1D(i, s, x);
496  TEXTURE_SET_SIGNED_X;
497 }
498 
499 __TEXTURE_FUNCTIONS_DECL__ void tex1D(short2* retVal, hipTextureObject_t textureObject, float x) {
500  TEXTURE_PARAMETERS_INIT;
501  texel.f = __ockl_image_sample_1D(i, s, x);
502  TEXTURE_SET_SIGNED_XY;
503 }
504 
505 __TEXTURE_FUNCTIONS_DECL__ void tex1D(short4* retVal, hipTextureObject_t textureObject, float x) {
506  TEXTURE_PARAMETERS_INIT;
507  texel.f = __ockl_image_sample_1D(i, s, x);
508  TEXTURE_SET_SIGNED_XYZW;
509 }
510 
511 __TEXTURE_FUNCTIONS_DECL__ void tex1D(unsigned short* retVal, hipTextureObject_t textureObject,
512  float x) {
513  TEXTURE_PARAMETERS_INIT;
514  texel.f = __ockl_image_sample_1D(i, s, x);
515  TEXTURE_SET_UNSIGNED;
516 }
517 
518 __TEXTURE_FUNCTIONS_DECL__ void tex1D(ushort1* retVal, hipTextureObject_t textureObject, float x) {
519  TEXTURE_PARAMETERS_INIT;
520  texel.f = __ockl_image_sample_1D(i, s, x);
521  TEXTURE_SET_UNSIGNED_X;
522 }
523 
524 __TEXTURE_FUNCTIONS_DECL__ void tex1D(ushort2* retVal, hipTextureObject_t textureObject, float x) {
525  TEXTURE_PARAMETERS_INIT;
526  texel.f = __ockl_image_sample_1D(i, s, x);
527  TEXTURE_SET_UNSIGNED_XY;
528 }
529 
530 __TEXTURE_FUNCTIONS_DECL__ void tex1D(ushort4* retVal, hipTextureObject_t textureObject, float x) {
531  TEXTURE_PARAMETERS_INIT;
532  texel.f = __ockl_image_sample_1D(i, s, x);
533  TEXTURE_SET_UNSIGNED_XYZW;
534 }
535 
536 __TEXTURE_FUNCTIONS_DECL__ void tex1D(int* retVal, hipTextureObject_t textureObject, float x) {
537  TEXTURE_PARAMETERS_INIT;
538  texel.f = __ockl_image_sample_1D(i, s, x);
539  TEXTURE_SET_SIGNED;
540 }
541 
542 __TEXTURE_FUNCTIONS_DECL__ void tex1D(int1* retVal, hipTextureObject_t textureObject, float x) {
543  TEXTURE_PARAMETERS_INIT;
544  texel.f = __ockl_image_sample_1D(i, s, x);
545  TEXTURE_SET_SIGNED_X;
546 }
547 
548 __TEXTURE_FUNCTIONS_DECL__ void tex1D(int2* retVal, hipTextureObject_t textureObject, float x) {
549  TEXTURE_PARAMETERS_INIT;
550  texel.f = __ockl_image_sample_1D(i, s, x);
551  TEXTURE_SET_SIGNED_XY;
552 }
553 
554 __TEXTURE_FUNCTIONS_DECL__ void tex1D(int4* retVal, hipTextureObject_t textureObject, float x) {
555  TEXTURE_PARAMETERS_INIT;
556  texel.f = __ockl_image_sample_1D(i, s, x);
557  TEXTURE_SET_SIGNED_XYZW;
558 }
559 
560 __TEXTURE_FUNCTIONS_DECL__ void tex1D(unsigned int* retVal, hipTextureObject_t textureObject,
561  float x) {
562  TEXTURE_PARAMETERS_INIT;
563  texel.f = __ockl_image_sample_1D(i, s, x);
564  TEXTURE_SET_UNSIGNED;
565 }
566 
567 __TEXTURE_FUNCTIONS_DECL__ void tex1D(uint1* retVal, hipTextureObject_t textureObject, float x) {
568  TEXTURE_PARAMETERS_INIT;
569  texel.f = __ockl_image_sample_1D(i, s, x);
570  TEXTURE_SET_UNSIGNED_X;
571 }
572 
573 __TEXTURE_FUNCTIONS_DECL__ void tex1D(uint2* retVal, hipTextureObject_t textureObject, float x) {
574  TEXTURE_PARAMETERS_INIT;
575  texel.f = __ockl_image_sample_1D(i, s, x);
576  TEXTURE_SET_UNSIGNED_XY;
577 }
578 
579 __TEXTURE_FUNCTIONS_DECL__ void tex1D(uint4* retVal, hipTextureObject_t textureObject, float x) {
580  TEXTURE_PARAMETERS_INIT;
581  texel.f = __ockl_image_sample_1D(i, s, x);
582  TEXTURE_SET_UNSIGNED_XYZW;
583 }
584 
585 __TEXTURE_FUNCTIONS_DECL__ void tex1D(float* retVal, hipTextureObject_t textureObject, float x) {
586  TEXTURE_PARAMETERS_INIT;
587  texel.f = __ockl_image_sample_1D(i, s, x);
588  TEXTURE_SET_FLOAT;
589 }
590 
591 __TEXTURE_FUNCTIONS_DECL__ void tex1D(float1* retVal, hipTextureObject_t textureObject, float x) {
592  TEXTURE_PARAMETERS_INIT;
593  texel.f = __ockl_image_sample_1D(i, s, x);
594  TEXTURE_SET_FLOAT_X;
595 }
596 
597 __TEXTURE_FUNCTIONS_DECL__ void tex1D(float2* retVal, hipTextureObject_t textureObject, float x) {
598  TEXTURE_PARAMETERS_INIT;
599  texel.f = __ockl_image_sample_1D(i, s, x);
600  TEXTURE_SET_FLOAT_XY;
601 }
602 
603 __TEXTURE_FUNCTIONS_DECL__ void tex1D(float4* retVal, hipTextureObject_t textureObject, float x) {
604  TEXTURE_PARAMETERS_INIT;
605  texel.f = __ockl_image_sample_1D(i, s, x);
606  TEXTURE_SET_FLOAT_XYZW;
607 }
608 template <class T>
609 __TEXTURE_FUNCTIONS_DECL__ T tex1D(hipTextureObject_t textureObject, float x) {
610  T ret;
611  tex1D(&ret, textureObject, x);
612  return ret;
613 }
614 
616 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(char* retVal, hipTextureObject_t textureObject, float x,
617  float level) {
618  TEXTURE_PARAMETERS_INIT;
619  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
620  TEXTURE_SET_SIGNED;
621 }
622 
623 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(char1* retVal, hipTextureObject_t textureObject, float x,
624  float level) {
625  TEXTURE_PARAMETERS_INIT;
626  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
627  TEXTURE_SET_SIGNED_X;
628 }
629 
630 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(char2* retVal, hipTextureObject_t textureObject, float x,
631  float level) {
632  TEXTURE_PARAMETERS_INIT;
633  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
634  TEXTURE_SET_SIGNED_XY;
635 }
636 
637 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(char4* retVal, hipTextureObject_t textureObject, float x,
638  float level) {
639  TEXTURE_PARAMETERS_INIT;
640  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
641  TEXTURE_SET_SIGNED_XYZW;
642 }
643 
644 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(unsigned char* retVal, hipTextureObject_t textureObject,
645  float x, float level) {
646  TEXTURE_PARAMETERS_INIT;
647  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
648  TEXTURE_SET_UNSIGNED;
649 }
650 
651 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(uchar1* retVal, hipTextureObject_t textureObject, float x,
652  float level) {
653  TEXTURE_PARAMETERS_INIT;
654  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
655  TEXTURE_SET_UNSIGNED_X;
656 }
657 
658 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(uchar2* retVal, hipTextureObject_t textureObject, float x,
659  float level) {
660  TEXTURE_PARAMETERS_INIT;
661  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
662  TEXTURE_SET_UNSIGNED_XY;
663 }
664 
665 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(uchar4* retVal, hipTextureObject_t textureObject, float x,
666  float level) {
667  TEXTURE_PARAMETERS_INIT;
668  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
669  TEXTURE_SET_UNSIGNED_XYZW;
670 }
671 
672 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(short* retVal, hipTextureObject_t textureObject, float x,
673  float level) {
674  TEXTURE_PARAMETERS_INIT;
675  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
676  TEXTURE_SET_SIGNED;
677 }
678 
679 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(short1* retVal, hipTextureObject_t textureObject, float x,
680  float level) {
681  TEXTURE_PARAMETERS_INIT;
682  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
683  TEXTURE_SET_SIGNED_X;
684 }
685 
686 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(short2* retVal, hipTextureObject_t textureObject, float x,
687  float level) {
688  TEXTURE_PARAMETERS_INIT;
689  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
690  TEXTURE_SET_SIGNED_XY;
691 }
692 
693 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(short4* retVal, hipTextureObject_t textureObject, float x,
694  float level) {
695  TEXTURE_PARAMETERS_INIT;
696  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
697  TEXTURE_SET_SIGNED_XYZW;
698 }
699 
700 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(unsigned short* retVal, hipTextureObject_t textureObject,
701  float x, float level) {
702  TEXTURE_PARAMETERS_INIT;
703  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
704  TEXTURE_SET_UNSIGNED;
705 }
706 
707 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(ushort1* retVal, hipTextureObject_t textureObject, float x,
708  float level) {
709  TEXTURE_PARAMETERS_INIT;
710  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
711  TEXTURE_SET_UNSIGNED_X;
712 }
713 
714 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(ushort2* retVal, hipTextureObject_t textureObject, float x,
715  float level) {
716  TEXTURE_PARAMETERS_INIT;
717  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
718  TEXTURE_SET_UNSIGNED_XY;
719 }
720 
721 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(ushort4* retVal, hipTextureObject_t textureObject, float x,
722  float level) {
723  TEXTURE_PARAMETERS_INIT;
724  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
725  TEXTURE_SET_UNSIGNED_XYZW;
726 }
727 
728 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(int* retVal, hipTextureObject_t textureObject, float x,
729  float level) {
730  TEXTURE_PARAMETERS_INIT;
731  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
732  TEXTURE_SET_SIGNED;
733 }
734 
735 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(int1* retVal, hipTextureObject_t textureObject, float x,
736  float level) {
737  TEXTURE_PARAMETERS_INIT;
738  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
739  TEXTURE_SET_SIGNED_X;
740 }
741 
742 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(int2* retVal, hipTextureObject_t textureObject, float x,
743  float level) {
744  TEXTURE_PARAMETERS_INIT;
745  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
746  TEXTURE_SET_SIGNED_XY;
747 }
748 
749 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(int4* retVal, hipTextureObject_t textureObject, float x,
750  float level) {
751  TEXTURE_PARAMETERS_INIT;
752  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
753  TEXTURE_SET_SIGNED_XYZW;
754 }
755 
756 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(unsigned int* retVal, hipTextureObject_t textureObject,
757  float x, float level) {
758  TEXTURE_PARAMETERS_INIT;
759  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
760  TEXTURE_SET_UNSIGNED;
761 }
762 
763 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(uint1* retVal, hipTextureObject_t textureObject, float x,
764  float level) {
765  TEXTURE_PARAMETERS_INIT;
766  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
767  TEXTURE_SET_UNSIGNED_X;
768 }
769 
770 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(uint2* retVal, hipTextureObject_t textureObject, float x,
771  float level) {
772  TEXTURE_PARAMETERS_INIT;
773  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
774  TEXTURE_SET_UNSIGNED_XY;
775 }
776 
777 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(uint4* retVal, hipTextureObject_t textureObject, float x,
778  float level) {
779  TEXTURE_PARAMETERS_INIT;
780  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
781  TEXTURE_SET_UNSIGNED_XYZW;
782 }
783 
784 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(float* retVal, hipTextureObject_t textureObject, float x,
785  float level) {
786  TEXTURE_PARAMETERS_INIT;
787  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
788  TEXTURE_SET_FLOAT;
789 }
790 
791 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(float1* retVal, hipTextureObject_t textureObject, float x,
792  float level) {
793  TEXTURE_PARAMETERS_INIT;
794  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
795  TEXTURE_SET_FLOAT_X;
796 }
797 
798 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(float2* retVal, hipTextureObject_t textureObject, float x,
799  float level) {
800  TEXTURE_PARAMETERS_INIT;
801  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
802  TEXTURE_SET_FLOAT_XY;
803 }
804 
805 __TEXTURE_FUNCTIONS_DECL__ void tex1DLod(float4* retVal, hipTextureObject_t textureObject, float x,
806  float level) {
807  TEXTURE_PARAMETERS_INIT;
808  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
809  TEXTURE_SET_FLOAT_XYZW;
810 }
811 
812 template <class T>
813 __TEXTURE_FUNCTIONS_DECL__ T tex1DLod(hipTextureObject_t textureObject, float x, float level) {
814  T ret;
815  tex1DLod(&ret, textureObject, x, level);
816  return ret;
817 }
818 
820 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(char* retVal, hipTextureObject_t textureObject, float x,
821  float dx, float dy) {
822  TEXTURE_PARAMETERS_INIT;
823  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
824  TEXTURE_SET_SIGNED;
825 }
826 
827 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(char1* retVal, hipTextureObject_t textureObject, float x,
828  float dx, float dy) {
829  TEXTURE_PARAMETERS_INIT;
830  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
831  TEXTURE_SET_SIGNED_X;
832 }
833 
834 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(char2* retVal, hipTextureObject_t textureObject, float x,
835  float dx, float dy) {
836  TEXTURE_PARAMETERS_INIT;
837  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
838  TEXTURE_SET_SIGNED_XY;
839 }
840 
841 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(char4* retVal, hipTextureObject_t textureObject, float x,
842  float dx, float dy) {
843  TEXTURE_PARAMETERS_INIT;
844  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
845  TEXTURE_SET_SIGNED_XYZW;
846 }
847 
848 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(unsigned char* retVal, hipTextureObject_t textureObject,
849  float x, float dx, float dy) {
850  TEXTURE_PARAMETERS_INIT;
851  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
852  TEXTURE_SET_UNSIGNED;
853 }
854 
855 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(uchar1* retVal, hipTextureObject_t textureObject, float x,
856  float dx, float dy) {
857  TEXTURE_PARAMETERS_INIT;
858  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
859  TEXTURE_SET_UNSIGNED_X;
860 }
861 
862 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(uchar2* retVal, hipTextureObject_t textureObject, float x,
863  float dx, float dy) {
864  TEXTURE_PARAMETERS_INIT;
865  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
866  TEXTURE_SET_UNSIGNED_XY;
867 }
868 
869 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(uchar4* retVal, hipTextureObject_t textureObject, float x,
870  float dx, float dy) {
871  TEXTURE_PARAMETERS_INIT;
872  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
873  TEXTURE_SET_UNSIGNED_XYZW;
874 }
875 
876 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(short* retVal, hipTextureObject_t textureObject, float x,
877  float dx, float dy) {
878  TEXTURE_PARAMETERS_INIT;
879  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
880  TEXTURE_SET_SIGNED;
881 }
882 
883 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(short1* retVal, hipTextureObject_t textureObject, float x,
884  float dx, float dy) {
885  TEXTURE_PARAMETERS_INIT;
886  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
887  TEXTURE_SET_SIGNED_X;
888 }
889 
890 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(short2* retVal, hipTextureObject_t textureObject, float x,
891  float dx, float dy) {
892  TEXTURE_PARAMETERS_INIT;
893  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
894  TEXTURE_SET_SIGNED_XY;
895 }
896 
897 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(short4* retVal, hipTextureObject_t textureObject, float x,
898  float dx, float dy) {
899  TEXTURE_PARAMETERS_INIT;
900  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
901  TEXTURE_SET_SIGNED_XYZW;
902 }
903 
904 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(unsigned short* retVal, hipTextureObject_t textureObject,
905  float x, float dx, float dy) {
906  TEXTURE_PARAMETERS_INIT;
907  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
908  TEXTURE_SET_UNSIGNED;
909 }
910 
911 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(ushort1* retVal, hipTextureObject_t textureObject,
912  float x, float dx, float dy) {
913  TEXTURE_PARAMETERS_INIT;
914  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
915  TEXTURE_SET_UNSIGNED_X;
916 }
917 
918 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(ushort2* retVal, hipTextureObject_t textureObject,
919  float x, float dx, float dy) {
920  TEXTURE_PARAMETERS_INIT;
921  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
922  TEXTURE_SET_UNSIGNED_XY;
923 }
924 
925 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(ushort4* retVal, hipTextureObject_t textureObject,
926  float x, float dx, float dy) {
927  TEXTURE_PARAMETERS_INIT;
928  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
929  TEXTURE_SET_UNSIGNED_XYZW;
930 }
931 
932 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(int* retVal, hipTextureObject_t textureObject, float x,
933  float dx, float dy) {
934  TEXTURE_PARAMETERS_INIT;
935  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
936  TEXTURE_SET_SIGNED;
937 }
938 
939 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(int1* retVal, hipTextureObject_t textureObject, float x,
940  float dx, float dy) {
941  TEXTURE_PARAMETERS_INIT;
942  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
943  TEXTURE_SET_SIGNED_X;
944 }
945 
946 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(int2* retVal, hipTextureObject_t textureObject, float x,
947  float dx, float dy) {
948  TEXTURE_PARAMETERS_INIT;
949  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
950  TEXTURE_SET_SIGNED_XY;
951 }
952 
953 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(int4* retVal, hipTextureObject_t textureObject, float x,
954  float dx, float dy) {
955  TEXTURE_PARAMETERS_INIT;
956  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
957  TEXTURE_SET_SIGNED_XYZW;
958 }
959 
960 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(unsigned int* retVal, hipTextureObject_t textureObject,
961  float x, float dx, float dy) {
962  TEXTURE_PARAMETERS_INIT;
963  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
964  TEXTURE_SET_UNSIGNED;
965 }
966 
967 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(uint1* retVal, hipTextureObject_t textureObject, float x,
968  float dx, float dy) {
969  TEXTURE_PARAMETERS_INIT;
970  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
971  TEXTURE_SET_UNSIGNED_X;
972 }
973 
974 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(uint2* retVal, hipTextureObject_t textureObject, float x,
975  float dx, float dy) {
976  TEXTURE_PARAMETERS_INIT;
977  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
978  TEXTURE_SET_UNSIGNED_XY;
979 }
980 
981 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(uint4* retVal, hipTextureObject_t textureObject, float x,
982  float dx, float dy) {
983  TEXTURE_PARAMETERS_INIT;
984  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
985  TEXTURE_SET_UNSIGNED_XYZW;
986 }
987 
988 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(float* retVal, hipTextureObject_t textureObject, float x,
989  float dx, float dy) {
990  TEXTURE_PARAMETERS_INIT;
991  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
992  TEXTURE_SET_FLOAT;
993 }
994 
995 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(float1* retVal, hipTextureObject_t textureObject, float x,
996  float dx, float dy) {
997  TEXTURE_PARAMETERS_INIT;
998  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
999  TEXTURE_SET_FLOAT_X;
1000 }
1001 
1002 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(float2* retVal, hipTextureObject_t textureObject, float x,
1003  float dx, float dy) {
1004  TEXTURE_PARAMETERS_INIT;
1005  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
1006  TEXTURE_SET_FLOAT_XY;
1007 }
1008 
1009 __TEXTURE_FUNCTIONS_DECL__ void tex1DGrad(float4* retVal, hipTextureObject_t textureObject, float x,
1010  float dx, float dy) {
1011  TEXTURE_PARAMETERS_INIT;
1012  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
1013  TEXTURE_SET_FLOAT_XYZW;
1014 }
1015 
1016 template <class T>
1017 __TEXTURE_FUNCTIONS_DECL__ T tex1DGrad(hipTextureObject_t textureObject, float x, float dx,
1018  float dy) {
1019  T ret;
1020  tex1DLod(&ret, textureObject, x, dx, dy);
1021  return ret;
1022 }
1023 
1025 __TEXTURE_FUNCTIONS_DECL__ void tex2D(char* retVal, hipTextureObject_t textureObject, float x,
1026  float y) {
1027  TEXTURE_PARAMETERS_INIT;
1028  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1029  TEXTURE_SET_SIGNED;
1030 }
1031 
1032 __TEXTURE_FUNCTIONS_DECL__ void tex2D(char1* retVal, hipTextureObject_t textureObject, float x,
1033  float y) {
1034  TEXTURE_PARAMETERS_INIT;
1035  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1036  TEXTURE_SET_SIGNED_X;
1037 }
1038 
1039 __TEXTURE_FUNCTIONS_DECL__ void tex2D(char2* retVal, hipTextureObject_t textureObject, float x,
1040  float y) {
1041  TEXTURE_PARAMETERS_INIT;
1042  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1043  TEXTURE_SET_SIGNED_XY;
1044 }
1045 
1046 __TEXTURE_FUNCTIONS_DECL__ void tex2D(char4* retVal, hipTextureObject_t textureObject, float x,
1047  float y) {
1048  TEXTURE_PARAMETERS_INIT;
1049  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1050  TEXTURE_SET_SIGNED_XYZW;
1051 }
1052 
1053 __TEXTURE_FUNCTIONS_DECL__ void tex2D(unsigned char* retVal, hipTextureObject_t textureObject,
1054  float x, float y) {
1055  TEXTURE_PARAMETERS_INIT;
1056  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1057  TEXTURE_SET_UNSIGNED;
1058 }
1059 
1060 __TEXTURE_FUNCTIONS_DECL__ void tex2D(uchar1* retVal, hipTextureObject_t textureObject, float x,
1061  float y) {
1062  TEXTURE_PARAMETERS_INIT;
1063  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1064  TEXTURE_SET_UNSIGNED_X;
1065 }
1066 
1067 __TEXTURE_FUNCTIONS_DECL__ void tex2D(uchar2* retVal, hipTextureObject_t textureObject, float x,
1068  float y) {
1069  TEXTURE_PARAMETERS_INIT;
1070  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1071  TEXTURE_SET_UNSIGNED_XY;
1072 }
1073 
1074 __TEXTURE_FUNCTIONS_DECL__ void tex2D(uchar4* retVal, hipTextureObject_t textureObject, float x,
1075  float y) {
1076  TEXTURE_PARAMETERS_INIT;
1077  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1078  TEXTURE_SET_UNSIGNED_XYZW;
1079 }
1080 
1081 __TEXTURE_FUNCTIONS_DECL__ void tex2D(short* retVal, hipTextureObject_t textureObject, float x,
1082  float y) {
1083  TEXTURE_PARAMETERS_INIT;
1084  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1085  TEXTURE_SET_SIGNED;
1086 }
1087 
1088 __TEXTURE_FUNCTIONS_DECL__ void tex2D(short1* retVal, hipTextureObject_t textureObject, float x,
1089  float y) {
1090  TEXTURE_PARAMETERS_INIT;
1091  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1092  TEXTURE_SET_SIGNED_X;
1093 }
1094 
1095 __TEXTURE_FUNCTIONS_DECL__ void tex2D(short2* retVal, hipTextureObject_t textureObject, float x,
1096  float y) {
1097  TEXTURE_PARAMETERS_INIT;
1098  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1099  TEXTURE_SET_SIGNED_XY;
1100 }
1101 
1102 __TEXTURE_FUNCTIONS_DECL__ void tex2D(short4* retVal, hipTextureObject_t textureObject, float x,
1103  float y) {
1104  TEXTURE_PARAMETERS_INIT;
1105  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1106  TEXTURE_SET_SIGNED_XYZW;
1107 }
1108 
1109 __TEXTURE_FUNCTIONS_DECL__ void tex2D(unsigned short* retVal, hipTextureObject_t textureObject,
1110  float x, float y) {
1111  TEXTURE_PARAMETERS_INIT;
1112  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1113  TEXTURE_SET_UNSIGNED;
1114 }
1115 
1116 __TEXTURE_FUNCTIONS_DECL__ void tex2D(ushort1* retVal, hipTextureObject_t textureObject, float x,
1117  float y) {
1118  TEXTURE_PARAMETERS_INIT;
1119  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1120  TEXTURE_SET_UNSIGNED_X;
1121 }
1122 
1123 __TEXTURE_FUNCTIONS_DECL__ void tex2D(ushort2* retVal, hipTextureObject_t textureObject, float x,
1124  float y) {
1125  TEXTURE_PARAMETERS_INIT;
1126  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1127  TEXTURE_SET_UNSIGNED_XY;
1128 }
1129 
1130 __TEXTURE_FUNCTIONS_DECL__ void tex2D(ushort4* retVal, hipTextureObject_t textureObject, float x,
1131  float y) {
1132  TEXTURE_PARAMETERS_INIT;
1133  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1134  TEXTURE_SET_UNSIGNED_XYZW;
1135 }
1136 
1137 __TEXTURE_FUNCTIONS_DECL__ void tex2D(int* retVal, hipTextureObject_t textureObject, float x,
1138  float y) {
1139  TEXTURE_PARAMETERS_INIT;
1140  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1141  TEXTURE_SET_SIGNED;
1142 }
1143 
1144 __TEXTURE_FUNCTIONS_DECL__ void tex2D(int1* retVal, hipTextureObject_t textureObject, float x,
1145  float y) {
1146  TEXTURE_PARAMETERS_INIT;
1147  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1148  TEXTURE_SET_SIGNED_X;
1149 }
1150 
1151 __TEXTURE_FUNCTIONS_DECL__ void tex2D(int2* retVal, hipTextureObject_t textureObject, float x,
1152  float y) {
1153  TEXTURE_PARAMETERS_INIT;
1154  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1155  TEXTURE_SET_SIGNED_XY;
1156 }
1157 
1158 __TEXTURE_FUNCTIONS_DECL__ void tex2D(int4* retVal, hipTextureObject_t textureObject, float x,
1159  float y) {
1160  TEXTURE_PARAMETERS_INIT;
1161  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1162  TEXTURE_SET_SIGNED_XYZW;
1163 }
1164 
1165 __TEXTURE_FUNCTIONS_DECL__ void tex2D(unsigned int* retVal, hipTextureObject_t textureObject,
1166  float x, float y) {
1167  TEXTURE_PARAMETERS_INIT;
1168  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1169  TEXTURE_SET_UNSIGNED;
1170 }
1171 
1172 __TEXTURE_FUNCTIONS_DECL__ void tex2D(uint1* retVal, hipTextureObject_t textureObject, float x,
1173  float y) {
1174  TEXTURE_PARAMETERS_INIT;
1175  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1176  TEXTURE_SET_UNSIGNED_X;
1177 }
1178 
1179 __TEXTURE_FUNCTIONS_DECL__ void tex2D(uint2* retVal, hipTextureObject_t textureObject, float x,
1180  float y) {
1181  TEXTURE_PARAMETERS_INIT;
1182  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1183  TEXTURE_SET_UNSIGNED_XY;
1184 }
1185 
1186 __TEXTURE_FUNCTIONS_DECL__ void tex2D(uint4* retVal, hipTextureObject_t textureObject, float x,
1187  float y) {
1188  TEXTURE_PARAMETERS_INIT;
1189  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1190  TEXTURE_SET_UNSIGNED_XYZW;
1191 }
1192 
1193 __TEXTURE_FUNCTIONS_DECL__ void tex2D(float* retVal, hipTextureObject_t textureObject, float x,
1194  float y) {
1195  TEXTURE_PARAMETERS_INIT;
1196  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1197  TEXTURE_SET_FLOAT;
1198 }
1199 
1200 __TEXTURE_FUNCTIONS_DECL__ void tex2D(float1* retVal, hipTextureObject_t textureObject, float x,
1201  float y) {
1202  TEXTURE_PARAMETERS_INIT;
1203  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1204  TEXTURE_SET_FLOAT_X;
1205 }
1206 
1207 __TEXTURE_FUNCTIONS_DECL__ void tex2D(float2* retVal, hipTextureObject_t textureObject, float x,
1208  float y) {
1209  TEXTURE_PARAMETERS_INIT;
1210  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1211  TEXTURE_SET_FLOAT_XY;
1212 }
1213 
1214 __TEXTURE_FUNCTIONS_DECL__ void tex2D(float4* retVal, hipTextureObject_t textureObject, float x,
1215  float y) {
1216  TEXTURE_PARAMETERS_INIT;
1217  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
1218  TEXTURE_SET_FLOAT_XYZW;
1219 }
1220 
1221 template <class T>
1222 __TEXTURE_FUNCTIONS_DECL__ T tex2D(hipTextureObject_t textureObject, float x, float y) {
1223  T ret;
1224  tex2D(&ret, textureObject, x, y);
1225  return ret;
1226 }
1227 
1229 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(char* retVal, hipTextureObject_t textureObject, float x,
1230  float y, float level) {
1231  TEXTURE_PARAMETERS_INIT;
1232  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1233  TEXTURE_SET_SIGNED;
1234 }
1235 
1236 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(char1* retVal, hipTextureObject_t textureObject, float x,
1237  float y, float level) {
1238  TEXTURE_PARAMETERS_INIT;
1239  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1240  TEXTURE_SET_SIGNED_X;
1241 }
1242 
1243 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(char2* retVal, hipTextureObject_t textureObject, float x,
1244  float y, float level) {
1245  TEXTURE_PARAMETERS_INIT;
1246  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1247  TEXTURE_SET_SIGNED_XY;
1248 }
1249 
1250 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(char4* retVal, hipTextureObject_t textureObject, float x,
1251  float y, float level) {
1252  TEXTURE_PARAMETERS_INIT;
1253  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1254  TEXTURE_SET_SIGNED_XYZW;
1255 }
1256 
1257 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(unsigned char* retVal, hipTextureObject_t textureObject,
1258  float x, float y, float level) {
1259  TEXTURE_PARAMETERS_INIT;
1260  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1261  TEXTURE_SET_UNSIGNED;
1262 }
1263 
1264 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(uchar1* retVal, hipTextureObject_t textureObject, float x,
1265  float y, float level) {
1266  TEXTURE_PARAMETERS_INIT;
1267  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1268  TEXTURE_SET_UNSIGNED_X;
1269 }
1270 
1271 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(uchar2* retVal, hipTextureObject_t textureObject, float x,
1272  float y, float level) {
1273  TEXTURE_PARAMETERS_INIT;
1274  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1275  TEXTURE_SET_UNSIGNED_XY;
1276 }
1277 
1278 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(uchar4* retVal, hipTextureObject_t textureObject, float x,
1279  float y, float level) {
1280  TEXTURE_PARAMETERS_INIT;
1281  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1282  TEXTURE_SET_UNSIGNED_XYZW;
1283 }
1284 
1285 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(short* retVal, hipTextureObject_t textureObject, float x,
1286  float y, float level) {
1287  TEXTURE_PARAMETERS_INIT;
1288  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1289  TEXTURE_SET_SIGNED;
1290 }
1291 
1292 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(short1* retVal, hipTextureObject_t textureObject, float x,
1293  float y, float level) {
1294  TEXTURE_PARAMETERS_INIT;
1295  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1296  TEXTURE_SET_SIGNED_X;
1297 }
1298 
1299 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(short2* retVal, hipTextureObject_t textureObject, float x,
1300  float y, float level) {
1301  TEXTURE_PARAMETERS_INIT;
1302  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1303  TEXTURE_SET_SIGNED_XY;
1304 }
1305 
1306 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(short4* retVal, hipTextureObject_t textureObject, float x,
1307  float y, float level) {
1308  TEXTURE_PARAMETERS_INIT;
1309  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1310  TEXTURE_SET_SIGNED_XYZW;
1311 }
1312 
1313 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(unsigned short* retVal, hipTextureObject_t textureObject,
1314  float x, float y, float level) {
1315  TEXTURE_PARAMETERS_INIT;
1316  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1317  TEXTURE_SET_UNSIGNED;
1318 }
1319 
1320 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(ushort1* retVal, hipTextureObject_t textureObject, float x,
1321  float y, float level) {
1322  TEXTURE_PARAMETERS_INIT;
1323  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1324  TEXTURE_SET_UNSIGNED_X;
1325 }
1326 
1327 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(ushort2* retVal, hipTextureObject_t textureObject, float x,
1328  float y, float level) {
1329  TEXTURE_PARAMETERS_INIT;
1330  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1331  TEXTURE_SET_UNSIGNED_XY;
1332 }
1333 
1334 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(ushort4* retVal, hipTextureObject_t textureObject, float x,
1335  float y, float level) {
1336  TEXTURE_PARAMETERS_INIT;
1337  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1338  TEXTURE_SET_UNSIGNED_XYZW;
1339 }
1340 
1341 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(int* retVal, hipTextureObject_t textureObject, float x,
1342  float y, float level) {
1343  TEXTURE_PARAMETERS_INIT;
1344  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1345  TEXTURE_SET_SIGNED;
1346 }
1347 
1348 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(int1* retVal, hipTextureObject_t textureObject, float x,
1349  float y, float level) {
1350  TEXTURE_PARAMETERS_INIT;
1351  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1352  TEXTURE_SET_SIGNED_X;
1353 }
1354 
1355 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(int2* retVal, hipTextureObject_t textureObject, float x,
1356  float y, float level) {
1357  TEXTURE_PARAMETERS_INIT;
1358  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1359  TEXTURE_SET_SIGNED_XY;
1360 }
1361 
1362 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(int4* retVal, hipTextureObject_t textureObject, float x,
1363  float y, float level) {
1364  TEXTURE_PARAMETERS_INIT;
1365  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1366  TEXTURE_SET_SIGNED_XYZW;
1367 }
1368 
1369 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(unsigned int* retVal, hipTextureObject_t textureObject,
1370  float x, float y, float level) {
1371  TEXTURE_PARAMETERS_INIT;
1372  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1373  TEXTURE_SET_UNSIGNED;
1374 }
1375 
1376 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(uint1* retVal, hipTextureObject_t textureObject, float x,
1377  float y, float level) {
1378  TEXTURE_PARAMETERS_INIT;
1379  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1380  TEXTURE_SET_UNSIGNED_X;
1381 }
1382 
1383 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(uint2* retVal, hipTextureObject_t textureObject, float x,
1384  float y, float level) {
1385  TEXTURE_PARAMETERS_INIT;
1386  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1387  TEXTURE_SET_UNSIGNED_XY;
1388 }
1389 
1390 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(uint4* retVal, hipTextureObject_t textureObject, float x,
1391  float y, float level) {
1392  TEXTURE_PARAMETERS_INIT;
1393  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1394  TEXTURE_SET_UNSIGNED_XYZW;
1395 }
1396 
1397 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(float* retVal, hipTextureObject_t textureObject, float x,
1398  float y, float level) {
1399  TEXTURE_PARAMETERS_INIT;
1400  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1401  TEXTURE_SET_FLOAT;
1402 }
1403 
1404 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(float1* retVal, hipTextureObject_t textureObject, float x,
1405  float y, float level) {
1406  TEXTURE_PARAMETERS_INIT;
1407  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1408  TEXTURE_SET_FLOAT_X;
1409 }
1410 
1411 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(float2* retVal, hipTextureObject_t textureObject, float x,
1412  float y, float level) {
1413  TEXTURE_PARAMETERS_INIT;
1414  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1415  TEXTURE_SET_FLOAT_XY;
1416 }
1417 
1418 __TEXTURE_FUNCTIONS_DECL__ void tex2DLod(float4* retVal, hipTextureObject_t textureObject, float x,
1419  float y, float level) {
1420  TEXTURE_PARAMETERS_INIT;
1421  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
1422  TEXTURE_SET_FLOAT_XYZW;
1423 }
1424 
1425 template <class T>
1426 __TEXTURE_FUNCTIONS_DECL__ T tex2DLod(hipTextureObject_t textureObject, float x, float y,
1427  float level) {
1428  T ret;
1429  tex2DLod(&ret, textureObject, x, y, level);
1430  return ret;
1431 }
1432 
1434 __TEXTURE_FUNCTIONS_DECL__ void tex3D(char* retVal, hipTextureObject_t textureObject, float x,
1435  float y, float z) {
1436  TEXTURE_PARAMETERS_INIT;
1437  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1438  TEXTURE_SET_SIGNED;
1439 }
1440 
1441 __TEXTURE_FUNCTIONS_DECL__ void tex3D(char1* retVal, hipTextureObject_t textureObject, float x,
1442  float y, float z) {
1443  TEXTURE_PARAMETERS_INIT;
1444  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1445  TEXTURE_SET_SIGNED_X;
1446 }
1447 
1448 __TEXTURE_FUNCTIONS_DECL__ void tex3D(char2* retVal, hipTextureObject_t textureObject, float x,
1449  float y, float z) {
1450  TEXTURE_PARAMETERS_INIT;
1451  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1452  TEXTURE_SET_SIGNED_XY;
1453 }
1454 
1455 __TEXTURE_FUNCTIONS_DECL__ void tex3D(char4* retVal, hipTextureObject_t textureObject, float x,
1456  float y, float z) {
1457  TEXTURE_PARAMETERS_INIT;
1458  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1459  TEXTURE_SET_SIGNED_XYZW;
1460 }
1461 
1462 __TEXTURE_FUNCTIONS_DECL__ void tex3D(unsigned char* retVal, hipTextureObject_t textureObject,
1463  float x, float y, float z) {
1464  TEXTURE_PARAMETERS_INIT;
1465  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1466  TEXTURE_SET_UNSIGNED;
1467 }
1468 
1469 __TEXTURE_FUNCTIONS_DECL__ void tex3D(uchar1* retVal, hipTextureObject_t textureObject, float x,
1470  float y, float z) {
1471  TEXTURE_PARAMETERS_INIT;
1472  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1473  TEXTURE_SET_UNSIGNED_X;
1474 }
1475 
1476 __TEXTURE_FUNCTIONS_DECL__ void tex3D(uchar2* retVal, hipTextureObject_t textureObject, float x,
1477  float y, float z) {
1478  TEXTURE_PARAMETERS_INIT;
1479  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1480  TEXTURE_SET_UNSIGNED_XY;
1481 }
1482 
1483 __TEXTURE_FUNCTIONS_DECL__ void tex3D(uchar4* retVal, hipTextureObject_t textureObject, float x,
1484  float y, float z) {
1485  TEXTURE_PARAMETERS_INIT;
1486  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1487  TEXTURE_SET_UNSIGNED_XYZW;
1488 }
1489 
1490 __TEXTURE_FUNCTIONS_DECL__ void tex3D(short* retVal, hipTextureObject_t textureObject, float x,
1491  float y, float z) {
1492  TEXTURE_PARAMETERS_INIT;
1493  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1494  TEXTURE_SET_SIGNED;
1495 }
1496 
1497 __TEXTURE_FUNCTIONS_DECL__ void tex3D(short1* retVal, hipTextureObject_t textureObject, float x,
1498  float y, float z) {
1499  TEXTURE_PARAMETERS_INIT;
1500  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1501  TEXTURE_SET_SIGNED_X;
1502 }
1503 
1504 __TEXTURE_FUNCTIONS_DECL__ void tex3D(short2* retVal, hipTextureObject_t textureObject, float x,
1505  float y, float z) {
1506  TEXTURE_PARAMETERS_INIT;
1507  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1508  TEXTURE_SET_SIGNED_XY;
1509 }
1510 
1511 __TEXTURE_FUNCTIONS_DECL__ void tex3D(short4* retVal, hipTextureObject_t textureObject, float x,
1512  float y, float z) {
1513  TEXTURE_PARAMETERS_INIT;
1514  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1515  TEXTURE_SET_SIGNED_XYZW;
1516 }
1517 
1518 __TEXTURE_FUNCTIONS_DECL__ void tex3D(unsigned short* retVal, hipTextureObject_t textureObject,
1519  float x, float y, float z) {
1520  TEXTURE_PARAMETERS_INIT;
1521  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1522  TEXTURE_SET_UNSIGNED;
1523 }
1524 
1525 __TEXTURE_FUNCTIONS_DECL__ void tex3D(ushort1* retVal, hipTextureObject_t textureObject, float x,
1526  float y, float z) {
1527  TEXTURE_PARAMETERS_INIT;
1528  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1529  TEXTURE_SET_UNSIGNED_X;
1530 }
1531 
1532 __TEXTURE_FUNCTIONS_DECL__ void tex3D(ushort2* retVal, hipTextureObject_t textureObject, float x,
1533  float y, float z) {
1534  TEXTURE_PARAMETERS_INIT;
1535  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1536  TEXTURE_SET_UNSIGNED_XY;
1537 }
1538 
1539 __TEXTURE_FUNCTIONS_DECL__ void tex3D(ushort4* retVal, hipTextureObject_t textureObject, float x,
1540  float y, float z) {
1541  TEXTURE_PARAMETERS_INIT;
1542  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1543  TEXTURE_SET_UNSIGNED_XYZW;
1544 }
1545 
1546 __TEXTURE_FUNCTIONS_DECL__ void tex3D(int* retVal, hipTextureObject_t textureObject, float x,
1547  float y, float z) {
1548  TEXTURE_PARAMETERS_INIT;
1549  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1550  TEXTURE_SET_SIGNED;
1551 }
1552 
1553 __TEXTURE_FUNCTIONS_DECL__ void tex3D(int1* retVal, hipTextureObject_t textureObject, float x,
1554  float y, float z) {
1555  TEXTURE_PARAMETERS_INIT;
1556  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1557  TEXTURE_SET_SIGNED_X;
1558 }
1559 
1560 __TEXTURE_FUNCTIONS_DECL__ void tex3D(int2* retVal, hipTextureObject_t textureObject, float x,
1561  float y, float z) {
1562  TEXTURE_PARAMETERS_INIT;
1563  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1564  TEXTURE_SET_SIGNED_XY;
1565 }
1566 
1567 __TEXTURE_FUNCTIONS_DECL__ void tex3D(int4* retVal, hipTextureObject_t textureObject, float x,
1568  float y, float z) {
1569  TEXTURE_PARAMETERS_INIT;
1570  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1571  TEXTURE_SET_SIGNED_XYZW;
1572 }
1573 
1574 __TEXTURE_FUNCTIONS_DECL__ void tex3D(unsigned int* retVal, hipTextureObject_t textureObject,
1575  float x, float y, float z) {
1576  TEXTURE_PARAMETERS_INIT;
1577  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1578  TEXTURE_SET_UNSIGNED;
1579 }
1580 
1581 __TEXTURE_FUNCTIONS_DECL__ void tex3D(uint1* retVal, hipTextureObject_t textureObject, float x,
1582  float y, float z) {
1583  TEXTURE_PARAMETERS_INIT;
1584  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1585  TEXTURE_SET_UNSIGNED_X;
1586 }
1587 
1588 __TEXTURE_FUNCTIONS_DECL__ void tex3D(uint2* retVal, hipTextureObject_t textureObject, float x,
1589  float y, float z) {
1590  TEXTURE_PARAMETERS_INIT;
1591  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1592  TEXTURE_SET_UNSIGNED_XY;
1593 }
1594 
1595 __TEXTURE_FUNCTIONS_DECL__ void tex3D(uint4* retVal, hipTextureObject_t textureObject, float x,
1596  float y, float z) {
1597  TEXTURE_PARAMETERS_INIT;
1598  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1599  TEXTURE_SET_UNSIGNED_XYZW;
1600 }
1601 
1602 __TEXTURE_FUNCTIONS_DECL__ void tex3D(float* retVal, hipTextureObject_t textureObject, float x,
1603  float y, float z) {
1604  TEXTURE_PARAMETERS_INIT;
1605  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1606  TEXTURE_SET_FLOAT;
1607 }
1608 
1609 __TEXTURE_FUNCTIONS_DECL__ void tex3D(float1* retVal, hipTextureObject_t textureObject, float x,
1610  float y, float z) {
1611  TEXTURE_PARAMETERS_INIT;
1612  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1613  TEXTURE_SET_FLOAT_X;
1614 }
1615 
1616 __TEXTURE_FUNCTIONS_DECL__ void tex3D(float2* retVal, hipTextureObject_t textureObject, float x,
1617  float y, float z) {
1618  TEXTURE_PARAMETERS_INIT;
1619  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1620  TEXTURE_SET_FLOAT_XY;
1621 }
1622 
1623 __TEXTURE_FUNCTIONS_DECL__ void tex3D(float4* retVal, hipTextureObject_t textureObject, float x,
1624  float y, float z) {
1625  TEXTURE_PARAMETERS_INIT;
1626  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
1627  TEXTURE_SET_FLOAT_XYZW;
1628 }
1629 
1630 template <class T>
1631 __TEXTURE_FUNCTIONS_DECL__ T tex3D(hipTextureObject_t textureObject, float x, float y, float z) {
1632  T ret;
1633  tex3D(&ret, textureObject, x, y, z);
1634  return ret;
1635 }
1636 
1638 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(char* retVal, hipTextureObject_t textureObject, float x,
1639  float y, float z, float level) {
1640  TEXTURE_PARAMETERS_INIT;
1641  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1642  level);
1643  TEXTURE_SET_SIGNED;
1644 }
1645 
1646 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(char1* retVal, hipTextureObject_t textureObject, float x,
1647  float y, float z, float level) {
1648  TEXTURE_PARAMETERS_INIT;
1649  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1650  level);
1651  TEXTURE_SET_SIGNED_X;
1652 }
1653 
1654 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(char2* retVal, hipTextureObject_t textureObject, float x,
1655  float y, float z, float level) {
1656  TEXTURE_PARAMETERS_INIT;
1657  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1658  level);
1659  TEXTURE_SET_SIGNED_XY;
1660 }
1661 
1662 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(char4* retVal, hipTextureObject_t textureObject, float x,
1663  float y, float z, float level) {
1664  TEXTURE_PARAMETERS_INIT;
1665  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1666  level);
1667  TEXTURE_SET_SIGNED_XYZW;
1668 }
1669 
1670 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(unsigned char* retVal, hipTextureObject_t textureObject,
1671  float x, float y, float z, float level) {
1672  TEXTURE_PARAMETERS_INIT;
1673  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1674  level);
1675  TEXTURE_SET_UNSIGNED;
1676 }
1677 
1678 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(uchar1* retVal, hipTextureObject_t textureObject, float x,
1679  float y, float z, float level) {
1680  TEXTURE_PARAMETERS_INIT;
1681  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1682  level);
1683  TEXTURE_SET_UNSIGNED_X;
1684 }
1685 
1686 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(uchar2* retVal, hipTextureObject_t textureObject, float x,
1687  float y, float z, float level) {
1688  TEXTURE_PARAMETERS_INIT;
1689  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1690  level);
1691  TEXTURE_SET_UNSIGNED_XY;
1692 }
1693 
1694 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(uchar4* retVal, hipTextureObject_t textureObject, float x,
1695  float y, float z, float level) {
1696  TEXTURE_PARAMETERS_INIT;
1697  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1698  level);
1699  TEXTURE_SET_UNSIGNED_XYZW;
1700 }
1701 
1702 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(short* retVal, hipTextureObject_t textureObject, float x,
1703  float y, float z, float level) {
1704  TEXTURE_PARAMETERS_INIT;
1705  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1706  level);
1707  TEXTURE_SET_SIGNED;
1708 }
1709 
1710 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(short1* retVal, hipTextureObject_t textureObject, float x,
1711  float y, float z, float level) {
1712  TEXTURE_PARAMETERS_INIT;
1713  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1714  level);
1715  TEXTURE_SET_SIGNED_X;
1716 }
1717 
1718 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(short2* retVal, hipTextureObject_t textureObject, float x,
1719  float y, float z, float level) {
1720  TEXTURE_PARAMETERS_INIT;
1721  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1722  level);
1723  TEXTURE_SET_SIGNED_XY;
1724 }
1725 
1726 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(short4* retVal, hipTextureObject_t textureObject, float x,
1727  float y, float z, float level) {
1728  TEXTURE_PARAMETERS_INIT;
1729  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1730  level);
1731  TEXTURE_SET_SIGNED_XYZW;
1732 }
1733 
1734 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(unsigned short* retVal, hipTextureObject_t textureObject,
1735  float x, float y, float z, float level) {
1736  TEXTURE_PARAMETERS_INIT;
1737  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1738  level);
1739  TEXTURE_SET_UNSIGNED;
1740 }
1741 
1742 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(ushort1* retVal, hipTextureObject_t textureObject, float x,
1743  float y, float z, float level) {
1744  TEXTURE_PARAMETERS_INIT;
1745  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1746  level);
1747  TEXTURE_SET_UNSIGNED_X;
1748 }
1749 
1750 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(ushort2* retVal, hipTextureObject_t textureObject, float x,
1751  float y, float z, float level) {
1752  TEXTURE_PARAMETERS_INIT;
1753  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1754  level);
1755  TEXTURE_SET_UNSIGNED_XY;
1756 }
1757 
1758 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(ushort4* retVal, hipTextureObject_t textureObject, float x,
1759  float y, float z, float level) {
1760  TEXTURE_PARAMETERS_INIT;
1761  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1762  level);
1763  TEXTURE_SET_UNSIGNED_XYZW;
1764 }
1765 
1766 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(int* retVal, hipTextureObject_t textureObject, float x,
1767  float y, float z, float level) {
1768  TEXTURE_PARAMETERS_INIT;
1769  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1770  level);
1771  TEXTURE_SET_SIGNED;
1772 }
1773 
1774 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(int1* retVal, hipTextureObject_t textureObject, float x,
1775  float y, float z, float level) {
1776  TEXTURE_PARAMETERS_INIT;
1777  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1778  level);
1779  TEXTURE_SET_SIGNED_X;
1780 }
1781 
1782 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(int2* retVal, hipTextureObject_t textureObject, float x,
1783  float y, float z, float level) {
1784  TEXTURE_PARAMETERS_INIT;
1785  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1786  level);
1787  TEXTURE_SET_SIGNED_XY;
1788 }
1789 
1790 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(int4* retVal, hipTextureObject_t textureObject, float x,
1791  float y, float z, float level) {
1792  TEXTURE_PARAMETERS_INIT;
1793  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1794  level);
1795  TEXTURE_SET_SIGNED_XYZW;
1796 }
1797 
1798 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(unsigned int* retVal, hipTextureObject_t textureObject,
1799  float x, float y, float z, float level) {
1800  TEXTURE_PARAMETERS_INIT;
1801  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1802  level);
1803  TEXTURE_SET_UNSIGNED;
1804 }
1805 
1806 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(uint1* retVal, hipTextureObject_t textureObject, float x,
1807  float y, float z, float level) {
1808  TEXTURE_PARAMETERS_INIT;
1809  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1810  level);
1811  TEXTURE_SET_UNSIGNED_X;
1812 }
1813 
1814 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(uint2* retVal, hipTextureObject_t textureObject, float x,
1815  float y, float z, float level) {
1816  TEXTURE_PARAMETERS_INIT;
1817  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1818  level);
1819  TEXTURE_SET_UNSIGNED_XY;
1820 }
1821 
1822 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(uint4* retVal, hipTextureObject_t textureObject, float x,
1823  float y, float z, float level) {
1824  TEXTURE_PARAMETERS_INIT;
1825  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1826  level);
1827  TEXTURE_SET_UNSIGNED_XYZW;
1828 }
1829 
1830 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(float* retVal, hipTextureObject_t textureObject, float x,
1831  float y, float z, float level) {
1832  TEXTURE_PARAMETERS_INIT;
1833  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1834  level);
1835  TEXTURE_SET_FLOAT;
1836 }
1837 
1838 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(float1* retVal, hipTextureObject_t textureObject, float x,
1839  float y, float z, float level) {
1840  TEXTURE_PARAMETERS_INIT;
1841  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1842  level);
1843  TEXTURE_SET_FLOAT_X;
1844 }
1845 
1846 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(float2* retVal, hipTextureObject_t textureObject, float x,
1847  float y, float z, float level) {
1848  TEXTURE_PARAMETERS_INIT;
1849  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1850  level);
1851  TEXTURE_SET_FLOAT_XY;
1852 }
1853 
1854 __TEXTURE_FUNCTIONS_DECL__ void tex3DLod(float4* retVal, hipTextureObject_t textureObject, float x,
1855  float y, float z, float level) {
1856  TEXTURE_PARAMETERS_INIT;
1857  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
1858  level);
1859  TEXTURE_SET_FLOAT_XYZW;
1860 }
1861 
1862 template <class T>
1863 __TEXTURE_FUNCTIONS_DECL__ T tex3DLod(hipTextureObject_t textureObject, float x, float y, float z,
1864  float level) {
1865  T ret;
1866  tex3DLod(&ret, textureObject, x, y, z, level);
1867  return ret;
1868 }
1869 
1871 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(char* retVal, hipTextureObject_t textureObject,
1872  float x, int layer) {
1873  TEXTURE_PARAMETERS_INIT;
1874  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1875  TEXTURE_SET_SIGNED;
1876 }
1877 
1878 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(char1* retVal, hipTextureObject_t textureObject,
1879  float x, int layer) {
1880  TEXTURE_PARAMETERS_INIT;
1881  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1882  TEXTURE_SET_SIGNED_X;
1883 }
1884 
1885 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(char2* retVal, hipTextureObject_t textureObject,
1886  float x, int layer) {
1887  TEXTURE_PARAMETERS_INIT;
1888  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1889  TEXTURE_SET_SIGNED_XY;
1890 }
1891 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(char4* retVal, hipTextureObject_t textureObject,
1892  float x, int layer) {
1893  TEXTURE_PARAMETERS_INIT;
1894  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1895  TEXTURE_SET_SIGNED_XYZW;
1896 }
1897 
1898 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(unsigned char* retVal,
1899  hipTextureObject_t textureObject, float x, int layer) {
1900  TEXTURE_PARAMETERS_INIT;
1901  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1902  TEXTURE_SET_UNSIGNED;
1903 }
1904 
1905 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(uchar1* retVal, hipTextureObject_t textureObject,
1906  float x, int layer) {
1907  TEXTURE_PARAMETERS_INIT;
1908  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1909  TEXTURE_SET_UNSIGNED_X;
1910 }
1911 
1912 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(uchar2* retVal, hipTextureObject_t textureObject,
1913  float x, int layer) {
1914  TEXTURE_PARAMETERS_INIT;
1915  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1916  TEXTURE_SET_UNSIGNED_XY;
1917 }
1918 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(uchar4* retVal, hipTextureObject_t textureObject,
1919  float x, int layer) {
1920  TEXTURE_PARAMETERS_INIT;
1921  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1922  TEXTURE_SET_UNSIGNED_XYZW;
1923 }
1924 
1925 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(short* retVal, hipTextureObject_t textureObject,
1926  float x, int layer) {
1927  TEXTURE_PARAMETERS_INIT;
1928  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1929  TEXTURE_SET_SIGNED;
1930 }
1931 
1932 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(short1* retVal, hipTextureObject_t textureObject,
1933  float x, int layer) {
1934  TEXTURE_PARAMETERS_INIT;
1935  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1936  TEXTURE_SET_SIGNED_X;
1937 }
1938 
1939 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(short2* retVal, hipTextureObject_t textureObject,
1940  float x, int layer) {
1941  TEXTURE_PARAMETERS_INIT;
1942  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1943  TEXTURE_SET_SIGNED_XY;
1944 }
1945 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(short4* retVal, hipTextureObject_t textureObject,
1946  float x, int layer) {
1947  TEXTURE_PARAMETERS_INIT;
1948  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1949  TEXTURE_SET_SIGNED_XYZW;
1950 }
1951 
1952 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(unsigned short* retVal,
1953  hipTextureObject_t textureObject, float x, int layer) {
1954  TEXTURE_PARAMETERS_INIT;
1955  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1956  TEXTURE_SET_UNSIGNED;
1957 }
1958 
1959 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(ushort1* retVal, hipTextureObject_t textureObject,
1960  float x, int layer) {
1961  TEXTURE_PARAMETERS_INIT;
1962  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1963  TEXTURE_SET_UNSIGNED_X;
1964 }
1965 
1966 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(ushort2* retVal, hipTextureObject_t textureObject,
1967  float x, int layer) {
1968  TEXTURE_PARAMETERS_INIT;
1969  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1970  TEXTURE_SET_UNSIGNED_XY;
1971 }
1972 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(ushort4* retVal, hipTextureObject_t textureObject,
1973  float x, int layer) {
1974  TEXTURE_PARAMETERS_INIT;
1975  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1976  TEXTURE_SET_UNSIGNED_XYZW;
1977 }
1978 
1979 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(int* retVal, hipTextureObject_t textureObject, float x,
1980  int layer) {
1981  TEXTURE_PARAMETERS_INIT;
1982  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1983  TEXTURE_SET_SIGNED;
1984 }
1985 
1986 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(int1* retVal, hipTextureObject_t textureObject,
1987  float x, int layer) {
1988  TEXTURE_PARAMETERS_INIT;
1989  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1990  TEXTURE_SET_SIGNED_X;
1991 }
1992 
1993 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(int2* retVal, hipTextureObject_t textureObject,
1994  float x, int layer) {
1995  TEXTURE_PARAMETERS_INIT;
1996  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
1997  TEXTURE_SET_SIGNED_XY;
1998 }
1999 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(int4* retVal, hipTextureObject_t textureObject,
2000  float x, int layer) {
2001  TEXTURE_PARAMETERS_INIT;
2002  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
2003  TEXTURE_SET_SIGNED_XYZW;
2004 }
2005 
2006 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(unsigned int* retVal, hipTextureObject_t textureObject,
2007  float x, int layer) {
2008  TEXTURE_PARAMETERS_INIT;
2009  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
2010  TEXTURE_SET_UNSIGNED;
2011 }
2012 
2013 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(uint1* retVal, hipTextureObject_t textureObject,
2014  float x, int layer) {
2015  TEXTURE_PARAMETERS_INIT;
2016  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
2017  TEXTURE_SET_UNSIGNED_X;
2018 }
2019 
2020 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(uint2* retVal, hipTextureObject_t textureObject,
2021  float x, int layer) {
2022  TEXTURE_PARAMETERS_INIT;
2023  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
2024  TEXTURE_SET_UNSIGNED_XY;
2025 }
2026 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(uint4* retVal, hipTextureObject_t textureObject,
2027  float x, int layer) {
2028  TEXTURE_PARAMETERS_INIT;
2029  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
2030  TEXTURE_SET_UNSIGNED_XYZW;
2031 }
2032 
2033 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(float* retVal, hipTextureObject_t textureObject,
2034  float x, int layer) {
2035  TEXTURE_PARAMETERS_INIT;
2036  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
2037  TEXTURE_SET_FLOAT;
2038 }
2039 
2040 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(float1* retVal, hipTextureObject_t textureObject,
2041  float x, int layer) {
2042  TEXTURE_PARAMETERS_INIT;
2043  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
2044  TEXTURE_SET_FLOAT_X;
2045 }
2046 
2047 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(float2* retVal, hipTextureObject_t textureObject,
2048  float x, int layer) {
2049  TEXTURE_PARAMETERS_INIT;
2050  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
2051  TEXTURE_SET_FLOAT_XY;
2052 }
2053 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayered(float4* retVal, hipTextureObject_t textureObject,
2054  float x, int layer) {
2055  TEXTURE_PARAMETERS_INIT;
2056  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
2057  TEXTURE_SET_FLOAT_XYZW;
2058 }
2059 
2060 template <class T>
2061 __TEXTURE_FUNCTIONS_DECL__ T tex1DLayered(hipTextureObject_t textureObject, float x, int layer) {
2062  T ret;
2063  tex1DLayered(&ret, textureObject, x, layer);
2064  return ret;
2065 }
2066 
2068 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(char* retVal, hipTextureObject_t textureObject,
2069  float x, int layer, float level) {
2070  TEXTURE_PARAMETERS_INIT;
2071  texel.f =
2072  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2073  TEXTURE_SET_SIGNED;
2074 }
2075 
2076 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(char1* retVal, hipTextureObject_t textureObject,
2077  float x, int layer, float level) {
2078  TEXTURE_PARAMETERS_INIT;
2079  texel.f =
2080  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2081  TEXTURE_SET_SIGNED_X;
2082 }
2083 
2084 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(char2* retVal, hipTextureObject_t textureObject,
2085  float x, int layer, float level) {
2086  TEXTURE_PARAMETERS_INIT;
2087  texel.f =
2088  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2089  TEXTURE_SET_SIGNED_XY;
2090 }
2091 
2092 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(char4* retVal, hipTextureObject_t textureObject,
2093  float x, int layer, float level) {
2094  TEXTURE_PARAMETERS_INIT;
2095  texel.f =
2096  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2097  TEXTURE_SET_SIGNED_XYZW;
2098 }
2099 
2100 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(unsigned char* retVal,
2101  hipTextureObject_t textureObject, float x,
2102  int layer, float level) {
2103  TEXTURE_PARAMETERS_INIT;
2104  texel.f =
2105  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2106  TEXTURE_SET_UNSIGNED;
2107 }
2108 
2109 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(uchar1* retVal, hipTextureObject_t textureObject,
2110  float x, int layer, float level) {
2111  TEXTURE_PARAMETERS_INIT;
2112  texel.f =
2113  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2114  TEXTURE_SET_UNSIGNED_X;
2115 }
2116 
2117 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(uchar2* retVal, hipTextureObject_t textureObject,
2118  float x, int layer, float level) {
2119  TEXTURE_PARAMETERS_INIT;
2120  texel.f =
2121  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2122  TEXTURE_SET_UNSIGNED_XY;
2123 }
2124 
2125 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(uchar4* retVal, hipTextureObject_t textureObject,
2126  float x, int layer, float level) {
2127  TEXTURE_PARAMETERS_INIT;
2128  texel.f =
2129  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2130  TEXTURE_SET_UNSIGNED_XYZW;
2131 }
2132 
2133 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(short* retVal, hipTextureObject_t textureObject,
2134  float x, int layer, float level) {
2135  TEXTURE_PARAMETERS_INIT;
2136  texel.f =
2137  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2138  TEXTURE_SET_SIGNED;
2139 }
2140 
2141 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(short1* retVal, hipTextureObject_t textureObject,
2142  float x, int layer, float level) {
2143  TEXTURE_PARAMETERS_INIT;
2144  texel.f =
2145  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2146  TEXTURE_SET_SIGNED_X;
2147 }
2148 
2149 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(short2* retVal, hipTextureObject_t textureObject,
2150  float x, int layer, float level) {
2151  TEXTURE_PARAMETERS_INIT;
2152  texel.f =
2153  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2154  TEXTURE_SET_SIGNED_XY;
2155 }
2156 
2157 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(short4* retVal, hipTextureObject_t textureObject,
2158  float x, int layer, float level) {
2159  TEXTURE_PARAMETERS_INIT;
2160  texel.f =
2161  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2162  TEXTURE_SET_SIGNED_XYZW;
2163 }
2164 
2165 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(unsigned short* retVal,
2166  hipTextureObject_t textureObject, float x,
2167  int layer, float level) {
2168  TEXTURE_PARAMETERS_INIT;
2169  texel.f =
2170  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2171  TEXTURE_SET_UNSIGNED;
2172 }
2173 
2174 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(ushort1* retVal, hipTextureObject_t textureObject,
2175  float x, int layer, float level) {
2176  TEXTURE_PARAMETERS_INIT;
2177  texel.f =
2178  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2179  TEXTURE_SET_UNSIGNED_X;
2180 }
2181 
2182 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(ushort2* retVal, hipTextureObject_t textureObject,
2183  float x, int layer, float level) {
2184  TEXTURE_PARAMETERS_INIT;
2185  texel.f =
2186  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2187  TEXTURE_SET_UNSIGNED_XY;
2188 }
2189 
2190 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(ushort4* retVal, hipTextureObject_t textureObject,
2191  float x, int layer, float level) {
2192  TEXTURE_PARAMETERS_INIT;
2193  texel.f =
2194  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2195  TEXTURE_SET_UNSIGNED_XYZW;
2196 }
2197 
2198 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(int* retVal, hipTextureObject_t textureObject,
2199  float x, int layer, float level) {
2200  TEXTURE_PARAMETERS_INIT;
2201  texel.f =
2202  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2203  TEXTURE_SET_SIGNED;
2204 }
2205 
2206 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(int1* retVal, hipTextureObject_t textureObject,
2207  float x, int layer, float level) {
2208  TEXTURE_PARAMETERS_INIT;
2209  texel.f =
2210  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2211  TEXTURE_SET_SIGNED_X;
2212 }
2213 
2214 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(int2* retVal, hipTextureObject_t textureObject,
2215  float x, int layer, float level) {
2216  TEXTURE_PARAMETERS_INIT;
2217  texel.f =
2218  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2219  TEXTURE_SET_SIGNED_XY;
2220 }
2221 
2222 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(int4* retVal, hipTextureObject_t textureObject,
2223  float x, int layer, float level) {
2224  TEXTURE_PARAMETERS_INIT;
2225  texel.f =
2226  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2227  TEXTURE_SET_SIGNED_XYZW;
2228 }
2229 
2230 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(unsigned int* retVal,
2231  hipTextureObject_t textureObject, float x,
2232  int layer, float level) {
2233  TEXTURE_PARAMETERS_INIT;
2234  texel.f =
2235  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2236  TEXTURE_SET_UNSIGNED;
2237 }
2238 
2239 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(uint1* retVal, hipTextureObject_t textureObject,
2240  float x, int layer, float level) {
2241  TEXTURE_PARAMETERS_INIT;
2242  texel.f =
2243  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2244  TEXTURE_SET_UNSIGNED_X;
2245 }
2246 
2247 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(uint2* retVal, hipTextureObject_t textureObject,
2248  float x, int layer, float level) {
2249  TEXTURE_PARAMETERS_INIT;
2250  texel.f =
2251  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2252  TEXTURE_SET_UNSIGNED_XY;
2253 }
2254 
2255 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(uint4* retVal, hipTextureObject_t textureObject,
2256  float x, int layer, float level) {
2257  TEXTURE_PARAMETERS_INIT;
2258  texel.f =
2259  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2260  TEXTURE_SET_UNSIGNED_XYZW;
2261 }
2262 
2263 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(float* retVal, hipTextureObject_t textureObject,
2264  float x, int layer, float level) {
2265  TEXTURE_PARAMETERS_INIT;
2266  texel.f =
2267  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2268  TEXTURE_SET_FLOAT;
2269 }
2270 
2271 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(float1* retVal, hipTextureObject_t textureObject,
2272  float x, int layer, float level) {
2273  TEXTURE_PARAMETERS_INIT;
2274  texel.f =
2275  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2276  TEXTURE_SET_FLOAT_X;
2277 }
2278 
2279 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(float2* retVal, hipTextureObject_t textureObject,
2280  float x, int layer, float level) {
2281  TEXTURE_PARAMETERS_INIT;
2282  texel.f =
2283  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2284  TEXTURE_SET_FLOAT_XY;
2285 }
2286 
2287 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredLod(float4* retVal, hipTextureObject_t textureObject,
2288  float x, int layer, float level) {
2289  TEXTURE_PARAMETERS_INIT;
2290  texel.f =
2291  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
2292  TEXTURE_SET_FLOAT_XYZW;
2293 }
2294 
2295 template <class T>
2296 __TEXTURE_FUNCTIONS_DECL__ T tex1DLayeredLod(hipTextureObject_t textureObject, float x, int layer,
2297  float level) {
2298  T ret;
2299  tex1DLayeredLod(&ret, textureObject, x, layer, level);
2300  return ret;
2301 }
2302 
2304 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(char* retVal, hipTextureObject_t textureObject,
2305  float x, int layer, float dx, float dy) {
2306  TEXTURE_PARAMETERS_INIT;
2307  texel.f =
2308  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2309  TEXTURE_SET_SIGNED;
2310 }
2311 
2312 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(char1* retVal, hipTextureObject_t textureObject,
2313  float x, int layer, float dx, float dy) {
2314  TEXTURE_PARAMETERS_INIT;
2315  texel.f =
2316  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2317  TEXTURE_SET_SIGNED_X;
2318 }
2319 
2320 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(char2* retVal, hipTextureObject_t textureObject,
2321  float x, int layer, float dx, float dy) {
2322  TEXTURE_PARAMETERS_INIT;
2323  texel.f =
2324  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2325  TEXTURE_SET_SIGNED_XY;
2326 }
2327 
2328 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(char4* retVal, hipTextureObject_t textureObject,
2329  float x, int layer, float dx, float dy) {
2330  TEXTURE_PARAMETERS_INIT;
2331  texel.f =
2332  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2333  TEXTURE_SET_SIGNED_XYZW;
2334 }
2335 
2336 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(unsigned char* retVal,
2337  hipTextureObject_t textureObject, float x,
2338  int layer, float dx, float dy) {
2339  TEXTURE_PARAMETERS_INIT;
2340  texel.f =
2341  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2342  TEXTURE_SET_UNSIGNED;
2343 }
2344 
2345 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(uchar1* retVal, hipTextureObject_t textureObject,
2346  float x, int layer, float dx, float dy) {
2347  TEXTURE_PARAMETERS_INIT;
2348  texel.f =
2349  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2350  TEXTURE_SET_UNSIGNED_X;
2351 }
2352 
2353 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(uchar2* retVal, hipTextureObject_t textureObject,
2354  float x, int layer, float dx, float dy) {
2355  TEXTURE_PARAMETERS_INIT;
2356  texel.f =
2357  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2358  TEXTURE_SET_UNSIGNED_XY;
2359 }
2360 
2361 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(uchar4* retVal, hipTextureObject_t textureObject,
2362  float x, int layer, float dx, float dy) {
2363  TEXTURE_PARAMETERS_INIT;
2364  texel.f =
2365  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2366  TEXTURE_SET_UNSIGNED_XYZW;
2367 }
2368 
2369 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(short* retVal, hipTextureObject_t textureObject,
2370  float x, int layer, float dx, float dy) {
2371  TEXTURE_PARAMETERS_INIT;
2372  texel.f =
2373  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2374  TEXTURE_SET_SIGNED;
2375 }
2376 
2377 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(short1* retVal, hipTextureObject_t textureObject,
2378  float x, int layer, float dx, float dy) {
2379  TEXTURE_PARAMETERS_INIT;
2380  texel.f =
2381  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2382  TEXTURE_SET_SIGNED_X;
2383 }
2384 
2385 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(short2* retVal, hipTextureObject_t textureObject,
2386  float x, int layer, float dx, float dy) {
2387  TEXTURE_PARAMETERS_INIT;
2388  texel.f =
2389  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2390  TEXTURE_SET_SIGNED_XY;
2391 }
2392 
2393 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(short4* retVal, hipTextureObject_t textureObject,
2394  float x, int layer, float dx, float dy) {
2395  TEXTURE_PARAMETERS_INIT;
2396  texel.f =
2397  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2398  TEXTURE_SET_SIGNED_XYZW;
2399 }
2400 
2401 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(unsigned short* retVal,
2402  hipTextureObject_t textureObject, float x,
2403  int layer, float dx, float dy) {
2404  TEXTURE_PARAMETERS_INIT;
2405  texel.f =
2406  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2407  TEXTURE_SET_UNSIGNED;
2408 }
2409 
2410 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(ushort1* retVal, hipTextureObject_t textureObject,
2411  float x, int layer, float dx, float dy) {
2412  TEXTURE_PARAMETERS_INIT;
2413  texel.f =
2414  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2415  TEXTURE_SET_UNSIGNED_X;
2416 }
2417 
2418 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(ushort2* retVal, hipTextureObject_t textureObject,
2419  float x, int layer, float dx, float dy) {
2420  TEXTURE_PARAMETERS_INIT;
2421  texel.f =
2422  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2423  TEXTURE_SET_UNSIGNED_XY;
2424 }
2425 
2426 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(ushort4* retVal, hipTextureObject_t textureObject,
2427  float x, int layer, float dx, float dy) {
2428  TEXTURE_PARAMETERS_INIT;
2429  texel.f =
2430  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2431  TEXTURE_SET_UNSIGNED_XYZW;
2432 }
2433 
2434 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(int* retVal, hipTextureObject_t textureObject,
2435  float x, int layer, float dx, float dy) {
2436  TEXTURE_PARAMETERS_INIT;
2437  texel.f =
2438  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2439  TEXTURE_SET_SIGNED;
2440 }
2441 
2442 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(int1* retVal, hipTextureObject_t textureObject,
2443  float x, int layer, float dx, float dy) {
2444  TEXTURE_PARAMETERS_INIT;
2445  texel.f =
2446  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2447  TEXTURE_SET_SIGNED_X;
2448 }
2449 
2450 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(int2* retVal, hipTextureObject_t textureObject,
2451  float x, int layer, float dx, float dy) {
2452  TEXTURE_PARAMETERS_INIT;
2453  texel.f =
2454  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2455  TEXTURE_SET_SIGNED_XY;
2456 }
2457 
2458 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(int4* retVal, hipTextureObject_t textureObject,
2459  float x, int layer, float dx, float dy) {
2460  TEXTURE_PARAMETERS_INIT;
2461  texel.f =
2462  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2463  TEXTURE_SET_SIGNED_XYZW;
2464 }
2465 
2466 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(unsigned int* retVal,
2467  hipTextureObject_t textureObject, float x,
2468  int layer, float dx, float dy) {
2469  TEXTURE_PARAMETERS_INIT;
2470  texel.f =
2471  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2472  TEXTURE_SET_UNSIGNED;
2473 }
2474 
2475 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(uint1* retVal, hipTextureObject_t textureObject,
2476  float x, int layer, float dx, float dy) {
2477  TEXTURE_PARAMETERS_INIT;
2478  texel.f =
2479  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2480  TEXTURE_SET_UNSIGNED_X;
2481 }
2482 
2483 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(uint2* retVal, hipTextureObject_t textureObject,
2484  float x, int layer, float dx, float dy) {
2485  TEXTURE_PARAMETERS_INIT;
2486  texel.f =
2487  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2488  TEXTURE_SET_UNSIGNED_XY;
2489 }
2490 
2491 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(uint4* retVal, hipTextureObject_t textureObject,
2492  float x, int layer, float dx, float dy) {
2493  TEXTURE_PARAMETERS_INIT;
2494  texel.f =
2495  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2496  TEXTURE_SET_UNSIGNED_XYZW;
2497 }
2498 
2499 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(float* retVal, hipTextureObject_t textureObject,
2500  float x, int layer, float dx, float dy) {
2501  TEXTURE_PARAMETERS_INIT;
2502  texel.f =
2503  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2504  TEXTURE_SET_FLOAT;
2505 }
2506 
2507 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(float1* retVal, hipTextureObject_t textureObject,
2508  float x, int layer, float dx, float dy) {
2509  TEXTURE_PARAMETERS_INIT;
2510  texel.f =
2511  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2512  TEXTURE_SET_FLOAT_X;
2513 }
2514 
2515 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(float2* retVal, hipTextureObject_t textureObject,
2516  float x, int layer, float dx, float dy) {
2517  TEXTURE_PARAMETERS_INIT;
2518  texel.f =
2519  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2520  TEXTURE_SET_FLOAT_XY;
2521 }
2522 
2523 __TEXTURE_FUNCTIONS_DECL__ void tex1DLayeredGrad(float4* retVal, hipTextureObject_t textureObject,
2524  float x, int layer, float dx, float dy) {
2525  TEXTURE_PARAMETERS_INIT;
2526  texel.f =
2527  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
2528  TEXTURE_SET_FLOAT_XYZW;
2529 }
2530 
2531 template <class T>
2532 __TEXTURE_FUNCTIONS_DECL__ T tex1DLayeredGrad(hipTextureObject_t textureObject, float x, int layer,
2533  float dx, float dy) {
2534  T ret;
2535  tex1DLayeredGrad(&ret, textureObject, x, layer, dx, dy);
2536  return ret;
2537 }
2538 
2540 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(char* retVal, hipTextureObject_t textureObject,
2541  float x, float y, int layer) {
2542  TEXTURE_PARAMETERS_INIT;
2543  texel.f =
2544  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2545  TEXTURE_SET_SIGNED;
2546 }
2547 
2548 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(char1* retVal, hipTextureObject_t textureObject,
2549  float x, float y, int layer) {
2550  TEXTURE_PARAMETERS_INIT;
2551  texel.f =
2552  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2553  TEXTURE_SET_SIGNED_X;
2554 }
2555 
2556 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(char2* retVal, hipTextureObject_t textureObject,
2557  float x, float y, int layer) {
2558  TEXTURE_PARAMETERS_INIT;
2559  texel.f =
2560  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2561  TEXTURE_SET_SIGNED_XY;
2562 }
2563 
2564 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(char4* retVal, hipTextureObject_t textureObject,
2565  float x, float y, int layer) {
2566  TEXTURE_PARAMETERS_INIT;
2567  texel.f =
2568  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2569  TEXTURE_SET_SIGNED_XYZW;
2570 }
2571 
2572 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(unsigned char* retVal,
2573  hipTextureObject_t textureObject, float x, float y,
2574  int layer) {
2575  TEXTURE_PARAMETERS_INIT;
2576  texel.f =
2577  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2578  TEXTURE_SET_UNSIGNED;
2579 }
2580 
2581 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(uchar1* retVal, hipTextureObject_t textureObject,
2582  float x, float y, int layer) {
2583  TEXTURE_PARAMETERS_INIT;
2584  texel.f =
2585  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2586  TEXTURE_SET_UNSIGNED_X;
2587 }
2588 
2589 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(uchar2* retVal, hipTextureObject_t textureObject,
2590  float x, float y, int layer) {
2591  TEXTURE_PARAMETERS_INIT;
2592  texel.f =
2593  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2594  TEXTURE_SET_UNSIGNED_XY;
2595 }
2596 
2597 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(uchar4* retVal, hipTextureObject_t textureObject,
2598  float x, float y, int layer) {
2599  TEXTURE_PARAMETERS_INIT;
2600  texel.f =
2601  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2602  TEXTURE_SET_UNSIGNED_XYZW;
2603 }
2604 
2605 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(short* retVal, hipTextureObject_t textureObject,
2606  float x, float y, int layer) {
2607  TEXTURE_PARAMETERS_INIT;
2608  texel.f =
2609  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2610  TEXTURE_SET_SIGNED;
2611 }
2612 
2613 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(short1* retVal, hipTextureObject_t textureObject,
2614  float x, float y, int layer) {
2615  TEXTURE_PARAMETERS_INIT;
2616  texel.f =
2617  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2618  TEXTURE_SET_SIGNED_X;
2619 }
2620 
2621 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(short2* retVal, hipTextureObject_t textureObject,
2622  float x, float y, int layer) {
2623  TEXTURE_PARAMETERS_INIT;
2624  texel.f =
2625  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2626  TEXTURE_SET_SIGNED_XY;
2627 }
2628 
2629 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(short4* retVal, hipTextureObject_t textureObject,
2630  float x, float y, int layer) {
2631  TEXTURE_PARAMETERS_INIT;
2632  texel.f =
2633  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2634  TEXTURE_SET_SIGNED_XYZW;
2635 }
2636 
2637 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(unsigned short* retVal,
2638  hipTextureObject_t textureObject, float x, float y,
2639  int layer) {
2640  TEXTURE_PARAMETERS_INIT;
2641  texel.f =
2642  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2643  TEXTURE_SET_UNSIGNED;
2644 }
2645 
2646 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(ushort1* retVal, hipTextureObject_t textureObject,
2647  float x, float y, int layer) {
2648  TEXTURE_PARAMETERS_INIT;
2649  texel.f =
2650  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2651  TEXTURE_SET_UNSIGNED_X;
2652 }
2653 
2654 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(ushort2* retVal, hipTextureObject_t textureObject,
2655  float x, float y, int layer) {
2656  TEXTURE_PARAMETERS_INIT;
2657  texel.f =
2658  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2659  TEXTURE_SET_UNSIGNED_XY;
2660 }
2661 
2662 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(ushort4* retVal, hipTextureObject_t textureObject,
2663  float x, float y, int layer) {
2664  TEXTURE_PARAMETERS_INIT;
2665  texel.f =
2666  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2667  TEXTURE_SET_UNSIGNED_XYZW;
2668 }
2669 
2670 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(int* retVal, hipTextureObject_t textureObject, float x,
2671  float y, int layer) {
2672  TEXTURE_PARAMETERS_INIT;
2673  texel.f =
2674  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2675  TEXTURE_SET_SIGNED;
2676 }
2677 
2678 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(int1* retVal, hipTextureObject_t textureObject,
2679  float x, float y, int layer) {
2680  TEXTURE_PARAMETERS_INIT;
2681  texel.f =
2682  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2683  TEXTURE_SET_SIGNED_X;
2684 }
2685 
2686 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(int2* retVal, hipTextureObject_t textureObject,
2687  float x, float y, int layer) {
2688  TEXTURE_PARAMETERS_INIT;
2689  texel.f =
2690  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2691  TEXTURE_SET_SIGNED_XY;
2692 }
2693 
2694 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(int4* retVal, hipTextureObject_t textureObject,
2695  float x, float y, int layer) {
2696  TEXTURE_PARAMETERS_INIT;
2697  texel.f =
2698  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2699  TEXTURE_SET_SIGNED_XYZW;
2700 }
2701 
2702 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(unsigned int* retVal, hipTextureObject_t textureObject,
2703  float x, float y, int layer) {
2704  TEXTURE_PARAMETERS_INIT;
2705  texel.f =
2706  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2707  TEXTURE_SET_UNSIGNED;
2708 }
2709 
2710 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(uint1* retVal, hipTextureObject_t textureObject,
2711  float x, float y, int layer) {
2712  TEXTURE_PARAMETERS_INIT;
2713  texel.f =
2714  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2715  TEXTURE_SET_UNSIGNED_X;
2716 }
2717 
2718 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(uint2* retVal, hipTextureObject_t textureObject,
2719  float x, float y, int layer) {
2720  TEXTURE_PARAMETERS_INIT;
2721  texel.f =
2722  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2723  TEXTURE_SET_UNSIGNED_XY;
2724 }
2725 
2726 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(uint4* retVal, hipTextureObject_t textureObject,
2727  float x, float y, int layer) {
2728  TEXTURE_PARAMETERS_INIT;
2729  texel.f =
2730  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2731  TEXTURE_SET_UNSIGNED_XYZW;
2732 }
2733 
2734 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(float* retVal, hipTextureObject_t textureObject,
2735  float x, float y, int layer) {
2736  TEXTURE_PARAMETERS_INIT;
2737  texel.f =
2738  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2739  TEXTURE_SET_FLOAT;
2740 }
2741 
2742 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(float1* retVal, hipTextureObject_t textureObject,
2743  float x, float y, int layer) {
2744  TEXTURE_PARAMETERS_INIT;
2745  texel.f =
2746  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2747  TEXTURE_SET_FLOAT_X;
2748 }
2749 
2750 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(float2* retVal, hipTextureObject_t textureObject,
2751  float x, float y, int layer) {
2752  TEXTURE_PARAMETERS_INIT;
2753  texel.f =
2754  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2755  TEXTURE_SET_FLOAT_XY;
2756 }
2757 
2758 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayered(float4* retVal, hipTextureObject_t textureObject,
2759  float x, float y, int layer) {
2760  TEXTURE_PARAMETERS_INIT;
2761  texel.f =
2762  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
2763  TEXTURE_SET_FLOAT_XYZW;
2764 }
2765 
2766 template <class T>
2767 __TEXTURE_FUNCTIONS_DECL__ T tex2DLayered(hipTextureObject_t textureObject, float x, float y,
2768  int layer) {
2769  T ret;
2770  tex2DLayered(&ret, textureObject, x, y, layer);
2771  return ret;
2772 }
2773 
2775 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(char* retVal, hipTextureObject_t textureObject,
2776  float x, float y, int layer, float level) {
2777  TEXTURE_PARAMETERS_INIT;
2778  texel.f = __ockl_image_sample_lod_2Da(
2779  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2780  TEXTURE_SET_SIGNED;
2781 }
2782 
2783 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(char1* retVal, hipTextureObject_t textureObject,
2784  float x, float y, int layer, float level) {
2785  TEXTURE_PARAMETERS_INIT;
2786  texel.f = __ockl_image_sample_lod_2Da(
2787  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2788  TEXTURE_SET_SIGNED_X;
2789 }
2790 
2791 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(char2* retVal, hipTextureObject_t textureObject,
2792  float x, float y, int layer, float level) {
2793  TEXTURE_PARAMETERS_INIT;
2794  texel.f = __ockl_image_sample_lod_2Da(
2795  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2796  TEXTURE_SET_SIGNED_XY;
2797 }
2798 
2799 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(char4* retVal, hipTextureObject_t textureObject,
2800  float x, float y, int layer, float level) {
2801  TEXTURE_PARAMETERS_INIT;
2802  texel.f = __ockl_image_sample_lod_2Da(
2803  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2804  TEXTURE_SET_SIGNED_XYZW;
2805 }
2806 
2807 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(unsigned char* retVal,
2808  hipTextureObject_t textureObject, float x, float y,
2809  int layer, float level) {
2810  TEXTURE_PARAMETERS_INIT;
2811  texel.f = __ockl_image_sample_lod_2Da(
2812  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2813  TEXTURE_SET_UNSIGNED;
2814 }
2815 
2816 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(uchar1* retVal, hipTextureObject_t textureObject,
2817  float x, float y, int layer, float level) {
2818  TEXTURE_PARAMETERS_INIT;
2819  texel.f = __ockl_image_sample_lod_2Da(
2820  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2821  TEXTURE_SET_UNSIGNED_X;
2822 }
2823 
2824 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(uchar2* retVal, hipTextureObject_t textureObject,
2825  float x, float y, int layer, float level) {
2826  TEXTURE_PARAMETERS_INIT;
2827  texel.f = __ockl_image_sample_lod_2Da(
2828  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2829  TEXTURE_SET_UNSIGNED_XY;
2830 }
2831 
2832 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(uchar4* retVal, hipTextureObject_t textureObject,
2833  float x, float y, int layer, float level) {
2834  TEXTURE_PARAMETERS_INIT;
2835  texel.f = __ockl_image_sample_lod_2Da(
2836  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2837  TEXTURE_SET_UNSIGNED_XYZW;
2838 }
2839 
2840 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(short* retVal, hipTextureObject_t textureObject,
2841  float x, float y, int layer, float level) {
2842  TEXTURE_PARAMETERS_INIT;
2843  texel.f = __ockl_image_sample_lod_2Da(
2844  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2845  TEXTURE_SET_SIGNED;
2846 }
2847 
2848 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(short1* retVal, hipTextureObject_t textureObject,
2849  float x, float y, int layer, float level) {
2850  TEXTURE_PARAMETERS_INIT;
2851  texel.f = __ockl_image_sample_lod_2Da(
2852  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2853  TEXTURE_SET_SIGNED_X;
2854 }
2855 
2856 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(short2* retVal, hipTextureObject_t textureObject,
2857  float x, float y, int layer, float level) {
2858  TEXTURE_PARAMETERS_INIT;
2859  texel.f = __ockl_image_sample_lod_2Da(
2860  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2861  TEXTURE_SET_SIGNED_XY;
2862 }
2863 
2864 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(short4* retVal, hipTextureObject_t textureObject,
2865  float x, float y, int layer, float level) {
2866  TEXTURE_PARAMETERS_INIT;
2867  texel.f = __ockl_image_sample_lod_2Da(
2868  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2869  TEXTURE_SET_SIGNED_XYZW;
2870 }
2871 
2872 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(unsigned short* retVal,
2873  hipTextureObject_t textureObject, float x, float y,
2874  int layer, float level) {
2875  TEXTURE_PARAMETERS_INIT;
2876  texel.f = __ockl_image_sample_lod_2Da(
2877  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2878  TEXTURE_SET_UNSIGNED;
2879 }
2880 
2881 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(ushort1* retVal, hipTextureObject_t textureObject,
2882  float x, float y, int layer, float level) {
2883  TEXTURE_PARAMETERS_INIT;
2884  texel.f = __ockl_image_sample_lod_2Da(
2885  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2886  TEXTURE_SET_UNSIGNED_X;
2887 }
2888 
2889 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(ushort2* retVal, hipTextureObject_t textureObject,
2890  float x, float y, int layer, float level) {
2891  TEXTURE_PARAMETERS_INIT;
2892  texel.f = __ockl_image_sample_lod_2Da(
2893  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2894  TEXTURE_SET_UNSIGNED_XY;
2895 }
2896 
2897 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(ushort4* retVal, hipTextureObject_t textureObject,
2898  float x, float y, int layer, float level) {
2899  TEXTURE_PARAMETERS_INIT;
2900  texel.f = __ockl_image_sample_lod_2Da(
2901  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2902  TEXTURE_SET_UNSIGNED_XYZW;
2903 }
2904 
2905 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(int* retVal, hipTextureObject_t textureObject,
2906  float x, float y, int layer, float level) {
2907  TEXTURE_PARAMETERS_INIT;
2908  texel.f = __ockl_image_sample_lod_2Da(
2909  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2910  TEXTURE_SET_SIGNED;
2911 }
2912 
2913 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(int1* retVal, hipTextureObject_t textureObject,
2914  float x, float y, int layer, float level) {
2915  TEXTURE_PARAMETERS_INIT;
2916  texel.f = __ockl_image_sample_lod_2Da(
2917  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2918  TEXTURE_SET_SIGNED_X;
2919 }
2920 
2921 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(int2* retVal, hipTextureObject_t textureObject,
2922  float x, float y, int layer, float level) {
2923  TEXTURE_PARAMETERS_INIT;
2924  texel.f = __ockl_image_sample_lod_2Da(
2925  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2926  TEXTURE_SET_SIGNED_XY;
2927 }
2928 
2929 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(int4* retVal, hipTextureObject_t textureObject,
2930  float x, float y, int layer, float level) {
2931  TEXTURE_PARAMETERS_INIT;
2932  texel.f = __ockl_image_sample_lod_2Da(
2933  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2934  TEXTURE_SET_SIGNED_XYZW;
2935 }
2936 
2937 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(unsigned int* retVal,
2938  hipTextureObject_t textureObject, float x, float y,
2939  int layer, float level) {
2940  TEXTURE_PARAMETERS_INIT;
2941  texel.f = __ockl_image_sample_lod_2Da(
2942  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2943  TEXTURE_SET_UNSIGNED;
2944 }
2945 
2946 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(uint1* retVal, hipTextureObject_t textureObject,
2947  float x, float y, int layer, float level) {
2948  TEXTURE_PARAMETERS_INIT;
2949  texel.f = __ockl_image_sample_lod_2Da(
2950  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2951  TEXTURE_SET_UNSIGNED_X;
2952 }
2953 
2954 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(uint2* retVal, hipTextureObject_t textureObject,
2955  float x, float y, int layer, float level) {
2956  TEXTURE_PARAMETERS_INIT;
2957  texel.f = __ockl_image_sample_lod_2Da(
2958  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2959  TEXTURE_SET_UNSIGNED_XY;
2960 }
2961 
2962 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(uint4* retVal, hipTextureObject_t textureObject,
2963  float x, float y, int layer, float level) {
2964  TEXTURE_PARAMETERS_INIT;
2965  texel.f = __ockl_image_sample_lod_2Da(
2966  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2967  TEXTURE_SET_UNSIGNED_XYZW;
2968 }
2969 
2970 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(float* retVal, hipTextureObject_t textureObject,
2971  float x, float y, int layer, float level) {
2972  TEXTURE_PARAMETERS_INIT;
2973  texel.f = __ockl_image_sample_lod_2Da(
2974  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2975  TEXTURE_SET_FLOAT;
2976 }
2977 
2978 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(float1* retVal, hipTextureObject_t textureObject,
2979  float x, float y, int layer, float level) {
2980  TEXTURE_PARAMETERS_INIT;
2981  texel.f = __ockl_image_sample_lod_2Da(
2982  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2983  TEXTURE_SET_FLOAT_X;
2984 }
2985 
2986 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(float2* retVal, hipTextureObject_t textureObject,
2987  float x, float y, int layer, float level) {
2988  TEXTURE_PARAMETERS_INIT;
2989  texel.f = __ockl_image_sample_lod_2Da(
2990  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2991  TEXTURE_SET_FLOAT_XY;
2992 }
2993 
2994 __TEXTURE_FUNCTIONS_DECL__ void tex2DLayeredLod(float4* retVal, hipTextureObject_t textureObject,
2995  float x, float y, int layer, float level) {
2996  TEXTURE_PARAMETERS_INIT;
2997  texel.f = __ockl_image_sample_lod_2Da(
2998  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
2999  TEXTURE_SET_FLOAT_XYZW;
3000 }
3001 
3002 template <class T>
3003 __TEXTURE_FUNCTIONS_DECL__ T tex2DLayeredLod(hipTextureObject_t textureObject, float x, float y,
3004  int layer, float level) {
3005  T ret;
3006  tex2DLayeredLod(&ret, textureObject, x, y, layer, level);
3007  return ret;
3008 }
3009 
3011 // Texture Reference APIs
3013 template <int texType, enum hipTextureReadMode mode>
3014 __TEXTURE_FUNCTIONS_DECL__ char tex1Dfetch(texture<char, texType, mode> texRef, int x) {
3015  TEXTURE_REF_PARAMETERS_INIT;
3016  texel.f = __ockl_image_sample_1D(i, s, x);
3017  TEXTURE_RETURN_CHAR;
3018 }
3019 
3020 template <int texType, enum hipTextureReadMode mode>
3021 __TEXTURE_FUNCTIONS_DECL__ char1 tex1Dfetch(texture<char1, texType, mode> texRef, int x) {
3022  TEXTURE_REF_PARAMETERS_INIT;
3023  texel.f = __ockl_image_sample_1D(i, s, x);
3024  TEXTURE_RETURN_CHAR_X;
3025 }
3026 
3027 template <int texType, enum hipTextureReadMode mode>
3028 __TEXTURE_FUNCTIONS_DECL__ char2 tex1Dfetch(texture<char2, texType, mode> texRef, int x) {
3029  TEXTURE_REF_PARAMETERS_INIT;
3030  texel.f = __ockl_image_sample_1D(i, s, x);
3031  TEXTURE_RETURN_CHAR_XY;
3032 }
3033 
3034 template <int texType, enum hipTextureReadMode mode>
3035 __TEXTURE_FUNCTIONS_DECL__ char4 tex1Dfetch(texture<char4, texType, mode> texRef, int x) {
3036  TEXTURE_REF_PARAMETERS_INIT;
3037  texel.f = __ockl_image_sample_1D(i, s, x);
3038  TEXTURE_RETURN_CHAR_XYZW;
3039 }
3040 
3041 template <int texType, enum hipTextureReadMode mode>
3042 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1Dfetch(texture<unsigned char, texType, mode> texRef,
3043  int x) {
3044  TEXTURE_REF_PARAMETERS_INIT;
3045  texel.f = __ockl_image_sample_1D(i, s, x);
3046  TEXTURE_RETURN_UCHAR;
3047 }
3048 
3049 template <int texType, enum hipTextureReadMode mode>
3050 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1Dfetch(texture<uchar1, texType, mode> texRef, int x) {
3051  TEXTURE_REF_PARAMETERS_INIT;
3052  texel.f = __ockl_image_sample_1D(i, s, x);
3053  TEXTURE_RETURN_UCHAR_X;
3054 }
3055 
3056 template <int texType, enum hipTextureReadMode mode>
3057 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1Dfetch(texture<uchar2, texType, mode> texRef, int x) {
3058  TEXTURE_REF_PARAMETERS_INIT;
3059  texel.f = __ockl_image_sample_1D(i, s, x);
3060  TEXTURE_RETURN_UCHAR_XY;
3061 }
3062 
3063 template <int texType, enum hipTextureReadMode mode>
3064 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1Dfetch(texture<uchar4, texType, mode> texRef, int x) {
3065  TEXTURE_REF_PARAMETERS_INIT;
3066  texel.f = __ockl_image_sample_1D(i, s, x);
3067  TEXTURE_RETURN_UCHAR_XYZW;
3068 }
3069 
3070 template <int texType, enum hipTextureReadMode mode>
3071 __TEXTURE_FUNCTIONS_DECL__ short tex1Dfetch(texture<short, texType, mode> texRef, int x) {
3072  TEXTURE_REF_PARAMETERS_INIT;
3073  texel.f = __ockl_image_sample_1D(i, s, x);
3074  TEXTURE_RETURN_SHORT;
3075 }
3076 
3077 template <int texType, enum hipTextureReadMode mode>
3078 __TEXTURE_FUNCTIONS_DECL__ short1 tex1Dfetch(texture<short1, texType, mode> texRef, int x) {
3079  TEXTURE_REF_PARAMETERS_INIT;
3080  texel.f = __ockl_image_sample_1D(i, s, x);
3081  TEXTURE_RETURN_SHORT_X;
3082 }
3083 
3084 template <int texType, enum hipTextureReadMode mode>
3085 __TEXTURE_FUNCTIONS_DECL__ short2 tex1Dfetch(texture<short2, texType, mode> texRef, int x) {
3086  TEXTURE_REF_PARAMETERS_INIT;
3087  texel.f = __ockl_image_sample_1D(i, s, x);
3088  TEXTURE_RETURN_SHORT_XY;
3089 }
3090 
3091 template <int texType, enum hipTextureReadMode mode>
3092 __TEXTURE_FUNCTIONS_DECL__ short4 tex1Dfetch(texture<short4, texType, mode> texRef, int x) {
3093  TEXTURE_REF_PARAMETERS_INIT;
3094  texel.f = __ockl_image_sample_1D(i, s, x);
3095  TEXTURE_RETURN_SHORT_XYZW;
3096 }
3097 
3098 template <int texType, enum hipTextureReadMode mode>
3099 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1Dfetch(texture<ushort1, texType, mode> texRef, int x) {
3100  TEXTURE_REF_PARAMETERS_INIT;
3101  texel.f = __ockl_image_sample_1D(i, s, x);
3102  TEXTURE_RETURN_USHORT_X;
3103 }
3104 
3105 template <int texType, enum hipTextureReadMode mode>
3106 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1Dfetch(texture<unsigned short, texType, mode> texRef,
3107  int x) {
3108  TEXTURE_REF_PARAMETERS_INIT;
3109  texel.f = __ockl_image_sample_1D(i, s, x);
3110  TEXTURE_RETURN_USHORT;
3111 }
3112 
3113 template <int texType, enum hipTextureReadMode mode>
3114 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1Dfetch(texture<ushort2, texType, mode> texRef, int x) {
3115  TEXTURE_REF_PARAMETERS_INIT;
3116  texel.f = __ockl_image_sample_1D(i, s, x);
3117  TEXTURE_RETURN_USHORT_XY;
3118 }
3119 
3120 template <int texType, enum hipTextureReadMode mode>
3121 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1Dfetch(texture<ushort4, texType, mode> texRef, int x) {
3122  TEXTURE_REF_PARAMETERS_INIT;
3123  texel.f = __ockl_image_sample_1D(i, s, x);
3124  TEXTURE_RETURN_USHORT_XYZW;
3125 }
3126 
3127 template <int texType, enum hipTextureReadMode mode>
3128 __TEXTURE_FUNCTIONS_DECL__ int1 tex1Dfetch(texture<int1, texType, mode> texRef, int x) {
3129  TEXTURE_REF_PARAMETERS_INIT;
3130  texel.f = __ockl_image_sample_1D(i, s, x);
3131  TEXTURE_RETURN_INT_X;
3132 }
3133 
3134 template <int texType, enum hipTextureReadMode mode>
3135 __TEXTURE_FUNCTIONS_DECL__ int tex1Dfetch(texture<int, texType, mode> texRef, int x) {
3136  TEXTURE_REF_PARAMETERS_INIT;
3137  texel.f = __ockl_image_sample_1D(i, s, x);
3138  TEXTURE_RETURN_INT;
3139 }
3140 
3141 template <int texType, enum hipTextureReadMode mode>
3142 __TEXTURE_FUNCTIONS_DECL__ int2 tex1Dfetch(texture<int2, texType, mode> texRef, int x) {
3143  TEXTURE_REF_PARAMETERS_INIT;
3144  texel.f = __ockl_image_sample_1D(i, s, x);
3145  TEXTURE_RETURN_INT_XY;
3146 }
3147 
3148 template <int texType, enum hipTextureReadMode mode>
3149 __TEXTURE_FUNCTIONS_DECL__ int4 tex1Dfetch(texture<int4, texType, mode> texRef, int x) {
3150  TEXTURE_REF_PARAMETERS_INIT;
3151  texel.f = __ockl_image_sample_1D(i, s, x);
3152  TEXTURE_RETURN_INT_XYZW;
3153 }
3154 
3155 template <int texType, enum hipTextureReadMode mode>
3156 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1Dfetch(texture<unsigned int, texType, mode> texRef,
3157  int x) {
3158  TEXTURE_REF_PARAMETERS_INIT;
3159  texel.f = __ockl_image_sample_1D(i, s, x);
3160  TEXTURE_RETURN_UINT;
3161 }
3162 
3163 template <int texType, enum hipTextureReadMode mode>
3164 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1Dfetch(texture<uint1, texType, mode> texRef, int x) {
3165  TEXTURE_REF_PARAMETERS_INIT;
3166  texel.f = __ockl_image_sample_1D(i, s, x);
3167  TEXTURE_RETURN_UINT_X;
3168 }
3169 
3170 template <int texType, enum hipTextureReadMode mode>
3171 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1Dfetch(texture<uint2, texType, mode> texRef, int x) {
3172  TEXTURE_REF_PARAMETERS_INIT;
3173  texel.f = __ockl_image_sample_1D(i, s, x);
3174  TEXTURE_RETURN_UINT_XY;
3175 }
3176 
3177 template <int texType, enum hipTextureReadMode mode>
3178 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1Dfetch(texture<uint4, texType, mode> texRef, int x) {
3179  TEXTURE_REF_PARAMETERS_INIT;
3180  texel.f = __ockl_image_sample_1D(i, s, x);
3181  TEXTURE_RETURN_UINT_XYZW;
3182 }
3183 
3184 template <int texType, enum hipTextureReadMode mode>
3185 __TEXTURE_FUNCTIONS_DECL__ float tex1Dfetch(texture<float, texType, mode> texRef, int x) {
3186  TEXTURE_REF_PARAMETERS_INIT;
3187  texel.f = __ockl_image_sample_1D(i, s, x);
3188  TEXTURE_RETURN_FLOAT;
3189 }
3190 
3191 template <int texType, enum hipTextureReadMode mode>
3192 __TEXTURE_FUNCTIONS_DECL__ float1 tex1Dfetch(texture<float1, texType, mode> texRef, int x) {
3193  TEXTURE_REF_PARAMETERS_INIT;
3194  texel.f = __ockl_image_sample_1D(i, s, x);
3195  TEXTURE_RETURN_FLOAT_X;
3196 }
3197 
3198 template <int texType, enum hipTextureReadMode mode>
3199 __TEXTURE_FUNCTIONS_DECL__ float2 tex1Dfetch(texture<float2, texType, mode> texRef, int x) {
3200  TEXTURE_REF_PARAMETERS_INIT;
3201  texel.f = __ockl_image_sample_1D(i, s, x);
3202  TEXTURE_RETURN_FLOAT_XY;
3203 }
3204 
3205 template <int texType, enum hipTextureReadMode mode>
3206 __TEXTURE_FUNCTIONS_DECL__ float4 tex1Dfetch(texture<float4, texType, mode> texRef, int x) {
3207  TEXTURE_REF_PARAMETERS_INIT;
3208  texel.f = __ockl_image_sample_1D(i, s, x);
3209  TEXTURE_RETURN_FLOAT_XYZW;
3210 }
3211 
3213 
3214 template <int texType, enum hipTextureReadMode mode>
3215 __TEXTURE_FUNCTIONS_DECL__ char tex1Dfetch(texture<char, texType, mode> texRef,
3216  hipTextureObject_t textureObject, int x) {
3217  TEXTURE_PARAMETERS_INIT;
3218  texel.f = __ockl_image_sample_1D(i, s, x);
3219  TEXTURE_RETURN_CHAR;
3220 }
3221 
3222 template <int texType, enum hipTextureReadMode mode>
3223 __TEXTURE_FUNCTIONS_DECL__ char1 tex1Dfetch(texture<char1, texType, mode> texRef,
3224  hipTextureObject_t textureObject, int x) {
3225  TEXTURE_PARAMETERS_INIT;
3226  texel.f = __ockl_image_sample_1D(i, s, x);
3227  TEXTURE_RETURN_CHAR_X;
3228 }
3229 
3230 template <int texType, enum hipTextureReadMode mode>
3231 __TEXTURE_FUNCTIONS_DECL__ char2 tex1Dfetch(texture<char2, texType, mode> texRef,
3232  hipTextureObject_t textureObject, int x) {
3233  TEXTURE_PARAMETERS_INIT;
3234  texel.f = __ockl_image_sample_1D(i, s, x);
3235  TEXTURE_RETURN_CHAR_XY;
3236 }
3237 
3238 template <int texType, enum hipTextureReadMode mode>
3239 __TEXTURE_FUNCTIONS_DECL__ char4 tex1Dfetch(texture<char4, texType, mode> texRef,
3240  hipTextureObject_t textureObject, int x) {
3241  TEXTURE_PARAMETERS_INIT;
3242  texel.f = __ockl_image_sample_1D(i, s, x);
3243  TEXTURE_RETURN_CHAR_XYZW;
3244 }
3245 
3246 template <int texType, enum hipTextureReadMode mode>
3247 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1Dfetch(texture<unsigned char, texType, mode> texRef,
3248  hipTextureObject_t textureObject, int x) {
3249  TEXTURE_PARAMETERS_INIT;
3250  texel.f = __ockl_image_sample_1D(i, s, x);
3251  TEXTURE_RETURN_UCHAR;
3252 }
3253 
3254 template <int texType, enum hipTextureReadMode mode>
3255 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1Dfetch(texture<uchar1, texType, mode> texRef,
3256  hipTextureObject_t textureObject, int x) {
3257  TEXTURE_PARAMETERS_INIT;
3258  texel.f = __ockl_image_sample_1D(i, s, x);
3259  TEXTURE_RETURN_UCHAR_X;
3260 }
3261 
3262 template <int texType, enum hipTextureReadMode mode>
3263 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1Dfetch(texture<uchar2, texType, mode> texRef,
3264  hipTextureObject_t textureObject, int x) {
3265  TEXTURE_PARAMETERS_INIT;
3266  texel.f = __ockl_image_sample_1D(i, s, x);
3267  TEXTURE_RETURN_UCHAR_XY;
3268 }
3269 
3270 template <int texType, enum hipTextureReadMode mode>
3271 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1Dfetch(texture<uchar4, texType, mode> texRef,
3272  hipTextureObject_t textureObject, int x) {
3273  TEXTURE_PARAMETERS_INIT;
3274  texel.f = __ockl_image_sample_1D(i, s, x);
3275  TEXTURE_RETURN_UCHAR_XYZW;
3276 }
3277 
3278 template <int texType, enum hipTextureReadMode mode>
3279 __TEXTURE_FUNCTIONS_DECL__ short tex1Dfetch(texture<short, texType, mode> texRef,
3280  hipTextureObject_t textureObject, int x) {
3281  TEXTURE_PARAMETERS_INIT;
3282  texel.f = __ockl_image_sample_1D(i, s, x);
3283  TEXTURE_RETURN_SHORT;
3284 }
3285 
3286 template <int texType, enum hipTextureReadMode mode>
3287 __TEXTURE_FUNCTIONS_DECL__ short1 tex1Dfetch(texture<short1, texType, mode> texRef,
3288  hipTextureObject_t textureObject, int x) {
3289  TEXTURE_PARAMETERS_INIT;
3290  texel.f = __ockl_image_sample_1D(i, s, x);
3291  TEXTURE_RETURN_SHORT_X;
3292 }
3293 
3294 template <int texType, enum hipTextureReadMode mode>
3295 __TEXTURE_FUNCTIONS_DECL__ short2 tex1Dfetch(texture<short2, texType, mode> texRef,
3296  hipTextureObject_t textureObject, int x) {
3297  TEXTURE_PARAMETERS_INIT;
3298  texel.f = __ockl_image_sample_1D(i, s, x);
3299  TEXTURE_RETURN_SHORT_XY;
3300 }
3301 
3302 template <int texType, enum hipTextureReadMode mode>
3303 __TEXTURE_FUNCTIONS_DECL__ short4 tex1Dfetch(texture<short4, texType, mode> texRef,
3304  hipTextureObject_t textureObject, int x) {
3305  TEXTURE_PARAMETERS_INIT;
3306  texel.f = __ockl_image_sample_1D(i, s, x);
3307  TEXTURE_RETURN_SHORT_XYZW;
3308 }
3309 
3310 template <int texType, enum hipTextureReadMode mode>
3311 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1Dfetch(texture<ushort1, texType, mode> texRef,
3312  hipTextureObject_t textureObject, int x) {
3313  TEXTURE_PARAMETERS_INIT;
3314  texel.f = __ockl_image_sample_1D(i, s, x);
3315  TEXTURE_RETURN_USHORT_X;
3316 }
3317 
3318 template <int texType, enum hipTextureReadMode mode>
3319 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1Dfetch(texture<unsigned short, texType, mode> texRef,
3320  hipTextureObject_t textureObject, int x) {
3321  TEXTURE_PARAMETERS_INIT;
3322  texel.f = __ockl_image_sample_1D(i, s, x);
3323  TEXTURE_RETURN_USHORT;
3324 }
3325 
3326 template <int texType, enum hipTextureReadMode mode>
3327 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1Dfetch(texture<ushort2, texType, mode> texRef,
3328  hipTextureObject_t textureObject, int x) {
3329  TEXTURE_PARAMETERS_INIT;
3330  texel.f = __ockl_image_sample_1D(i, s, x);
3331  TEXTURE_RETURN_USHORT_XY;
3332 }
3333 
3334 template <int texType, enum hipTextureReadMode mode>
3335 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1Dfetch(texture<ushort4, texType, mode> texRef,
3336  hipTextureObject_t textureObject, int x) {
3337  TEXTURE_PARAMETERS_INIT;
3338  texel.f = __ockl_image_sample_1D(i, s, x);
3339  TEXTURE_RETURN_USHORT_XYZW;
3340 }
3341 
3342 template <int texType, enum hipTextureReadMode mode>
3343 __TEXTURE_FUNCTIONS_DECL__ int1 tex1Dfetch(texture<int1, texType, mode> texRef,
3344  hipTextureObject_t textureObject, int x) {
3345  TEXTURE_PARAMETERS_INIT;
3346  texel.f = __ockl_image_sample_1D(i, s, x);
3347  TEXTURE_RETURN_INT_X;
3348 }
3349 
3350 template <int texType, enum hipTextureReadMode mode>
3351 __TEXTURE_FUNCTIONS_DECL__ int tex1Dfetch(texture<int, texType, mode> texRef,
3352  hipTextureObject_t textureObject, int x) {
3353  TEXTURE_PARAMETERS_INIT;
3354  texel.f = __ockl_image_sample_1D(i, s, x);
3355  TEXTURE_RETURN_INT;
3356 }
3357 
3358 template <int texType, enum hipTextureReadMode mode>
3359 __TEXTURE_FUNCTIONS_DECL__ int2 tex1Dfetch(texture<int2, texType, mode> texRef,
3360  hipTextureObject_t textureObject, int x) {
3361  TEXTURE_PARAMETERS_INIT;
3362  texel.f = __ockl_image_sample_1D(i, s, x);
3363  TEXTURE_RETURN_INT_XY;
3364 }
3365 
3366 template <int texType, enum hipTextureReadMode mode>
3367 __TEXTURE_FUNCTIONS_DECL__ int4 tex1Dfetch(texture<int4, texType, mode> texRef,
3368  hipTextureObject_t textureObject, int x) {
3369  TEXTURE_PARAMETERS_INIT;
3370  texel.f = __ockl_image_sample_1D(i, s, x);
3371  TEXTURE_RETURN_INT_XYZW;
3372 }
3373 
3374 template <int texType, enum hipTextureReadMode mode>
3375 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1Dfetch(texture<unsigned int, texType, mode> texRef,
3376  hipTextureObject_t textureObject, int x) {
3377  TEXTURE_PARAMETERS_INIT;
3378  texel.f = __ockl_image_sample_1D(i, s, x);
3379  TEXTURE_RETURN_UINT;
3380 }
3381 
3382 template <int texType, enum hipTextureReadMode mode>
3383 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1Dfetch(texture<uint1, texType, mode> texRef,
3384  hipTextureObject_t textureObject, int x) {
3385  TEXTURE_PARAMETERS_INIT;
3386  texel.f = __ockl_image_sample_1D(i, s, x);
3387  TEXTURE_RETURN_UINT_X;
3388 }
3389 
3390 template <int texType, enum hipTextureReadMode mode>
3391 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1Dfetch(texture<uint2, texType, mode> texRef,
3392  hipTextureObject_t textureObject, int x) {
3393  TEXTURE_PARAMETERS_INIT;
3394  texel.f = __ockl_image_sample_1D(i, s, x);
3395  TEXTURE_RETURN_UINT_XY;
3396 }
3397 
3398 template <int texType, enum hipTextureReadMode mode>
3399 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1Dfetch(texture<uint4, texType, mode> texRef,
3400  hipTextureObject_t textureObject, int x) {
3401  TEXTURE_PARAMETERS_INIT;
3402  texel.f = __ockl_image_sample_1D(i, s, x);
3403  TEXTURE_RETURN_UINT_XYZW;
3404 }
3405 
3406 template <int texType, enum hipTextureReadMode mode>
3407 __TEXTURE_FUNCTIONS_DECL__ float tex1Dfetch(texture<float, texType, mode> texRef,
3408  hipTextureObject_t textureObject, int x) {
3409  TEXTURE_PARAMETERS_INIT;
3410  texel.f = __ockl_image_sample_1D(i, s, x);
3411  TEXTURE_RETURN_FLOAT;
3412 }
3413 
3414 template <int texType, enum hipTextureReadMode mode>
3415 __TEXTURE_FUNCTIONS_DECL__ float1 tex1Dfetch(texture<float1, texType, mode> texRef,
3416  hipTextureObject_t textureObject, int x) {
3417  TEXTURE_PARAMETERS_INIT;
3418  texel.f = __ockl_image_sample_1D(i, s, x);
3419  TEXTURE_RETURN_FLOAT_X;
3420 }
3421 
3422 template <int texType, enum hipTextureReadMode mode>
3423 __TEXTURE_FUNCTIONS_DECL__ float2 tex1Dfetch(texture<float2, texType, mode> texRef,
3424  hipTextureObject_t textureObject, int x) {
3425  TEXTURE_PARAMETERS_INIT;
3426  texel.f = __ockl_image_sample_1D(i, s, x);
3427  TEXTURE_RETURN_FLOAT_XY;
3428 }
3429 
3430 template <int texType, enum hipTextureReadMode mode>
3431 __TEXTURE_FUNCTIONS_DECL__ float4 tex1Dfetch(texture<float4, texType, mode> texRef,
3432  hipTextureObject_t textureObject, int x) {
3433  TEXTURE_PARAMETERS_INIT;
3434  texel.f = __ockl_image_sample_1D(i, s, x);
3435  TEXTURE_RETURN_FLOAT_XYZW;
3436 }
3437 
3439 template <int texType, enum hipTextureReadMode mode>
3440 __TEXTURE_FUNCTIONS_DECL__ char tex1D(texture<char, texType, mode> texRef, float x) {
3441  TEXTURE_REF_PARAMETERS_INIT;
3442  texel.f = __ockl_image_sample_1D(i, s, x);
3443  TEXTURE_RETURN_CHAR;
3444 }
3445 
3446 template <int texType, enum hipTextureReadMode mode>
3447 __TEXTURE_FUNCTIONS_DECL__ char1 tex1D(texture<char1, texType, mode> texRef, float x) {
3448  TEXTURE_REF_PARAMETERS_INIT;
3449  texel.f = __ockl_image_sample_1D(i, s, x);
3450  TEXTURE_RETURN_CHAR_X;
3451 }
3452 
3453 template <int texType, enum hipTextureReadMode mode>
3454 __TEXTURE_FUNCTIONS_DECL__ char2 tex1D(texture<char2, texType, mode> texRef, float x) {
3455  TEXTURE_REF_PARAMETERS_INIT;
3456  texel.f = __ockl_image_sample_1D(i, s, x);
3457  TEXTURE_RETURN_CHAR_XY;
3458 }
3459 
3460 template <int texType, enum hipTextureReadMode mode>
3461 __TEXTURE_FUNCTIONS_DECL__ char4 tex1D(texture<char4, texType, mode> texRef, float x) {
3462  TEXTURE_REF_PARAMETERS_INIT;
3463  texel.f = __ockl_image_sample_1D(i, s, x);
3464  TEXTURE_RETURN_CHAR_XYZW;
3465 }
3466 
3467 template <int texType, enum hipTextureReadMode mode>
3468 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1D(texture<unsigned char, texType, mode> texRef,
3469  float x) {
3470  TEXTURE_REF_PARAMETERS_INIT;
3471  texel.f = __ockl_image_sample_1D(i, s, x);
3472  TEXTURE_RETURN_UCHAR;
3473 }
3474 
3475 template <int texType, enum hipTextureReadMode mode>
3476 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1D(texture<uchar1, texType, mode> texRef, float x) {
3477  TEXTURE_REF_PARAMETERS_INIT;
3478  texel.f = __ockl_image_sample_1D(i, s, x);
3479  TEXTURE_RETURN_UCHAR_X;
3480 }
3481 
3482 template <int texType, enum hipTextureReadMode mode>
3483 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1D(texture<uchar2, texType, mode> texRef, float x) {
3484  TEXTURE_REF_PARAMETERS_INIT;
3485  texel.f = __ockl_image_sample_1D(i, s, x);
3486  TEXTURE_RETURN_UCHAR_XY;
3487 }
3488 
3489 template <int texType, enum hipTextureReadMode mode>
3490 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1D(texture<uchar4, texType, mode> texRef, float x) {
3491  TEXTURE_REF_PARAMETERS_INIT;
3492  texel.f = __ockl_image_sample_1D(i, s, x);
3493  TEXTURE_RETURN_UCHAR_XYZW;
3494 }
3495 
3496 template <int texType, enum hipTextureReadMode mode>
3497 __TEXTURE_FUNCTIONS_DECL__ short tex1D(texture<short, texType, mode> texRef, float x) {
3498  TEXTURE_REF_PARAMETERS_INIT;
3499  texel.f = __ockl_image_sample_1D(i, s, x);
3500  TEXTURE_RETURN_SHORT;
3501 }
3502 
3503 template <int texType, enum hipTextureReadMode mode>
3504 __TEXTURE_FUNCTIONS_DECL__ short1 tex1D(texture<short1, texType, mode> texRef, float x) {
3505  TEXTURE_REF_PARAMETERS_INIT;
3506  texel.f = __ockl_image_sample_1D(i, s, x);
3507  TEXTURE_RETURN_SHORT_X;
3508 }
3509 
3510 template <int texType, enum hipTextureReadMode mode>
3511 __TEXTURE_FUNCTIONS_DECL__ short2 tex1D(texture<short2, texType, mode> texRef, float x) {
3512  TEXTURE_REF_PARAMETERS_INIT;
3513  texel.f = __ockl_image_sample_1D(i, s, x);
3514  TEXTURE_RETURN_SHORT_XY;
3515 }
3516 
3517 template <int texType, enum hipTextureReadMode mode>
3518 __TEXTURE_FUNCTIONS_DECL__ short4 tex1D(texture<short4, texType, mode> texRef, float x) {
3519  TEXTURE_REF_PARAMETERS_INIT;
3520  texel.f = __ockl_image_sample_1D(i, s, x);
3521  TEXTURE_RETURN_SHORT_XYZW;
3522 }
3523 
3524 template <int texType, enum hipTextureReadMode mode>
3525 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1D(texture<unsigned short, texType, mode> texRef,
3526  float x) {
3527  TEXTURE_REF_PARAMETERS_INIT;
3528  texel.f = __ockl_image_sample_1D(i, s, x);
3529  TEXTURE_RETURN_USHORT;
3530 }
3531 
3532 template <int texType, enum hipTextureReadMode mode>
3533 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1D(texture<ushort1, texType, mode> texRef, float x) {
3534  TEXTURE_REF_PARAMETERS_INIT;
3535  texel.f = __ockl_image_sample_1D(i, s, x);
3536  TEXTURE_RETURN_USHORT_X;
3537 }
3538 
3539 template <int texType, enum hipTextureReadMode mode>
3540 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1D(texture<ushort2, texType, mode> texRef, float x) {
3541  TEXTURE_REF_PARAMETERS_INIT;
3542  texel.f = __ockl_image_sample_1D(i, s, x);
3543  TEXTURE_RETURN_USHORT_XY;
3544 }
3545 
3546 template <int texType, enum hipTextureReadMode mode>
3547 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1D(texture<ushort4, texType, mode> texRef, float x) {
3548  TEXTURE_REF_PARAMETERS_INIT;
3549  texel.f = __ockl_image_sample_1D(i, s, x);
3550  TEXTURE_RETURN_USHORT_XYZW;
3551 }
3552 
3553 template <int texType, enum hipTextureReadMode mode>
3554 __TEXTURE_FUNCTIONS_DECL__ int tex1D(texture<int, texType, mode> texRef, float x) {
3555  TEXTURE_REF_PARAMETERS_INIT;
3556  texel.f = __ockl_image_sample_1D(i, s, x);
3557  TEXTURE_RETURN_INT;
3558 }
3559 
3560 template <int texType, enum hipTextureReadMode mode>
3561 __TEXTURE_FUNCTIONS_DECL__ int1 tex1D(texture<int1, texType, mode> texRef, float x) {
3562  TEXTURE_REF_PARAMETERS_INIT;
3563  texel.f = __ockl_image_sample_1D(i, s, x);
3564  TEXTURE_RETURN_INT_X;
3565 }
3566 
3567 template <int texType, enum hipTextureReadMode mode>
3568 __TEXTURE_FUNCTIONS_DECL__ int2 tex1D(texture<int2, texType, mode> texRef, float x) {
3569  TEXTURE_REF_PARAMETERS_INIT;
3570  texel.f = __ockl_image_sample_1D(i, s, x);
3571  TEXTURE_RETURN_INT_XY;
3572 }
3573 
3574 template <int texType, enum hipTextureReadMode mode>
3575 __TEXTURE_FUNCTIONS_DECL__ int4 tex1D(texture<int4, texType, mode> texRef, float x) {
3576  TEXTURE_REF_PARAMETERS_INIT;
3577  texel.f = __ockl_image_sample_1D(i, s, x);
3578  TEXTURE_RETURN_INT_XYZW;
3579 }
3580 
3581 template <int texType, enum hipTextureReadMode mode>
3582 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1D(texture<unsigned int, texType, mode> texRef, float x) {
3583  TEXTURE_REF_PARAMETERS_INIT;
3584  texel.f = __ockl_image_sample_1D(i, s, x);
3585  TEXTURE_RETURN_UINT;
3586 }
3587 
3588 template <int texType, enum hipTextureReadMode mode>
3589 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1D(texture<uint1, texType, mode> texRef, float x) {
3590  TEXTURE_REF_PARAMETERS_INIT;
3591  texel.f = __ockl_image_sample_1D(i, s, x);
3592  TEXTURE_RETURN_UINT_X;
3593 }
3594 
3595 template <int texType, enum hipTextureReadMode mode>
3596 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1D(texture<uint2, texType, mode> texRef, float x) {
3597  TEXTURE_REF_PARAMETERS_INIT;
3598  texel.f = __ockl_image_sample_1D(i, s, x);
3599  TEXTURE_RETURN_UINT_XY;
3600 }
3601 
3602 template <int texType, enum hipTextureReadMode mode>
3603 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1D(texture<uint4, texType, mode> texRef, float x) {
3604  TEXTURE_REF_PARAMETERS_INIT;
3605  texel.f = __ockl_image_sample_1D(i, s, x);
3606  TEXTURE_RETURN_UINT_XYZW;
3607 }
3608 
3609 template <int texType, enum hipTextureReadMode mode>
3610 __TEXTURE_FUNCTIONS_DECL__ float1 tex1D(texture<float1, texType, mode> texRef, float x) {
3611  TEXTURE_REF_PARAMETERS_INIT;
3612  texel.f = __ockl_image_sample_1D(i, s, x);
3613  TEXTURE_RETURN_FLOAT_X;
3614 }
3615 
3616 template <int texType, enum hipTextureReadMode mode>
3617 __TEXTURE_FUNCTIONS_DECL__ float2 tex1D(texture<float2, texType, mode> texRef, float x) {
3618  TEXTURE_REF_PARAMETERS_INIT;
3619  texel.f = __ockl_image_sample_1D(i, s, x);
3620  TEXTURE_RETURN_FLOAT_XY;
3621 }
3622 
3623 template <int texType, enum hipTextureReadMode mode>
3624 __TEXTURE_FUNCTIONS_DECL__ float4 tex1D(texture<float4, texType, mode> texRef, float x) {
3625  TEXTURE_REF_PARAMETERS_INIT;
3626  texel.f = __ockl_image_sample_1D(i, s, x);
3627  TEXTURE_RETURN_FLOAT_XYZW;
3628 }
3629 
3631 template <int texType, enum hipTextureReadMode mode>
3632 __TEXTURE_FUNCTIONS_DECL__ char tex1D(texture<char, texType, mode> texRef,
3633  hipTextureObject_t textureObject, float x) {
3634  TEXTURE_PARAMETERS_INIT;
3635  texel.f = __ockl_image_sample_1D(i, s, x);
3636  TEXTURE_RETURN_CHAR;
3637 }
3638 
3639 template <int texType, enum hipTextureReadMode mode>
3640 __TEXTURE_FUNCTIONS_DECL__ char1 tex1D(texture<char1, texType, mode> texRef,
3641  hipTextureObject_t textureObject, float x) {
3642  TEXTURE_PARAMETERS_INIT;
3643  texel.f = __ockl_image_sample_1D(i, s, x);
3644  TEXTURE_RETURN_CHAR_X;
3645 }
3646 
3647 template <int texType, enum hipTextureReadMode mode>
3648 __TEXTURE_FUNCTIONS_DECL__ char2 tex1D(texture<char2, texType, mode> texRef,
3649  hipTextureObject_t textureObject, float x) {
3650  TEXTURE_PARAMETERS_INIT;
3651  texel.f = __ockl_image_sample_1D(i, s, x);
3652  TEXTURE_RETURN_CHAR_XY;
3653 }
3654 
3655 template <int texType, enum hipTextureReadMode mode>
3656 __TEXTURE_FUNCTIONS_DECL__ char4 tex1D(texture<char4, texType, mode> texRef,
3657  hipTextureObject_t textureObject, float x) {
3658  TEXTURE_PARAMETERS_INIT;
3659  texel.f = __ockl_image_sample_1D(i, s, x);
3660  TEXTURE_RETURN_CHAR_XYZW;
3661 }
3662 
3663 template <int texType, enum hipTextureReadMode mode>
3664 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1D(texture<unsigned char, texType, mode> texRef,
3665  hipTextureObject_t textureObject, float x) {
3666  TEXTURE_PARAMETERS_INIT;
3667  texel.f = __ockl_image_sample_1D(i, s, x);
3668  TEXTURE_RETURN_UCHAR;
3669 }
3670 
3671 template <int texType, enum hipTextureReadMode mode>
3672 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1D(texture<uchar1, texType, mode> texRef,
3673  hipTextureObject_t textureObject, float x) {
3674  TEXTURE_PARAMETERS_INIT;
3675  texel.f = __ockl_image_sample_1D(i, s, x);
3676  TEXTURE_RETURN_UCHAR_X;
3677 }
3678 
3679 template <int texType, enum hipTextureReadMode mode>
3680 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1D(texture<uchar2, texType, mode> texRef,
3681  hipTextureObject_t textureObject, float x) {
3682  TEXTURE_PARAMETERS_INIT;
3683  texel.f = __ockl_image_sample_1D(i, s, x);
3684  TEXTURE_RETURN_UCHAR_XY;
3685 }
3686 
3687 template <int texType, enum hipTextureReadMode mode>
3688 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1D(texture<uchar4, texType, mode> texRef,
3689  hipTextureObject_t textureObject, float x) {
3690  TEXTURE_PARAMETERS_INIT;
3691  texel.f = __ockl_image_sample_1D(i, s, x);
3692  TEXTURE_RETURN_UCHAR_XYZW;
3693 }
3694 
3695 template <int texType, enum hipTextureReadMode mode>
3696 __TEXTURE_FUNCTIONS_DECL__ short tex1D(texture<short, texType, mode> texRef,
3697  hipTextureObject_t textureObject, float x) {
3698  TEXTURE_PARAMETERS_INIT;
3699  texel.f = __ockl_image_sample_1D(i, s, x);
3700  TEXTURE_RETURN_SHORT;
3701 }
3702 
3703 template <int texType, enum hipTextureReadMode mode>
3704 __TEXTURE_FUNCTIONS_DECL__ short1 tex1D(texture<short1, texType, mode> texRef,
3705  hipTextureObject_t textureObject, float x) {
3706  TEXTURE_PARAMETERS_INIT;
3707  texel.f = __ockl_image_sample_1D(i, s, x);
3708  TEXTURE_RETURN_SHORT_X;
3709 }
3710 
3711 template <int texType, enum hipTextureReadMode mode>
3712 __TEXTURE_FUNCTIONS_DECL__ short2 tex1D(texture<short2, texType, mode> texRef,
3713  hipTextureObject_t textureObject, float x) {
3714  TEXTURE_PARAMETERS_INIT;
3715  texel.f = __ockl_image_sample_1D(i, s, x);
3716  TEXTURE_RETURN_SHORT_XY;
3717 }
3718 
3719 template <int texType, enum hipTextureReadMode mode>
3720 __TEXTURE_FUNCTIONS_DECL__ short4 tex1D(texture<short4, texType, mode> texRef,
3721  hipTextureObject_t textureObject, float x) {
3722  TEXTURE_PARAMETERS_INIT;
3723  texel.f = __ockl_image_sample_1D(i, s, x);
3724  TEXTURE_RETURN_SHORT_XYZW;
3725 }
3726 
3727 template <int texType, enum hipTextureReadMode mode>
3728 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1D(texture<unsigned short, texType, mode> texRef,
3729  hipTextureObject_t textureObject, float x) {
3730  TEXTURE_PARAMETERS_INIT;
3731  texel.f = __ockl_image_sample_1D(i, s, x);
3732  TEXTURE_RETURN_USHORT;
3733 }
3734 
3735 template <int texType, enum hipTextureReadMode mode>
3736 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1D(texture<ushort1, texType, mode> texRef,
3737  hipTextureObject_t textureObject, float x) {
3738  TEXTURE_PARAMETERS_INIT;
3739  texel.f = __ockl_image_sample_1D(i, s, x);
3740  TEXTURE_RETURN_USHORT_X;
3741 }
3742 
3743 template <int texType, enum hipTextureReadMode mode>
3744 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1D(texture<ushort2, texType, mode> texRef,
3745  hipTextureObject_t textureObject, float x) {
3746  TEXTURE_PARAMETERS_INIT;
3747  texel.f = __ockl_image_sample_1D(i, s, x);
3748  TEXTURE_RETURN_USHORT_XY;
3749 }
3750 
3751 template <int texType, enum hipTextureReadMode mode>
3752 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1D(texture<ushort4, texType, mode> texRef,
3753  hipTextureObject_t textureObject, float x) {
3754  TEXTURE_PARAMETERS_INIT;
3755  texel.f = __ockl_image_sample_1D(i, s, x);
3756  TEXTURE_RETURN_USHORT_XYZW;
3757 }
3758 
3759 template <int texType, enum hipTextureReadMode mode>
3760 __TEXTURE_FUNCTIONS_DECL__ int tex1D(texture<int, texType, mode> texRef,
3761  hipTextureObject_t textureObject, float x) {
3762  TEXTURE_PARAMETERS_INIT;
3763  texel.f = __ockl_image_sample_1D(i, s, x);
3764  TEXTURE_RETURN_INT;
3765 }
3766 
3767 template <int texType, enum hipTextureReadMode mode>
3768 __TEXTURE_FUNCTIONS_DECL__ int1 tex1D(texture<int1, texType, mode> texRef,
3769  hipTextureObject_t textureObject, float x) {
3770  TEXTURE_PARAMETERS_INIT;
3771  texel.f = __ockl_image_sample_1D(i, s, x);
3772  TEXTURE_RETURN_INT_X;
3773 }
3774 
3775 template <int texType, enum hipTextureReadMode mode>
3776 __TEXTURE_FUNCTIONS_DECL__ int2 tex1D(texture<int2, texType, mode> texRef,
3777  hipTextureObject_t textureObject, float x) {
3778  TEXTURE_PARAMETERS_INIT;
3779  texel.f = __ockl_image_sample_1D(i, s, x);
3780  TEXTURE_RETURN_INT_XY;
3781 }
3782 
3783 template <int texType, enum hipTextureReadMode mode>
3784 __TEXTURE_FUNCTIONS_DECL__ int4 tex1D(texture<int4, texType, mode> texRef,
3785  hipTextureObject_t textureObject, float x) {
3786  TEXTURE_PARAMETERS_INIT;
3787  texel.f = __ockl_image_sample_1D(i, s, x);
3788  TEXTURE_RETURN_INT_XYZW;
3789 }
3790 
3791 template <int texType, enum hipTextureReadMode mode>
3792 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1D(texture<unsigned int, texType, mode> texRef,
3793  hipTextureObject_t textureObject, float x) {
3794  TEXTURE_PARAMETERS_INIT;
3795  texel.f = __ockl_image_sample_1D(i, s, x);
3796  TEXTURE_RETURN_UINT;
3797 }
3798 
3799 template <int texType, enum hipTextureReadMode mode>
3800 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1D(texture<uint1, texType, mode> texRef,
3801  hipTextureObject_t textureObject, float x) {
3802  TEXTURE_PARAMETERS_INIT;
3803  texel.f = __ockl_image_sample_1D(i, s, x);
3804  TEXTURE_RETURN_UINT_X;
3805 }
3806 
3807 template <int texType, enum hipTextureReadMode mode>
3808 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1D(texture<uint2, texType, mode> texRef,
3809  hipTextureObject_t textureObject, float x) {
3810  TEXTURE_PARAMETERS_INIT;
3811  texel.f = __ockl_image_sample_1D(i, s, x);
3812  TEXTURE_RETURN_UINT_XY;
3813 }
3814 
3815 template <int texType, enum hipTextureReadMode mode>
3816 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1D(texture<uint4, texType, mode> texRef,
3817  hipTextureObject_t textureObject, float x) {
3818  TEXTURE_PARAMETERS_INIT;
3819  texel.f = __ockl_image_sample_1D(i, s, x);
3820  TEXTURE_RETURN_UINT_XYZW;
3821 }
3822 
3823 template <int texType, enum hipTextureReadMode mode>
3824 __TEXTURE_FUNCTIONS_DECL__ float tex1D(texture<float, texType, mode> texRef,
3825  hipTextureObject_t textureObject, float x) {
3826  TEXTURE_PARAMETERS_INIT;
3827  texel.f = __ockl_image_sample_1D(i, s, x);
3828  TEXTURE_RETURN_FLOAT;
3829 }
3831 template <int texType, enum hipTextureReadMode mode>
3832 __TEXTURE_FUNCTIONS_DECL__ float tex1D(texture<float, texType, mode> texRef, float x) {
3833  TEXTURE_REF_PARAMETERS_INIT;
3834  texel.f = __ockl_image_sample_1D(i, s, x);
3835  TEXTURE_RETURN_FLOAT;
3836 }
3837 
3838 template <int texType, enum hipTextureReadMode mode>
3839 __TEXTURE_FUNCTIONS_DECL__ float1 tex1D(texture<float1, texType, mode> texRef,
3840  hipTextureObject_t textureObject, float x) {
3841  TEXTURE_PARAMETERS_INIT;
3842  texel.f = __ockl_image_sample_1D(i, s, x);
3843  TEXTURE_RETURN_FLOAT_X;
3844 }
3845 
3846 template <int texType, enum hipTextureReadMode mode>
3847 __TEXTURE_FUNCTIONS_DECL__ float2 tex1D(texture<float2, texType, mode> texRef,
3848  hipTextureObject_t textureObject, float x) {
3849  TEXTURE_PARAMETERS_INIT;
3850  texel.f = __ockl_image_sample_1D(i, s, x);
3851  TEXTURE_RETURN_FLOAT_XY;
3852 }
3853 
3854 template <int texType, enum hipTextureReadMode mode>
3855 __TEXTURE_FUNCTIONS_DECL__ float4 tex1D(texture<float4, texType, mode> texRef,
3856  hipTextureObject_t textureObject, float x) {
3857  TEXTURE_PARAMETERS_INIT;
3858  texel.f = __ockl_image_sample_1D(i, s, x);
3859  TEXTURE_RETURN_FLOAT_XYZW;
3860 }
3861 
3863 
3864 template <int texType, enum hipTextureReadMode mode>
3865 __TEXTURE_FUNCTIONS_DECL__ char tex1DLod(texture<char, texType, mode> texRef, float x,
3866  float level) {
3867  TEXTURE_REF_PARAMETERS_INIT;
3868  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3869  TEXTURE_RETURN_CHAR;
3870 }
3871 
3872 template <int texType, enum hipTextureReadMode mode>
3873 __TEXTURE_FUNCTIONS_DECL__ char1 tex1DLod(texture<char1, texType, mode> texRef, float x,
3874  float level) {
3875  TEXTURE_REF_PARAMETERS_INIT;
3876  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3877  TEXTURE_RETURN_CHAR_X;
3878 }
3879 template <int texType, enum hipTextureReadMode mode>
3880 __TEXTURE_FUNCTIONS_DECL__ char2 tex1DLod(texture<char2, texType, mode> texRef, float x,
3881  float level) {
3882  TEXTURE_REF_PARAMETERS_INIT;
3883  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3884  TEXTURE_RETURN_CHAR_XY;
3885 }
3886 
3887 template <int texType, enum hipTextureReadMode mode>
3888 __TEXTURE_FUNCTIONS_DECL__ char4 tex1DLod(texture<char4, texType, mode> texRef, float x,
3889  float level) {
3890  TEXTURE_REF_PARAMETERS_INIT;
3891  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3892  TEXTURE_RETURN_CHAR_XYZW;
3893 }
3894 
3895 template <int texType, enum hipTextureReadMode mode>
3896 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1DLod(texture<unsigned char, texType, mode> texRef,
3897  float x, float level) {
3898  TEXTURE_REF_PARAMETERS_INIT;
3899  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3900  TEXTURE_RETURN_UCHAR;
3901 }
3902 
3903 template <int texType, enum hipTextureReadMode mode>
3904 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1DLod(texture<uchar1, texType, mode> texRef, float x,
3905  float level) {
3906  TEXTURE_REF_PARAMETERS_INIT;
3907  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3908  TEXTURE_RETURN_UCHAR_X;
3909 }
3910 
3911 template <int texType, enum hipTextureReadMode mode>
3912 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1DLod(texture<uchar2, texType, mode> texRef, float x,
3913  float level) {
3914  TEXTURE_REF_PARAMETERS_INIT;
3915  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3916  TEXTURE_RETURN_UCHAR_XY;
3917 }
3918 
3919 template <int texType, enum hipTextureReadMode mode>
3920 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1DLod(texture<uchar4, texType, mode> texRef, float x,
3921  float level) {
3922  TEXTURE_REF_PARAMETERS_INIT;
3923  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3924  TEXTURE_RETURN_UCHAR_XYZW;
3925 }
3926 
3927 template <int texType, enum hipTextureReadMode mode>
3928 __TEXTURE_FUNCTIONS_DECL__ short tex1DLod(texture<short, texType, mode> texRef, float x,
3929  float level) {
3930  TEXTURE_REF_PARAMETERS_INIT;
3931  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3932  TEXTURE_RETURN_SHORT;
3933 }
3934 
3935 template <int texType, enum hipTextureReadMode mode>
3936 __TEXTURE_FUNCTIONS_DECL__ short1 tex1DLod(texture<short1, texType, mode> texRef, float x,
3937  float level) {
3938  TEXTURE_REF_PARAMETERS_INIT;
3939  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3940  TEXTURE_RETURN_SHORT_X;
3941 }
3942 
3943 template <int texType, enum hipTextureReadMode mode>
3944 __TEXTURE_FUNCTIONS_DECL__ short2 tex1DLod(texture<short2, texType, mode> texRef, float x,
3945  float level) {
3946  TEXTURE_REF_PARAMETERS_INIT;
3947  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3948  TEXTURE_RETURN_SHORT_XY;
3949 }
3950 
3951 template <int texType, enum hipTextureReadMode mode>
3952 __TEXTURE_FUNCTIONS_DECL__ short4 tex1DLod(texture<short4, texType, mode> texRef, float x,
3953  float level) {
3954  TEXTURE_REF_PARAMETERS_INIT;
3955  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3956  TEXTURE_RETURN_SHORT_XYZW;
3957 }
3958 
3959 template <int texType, enum hipTextureReadMode mode>
3960 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1DLod(texture<unsigned short, texType, mode> texRef,
3961  float x, float level) {
3962  TEXTURE_REF_PARAMETERS_INIT;
3963  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3964  TEXTURE_RETURN_USHORT;
3965 }
3966 
3967 template <int texType, enum hipTextureReadMode mode>
3968 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1DLod(texture<ushort1, texType, mode> texRef, float x,
3969  float level) {
3970  TEXTURE_REF_PARAMETERS_INIT;
3971  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3972  TEXTURE_RETURN_USHORT_X;
3973 }
3974 
3975 template <int texType, enum hipTextureReadMode mode>
3976 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1DLod(texture<ushort2, texType, mode> texRef, float x,
3977  float level) {
3978  TEXTURE_REF_PARAMETERS_INIT;
3979  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3980  TEXTURE_RETURN_USHORT_XY;
3981 }
3982 
3983 template <int texType, enum hipTextureReadMode mode>
3984 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1DLod(texture<ushort4, texType, mode> texRef, float x,
3985  float level) {
3986  TEXTURE_REF_PARAMETERS_INIT;
3987  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3988  TEXTURE_RETURN_USHORT_XYZW;
3989 }
3990 
3991 template <int texType, enum hipTextureReadMode mode>
3992 __TEXTURE_FUNCTIONS_DECL__ int tex1DLod(texture<int, texType, mode> texRef, float x, float level) {
3993  TEXTURE_REF_PARAMETERS_INIT;
3994  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
3995  TEXTURE_RETURN_INT;
3996 }
3997 
3998 template <int texType, enum hipTextureReadMode mode>
3999 __TEXTURE_FUNCTIONS_DECL__ int1 tex1DLod(texture<int1, texType, mode> texRef, float x,
4000  float level) {
4001  TEXTURE_REF_PARAMETERS_INIT;
4002  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4003  TEXTURE_RETURN_INT_X;
4004 }
4005 
4006 template <int texType, enum hipTextureReadMode mode>
4007 __TEXTURE_FUNCTIONS_DECL__ int2 tex1DLod(texture<int2, texType, mode> texRef, float x,
4008  float level) {
4009  TEXTURE_REF_PARAMETERS_INIT;
4010  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4011  TEXTURE_RETURN_INT_XY;
4012 }
4013 
4014 template <int texType, enum hipTextureReadMode mode>
4015 __TEXTURE_FUNCTIONS_DECL__ int4 tex1DLod(texture<int4, texType, mode> texRef, float x,
4016  float level) {
4017  TEXTURE_REF_PARAMETERS_INIT;
4018  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4019  TEXTURE_RETURN_INT_XYZW;
4020 }
4021 
4022 template <int texType, enum hipTextureReadMode mode>
4023 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1DLod(texture<unsigned int, texType, mode> texRef,
4024  float x, float level) {
4025  TEXTURE_REF_PARAMETERS_INIT;
4026  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4027  TEXTURE_RETURN_UINT;
4028 }
4029 
4030 template <int texType, enum hipTextureReadMode mode>
4031 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1DLod(texture<uint1, texType, mode> texRef, float x,
4032  float level) {
4033  TEXTURE_REF_PARAMETERS_INIT;
4034  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4035  TEXTURE_RETURN_UINT_X;
4036 }
4037 
4038 template <int texType, enum hipTextureReadMode mode>
4039 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1DLod(texture<uint2, texType, mode> texRef, float x,
4040  float level) {
4041  TEXTURE_REF_PARAMETERS_INIT;
4042  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4043  TEXTURE_RETURN_UINT_XY;
4044 }
4045 
4046 template <int texType, enum hipTextureReadMode mode>
4047 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1DLod(texture<uint4, texType, mode> texRef, float x,
4048  float level) {
4049  TEXTURE_REF_PARAMETERS_INIT;
4050  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4051  TEXTURE_RETURN_UINT_XYZW;
4052 }
4053 
4054 template <int texType, enum hipTextureReadMode mode>
4055 __TEXTURE_FUNCTIONS_DECL__ float tex1DLod(texture<float, texType, mode> texRef, float x,
4056  float level) {
4057  TEXTURE_REF_PARAMETERS_INIT;
4058  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4059  TEXTURE_RETURN_FLOAT;
4060 }
4061 
4062 template <int texType, enum hipTextureReadMode mode>
4063 __TEXTURE_FUNCTIONS_DECL__ float1 tex1DLod(texture<float1, texType, mode> texRef, float x,
4064  float level) {
4065  TEXTURE_REF_PARAMETERS_INIT;
4066  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4067  TEXTURE_RETURN_FLOAT_X;
4068 }
4069 
4070 template <int texType, enum hipTextureReadMode mode>
4071 __TEXTURE_FUNCTIONS_DECL__ float2 tex1DLod(texture<float2, texType, mode> texRef, float x,
4072  float level) {
4073  TEXTURE_REF_PARAMETERS_INIT;
4074  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4075  TEXTURE_RETURN_FLOAT_XY;
4076 }
4077 
4078 template <int texType, enum hipTextureReadMode mode>
4079 __TEXTURE_FUNCTIONS_DECL__ float4 tex1DLod(texture<float4, texType, mode> texRef, float x,
4080  float level) {
4081  TEXTURE_REF_PARAMETERS_INIT;
4082  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4083  TEXTURE_RETURN_FLOAT_XYZW;
4084 }
4085 
4087 
4088 template <int texType, enum hipTextureReadMode mode>
4089 __TEXTURE_FUNCTIONS_DECL__ char tex1DLod(texture<char, texType, mode> texRef,
4090  hipTextureObject_t textureObject, float x, float level) {
4091  TEXTURE_PARAMETERS_INIT;
4092  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4093  TEXTURE_RETURN_CHAR;
4094 }
4095 
4096 template <int texType, enum hipTextureReadMode mode>
4097 __TEXTURE_FUNCTIONS_DECL__ char1 tex1DLod(texture<char1, texType, mode> texRef,
4098  hipTextureObject_t textureObject, float x, float level) {
4099  TEXTURE_PARAMETERS_INIT;
4100  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4101  TEXTURE_RETURN_CHAR_X;
4102 }
4103 template <int texType, enum hipTextureReadMode mode>
4104 __TEXTURE_FUNCTIONS_DECL__ char2 tex1DLod(texture<char2, texType, mode> texRef,
4105  hipTextureObject_t textureObject, float x, float level) {
4106  TEXTURE_PARAMETERS_INIT;
4107  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4108  TEXTURE_RETURN_CHAR_XY;
4109 }
4110 
4111 template <int texType, enum hipTextureReadMode mode>
4112 __TEXTURE_FUNCTIONS_DECL__ char4 tex1DLod(texture<char4, texType, mode> texRef,
4113  hipTextureObject_t textureObject, float x, float level) {
4114  TEXTURE_PARAMETERS_INIT;
4115  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4116  TEXTURE_RETURN_CHAR_XYZW;
4117 }
4118 
4119 template <int texType, enum hipTextureReadMode mode>
4120 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1DLod(texture<unsigned char, texType, mode> texRef,
4121  hipTextureObject_t textureObject, float x,
4122  float level) {
4123  TEXTURE_PARAMETERS_INIT;
4124  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4125  TEXTURE_RETURN_UCHAR;
4126 }
4127 
4128 template <int texType, enum hipTextureReadMode mode>
4129 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1DLod(texture<uchar1, texType, mode> texRef,
4130  hipTextureObject_t textureObject, float x, float level) {
4131  TEXTURE_PARAMETERS_INIT;
4132  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4133  TEXTURE_RETURN_UCHAR_X;
4134 }
4135 
4136 template <int texType, enum hipTextureReadMode mode>
4137 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1DLod(texture<uchar2, texType, mode> texRef,
4138  hipTextureObject_t textureObject, float x, float level) {
4139  TEXTURE_PARAMETERS_INIT;
4140  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4141  TEXTURE_RETURN_UCHAR_XY;
4142 }
4143 
4144 template <int texType, enum hipTextureReadMode mode>
4145 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1DLod(texture<uchar4, texType, mode> texRef,
4146  hipTextureObject_t textureObject, float x, float level) {
4147  TEXTURE_PARAMETERS_INIT;
4148  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4149  TEXTURE_RETURN_UCHAR_XYZW;
4150 }
4151 
4152 template <int texType, enum hipTextureReadMode mode>
4153 __TEXTURE_FUNCTIONS_DECL__ short tex1DLod(texture<short, texType, mode> texRef,
4154  hipTextureObject_t textureObject, float x, float level) {
4155  TEXTURE_PARAMETERS_INIT;
4156  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4157  TEXTURE_RETURN_SHORT;
4158 }
4159 
4160 template <int texType, enum hipTextureReadMode mode>
4161 __TEXTURE_FUNCTIONS_DECL__ short1 tex1DLod(texture<short1, texType, mode> texRef,
4162  hipTextureObject_t textureObject, float x, float level) {
4163  TEXTURE_PARAMETERS_INIT;
4164  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4165  TEXTURE_RETURN_SHORT_X;
4166 }
4167 
4168 template <int texType, enum hipTextureReadMode mode>
4169 __TEXTURE_FUNCTIONS_DECL__ short2 tex1DLod(texture<short2, texType, mode> texRef,
4170  hipTextureObject_t textureObject, float x, float level) {
4171  TEXTURE_PARAMETERS_INIT;
4172  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4173  TEXTURE_RETURN_SHORT_XY;
4174 }
4175 
4176 template <int texType, enum hipTextureReadMode mode>
4177 __TEXTURE_FUNCTIONS_DECL__ short4 tex1DLod(texture<short4, texType, mode> texRef,
4178  hipTextureObject_t textureObject, float x, float level) {
4179  TEXTURE_PARAMETERS_INIT;
4180  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4181  TEXTURE_RETURN_SHORT_XYZW;
4182 }
4183 
4184 template <int texType, enum hipTextureReadMode mode>
4185 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1DLod(texture<unsigned short, texType, mode> texRef,
4186  hipTextureObject_t textureObject, float x,
4187  float level) {
4188  TEXTURE_PARAMETERS_INIT;
4189  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4190  TEXTURE_RETURN_USHORT;
4191 }
4192 
4193 template <int texType, enum hipTextureReadMode mode>
4194 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1DLod(texture<ushort1, texType, mode> texRef,
4195  hipTextureObject_t textureObject, float x,
4196  float level) {
4197  TEXTURE_PARAMETERS_INIT;
4198  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4199  TEXTURE_RETURN_USHORT_X;
4200 }
4201 
4202 template <int texType, enum hipTextureReadMode mode>
4203 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1DLod(texture<ushort2, texType, mode> texRef,
4204  hipTextureObject_t textureObject, float x,
4205  float level) {
4206  TEXTURE_PARAMETERS_INIT;
4207  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4208  TEXTURE_RETURN_USHORT_XY;
4209 }
4210 
4211 template <int texType, enum hipTextureReadMode mode>
4212 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1DLod(texture<ushort4, texType, mode> texRef,
4213  hipTextureObject_t textureObject, float x,
4214  float level) {
4215  TEXTURE_PARAMETERS_INIT;
4216  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4217  TEXTURE_RETURN_USHORT_XYZW;
4218 }
4219 
4220 template <int texType, enum hipTextureReadMode mode>
4221 __TEXTURE_FUNCTIONS_DECL__ int tex1DLod(texture<int, texType, mode> texRef,
4222  hipTextureObject_t textureObject, float x, float level) {
4223  TEXTURE_PARAMETERS_INIT;
4224  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4225  TEXTURE_RETURN_INT;
4226 }
4227 
4228 template <int texType, enum hipTextureReadMode mode>
4229 __TEXTURE_FUNCTIONS_DECL__ int1 tex1DLod(texture<int1, texType, mode> texRef,
4230  hipTextureObject_t textureObject, float x, float level) {
4231  TEXTURE_PARAMETERS_INIT;
4232  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4233  TEXTURE_RETURN_INT_X;
4234 }
4235 
4236 template <int texType, enum hipTextureReadMode mode>
4237 __TEXTURE_FUNCTIONS_DECL__ int2 tex1DLod(texture<int2, texType, mode> texRef,
4238  hipTextureObject_t textureObject, float x, float level) {
4239  TEXTURE_PARAMETERS_INIT;
4240  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4241  TEXTURE_RETURN_INT_XY;
4242 }
4243 
4244 template <int texType, enum hipTextureReadMode mode>
4245 __TEXTURE_FUNCTIONS_DECL__ int4 tex1DLod(texture<int4, texType, mode> texRef,
4246  hipTextureObject_t textureObject, float x, float level) {
4247  TEXTURE_PARAMETERS_INIT;
4248  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4249  TEXTURE_RETURN_INT_XYZW;
4250 }
4251 
4252 template <int texType, enum hipTextureReadMode mode>
4253 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1DLod(texture<unsigned int, texType, mode> texRef,
4254  hipTextureObject_t textureObject, float x,
4255  float level) {
4256  TEXTURE_PARAMETERS_INIT;
4257  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4258  TEXTURE_RETURN_UINT;
4259 }
4260 
4261 template <int texType, enum hipTextureReadMode mode>
4262 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1DLod(texture<uint1, texType, mode> texRef,
4263  hipTextureObject_t textureObject, float x, float level) {
4264  TEXTURE_PARAMETERS_INIT;
4265  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4266  TEXTURE_RETURN_UINT_X;
4267 }
4268 
4269 template <int texType, enum hipTextureReadMode mode>
4270 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1DLod(texture<uint2, texType, mode> texRef,
4271  hipTextureObject_t textureObject, float x, float level) {
4272  TEXTURE_PARAMETERS_INIT;
4273  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4274  TEXTURE_RETURN_UINT_XY;
4275 }
4276 
4277 template <int texType, enum hipTextureReadMode mode>
4278 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1DLod(texture<uint4, texType, mode> texRef,
4279  hipTextureObject_t textureObject, float x, float level) {
4280  TEXTURE_PARAMETERS_INIT;
4281  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4282  TEXTURE_RETURN_UINT_XYZW;
4283 }
4284 
4285 template <int texType, enum hipTextureReadMode mode>
4286 __TEXTURE_FUNCTIONS_DECL__ float tex1DLod(texture<float, texType, mode> texRef,
4287  hipTextureObject_t textureObject, float x, float level) {
4288  TEXTURE_PARAMETERS_INIT;
4289  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4290  TEXTURE_RETURN_FLOAT;
4291 }
4292 
4293 template <int texType, enum hipTextureReadMode mode>
4294 __TEXTURE_FUNCTIONS_DECL__ float1 tex1DLod(texture<float1, texType, mode> texRef,
4295  hipTextureObject_t textureObject, float x, float level) {
4296  TEXTURE_PARAMETERS_INIT;
4297  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4298  TEXTURE_RETURN_FLOAT_X;
4299 }
4300 
4301 template <int texType, enum hipTextureReadMode mode>
4302 __TEXTURE_FUNCTIONS_DECL__ float2 tex1DLod(texture<float2, texType, mode> texRef,
4303  hipTextureObject_t textureObject, float x, float level) {
4304  TEXTURE_PARAMETERS_INIT;
4305  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4306  TEXTURE_RETURN_FLOAT_XY;
4307 }
4308 
4309 template <int texType, enum hipTextureReadMode mode>
4310 __TEXTURE_FUNCTIONS_DECL__ float4 tex1DLod(texture<float4, texType, mode> texRef,
4311  hipTextureObject_t textureObject, float x, float level) {
4312  TEXTURE_PARAMETERS_INIT;
4313  texel.f = __ockl_image_sample_lod_1D(i, s, x, level);
4314  TEXTURE_RETURN_FLOAT_XYZW;
4315 }
4316 
4318 
4319 template <int texType, enum hipTextureReadMode mode>
4320 __TEXTURE_FUNCTIONS_DECL__ char tex1DGrad(texture<char, texType, mode> texRef, float x, float dx,
4321  float dy) {
4322  TEXTURE_REF_PARAMETERS_INIT;
4323  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4324  TEXTURE_RETURN_CHAR;
4325 }
4326 
4327 template <int texType, enum hipTextureReadMode mode>
4328 __TEXTURE_FUNCTIONS_DECL__ char1 tex1DGrad(texture<char1, texType, mode> texRef, float x, float dx,
4329  float dy) {
4330  TEXTURE_REF_PARAMETERS_INIT;
4331  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4332  TEXTURE_RETURN_CHAR_X;
4333 }
4334 
4335 template <int texType, enum hipTextureReadMode mode>
4336 __TEXTURE_FUNCTIONS_DECL__ char2 tex1DGrad(texture<char2, texType, mode> texRef, float x, float dx,
4337  float dy) {
4338  TEXTURE_REF_PARAMETERS_INIT;
4339  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4340  TEXTURE_RETURN_CHAR_XY;
4341 }
4342 
4343 template <int texType, enum hipTextureReadMode mode>
4344 __TEXTURE_FUNCTIONS_DECL__ char4 tex1DGrad(texture<char4, texType, mode> texRef, float x, float dx,
4345  float dy) {
4346  TEXTURE_REF_PARAMETERS_INIT;
4347  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4348  TEXTURE_RETURN_CHAR_XYZW;
4349 }
4350 
4351 template <int texType, enum hipTextureReadMode mode>
4352 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1DGrad(texture<unsigned char, texType, mode> texRef,
4353  float x, float dx, float dy) {
4354  TEXTURE_REF_PARAMETERS_INIT;
4355  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4356  TEXTURE_RETURN_UCHAR;
4357 }
4358 
4359 template <int texType, enum hipTextureReadMode mode>
4360 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1DGrad(texture<uchar1, texType, mode> texRef, float x,
4361  float dx, float dy) {
4362  TEXTURE_REF_PARAMETERS_INIT;
4363  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4364  TEXTURE_RETURN_UCHAR_X;
4365 }
4366 
4367 template <int texType, enum hipTextureReadMode mode>
4368 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1DGrad(texture<uchar2, texType, mode> texRef, float x,
4369  float dx, float dy) {
4370  TEXTURE_REF_PARAMETERS_INIT;
4371  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4372  TEXTURE_RETURN_UCHAR_XY;
4373 }
4374 
4375 template <int texType, enum hipTextureReadMode mode>
4376 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1DGrad(texture<uchar4, texType, mode> texRef, float x,
4377  float dx, float dy) {
4378  TEXTURE_REF_PARAMETERS_INIT;
4379  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4380  TEXTURE_RETURN_UCHAR_XYZW;
4381 }
4382 
4383 template <int texType, enum hipTextureReadMode mode>
4384 __TEXTURE_FUNCTIONS_DECL__ short tex1DGrad(texture<short, texType, mode> texRef, float x, float dx,
4385  float dy) {
4386  TEXTURE_REF_PARAMETERS_INIT;
4387  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4388  TEXTURE_RETURN_SHORT;
4389 }
4390 
4391 template <int texType, enum hipTextureReadMode mode>
4392 __TEXTURE_FUNCTIONS_DECL__ short1 tex1DGrad(texture<short1, texType, mode> texRef, float x,
4393  float dx, float dy) {
4394  TEXTURE_REF_PARAMETERS_INIT;
4395  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4396  TEXTURE_RETURN_SHORT_X;
4397 }
4398 
4399 template <int texType, enum hipTextureReadMode mode>
4400 __TEXTURE_FUNCTIONS_DECL__ short2 tex1DGrad(texture<short2, texType, mode> texRef, float x,
4401  float dx, float dy) {
4402  TEXTURE_REF_PARAMETERS_INIT;
4403  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4404  TEXTURE_RETURN_SHORT_XY;
4405 }
4406 
4407 template <int texType, enum hipTextureReadMode mode>
4408 __TEXTURE_FUNCTIONS_DECL__ short4 tex1DGrad(texture<short4, texType, mode> texRef, float x,
4409  float dx, float dy) {
4410  TEXTURE_REF_PARAMETERS_INIT;
4411  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4412  TEXTURE_RETURN_SHORT_XYZW;
4413 }
4414 
4415 template <int texType, enum hipTextureReadMode mode>
4416 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1DGrad(texture<unsigned short, texType, mode> texRef,
4417  float x, float dx, float dy) {
4418  TEXTURE_REF_PARAMETERS_INIT;
4419  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4420  TEXTURE_RETURN_USHORT;
4421 }
4422 
4423 template <int texType, enum hipTextureReadMode mode>
4424 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1DGrad(texture<ushort1, texType, mode> texRef, float x,
4425  float dx, float dy) {
4426  TEXTURE_REF_PARAMETERS_INIT;
4427  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4428  TEXTURE_RETURN_USHORT_X;
4429 }
4430 
4431 template <int texType, enum hipTextureReadMode mode>
4432 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1DGrad(texture<ushort2, texType, mode> texRef, float x,
4433  float dx, float dy) {
4434  TEXTURE_REF_PARAMETERS_INIT;
4435  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4436  TEXTURE_RETURN_USHORT_XY;
4437 }
4438 
4439 template <int texType, enum hipTextureReadMode mode>
4440 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1DGrad(texture<ushort4, texType, mode> texRef, float x,
4441  float dx, float dy) {
4442  TEXTURE_REF_PARAMETERS_INIT;
4443  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4444  TEXTURE_RETURN_USHORT_XYZW;
4445 }
4446 
4447 template <int texType, enum hipTextureReadMode mode>
4448 __TEXTURE_FUNCTIONS_DECL__ int tex1DGrad(texture<int, texType, mode> texRef, float x, float dx,
4449  float dy) {
4450  TEXTURE_REF_PARAMETERS_INIT;
4451  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4452  TEXTURE_RETURN_INT;
4453 }
4454 
4455 template <int texType, enum hipTextureReadMode mode>
4456 __TEXTURE_FUNCTIONS_DECL__ int1 tex1DGrad(texture<int1, texType, mode> texRef, float x, float dx,
4457  float dy) {
4458  TEXTURE_REF_PARAMETERS_INIT;
4459  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4460  TEXTURE_RETURN_INT_X;
4461 }
4462 
4463 template <int texType, enum hipTextureReadMode mode>
4464 __TEXTURE_FUNCTIONS_DECL__ int2 tex1DGrad(texture<int2, texType, mode> texRef, float x, float dx,
4465  float dy) {
4466  TEXTURE_REF_PARAMETERS_INIT;
4467  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4468  TEXTURE_RETURN_INT_XY;
4469 }
4470 
4471 template <int texType, enum hipTextureReadMode mode>
4472 __TEXTURE_FUNCTIONS_DECL__ int4 tex1DGrad(texture<int4, texType, mode> texRef, float x, float dx,
4473  float dy) {
4474  TEXTURE_REF_PARAMETERS_INIT;
4475  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4476  TEXTURE_RETURN_INT_XYZW;
4477 }
4478 
4479 template <int texType, enum hipTextureReadMode mode>
4480 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1DGrad(texture<unsigned int, texType, mode> texRef,
4481  float x, float dx, float dy) {
4482  TEXTURE_REF_PARAMETERS_INIT;
4483  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4484  TEXTURE_RETURN_UINT;
4485 }
4486 
4487 template <int texType, enum hipTextureReadMode mode>
4488 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1DGrad(texture<uint1, texType, mode> texRef, float x, float dx,
4489  float dy) {
4490  TEXTURE_REF_PARAMETERS_INIT;
4491  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4492  TEXTURE_RETURN_UINT_X;
4493 }
4494 
4495 template <int texType, enum hipTextureReadMode mode>
4496 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1DGrad(texture<uint2, texType, mode> texRef, float x, float dx,
4497  float dy) {
4498  TEXTURE_REF_PARAMETERS_INIT;
4499  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4500  TEXTURE_RETURN_UINT_XY;
4501 }
4502 
4503 template <int texType, enum hipTextureReadMode mode>
4504 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1DGrad(texture<uint4, texType, mode> texRef, float x, float dx,
4505  float dy) {
4506  TEXTURE_REF_PARAMETERS_INIT;
4507  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4508  TEXTURE_RETURN_UINT_XYZW;
4509 }
4510 
4511 template <int texType, enum hipTextureReadMode mode>
4512 __TEXTURE_FUNCTIONS_DECL__ float tex1DGrad(texture<float, texType, mode> texRef, float x, float dx,
4513  float dy) {
4514  TEXTURE_REF_PARAMETERS_INIT;
4515  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4516  TEXTURE_RETURN_FLOAT;
4517 }
4518 
4519 template <int texType, enum hipTextureReadMode mode>
4520 __TEXTURE_FUNCTIONS_DECL__ float1 tex1DGrad(texture<float1, texType, mode> texRef, float x,
4521  float dx, float dy) {
4522  TEXTURE_REF_PARAMETERS_INIT;
4523  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4524  TEXTURE_RETURN_FLOAT_X;
4525 }
4526 
4527 template <int texType, enum hipTextureReadMode mode>
4528 __TEXTURE_FUNCTIONS_DECL__ float2 tex1DGrad(texture<float2, texType, mode> texRef, float x,
4529  float dx, float dy) {
4530  TEXTURE_REF_PARAMETERS_INIT;
4531  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4532  TEXTURE_RETURN_FLOAT_XY;
4533 }
4534 
4535 template <int texType, enum hipTextureReadMode mode>
4536 __TEXTURE_FUNCTIONS_DECL__ float4 tex1DGrad(texture<float4, texType, mode> texRef, float x,
4537  float dx, float dy) {
4538  TEXTURE_REF_PARAMETERS_INIT;
4539  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4540  TEXTURE_RETURN_FLOAT_XYZW;
4541 }
4542 
4544 
4545 template <int texType, enum hipTextureReadMode mode>
4546 __TEXTURE_FUNCTIONS_DECL__ char tex1DGrad(texture<char, texType, mode> texRef,
4547  hipTextureObject_t textureObject, float x, float dx,
4548  float dy) {
4549  TEXTURE_PARAMETERS_INIT;
4550  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4551  TEXTURE_RETURN_CHAR;
4552 }
4553 
4554 template <int texType, enum hipTextureReadMode mode>
4555 __TEXTURE_FUNCTIONS_DECL__ char1 tex1DGrad(texture<char1, texType, mode> texRef,
4556  hipTextureObject_t textureObject, float x, float dx,
4557  float dy) {
4558  TEXTURE_PARAMETERS_INIT;
4559  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4560  TEXTURE_RETURN_CHAR_X;
4561 }
4562 
4563 template <int texType, enum hipTextureReadMode mode>
4564 __TEXTURE_FUNCTIONS_DECL__ char2 tex1DGrad(texture<char2, texType, mode> texRef,
4565  hipTextureObject_t textureObject, float x, float dx,
4566  float dy) {
4567  TEXTURE_PARAMETERS_INIT;
4568  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4569  TEXTURE_RETURN_CHAR_XY;
4570 }
4571 
4572 template <int texType, enum hipTextureReadMode mode>
4573 __TEXTURE_FUNCTIONS_DECL__ char4 tex1DGrad(texture<char4, texType, mode> texRef,
4574  hipTextureObject_t textureObject, float x, float dx,
4575  float dy) {
4576  TEXTURE_PARAMETERS_INIT;
4577  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4578  TEXTURE_RETURN_CHAR_XYZW;
4579 }
4580 
4581 template <int texType, enum hipTextureReadMode mode>
4582 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1DGrad(texture<unsigned char, texType, mode> texRef,
4583  hipTextureObject_t textureObject, float x,
4584  float dx, float dy) {
4585  TEXTURE_PARAMETERS_INIT;
4586  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4587  TEXTURE_RETURN_UCHAR;
4588 }
4589 
4590 template <int texType, enum hipTextureReadMode mode>
4591 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1DGrad(texture<uchar1, texType, mode> texRef,
4592  hipTextureObject_t textureObject, float x, float dx,
4593  float dy) {
4594  TEXTURE_PARAMETERS_INIT;
4595  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4596  TEXTURE_RETURN_UCHAR_X;
4597 }
4598 
4599 template <int texType, enum hipTextureReadMode mode>
4600 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1DGrad(texture<uchar2, texType, mode> texRef,
4601  hipTextureObject_t textureObject, float x, float dx,
4602  float dy) {
4603  TEXTURE_PARAMETERS_INIT;
4604  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4605  TEXTURE_RETURN_UCHAR_XY;
4606 }
4607 
4608 template <int texType, enum hipTextureReadMode mode>
4609 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1DGrad(texture<uchar4, texType, mode> texRef,
4610  hipTextureObject_t textureObject, float x, float dx,
4611  float dy) {
4612  TEXTURE_PARAMETERS_INIT;
4613  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4614  TEXTURE_RETURN_UCHAR_XYZW;
4615 }
4616 
4617 template <int texType, enum hipTextureReadMode mode>
4618 __TEXTURE_FUNCTIONS_DECL__ short tex1DGrad(texture<short, texType, mode> texRef,
4619  hipTextureObject_t textureObject, float x, float dx,
4620  float dy) {
4621  TEXTURE_PARAMETERS_INIT;
4622  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4623  TEXTURE_RETURN_SHORT;
4624 }
4625 
4626 template <int texType, enum hipTextureReadMode mode>
4627 __TEXTURE_FUNCTIONS_DECL__ short1 tex1DGrad(texture<short1, texType, mode> texRef,
4628  hipTextureObject_t textureObject, float x, float dx,
4629  float dy) {
4630  TEXTURE_PARAMETERS_INIT;
4631  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4632  TEXTURE_RETURN_SHORT_X;
4633 }
4634 
4635 template <int texType, enum hipTextureReadMode mode>
4636 __TEXTURE_FUNCTIONS_DECL__ short2 tex1DGrad(texture<short2, texType, mode> texRef,
4637  hipTextureObject_t textureObject, float x, float dx,
4638  float dy) {
4639  TEXTURE_PARAMETERS_INIT;
4640  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4641  TEXTURE_RETURN_SHORT_XY;
4642 }
4643 
4644 template <int texType, enum hipTextureReadMode mode>
4645 __TEXTURE_FUNCTIONS_DECL__ short4 tex1DGrad(texture<short4, texType, mode> texRef,
4646  hipTextureObject_t textureObject, float x, float dx,
4647  float dy) {
4648  TEXTURE_PARAMETERS_INIT;
4649  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4650  TEXTURE_RETURN_SHORT_XYZW;
4651 }
4652 
4653 template <int texType, enum hipTextureReadMode mode>
4654 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1DGrad(texture<unsigned short, texType, mode> texRef,
4655  hipTextureObject_t textureObject, float x,
4656  float dx, float dy) {
4657  TEXTURE_PARAMETERS_INIT;
4658  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4659  TEXTURE_RETURN_USHORT;
4660 }
4661 
4662 template <int texType, enum hipTextureReadMode mode>
4663 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1DGrad(texture<ushort1, texType, mode> texRef,
4664  hipTextureObject_t textureObject, float x, float dx,
4665  float dy) {
4666  TEXTURE_PARAMETERS_INIT;
4667  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4668  TEXTURE_RETURN_USHORT_X;
4669 }
4670 
4671 template <int texType, enum hipTextureReadMode mode>
4672 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1DGrad(texture<ushort2, texType, mode> texRef,
4673  hipTextureObject_t textureObject, float x, float dx,
4674  float dy) {
4675  TEXTURE_PARAMETERS_INIT;
4676  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4677  TEXTURE_RETURN_USHORT_XY;
4678 }
4679 
4680 template <int texType, enum hipTextureReadMode mode>
4681 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1DGrad(texture<ushort4, texType, mode> texRef,
4682  hipTextureObject_t textureObject, float x, float dx,
4683  float dy) {
4684  TEXTURE_PARAMETERS_INIT;
4685  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4686  TEXTURE_RETURN_USHORT_XYZW;
4687 }
4688 
4689 template <int texType, enum hipTextureReadMode mode>
4690 __TEXTURE_FUNCTIONS_DECL__ int tex1DGrad(texture<int, texType, mode> texRef,
4691  hipTextureObject_t textureObject, float x, float dx,
4692  float dy) {
4693  TEXTURE_PARAMETERS_INIT;
4694  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4695  TEXTURE_RETURN_INT;
4696 }
4697 
4698 template <int texType, enum hipTextureReadMode mode>
4699 __TEXTURE_FUNCTIONS_DECL__ int1 tex1DGrad(texture<int1, texType, mode> texRef,
4700  hipTextureObject_t textureObject, float x, float dx,
4701  float dy) {
4702  TEXTURE_PARAMETERS_INIT;
4703  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4704  TEXTURE_RETURN_INT_X;
4705 }
4706 
4707 template <int texType, enum hipTextureReadMode mode>
4708 __TEXTURE_FUNCTIONS_DECL__ int2 tex1DGrad(texture<int2, texType, mode> texRef,
4709  hipTextureObject_t textureObject, float x, float dx,
4710  float dy) {
4711  TEXTURE_PARAMETERS_INIT;
4712  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4713  TEXTURE_RETURN_INT_XY;
4714 }
4715 
4716 template <int texType, enum hipTextureReadMode mode>
4717 __TEXTURE_FUNCTIONS_DECL__ int4 tex1DGrad(texture<int4, texType, mode> texRef,
4718  hipTextureObject_t textureObject, float x, float dx,
4719  float dy) {
4720  TEXTURE_PARAMETERS_INIT;
4721  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4722  TEXTURE_RETURN_INT_XYZW;
4723 }
4724 
4725 template <int texType, enum hipTextureReadMode mode>
4726 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1DGrad(texture<unsigned int, texType, mode> texRef,
4727  hipTextureObject_t textureObject, float x,
4728  float dx, float dy) {
4729  TEXTURE_PARAMETERS_INIT;
4730  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4731  TEXTURE_RETURN_UINT;
4732 }
4733 
4734 template <int texType, enum hipTextureReadMode mode>
4735 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1DGrad(texture<uint1, texType, mode> texRef,
4736  hipTextureObject_t textureObject, float x, float dx,
4737  float dy) {
4738  TEXTURE_PARAMETERS_INIT;
4739  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4740  TEXTURE_RETURN_UINT_X;
4741 }
4742 
4743 template <int texType, enum hipTextureReadMode mode>
4744 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1DGrad(texture<uint2, texType, mode> texRef,
4745  hipTextureObject_t textureObject, float x, float dx,
4746  float dy) {
4747  TEXTURE_PARAMETERS_INIT;
4748  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4749  TEXTURE_RETURN_UINT_XY;
4750 }
4751 
4752 template <int texType, enum hipTextureReadMode mode>
4753 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1DGrad(texture<uint4, texType, mode> texRef,
4754  hipTextureObject_t textureObject, float x, float dx,
4755  float dy) {
4756  TEXTURE_PARAMETERS_INIT;
4757  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4758  TEXTURE_RETURN_UINT_XYZW;
4759 }
4760 
4761 template <int texType, enum hipTextureReadMode mode>
4762 __TEXTURE_FUNCTIONS_DECL__ float tex1DGrad(texture<float, texType, mode> texRef,
4763  hipTextureObject_t textureObject, float x, float dx,
4764  float dy) {
4765  TEXTURE_PARAMETERS_INIT;
4766  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4767  TEXTURE_RETURN_FLOAT;
4768 }
4769 
4770 template <int texType, enum hipTextureReadMode mode>
4771 __TEXTURE_FUNCTIONS_DECL__ float1 tex1DGrad(texture<float1, texType, mode> texRef,
4772  hipTextureObject_t textureObject, float x, float dx,
4773  float dy) {
4774  TEXTURE_PARAMETERS_INIT;
4775  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4776  TEXTURE_RETURN_FLOAT_X;
4777 }
4778 
4779 template <int texType, enum hipTextureReadMode mode>
4780 __TEXTURE_FUNCTIONS_DECL__ float2 tex1DGrad(texture<float2, texType, mode> texRef,
4781  hipTextureObject_t textureObject, float x, float dx,
4782  float dy) {
4783  TEXTURE_PARAMETERS_INIT;
4784  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4785  TEXTURE_RETURN_FLOAT_XY;
4786 }
4787 
4788 template <int texType, enum hipTextureReadMode mode>
4789 __TEXTURE_FUNCTIONS_DECL__ float4 tex1DGrad(texture<float4, texType, mode> texRef,
4790  hipTextureObject_t textureObject, float x, float dx,
4791  float dy) {
4792  TEXTURE_PARAMETERS_INIT;
4793  texel.f = __ockl_image_sample_grad_1D(i, s, x, dx, dy);
4794  TEXTURE_RETURN_FLOAT_XYZW;
4795 }
4796 
4798 
4799 template <int texType, enum hipTextureReadMode mode>
4800 __TEXTURE_FUNCTIONS_DECL__ char tex2D(texture<char, texType, mode> texRef, float x, float y) {
4801  TEXTURE_REF_PARAMETERS_INIT;
4802  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4803  TEXTURE_RETURN_CHAR;
4804 }
4805 
4806 template <int texType, enum hipTextureReadMode mode>
4807 __TEXTURE_FUNCTIONS_DECL__ char1 tex2D(texture<char1, texType, mode> texRef, float x, float y) {
4808  TEXTURE_REF_PARAMETERS_INIT;
4809  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4810  TEXTURE_RETURN_CHAR_X;
4811 }
4812 
4813 template <int texType, enum hipTextureReadMode mode>
4814 __TEXTURE_FUNCTIONS_DECL__ char2 tex2D(texture<char2, texType, mode> texRef, float x, float y) {
4815  TEXTURE_REF_PARAMETERS_INIT;
4816  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4817  TEXTURE_RETURN_CHAR_XY;
4818 }
4819 
4820 template <int texType, enum hipTextureReadMode mode>
4821 __TEXTURE_FUNCTIONS_DECL__ char4 tex2D(texture<char4, texType, mode> texRef, float x, float y) {
4822  TEXTURE_REF_PARAMETERS_INIT;
4823  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4824  TEXTURE_RETURN_CHAR_XYZW;
4825 }
4826 
4827 template <int texType, enum hipTextureReadMode mode>
4828 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2D(texture<unsigned char, texType, mode> texRef,
4829  float x, float y) {
4830  TEXTURE_REF_PARAMETERS_INIT;
4831  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4832  TEXTURE_RETURN_UCHAR;
4833 }
4834 
4835 template <int texType, enum hipTextureReadMode mode>
4836 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2D(texture<uchar1, texType, mode> texRef, float x, float y) {
4837  TEXTURE_REF_PARAMETERS_INIT;
4838  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4839  TEXTURE_RETURN_UCHAR_X;
4840 }
4841 
4842 template <int texType, enum hipTextureReadMode mode>
4843 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2D(texture<uchar2, texType, mode> texRef, float x, float y) {
4844  TEXTURE_REF_PARAMETERS_INIT;
4845  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4846  TEXTURE_RETURN_UCHAR_XY;
4847 }
4848 
4849 template <int texType, enum hipTextureReadMode mode>
4850 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2D(texture<uchar4, texType, mode> texRef, float x, float y) {
4851  TEXTURE_REF_PARAMETERS_INIT;
4852  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4853  TEXTURE_RETURN_UCHAR_XYZW;
4854 }
4855 
4856 template <int texType, enum hipTextureReadMode mode>
4857 __TEXTURE_FUNCTIONS_DECL__ short tex2D(texture<short, texType, mode> texRef, float x, float y) {
4858  TEXTURE_REF_PARAMETERS_INIT;
4859  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4860  TEXTURE_RETURN_SHORT;
4861 }
4862 
4863 template <int texType, enum hipTextureReadMode mode>
4864 __TEXTURE_FUNCTIONS_DECL__ short1 tex2D(texture<short1, texType, mode> texRef, float x, float y) {
4865  TEXTURE_REF_PARAMETERS_INIT;
4866  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4867  TEXTURE_RETURN_SHORT_X;
4868 }
4869 
4870 template <int texType, enum hipTextureReadMode mode>
4871 __TEXTURE_FUNCTIONS_DECL__ short2 tex2D(texture<short2, texType, mode> texRef, float x, float y) {
4872  TEXTURE_REF_PARAMETERS_INIT;
4873  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4874  TEXTURE_RETURN_SHORT_XY;
4875 }
4876 
4877 template <int texType, enum hipTextureReadMode mode>
4878 __TEXTURE_FUNCTIONS_DECL__ short4 tex2D(texture<short4, texType, mode> texRef, float x, float y) {
4879  TEXTURE_REF_PARAMETERS_INIT;
4880  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4881  TEXTURE_RETURN_SHORT_XYZW;
4882 }
4883 
4884 template <int texType, enum hipTextureReadMode mode>
4885 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2D(texture<unsigned short, texType, mode> texRef,
4886  float x, float y) {
4887  TEXTURE_REF_PARAMETERS_INIT;
4888  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4889  TEXTURE_RETURN_USHORT;
4890 }
4891 
4892 template <int texType, enum hipTextureReadMode mode>
4893 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2D(texture<ushort1, texType, mode> texRef, float x, float y) {
4894  TEXTURE_REF_PARAMETERS_INIT;
4895  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4896  TEXTURE_RETURN_USHORT_X;
4897 }
4898 
4899 template <int texType, enum hipTextureReadMode mode>
4900 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2D(texture<ushort2, texType, mode> texRef, float x, float y) {
4901  TEXTURE_REF_PARAMETERS_INIT;
4902  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4903  TEXTURE_RETURN_USHORT_XY;
4904 }
4905 
4906 template <int texType, enum hipTextureReadMode mode>
4907 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2D(texture<ushort4, texType, mode> texRef, float x, float y) {
4908  TEXTURE_REF_PARAMETERS_INIT;
4909  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4910  TEXTURE_RETURN_USHORT_XYZW;
4911 }
4912 
4913 template <int texType, enum hipTextureReadMode mode>
4914 __TEXTURE_FUNCTIONS_DECL__ int tex2D(texture<int, texType, mode> texRef, float x, float y) {
4915  TEXTURE_REF_PARAMETERS_INIT;
4916  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4917  TEXTURE_RETURN_INT;
4918 }
4919 
4920 template <int texType, enum hipTextureReadMode mode>
4921 __TEXTURE_FUNCTIONS_DECL__ int1 tex2D(texture<int1, texType, mode> texRef, float x, float y) {
4922  TEXTURE_REF_PARAMETERS_INIT;
4923  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4924  TEXTURE_RETURN_INT_X;
4925 }
4926 
4927 template <int texType, enum hipTextureReadMode mode>
4928 __TEXTURE_FUNCTIONS_DECL__ int2 tex2D(texture<int2, texType, mode> texRef, float x, float y) {
4929  TEXTURE_REF_PARAMETERS_INIT;
4930  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4931  TEXTURE_RETURN_INT_XY;
4932 }
4933 
4934 template <int texType, enum hipTextureReadMode mode>
4935 __TEXTURE_FUNCTIONS_DECL__ int4 tex2D(texture<int4, texType, mode> texRef, float x, float y) {
4936  TEXTURE_REF_PARAMETERS_INIT;
4937  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4938  TEXTURE_RETURN_INT_XYZW;
4939 }
4940 
4941 template <int texType, enum hipTextureReadMode mode>
4942 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2D(texture<unsigned int, texType, mode> texRef, float x,
4943  float y) {
4944  TEXTURE_REF_PARAMETERS_INIT;
4945  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4946  TEXTURE_RETURN_UINT;
4947 }
4948 
4949 template <int texType, enum hipTextureReadMode mode>
4950 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2D(texture<uint1, texType, mode> texRef, float x, float y) {
4951  TEXTURE_REF_PARAMETERS_INIT;
4952  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4953  TEXTURE_RETURN_UINT_X;
4954 }
4955 
4956 template <int texType, enum hipTextureReadMode mode>
4957 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2D(texture<uint2, texType, mode> texRef, float x, float y) {
4958  TEXTURE_REF_PARAMETERS_INIT;
4959  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4960  TEXTURE_RETURN_UINT_XY;
4961 }
4962 
4963 template <int texType, enum hipTextureReadMode mode>
4964 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2D(texture<uint4, texType, mode> texRef, float x, float y) {
4965  TEXTURE_REF_PARAMETERS_INIT;
4966  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4967  TEXTURE_RETURN_UINT_XYZW;
4968 }
4969 
4970 
4972 
4973 template <int texType, enum hipTextureReadMode mode>
4974 __TEXTURE_FUNCTIONS_DECL__ char tex2D(texture<char, texType, mode> texRef,
4975  hipTextureObject_t textureObject, float x, float y) {
4976  TEXTURE_PARAMETERS_INIT;
4977  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4978  TEXTURE_RETURN_CHAR;
4979 }
4980 
4981 template <int texType, enum hipTextureReadMode mode>
4982 __TEXTURE_FUNCTIONS_DECL__ char1 tex2D(texture<char1, texType, mode> texRef,
4983  hipTextureObject_t textureObject, float x, float y) {
4984  TEXTURE_PARAMETERS_INIT;
4985  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4986  TEXTURE_RETURN_CHAR_X;
4987 }
4988 
4989 template <int texType, enum hipTextureReadMode mode>
4990 __TEXTURE_FUNCTIONS_DECL__ char2 tex2D(texture<char2, texType, mode> texRef,
4991  hipTextureObject_t textureObject, float x, float y) {
4992  TEXTURE_PARAMETERS_INIT;
4993  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
4994  TEXTURE_RETURN_CHAR_XY;
4995 }
4996 
4997 template <int texType, enum hipTextureReadMode mode>
4998 __TEXTURE_FUNCTIONS_DECL__ char4 tex2D(texture<char4, texType, mode> texRef,
4999  hipTextureObject_t textureObject, float x, float y) {
5000  TEXTURE_PARAMETERS_INIT;
5001  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5002  TEXTURE_RETURN_CHAR_XYZW;
5003 }
5004 
5005 template <int texType, enum hipTextureReadMode mode>
5006 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2D(texture<unsigned char, texType, mode> texRef,
5007  hipTextureObject_t textureObject, float x, float y) {
5008  TEXTURE_PARAMETERS_INIT;
5009  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5010  TEXTURE_RETURN_UCHAR;
5011 }
5012 
5013 template <int texType, enum hipTextureReadMode mode>
5014 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2D(texture<uchar1, texType, mode> texRef,
5015  hipTextureObject_t textureObject, float x, float y) {
5016  TEXTURE_PARAMETERS_INIT;
5017  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5018  TEXTURE_RETURN_UCHAR_X;
5019 }
5020 
5021 template <int texType, enum hipTextureReadMode mode>
5022 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2D(texture<uchar2, texType, mode> texRef,
5023  hipTextureObject_t textureObject, float x, float y) {
5024  TEXTURE_PARAMETERS_INIT;
5025  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5026  TEXTURE_RETURN_UCHAR_XY;
5027 }
5028 
5029 template <int texType, enum hipTextureReadMode mode>
5030 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2D(texture<uchar4, texType, mode> texRef,
5031  hipTextureObject_t textureObject, float x, float y) {
5032  TEXTURE_PARAMETERS_INIT;
5033  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5034  TEXTURE_RETURN_UCHAR_XYZW;
5035 }
5036 
5037 template <int texType, enum hipTextureReadMode mode>
5038 __TEXTURE_FUNCTIONS_DECL__ short tex2D(texture<short, texType, mode> texRef,
5039  hipTextureObject_t textureObject, float x, float y) {
5040  TEXTURE_PARAMETERS_INIT;
5041  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5042  TEXTURE_RETURN_SHORT;
5043 }
5044 
5045 template <int texType, enum hipTextureReadMode mode>
5046 __TEXTURE_FUNCTIONS_DECL__ short1 tex2D(texture<short1, texType, mode> texRef,
5047  hipTextureObject_t textureObject, float x, float y) {
5048  TEXTURE_PARAMETERS_INIT;
5049  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5050  TEXTURE_RETURN_SHORT_X;
5051 }
5052 
5053 template <int texType, enum hipTextureReadMode mode>
5054 __TEXTURE_FUNCTIONS_DECL__ short2 tex2D(texture<short2, texType, mode> texRef,
5055  hipTextureObject_t textureObject, float x, float y) {
5056  TEXTURE_PARAMETERS_INIT;
5057  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5058  TEXTURE_RETURN_SHORT_XY;
5059 }
5060 
5061 template <int texType, enum hipTextureReadMode mode>
5062 __TEXTURE_FUNCTIONS_DECL__ short4 tex2D(texture<short4, texType, mode> texRef,
5063  hipTextureObject_t textureObject, float x, float y) {
5064  TEXTURE_PARAMETERS_INIT;
5065  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5066  TEXTURE_RETURN_SHORT_XYZW;
5067 }
5068 
5069 template <int texType, enum hipTextureReadMode mode>
5070 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2D(texture<unsigned short, texType, mode> texRef,
5071  hipTextureObject_t textureObject, float x,
5072  float y) {
5073  TEXTURE_PARAMETERS_INIT;
5074  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5075  TEXTURE_RETURN_USHORT;
5076 }
5077 
5078 template <int texType, enum hipTextureReadMode mode>
5079 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2D(texture<ushort1, texType, mode> texRef,
5080  hipTextureObject_t textureObject, float x, float y) {
5081  TEXTURE_PARAMETERS_INIT;
5082  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5083  TEXTURE_RETURN_USHORT_X;
5084 }
5085 
5086 template <int texType, enum hipTextureReadMode mode>
5087 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2D(texture<ushort2, texType, mode> texRef,
5088  hipTextureObject_t textureObject, float x, float y) {
5089  TEXTURE_PARAMETERS_INIT;
5090  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5091  TEXTURE_RETURN_USHORT_XY;
5092 }
5093 
5094 template <int texType, enum hipTextureReadMode mode>
5095 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2D(texture<ushort4, texType, mode> texRef,
5096  hipTextureObject_t textureObject, float x, float y) {
5097  TEXTURE_PARAMETERS_INIT;
5098  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5099  TEXTURE_RETURN_USHORT_XYZW;
5100 }
5101 
5102 template <int texType, enum hipTextureReadMode mode>
5103 __TEXTURE_FUNCTIONS_DECL__ int tex2D(texture<int, texType, mode> texRef,
5104  hipTextureObject_t textureObject, float x, float y) {
5105  TEXTURE_PARAMETERS_INIT;
5106  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5107  TEXTURE_RETURN_INT;
5108 }
5109 
5110 template <int texType, enum hipTextureReadMode mode>
5111 __TEXTURE_FUNCTIONS_DECL__ int1 tex2D(texture<int1, texType, mode> texRef,
5112  hipTextureObject_t textureObject, float x, float y) {
5113  TEXTURE_PARAMETERS_INIT;
5114  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5115  TEXTURE_RETURN_INT_X;
5116 }
5117 
5118 template <int texType, enum hipTextureReadMode mode>
5119 __TEXTURE_FUNCTIONS_DECL__ int2 tex2D(texture<int2, texType, mode> texRef,
5120  hipTextureObject_t textureObject, float x, float y) {
5121  TEXTURE_PARAMETERS_INIT;
5122  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5123  TEXTURE_RETURN_INT_XY;
5124 }
5125 
5126 template <int texType, enum hipTextureReadMode mode>
5127 __TEXTURE_FUNCTIONS_DECL__ int4 tex2D(texture<int4, texType, mode> texRef,
5128  hipTextureObject_t textureObject, float x, float y) {
5129  TEXTURE_PARAMETERS_INIT;
5130  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5131  TEXTURE_RETURN_INT_XYZW;
5132 }
5133 
5134 template <int texType, enum hipTextureReadMode mode>
5135 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2D(texture<unsigned int, texType, mode> texRef,
5136  hipTextureObject_t textureObject, float x, float y) {
5137  TEXTURE_PARAMETERS_INIT;
5138  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5139  TEXTURE_RETURN_UINT;
5140 }
5141 
5142 template <int texType, enum hipTextureReadMode mode>
5143 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2D(texture<uint1, texType, mode> texRef,
5144  hipTextureObject_t textureObject, float x, float y) {
5145  TEXTURE_PARAMETERS_INIT;
5146  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5147  TEXTURE_RETURN_UINT_X;
5148 }
5149 
5150 template <int texType, enum hipTextureReadMode mode>
5151 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2D(texture<uint2, texType, mode> texRef,
5152  hipTextureObject_t textureObject, float x, float y) {
5153  TEXTURE_PARAMETERS_INIT;
5154  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5155  TEXTURE_RETURN_UINT_XY;
5156 }
5157 
5158 template <int texType, enum hipTextureReadMode mode>
5159 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2D(texture<uint4, texType, mode> texRef,
5160  hipTextureObject_t textureObject, float x, float y) {
5161  TEXTURE_PARAMETERS_INIT;
5162  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5163  TEXTURE_RETURN_UINT_XYZW;
5164 }
5165 
5166 template <int texType, enum hipTextureReadMode mode>
5167 __TEXTURE_FUNCTIONS_DECL__ float tex2D(texture<float, texType, mode> texRef,
5168  hipTextureObject_t textureObject, float x, float y) {
5169  TEXTURE_PARAMETERS_INIT;
5170  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5171  TEXTURE_RETURN_FLOAT;
5172 }
5173 
5174 template <int texType, enum hipTextureReadMode mode>
5175 __TEXTURE_FUNCTIONS_DECL__ float tex2D(texture<float, texType, mode> texRef, float x, float y) {
5176  TEXTURE_REF_PARAMETERS_INIT;
5177  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5178  TEXTURE_RETURN_FLOAT;
5179 }
5180 
5181 template <int texType, enum hipTextureReadMode mode>
5182 __TEXTURE_FUNCTIONS_DECL__ float1 tex2D(texture<float1, texType, mode> texRef, float x, float y) {
5183  TEXTURE_REF_PARAMETERS_INIT;
5184  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5185  TEXTURE_RETURN_FLOAT_X;
5186 }
5187 
5188 template <int texType, enum hipTextureReadMode mode>
5189 __TEXTURE_FUNCTIONS_DECL__ float1 tex2D(texture<float1, texType, mode> texRef,
5190  hipTextureObject_t textureObject, float x, float y) {
5191  TEXTURE_PARAMETERS_INIT;
5192  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5193  TEXTURE_RETURN_FLOAT_X;
5194 }
5195 
5196 template <int texType, enum hipTextureReadMode mode>
5197 __TEXTURE_FUNCTIONS_DECL__ float2 tex2D(texture<float2, texType, mode> texRef, float x, float y) {
5198  TEXTURE_REF_PARAMETERS_INIT;
5199  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5200  TEXTURE_RETURN_FLOAT_XY;
5201 }
5202 
5203 template <int texType, enum hipTextureReadMode mode>
5204 __TEXTURE_FUNCTIONS_DECL__ float2 tex2D(texture<float2, texType, mode> texRef,
5205  hipTextureObject_t textureObject, float x, float y) {
5206  TEXTURE_PARAMETERS_INIT;
5207  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5208  TEXTURE_RETURN_FLOAT_XY;
5209 }
5210 
5211 template <int texType, enum hipTextureReadMode mode>
5212 __TEXTURE_FUNCTIONS_DECL__ float4 tex2D(texture<float4, texType, mode> texRef, float x, float y) {
5213  TEXTURE_REF_PARAMETERS_INIT;
5214  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5215  TEXTURE_RETURN_FLOAT_XYZW;
5216 }
5217 
5218 template <int texType, enum hipTextureReadMode mode>
5219 __TEXTURE_FUNCTIONS_DECL__ float4 tex2D(texture<float4, texType, mode> texRef,
5220  hipTextureObject_t textureObject, float x, float y) {
5221  TEXTURE_PARAMETERS_INIT;
5222  texel.f = __ockl_image_sample_2D(i, s, hc::short_vector::float2(x, y).get_vector());
5223  TEXTURE_RETURN_FLOAT_XYZW;
5224 }
5225 
5227 
5228 template <int texType, enum hipTextureReadMode mode>
5229 __TEXTURE_FUNCTIONS_DECL__ char tex2DLod(texture<char, texType, mode> texRef, float x, float y,
5230  float level) {
5231  TEXTURE_REF_PARAMETERS_INIT;
5232  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5233  TEXTURE_RETURN_CHAR;
5234 }
5235 
5236 template <int texType, enum hipTextureReadMode mode>
5237 __TEXTURE_FUNCTIONS_DECL__ char1 tex2DLod(texture<char1, texType, mode> texRef, float x, float y,
5238  float level) {
5239  TEXTURE_REF_PARAMETERS_INIT;
5240  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5241  TEXTURE_RETURN_CHAR_X;
5242 }
5243 
5244 template <int texType, enum hipTextureReadMode mode>
5245 __TEXTURE_FUNCTIONS_DECL__ char2 tex2DLod(texture<char2, texType, mode> texRef, float x, float y,
5246  float level) {
5247  TEXTURE_REF_PARAMETERS_INIT;
5248  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5249  TEXTURE_RETURN_CHAR_XY;
5250 }
5251 
5252 template <int texType, enum hipTextureReadMode mode>
5253 __TEXTURE_FUNCTIONS_DECL__ char4 tex2DLod(texture<char4, texType, mode> texRef, float x, float y,
5254  float level) {
5255  TEXTURE_REF_PARAMETERS_INIT;
5256  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5257  TEXTURE_RETURN_CHAR_XYZW;
5258 }
5259 
5260 template <int texType, enum hipTextureReadMode mode>
5261 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2DLod(texture<unsigned char, texType, mode> texRef,
5262  float x, float y, float level) {
5263  TEXTURE_REF_PARAMETERS_INIT;
5264  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5265  TEXTURE_RETURN_UCHAR;
5266 }
5267 
5268 template <int texType, enum hipTextureReadMode mode>
5269 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2DLod(texture<uchar1, texType, mode> texRef, float x, float y,
5270  float level) {
5271  TEXTURE_REF_PARAMETERS_INIT;
5272  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5273  TEXTURE_RETURN_UCHAR_X;
5274 }
5275 
5276 template <int texType, enum hipTextureReadMode mode>
5277 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2DLod(texture<uchar2, texType, mode> texRef, float x, float y,
5278  float level) {
5279  TEXTURE_REF_PARAMETERS_INIT;
5280  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5281  TEXTURE_RETURN_UCHAR_XY;
5282 }
5283 
5284 template <int texType, enum hipTextureReadMode mode>
5285 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2DLod(texture<uchar4, texType, mode> texRef, float x, float y,
5286  float level) {
5287  TEXTURE_REF_PARAMETERS_INIT;
5288  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5289  TEXTURE_RETURN_UCHAR_XYZW;
5290 }
5291 
5292 template <int texType, enum hipTextureReadMode mode>
5293 __TEXTURE_FUNCTIONS_DECL__ short tex2DLod(texture<short, texType, mode> texRef, float x, float y,
5294  float level) {
5295  TEXTURE_REF_PARAMETERS_INIT;
5296  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5297  TEXTURE_RETURN_SHORT;
5298 }
5299 
5300 template <int texType, enum hipTextureReadMode mode>
5301 __TEXTURE_FUNCTIONS_DECL__ short1 tex2DLod(texture<short1, texType, mode> texRef, float x, float y,
5302  float level) {
5303  TEXTURE_REF_PARAMETERS_INIT;
5304  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5305  TEXTURE_RETURN_SHORT_X;
5306 }
5307 
5308 template <int texType, enum hipTextureReadMode mode>
5309 __TEXTURE_FUNCTIONS_DECL__ short2 tex2DLod(texture<short2, texType, mode> texRef, float x, float y,
5310  float level) {
5311  TEXTURE_REF_PARAMETERS_INIT;
5312  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5313  TEXTURE_RETURN_SHORT_XY;
5314 }
5315 
5316 template <int texType, enum hipTextureReadMode mode>
5317 __TEXTURE_FUNCTIONS_DECL__ short4 tex2DLod(texture<short4, texType, mode> texRef, float x, float y,
5318  float level) {
5319  TEXTURE_REF_PARAMETERS_INIT;
5320  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5321  TEXTURE_RETURN_SHORT_XYZW;
5322 }
5323 
5324 template <int texType, enum hipTextureReadMode mode>
5325 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2DLod(texture<unsigned short, texType, mode> texRef,
5326  float x, float y, float level) {
5327  TEXTURE_REF_PARAMETERS_INIT;
5328  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5329  TEXTURE_RETURN_USHORT;
5330 }
5331 
5332 template <int texType, enum hipTextureReadMode mode>
5333 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2DLod(texture<ushort1, texType, mode> texRef, float x,
5334  float y, float level) {
5335  TEXTURE_REF_PARAMETERS_INIT;
5336  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5337  TEXTURE_RETURN_USHORT_X;
5338 }
5339 
5340 template <int texType, enum hipTextureReadMode mode>
5341 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2DLod(texture<ushort2, texType, mode> texRef, float x,
5342  float y, float level) {
5343  TEXTURE_REF_PARAMETERS_INIT;
5344  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5345  TEXTURE_RETURN_USHORT_XY;
5346 }
5347 
5348 template <int texType, enum hipTextureReadMode mode>
5349 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2DLod(texture<ushort4, texType, mode> texRef, float x,
5350  float y, float level) {
5351  TEXTURE_REF_PARAMETERS_INIT;
5352  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5353  TEXTURE_RETURN_USHORT_XYZW;
5354 }
5355 
5356 template <int texType, enum hipTextureReadMode mode>
5357 __TEXTURE_FUNCTIONS_DECL__ int tex2DLod(texture<int, texType, mode> texRef, float x, float y,
5358  float level) {
5359  TEXTURE_REF_PARAMETERS_INIT;
5360  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5361  TEXTURE_RETURN_INT;
5362 }
5363 
5364 template <int texType, enum hipTextureReadMode mode>
5365 __TEXTURE_FUNCTIONS_DECL__ int1 tex2DLod(texture<int1, texType, mode> texRef, float x, float y,
5366  float level) {
5367  TEXTURE_REF_PARAMETERS_INIT;
5368  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5369  TEXTURE_RETURN_INT_X;
5370 }
5371 
5372 template <int texType, enum hipTextureReadMode mode>
5373 __TEXTURE_FUNCTIONS_DECL__ int2 tex2DLod(texture<int2, texType, mode> texRef, float x, float y,
5374  float level) {
5375  TEXTURE_REF_PARAMETERS_INIT;
5376  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5377  TEXTURE_RETURN_INT_XY;
5378 }
5379 
5380 template <int texType, enum hipTextureReadMode mode>
5381 __TEXTURE_FUNCTIONS_DECL__ int4 tex2DLod(texture<int4, texType, mode> texRef, float x, float y,
5382  float level) {
5383  TEXTURE_REF_PARAMETERS_INIT;
5384  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5385  TEXTURE_RETURN_INT_XYZW;
5386 }
5387 
5388 template <int texType, enum hipTextureReadMode mode>
5389 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2DLod(texture<unsigned int, texType, mode> texRef,
5390  float x, float y, float level) {
5391  TEXTURE_REF_PARAMETERS_INIT;
5392  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5393  TEXTURE_RETURN_UINT;
5394 }
5395 
5396 template <int texType, enum hipTextureReadMode mode>
5397 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2DLod(texture<uint1, texType, mode> texRef, float x, float y,
5398  float level) {
5399  TEXTURE_REF_PARAMETERS_INIT;
5400  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5401  TEXTURE_RETURN_UINT_X;
5402 }
5403 
5404 template <int texType, enum hipTextureReadMode mode>
5405 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2DLod(texture<uint2, texType, mode> texRef, float x, float y,
5406  float level) {
5407  TEXTURE_REF_PARAMETERS_INIT;
5408  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5409  TEXTURE_RETURN_UINT_XY;
5410 }
5411 
5412 template <int texType, enum hipTextureReadMode mode>
5413 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2DLod(texture<uint4, texType, mode> texRef, float x, float y,
5414  float level) {
5415  TEXTURE_REF_PARAMETERS_INIT;
5416  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5417  TEXTURE_RETURN_UINT_XYZW;
5418 }
5419 
5420 template <int texType, enum hipTextureReadMode mode>
5421 __TEXTURE_FUNCTIONS_DECL__ float tex2DLod(texture<float, texType, mode> texRef, float x, float y,
5422  float level) {
5423  TEXTURE_REF_PARAMETERS_INIT;
5424  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5425  TEXTURE_RETURN_FLOAT;
5426 }
5427 
5428 template <int texType, enum hipTextureReadMode mode>
5429 __TEXTURE_FUNCTIONS_DECL__ float1 tex2DLod(texture<float1, texType, mode> texRef, float x, float y,
5430  float level) {
5431  TEXTURE_REF_PARAMETERS_INIT;
5432  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5433  TEXTURE_RETURN_FLOAT_X;
5434 }
5435 
5436 template <int texType, enum hipTextureReadMode mode>
5437 __TEXTURE_FUNCTIONS_DECL__ float2 tex2DLod(texture<float2, texType, mode> texRef, float x, float y,
5438  float level) {
5439  TEXTURE_REF_PARAMETERS_INIT;
5440  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5441  TEXTURE_RETURN_FLOAT_XY;
5442 }
5443 
5444 template <int texType, enum hipTextureReadMode mode>
5445 __TEXTURE_FUNCTIONS_DECL__ float4 tex2DLod(texture<float4, texType, mode> texRef, float x, float y,
5446  float level) {
5447  TEXTURE_REF_PARAMETERS_INIT;
5448  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5449  TEXTURE_RETURN_FLOAT_XYZW;
5450 }
5451 
5453 
5454 template <int texType, enum hipTextureReadMode mode>
5455 __TEXTURE_FUNCTIONS_DECL__ char tex2DLod(texture<char, texType, mode> texRef,
5456  hipTextureObject_t textureObject, float x, float y,
5457  float level) {
5458  TEXTURE_PARAMETERS_INIT;
5459  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5460  TEXTURE_RETURN_CHAR;
5461 }
5462 
5463 template <int texType, enum hipTextureReadMode mode>
5464 __TEXTURE_FUNCTIONS_DECL__ char1 tex2DLod(texture<char1, texType, mode> texRef,
5465  hipTextureObject_t textureObject, float x, float y,
5466  float level) {
5467  TEXTURE_PARAMETERS_INIT;
5468  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5469  TEXTURE_RETURN_CHAR_X;
5470 }
5471 
5472 template <int texType, enum hipTextureReadMode mode>
5473 __TEXTURE_FUNCTIONS_DECL__ char2 tex2DLod(texture<char2, texType, mode> texRef,
5474  hipTextureObject_t textureObject, float x, float y,
5475  float level) {
5476  TEXTURE_PARAMETERS_INIT;
5477  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5478  TEXTURE_RETURN_CHAR_XY;
5479 }
5480 
5481 template <int texType, enum hipTextureReadMode mode>
5482 __TEXTURE_FUNCTIONS_DECL__ char4 tex2DLod(texture<char4, texType, mode> texRef,
5483  hipTextureObject_t textureObject, float x, float y,
5484  float level) {
5485  TEXTURE_PARAMETERS_INIT;
5486  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5487  TEXTURE_RETURN_CHAR_XYZW;
5488 }
5489 
5490 template <int texType, enum hipTextureReadMode mode>
5491 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2DLod(texture<unsigned char, texType, mode> texRef,
5492  hipTextureObject_t textureObject, float x,
5493  float y, float level) {
5494  TEXTURE_PARAMETERS_INIT;
5495  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5496  TEXTURE_RETURN_UCHAR;
5497 }
5498 
5499 template <int texType, enum hipTextureReadMode mode>
5500 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2DLod(texture<uchar1, texType, mode> texRef,
5501  hipTextureObject_t textureObject, float x, float y,
5502  float level) {
5503  TEXTURE_PARAMETERS_INIT;
5504  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5505  TEXTURE_RETURN_UCHAR_X;
5506 }
5507 
5508 template <int texType, enum hipTextureReadMode mode>
5509 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2DLod(texture<uchar2, texType, mode> texRef,
5510  hipTextureObject_t textureObject, float x, float y,
5511  float level) {
5512  TEXTURE_PARAMETERS_INIT;
5513  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5514  TEXTURE_RETURN_UCHAR_XY;
5515 }
5516 
5517 template <int texType, enum hipTextureReadMode mode>
5518 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2DLod(texture<uchar4, texType, mode> texRef,
5519  hipTextureObject_t textureObject, float x, float y,
5520  float level) {
5521  TEXTURE_PARAMETERS_INIT;
5522  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5523  TEXTURE_RETURN_UCHAR_XYZW;
5524 }
5525 
5526 template <int texType, enum hipTextureReadMode mode>
5527 __TEXTURE_FUNCTIONS_DECL__ short tex2DLod(texture<short, texType, mode> texRef,
5528  hipTextureObject_t textureObject, float x, float y,
5529  float level) {
5530  TEXTURE_PARAMETERS_INIT;
5531  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5532  TEXTURE_RETURN_SHORT;
5533 }
5534 
5535 template <int texType, enum hipTextureReadMode mode>
5536 __TEXTURE_FUNCTIONS_DECL__ short1 tex2DLod(texture<short1, texType, mode> texRef,
5537  hipTextureObject_t textureObject, float x, float y,
5538  float level) {
5539  TEXTURE_PARAMETERS_INIT;
5540  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5541  TEXTURE_RETURN_SHORT_X;
5542 }
5543 
5544 template <int texType, enum hipTextureReadMode mode>
5545 __TEXTURE_FUNCTIONS_DECL__ short2 tex2DLod(texture<short2, texType, mode> texRef,
5546  hipTextureObject_t textureObject, float x, float y,
5547  float level) {
5548  TEXTURE_PARAMETERS_INIT;
5549  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5550  TEXTURE_RETURN_SHORT_XY;
5551 }
5552 
5553 template <int texType, enum hipTextureReadMode mode>
5554 __TEXTURE_FUNCTIONS_DECL__ short4 tex2DLod(texture<short4, texType, mode> texRef,
5555  hipTextureObject_t textureObject, float x, float y,
5556  float level) {
5557  TEXTURE_PARAMETERS_INIT;
5558  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5559  TEXTURE_RETURN_SHORT_XYZW;
5560 }
5561 
5562 template <int texType, enum hipTextureReadMode mode>
5563 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2DLod(texture<unsigned short, texType, mode> texRef,
5564  hipTextureObject_t textureObject, float x,
5565  float y, float level) {
5566  TEXTURE_PARAMETERS_INIT;
5567  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5568  TEXTURE_RETURN_USHORT;
5569 }
5570 
5571 template <int texType, enum hipTextureReadMode mode>
5572 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2DLod(texture<ushort1, texType, mode> texRef,
5573  hipTextureObject_t textureObject, float x, float y,
5574  float level) {
5575  TEXTURE_PARAMETERS_INIT;
5576  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5577  TEXTURE_RETURN_USHORT_X;
5578 }
5579 
5580 template <int texType, enum hipTextureReadMode mode>
5581 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2DLod(texture<ushort2, texType, mode> texRef,
5582  hipTextureObject_t textureObject, float x, float y,
5583  float level) {
5584  TEXTURE_PARAMETERS_INIT;
5585  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5586  TEXTURE_RETURN_USHORT_XY;
5587 }
5588 
5589 template <int texType, enum hipTextureReadMode mode>
5590 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2DLod(texture<ushort4, texType, mode> texRef,
5591  hipTextureObject_t textureObject, float x, float y,
5592  float level) {
5593  TEXTURE_PARAMETERS_INIT;
5594  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5595  TEXTURE_RETURN_USHORT_XYZW;
5596 }
5597 
5598 template <int texType, enum hipTextureReadMode mode>
5599 __TEXTURE_FUNCTIONS_DECL__ int tex2DLod(texture<int, texType, mode> texRef,
5600  hipTextureObject_t textureObject, float x, float y,
5601  float level) {
5602  TEXTURE_PARAMETERS_INIT;
5603  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5604  TEXTURE_RETURN_INT;
5605 }
5606 
5607 template <int texType, enum hipTextureReadMode mode>
5608 __TEXTURE_FUNCTIONS_DECL__ int1 tex2DLod(texture<int1, texType, mode> texRef,
5609  hipTextureObject_t textureObject, float x, float y,
5610  float level) {
5611  TEXTURE_PARAMETERS_INIT;
5612  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5613  TEXTURE_RETURN_INT_X;
5614 }
5615 
5616 template <int texType, enum hipTextureReadMode mode>
5617 __TEXTURE_FUNCTIONS_DECL__ int2 tex2DLod(texture<int2, texType, mode> texRef,
5618  hipTextureObject_t textureObject, float x, float y,
5619  float level) {
5620  TEXTURE_PARAMETERS_INIT;
5621  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5622  TEXTURE_RETURN_INT_XY;
5623 }
5624 
5625 template <int texType, enum hipTextureReadMode mode>
5626 __TEXTURE_FUNCTIONS_DECL__ int4 tex2DLod(texture<int4, texType, mode> texRef,
5627  hipTextureObject_t textureObject, float x, float y,
5628  float level) {
5629  TEXTURE_PARAMETERS_INIT;
5630  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5631  TEXTURE_RETURN_INT_XYZW;
5632 }
5633 
5634 template <int texType, enum hipTextureReadMode mode>
5635 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2DLod(texture<unsigned int, texType, mode> texRef,
5636  hipTextureObject_t textureObject, float x, float y,
5637  float level) {
5638  TEXTURE_PARAMETERS_INIT;
5639  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5640  TEXTURE_RETURN_UINT;
5641 }
5642 
5643 template <int texType, enum hipTextureReadMode mode>
5644 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2DLod(texture<uint1, texType, mode> texRef,
5645  hipTextureObject_t textureObject, float x, float y,
5646  float level) {
5647  TEXTURE_PARAMETERS_INIT;
5648  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5649  TEXTURE_RETURN_UINT_X;
5650 }
5651 
5652 template <int texType, enum hipTextureReadMode mode>
5653 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2DLod(texture<uint2, texType, mode> texRef,
5654  hipTextureObject_t textureObject, float x, float y,
5655  float level) {
5656  TEXTURE_PARAMETERS_INIT;
5657  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5658  TEXTURE_RETURN_UINT_XY;
5659 }
5660 
5661 template <int texType, enum hipTextureReadMode mode>
5662 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2DLod(texture<uint4, texType, mode> texRef,
5663  hipTextureObject_t textureObject, float x, float y,
5664  float level) {
5665  TEXTURE_PARAMETERS_INIT;
5666  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5667  TEXTURE_RETURN_UINT_XYZW;
5668 }
5669 
5670 template <int texType, enum hipTextureReadMode mode>
5671 __TEXTURE_FUNCTIONS_DECL__ float tex2DLod(texture<float, texType, mode> texRef,
5672  hipTextureObject_t textureObject, float x, float y,
5673  float level) {
5674  TEXTURE_PARAMETERS_INIT;
5675  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5676  TEXTURE_RETURN_FLOAT;
5677 }
5678 
5679 template <int texType, enum hipTextureReadMode mode>
5680 __TEXTURE_FUNCTIONS_DECL__ float1 tex2DLod(texture<float1, texType, mode> texRef,
5681  hipTextureObject_t textureObject, float x, float y,
5682  float level) {
5683  TEXTURE_PARAMETERS_INIT;
5684  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5685  TEXTURE_RETURN_FLOAT_X;
5686 }
5687 
5688 template <int texType, enum hipTextureReadMode mode>
5689 __TEXTURE_FUNCTIONS_DECL__ float2 tex2DLod(texture<float2, texType, mode> texRef,
5690  hipTextureObject_t textureObject, float x, float y,
5691  float level) {
5692  TEXTURE_PARAMETERS_INIT;
5693  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5694  TEXTURE_RETURN_FLOAT_XY;
5695 }
5696 
5697 template <int texType, enum hipTextureReadMode mode>
5698 __TEXTURE_FUNCTIONS_DECL__ float4 tex2DLod(texture<float4, texType, mode> texRef,
5699  hipTextureObject_t textureObject, float x, float y,
5700  float level) {
5701  TEXTURE_PARAMETERS_INIT;
5702  texel.f = __ockl_image_sample_lod_2D(i, s, hc::short_vector::float2(x, y).get_vector(), level);
5703  TEXTURE_RETURN_FLOAT_XYZW;
5704 }
5705 
5707 
5708 template <int texType, enum hipTextureReadMode mode>
5709 __TEXTURE_FUNCTIONS_DECL__ char tex2DGrad(texture<char, texType, mode> texRef, float x, float y,
5710  float2 dx, float2 dy) {
5711  TEXTURE_REF_PARAMETERS_INIT;
5712  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5713  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5714  hc::short_vector::float2(dy.x, dy.y).get_vector());
5715  TEXTURE_RETURN_CHAR;
5716 }
5717 
5718 template <int texType, enum hipTextureReadMode mode>
5719 __TEXTURE_FUNCTIONS_DECL__ char1 tex2DGrad(texture<char1, texType, mode> texRef, float x, float y,
5720  float2 dx, float2 dy) {
5721  TEXTURE_REF_PARAMETERS_INIT;
5722  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5723  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5724  hc::short_vector::float2(dy.x, dy.y).get_vector());
5725  TEXTURE_RETURN_CHAR_X;
5726 }
5727 
5728 template <int texType, enum hipTextureReadMode mode>
5729 __TEXTURE_FUNCTIONS_DECL__ char2 tex2DGrad(texture<char2, texType, mode> texRef, float x, float y,
5730  float2 dx, float2 dy) {
5731  TEXTURE_REF_PARAMETERS_INIT;
5732  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5733  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5734  hc::short_vector::float2(dy.x, dy.y).get_vector());
5735  TEXTURE_RETURN_CHAR_XY;
5736 }
5737 
5738 template <int texType, enum hipTextureReadMode mode>
5739 __TEXTURE_FUNCTIONS_DECL__ char4 tex2DGrad(texture<char4, texType, mode> texRef, float x, float y,
5740  float2 dx, float2 dy) {
5741  TEXTURE_REF_PARAMETERS_INIT;
5742  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5743  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5744  hc::short_vector::float2(dy.x, dy.y).get_vector());
5745  TEXTURE_RETURN_CHAR_XYZW;
5746 }
5747 
5748 template <int texType, enum hipTextureReadMode mode>
5749 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2DGrad(texture<unsigned char, texType, mode> texRef,
5750  float x, float y, float2 dx, float2 dy) {
5751  TEXTURE_REF_PARAMETERS_INIT;
5752  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5753  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5754  hc::short_vector::float2(dy.x, dy.y).get_vector());
5755  TEXTURE_RETURN_UCHAR;
5756 }
5757 
5758 template <int texType, enum hipTextureReadMode mode>
5759 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2DGrad(texture<uchar1, texType, mode> texRef, float x, float y,
5760  float2 dx, float2 dy) {
5761  TEXTURE_REF_PARAMETERS_INIT;
5762  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5763  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5764  hc::short_vector::float2(dy.x, dy.y).get_vector());
5765  TEXTURE_RETURN_UCHAR_X;
5766 }
5767 
5768 template <int texType, enum hipTextureReadMode mode>
5769 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2DGrad(texture<uchar2, texType, mode> texRef, float x, float y,
5770  float2 dx, float2 dy) {
5771  TEXTURE_REF_PARAMETERS_INIT;
5772  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5773  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5774  hc::short_vector::float2(dy.x, dy.y).get_vector());
5775  TEXTURE_RETURN_UCHAR_XY;
5776 }
5777 
5778 template <int texType, enum hipTextureReadMode mode>
5779 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2DGrad(texture<uchar4, texType, mode> texRef, float x, float y,
5780  float2 dx, float2 dy) {
5781  TEXTURE_REF_PARAMETERS_INIT;
5782  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5783  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5784  hc::short_vector::float2(dy.x, dy.y).get_vector());
5785  TEXTURE_RETURN_UCHAR_XYZW;
5786 }
5787 
5788 template <int texType, enum hipTextureReadMode mode>
5789 __TEXTURE_FUNCTIONS_DECL__ short tex2DGrad(texture<short, texType, mode> texRef, float x, float y,
5790  float2 dx, float2 dy) {
5791  TEXTURE_REF_PARAMETERS_INIT;
5792  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5793  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5794  hc::short_vector::float2(dy.x, dy.y).get_vector());
5795  TEXTURE_RETURN_SHORT;
5796 }
5797 
5798 template <int texType, enum hipTextureReadMode mode>
5799 __TEXTURE_FUNCTIONS_DECL__ short1 tex2DGrad(texture<short1, texType, mode> texRef, float x, float y,
5800  float2 dx, float2 dy) {
5801  TEXTURE_REF_PARAMETERS_INIT;
5802  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5803  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5804  hc::short_vector::float2(dy.x, dy.y).get_vector());
5805  TEXTURE_RETURN_SHORT_X;
5806 }
5807 
5808 template <int texType, enum hipTextureReadMode mode>
5809 __TEXTURE_FUNCTIONS_DECL__ short2 tex2DGrad(texture<short2, texType, mode> texRef, float x, float y,
5810  float2 dx, float2 dy) {
5811  TEXTURE_REF_PARAMETERS_INIT;
5812  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5813  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5814  hc::short_vector::float2(dy.x, dy.y).get_vector());
5815  TEXTURE_RETURN_SHORT_XY;
5816 }
5817 
5818 template <int texType, enum hipTextureReadMode mode>
5819 __TEXTURE_FUNCTIONS_DECL__ short4 tex2DGrad(texture<short4, texType, mode> texRef, float x, float y,
5820  float2 dx, float2 dy) {
5821  TEXTURE_REF_PARAMETERS_INIT;
5822  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5823  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5824  hc::short_vector::float2(dy.x, dy.y).get_vector());
5825  TEXTURE_RETURN_SHORT_XYZW;
5826 }
5827 
5828 template <int texType, enum hipTextureReadMode mode>
5829 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2DGrad(texture<unsigned short, texType, mode> texRef,
5830  float x, float y, float2 dx, float2 dy) {
5831  TEXTURE_REF_PARAMETERS_INIT;
5832  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5833  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5834  hc::short_vector::float2(dy.x, dy.y).get_vector());
5835  TEXTURE_RETURN_USHORT;
5836 }
5837 
5838 template <int texType, enum hipTextureReadMode mode>
5839 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2DGrad(texture<ushort1, texType, mode> texRef, float x,
5840  float y, float2 dx, float2 dy) {
5841  TEXTURE_REF_PARAMETERS_INIT;
5842  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5843  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5844  hc::short_vector::float2(dy.x, dy.y).get_vector());
5845  TEXTURE_RETURN_USHORT_X;
5846 }
5847 
5848 template <int texType, enum hipTextureReadMode mode>
5849 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2DGrad(texture<ushort2, texType, mode> texRef, float x,
5850  float y, float2 dx, float2 dy) {
5851  TEXTURE_REF_PARAMETERS_INIT;
5852  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5853  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5854  hc::short_vector::float2(dy.x, dy.y).get_vector());
5855  TEXTURE_RETURN_USHORT_XY;
5856 }
5857 
5858 template <int texType, enum hipTextureReadMode mode>
5859 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2DGrad(texture<ushort4, texType, mode> texRef, float x,
5860  float y, float2 dx, float2 dy) {
5861  TEXTURE_REF_PARAMETERS_INIT;
5862  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5863  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5864  hc::short_vector::float2(dy.x, dy.y).get_vector());
5865  TEXTURE_RETURN_USHORT_XYZW;
5866 }
5867 
5868 template <int texType, enum hipTextureReadMode mode>
5869 __TEXTURE_FUNCTIONS_DECL__ int tex2DGrad(texture<int, texType, mode> texRef, float x, float y,
5870  float2 dx, float2 dy) {
5871  TEXTURE_REF_PARAMETERS_INIT;
5872  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5873  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5874  hc::short_vector::float2(dy.x, dy.y).get_vector());
5875  TEXTURE_RETURN_INT;
5876 }
5877 
5878 template <int texType, enum hipTextureReadMode mode>
5879 __TEXTURE_FUNCTIONS_DECL__ int1 tex2DGrad(texture<int1, texType, mode> texRef, float x, float y,
5880  float2 dx, float2 dy) {
5881  TEXTURE_REF_PARAMETERS_INIT;
5882  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5883  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5884  hc::short_vector::float2(dy.x, dy.y).get_vector());
5885  TEXTURE_RETURN_INT_X;
5886 }
5887 
5888 template <int texType, enum hipTextureReadMode mode>
5889 __TEXTURE_FUNCTIONS_DECL__ int2 tex2DGrad(texture<int2, texType, mode> texRef, float x, float y,
5890  float2 dx, float2 dy) {
5891  TEXTURE_REF_PARAMETERS_INIT;
5892  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5893  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5894  hc::short_vector::float2(dy.x, dy.y).get_vector());
5895  TEXTURE_RETURN_INT_XY;
5896 }
5897 
5898 template <int texType, enum hipTextureReadMode mode>
5899 __TEXTURE_FUNCTIONS_DECL__ int4 tex2DGrad(texture<int4, texType, mode> texRef, float x, float y,
5900  float2 dx, float2 dy) {
5901  TEXTURE_REF_PARAMETERS_INIT;
5902  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5903  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5904  hc::short_vector::float2(dy.x, dy.y).get_vector());
5905  TEXTURE_RETURN_INT_XYZW;
5906 }
5907 
5908 template <int texType, enum hipTextureReadMode mode>
5909 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2DGrad(texture<unsigned int, texType, mode> texRef,
5910  float x, float y, float2 dx, float2 dy) {
5911  TEXTURE_REF_PARAMETERS_INIT;
5912  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5913  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5914  hc::short_vector::float2(dy.x, dy.y).get_vector());
5915  TEXTURE_RETURN_UINT;
5916 }
5917 
5918 template <int texType, enum hipTextureReadMode mode>
5919 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2DGrad(texture<uint1, texType, mode> texRef, float x, float y,
5920  float2 dx, float2 dy) {
5921  TEXTURE_REF_PARAMETERS_INIT;
5922  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5923  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5924  hc::short_vector::float2(dy.x, dy.y).get_vector());
5925  TEXTURE_RETURN_UINT_X;
5926 }
5927 
5928 template <int texType, enum hipTextureReadMode mode>
5929 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2DGrad(texture<uint2, texType, mode> texRef, float x, float y,
5930  float2 dx, float2 dy) {
5931  TEXTURE_REF_PARAMETERS_INIT;
5932  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5933  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5934  hc::short_vector::float2(dy.x, dy.y).get_vector());
5935  TEXTURE_RETURN_UINT_XY;
5936 }
5937 
5938 template <int texType, enum hipTextureReadMode mode>
5939 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2DGrad(texture<uint4, texType, mode> texRef, float x, float y,
5940  float2 dx, float2 dy) {
5941  TEXTURE_REF_PARAMETERS_INIT;
5942  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5943  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5944  hc::short_vector::float2(dy.x, dy.y).get_vector());
5945  TEXTURE_RETURN_UINT_XYZW;
5946 }
5947 
5948 template <int texType, enum hipTextureReadMode mode>
5949 __TEXTURE_FUNCTIONS_DECL__ float tex2DGrad(texture<float, texType, mode> texRef, float x, float y,
5950  float2 dx, float2 dy) {
5951  TEXTURE_REF_PARAMETERS_INIT;
5952  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5953  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5954  hc::short_vector::float2(dy.x, dy.y).get_vector());
5955  TEXTURE_RETURN_FLOAT;
5956 }
5957 
5958 template <int texType, enum hipTextureReadMode mode>
5959 __TEXTURE_FUNCTIONS_DECL__ float1 tex2DGrad(texture<float1, texType, mode> texRef, float x, float y,
5960  float2 dx, float2 dy) {
5961  TEXTURE_REF_PARAMETERS_INIT;
5962  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5963  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5964  hc::short_vector::float2(dy.x, dy.y).get_vector());
5965  TEXTURE_RETURN_FLOAT_X;
5966 }
5967 
5968 template <int texType, enum hipTextureReadMode mode>
5969 __TEXTURE_FUNCTIONS_DECL__ float2 tex2DGrad(texture<float2, texType, mode> texRef, float x, float y,
5970  float2 dx, float2 dy) {
5971  TEXTURE_REF_PARAMETERS_INIT;
5972  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5973  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5974  hc::short_vector::float2(dy.x, dy.y).get_vector());
5975  TEXTURE_RETURN_FLOAT_XY;
5976 }
5977 
5978 template <int texType, enum hipTextureReadMode mode>
5979 __TEXTURE_FUNCTIONS_DECL__ float4 tex2DGrad(texture<float4, texType, mode> texRef, float x, float y,
5980  float2 dx, float2 dy) {
5981  TEXTURE_REF_PARAMETERS_INIT;
5982  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5983  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5984  hc::short_vector::float2(dy.x, dy.y).get_vector());
5985  TEXTURE_RETURN_FLOAT_XYZW;
5986 }
5987 
5989 
5990 template <int texType, enum hipTextureReadMode mode>
5991 __TEXTURE_FUNCTIONS_DECL__ char tex2DGrad(texture<char, texType, mode> texRef,
5992  hipTextureObject_t textureObject, float x, float y,
5993  float2 dx, float2 dy) {
5994  TEXTURE_PARAMETERS_INIT;
5995  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
5996  hc::short_vector::float2(dx.x, dx.y).get_vector(),
5997  hc::short_vector::float2(dy.x, dy.y).get_vector());
5998  TEXTURE_RETURN_CHAR;
5999 }
6000 
6001 template <int texType, enum hipTextureReadMode mode>
6002 __TEXTURE_FUNCTIONS_DECL__ char1 tex2DGrad(texture<char1, texType, mode> texRef,
6003  hipTextureObject_t textureObject, float x, float y,
6004  float2 dx, float2 dy) {
6005  TEXTURE_PARAMETERS_INIT;
6006  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6007  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6008  hc::short_vector::float2(dy.x, dy.y).get_vector());
6009  TEXTURE_RETURN_CHAR_X;
6010 }
6011 
6012 template <int texType, enum hipTextureReadMode mode>
6013 __TEXTURE_FUNCTIONS_DECL__ char2 tex2DGrad(texture<char2, texType, mode> texRef,
6014  hipTextureObject_t textureObject, float x, float y,
6015  float2 dx, float2 dy) {
6016  TEXTURE_PARAMETERS_INIT;
6017  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6018  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6019  hc::short_vector::float2(dy.x, dy.y).get_vector());
6020  TEXTURE_RETURN_CHAR_XY;
6021 }
6022 
6023 template <int texType, enum hipTextureReadMode mode>
6024 __TEXTURE_FUNCTIONS_DECL__ char4 tex2DGrad(texture<char4, texType, mode> texRef,
6025  hipTextureObject_t textureObject, float x, float y,
6026  float2 dx, float2 dy) {
6027  TEXTURE_PARAMETERS_INIT;
6028  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6029  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6030  hc::short_vector::float2(dy.x, dy.y).get_vector());
6031  TEXTURE_RETURN_CHAR_XYZW;
6032 }
6033 
6034 template <int texType, enum hipTextureReadMode mode>
6035 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2DGrad(texture<unsigned char, texType, mode> texRef,
6036  hipTextureObject_t textureObject, float x,
6037  float y, float2 dx, float2 dy) {
6038  TEXTURE_PARAMETERS_INIT;
6039  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6040  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6041  hc::short_vector::float2(dy.x, dy.y).get_vector());
6042  TEXTURE_RETURN_UCHAR;
6043 }
6044 
6045 template <int texType, enum hipTextureReadMode mode>
6046 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2DGrad(texture<uchar1, texType, mode> texRef,
6047  hipTextureObject_t textureObject, float x, float y,
6048  float2 dx, float2 dy) {
6049  TEXTURE_PARAMETERS_INIT;
6050  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6051  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6052  hc::short_vector::float2(dy.x, dy.y).get_vector());
6053  TEXTURE_RETURN_UCHAR_X;
6054 }
6055 
6056 template <int texType, enum hipTextureReadMode mode>
6057 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2DGrad(texture<uchar2, texType, mode> texRef,
6058  hipTextureObject_t textureObject, float x, float y,
6059  float2 dx, float2 dy) {
6060  TEXTURE_PARAMETERS_INIT;
6061  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6062  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6063  hc::short_vector::float2(dy.x, dy.y).get_vector());
6064  TEXTURE_RETURN_UCHAR_XY;
6065 }
6066 
6067 template <int texType, enum hipTextureReadMode mode>
6068 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2DGrad(texture<uchar4, texType, mode> texRef,
6069  hipTextureObject_t textureObject, float x, float y,
6070  float2 dx, float2 dy) {
6071  TEXTURE_PARAMETERS_INIT;
6072  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6073  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6074  hc::short_vector::float2(dy.x, dy.y).get_vector());
6075  TEXTURE_RETURN_UCHAR_XYZW;
6076 }
6077 
6078 template <int texType, enum hipTextureReadMode mode>
6079 __TEXTURE_FUNCTIONS_DECL__ short tex2DGrad(texture<short, texType, mode> texRef,
6080  hipTextureObject_t textureObject, float x, float y,
6081  float2 dx, float2 dy) {
6082  TEXTURE_PARAMETERS_INIT;
6083  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6084  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6085  hc::short_vector::float2(dy.x, dy.y).get_vector());
6086  TEXTURE_RETURN_SHORT;
6087 }
6088 
6089 template <int texType, enum hipTextureReadMode mode>
6090 __TEXTURE_FUNCTIONS_DECL__ short1 tex2DGrad(texture<short1, texType, mode> texRef,
6091  hipTextureObject_t textureObject, float x, float y,
6092  float2 dx, float2 dy) {
6093  TEXTURE_PARAMETERS_INIT;
6094  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6095  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6096  hc::short_vector::float2(dy.x, dy.y).get_vector());
6097  TEXTURE_RETURN_SHORT_X;
6098 }
6099 
6100 template <int texType, enum hipTextureReadMode mode>
6101 __TEXTURE_FUNCTIONS_DECL__ short2 tex2DGrad(texture<short2, texType, mode> texRef,
6102  hipTextureObject_t textureObject, float x, float y,
6103  float2 dx, float2 dy) {
6104  TEXTURE_PARAMETERS_INIT;
6105  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6106  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6107  hc::short_vector::float2(dy.x, dy.y).get_vector());
6108  TEXTURE_RETURN_SHORT_XY;
6109 }
6110 
6111 template <int texType, enum hipTextureReadMode mode>
6112 __TEXTURE_FUNCTIONS_DECL__ short4 tex2DGrad(texture<short4, texType, mode> texRef,
6113  hipTextureObject_t textureObject, float x, float y,
6114  float2 dx, float2 dy) {
6115  TEXTURE_PARAMETERS_INIT;
6116  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6117  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6118  hc::short_vector::float2(dy.x, dy.y).get_vector());
6119  TEXTURE_RETURN_SHORT_XYZW;
6120 }
6121 
6122 template <int texType, enum hipTextureReadMode mode>
6123 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2DGrad(texture<unsigned short, texType, mode> texRef,
6124  hipTextureObject_t textureObject, float x,
6125  float y, float2 dx, float2 dy) {
6126  TEXTURE_PARAMETERS_INIT;
6127  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6128  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6129  hc::short_vector::float2(dy.x, dy.y).get_vector());
6130  TEXTURE_RETURN_USHORT;
6131 }
6132 
6133 template <int texType, enum hipTextureReadMode mode>
6134 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2DGrad(texture<ushort1, texType, mode> texRef,
6135  hipTextureObject_t textureObject, float x, float y,
6136  float2 dx, float2 dy) {
6137  TEXTURE_PARAMETERS_INIT;
6138  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6139  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6140  hc::short_vector::float2(dy.x, dy.y).get_vector());
6141  TEXTURE_RETURN_USHORT_X;
6142 }
6143 
6144 template <int texType, enum hipTextureReadMode mode>
6145 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2DGrad(texture<ushort2, texType, mode> texRef,
6146  hipTextureObject_t textureObject, float x, float y,
6147  float2 dx, float2 dy) {
6148  TEXTURE_PARAMETERS_INIT;
6149  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6150  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6151  hc::short_vector::float2(dy.x, dy.y).get_vector());
6152  TEXTURE_RETURN_USHORT_XY;
6153 }
6154 
6155 template <int texType, enum hipTextureReadMode mode>
6156 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2DGrad(texture<ushort4, texType, mode> texRef,
6157  hipTextureObject_t textureObject, float x, float y,
6158  float2 dx, float2 dy) {
6159  TEXTURE_PARAMETERS_INIT;
6160  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6161  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6162  hc::short_vector::float2(dy.x, dy.y).get_vector());
6163  TEXTURE_RETURN_USHORT_XYZW;
6164 }
6165 
6166 template <int texType, enum hipTextureReadMode mode>
6167 __TEXTURE_FUNCTIONS_DECL__ int tex2DGrad(texture<int, texType, mode> texRef,
6168  hipTextureObject_t textureObject, float x, float y,
6169  float2 dx, float2 dy) {
6170  TEXTURE_PARAMETERS_INIT;
6171  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6172  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6173  hc::short_vector::float2(dy.x, dy.y).get_vector());
6174  TEXTURE_RETURN_INT;
6175 }
6176 
6177 template <int texType, enum hipTextureReadMode mode>
6178 __TEXTURE_FUNCTIONS_DECL__ int1 tex2DGrad(texture<int1, texType, mode> texRef,
6179  hipTextureObject_t textureObject, float x, float y,
6180  float2 dx, float2 dy) {
6181  TEXTURE_PARAMETERS_INIT;
6182  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6183  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6184  hc::short_vector::float2(dy.x, dy.y).get_vector());
6185  TEXTURE_RETURN_INT_X;
6186 }
6187 
6188 template <int texType, enum hipTextureReadMode mode>
6189 __TEXTURE_FUNCTIONS_DECL__ int2 tex2DGrad(texture<int2, texType, mode> texRef,
6190  hipTextureObject_t textureObject, float x, float y,
6191  float2 dx, float2 dy) {
6192  TEXTURE_PARAMETERS_INIT;
6193  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6194  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6195  hc::short_vector::float2(dy.x, dy.y).get_vector());
6196  TEXTURE_RETURN_INT_XY;
6197 }
6198 
6199 template <int texType, enum hipTextureReadMode mode>
6200 __TEXTURE_FUNCTIONS_DECL__ int4 tex2DGrad(texture<int4, texType, mode> texRef,
6201  hipTextureObject_t textureObject, float x, float y,
6202  float2 dx, float2 dy) {
6203  TEXTURE_PARAMETERS_INIT;
6204  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6205  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6206  hc::short_vector::float2(dy.x, dy.y).get_vector());
6207  TEXTURE_RETURN_INT_XYZW;
6208 }
6209 
6210 template <int texType, enum hipTextureReadMode mode>
6211 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2DGrad(texture<unsigned int, texType, mode> texRef,
6212  hipTextureObject_t textureObject, float x,
6213  float y, float2 dx, float2 dy) {
6214  TEXTURE_PARAMETERS_INIT;
6215  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6216  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6217  hc::short_vector::float2(dy.x, dy.y).get_vector());
6218  TEXTURE_RETURN_UINT;
6219 }
6220 
6221 template <int texType, enum hipTextureReadMode mode>
6222 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2DGrad(texture<uint1, texType, mode> texRef,
6223  hipTextureObject_t textureObject, float x, float y,
6224  float2 dx, float2 dy) {
6225  TEXTURE_PARAMETERS_INIT;
6226  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6227  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6228  hc::short_vector::float2(dy.x, dy.y).get_vector());
6229  TEXTURE_RETURN_UINT_X;
6230 }
6231 
6232 template <int texType, enum hipTextureReadMode mode>
6233 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2DGrad(texture<uint2, texType, mode> texRef,
6234  hipTextureObject_t textureObject, float x, float y,
6235  float2 dx, float2 dy) {
6236  TEXTURE_PARAMETERS_INIT;
6237  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6238  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6239  hc::short_vector::float2(dy.x, dy.y).get_vector());
6240  TEXTURE_RETURN_UINT_XY;
6241 }
6242 
6243 template <int texType, enum hipTextureReadMode mode>
6244 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2DGrad(texture<uint4, texType, mode> texRef,
6245  hipTextureObject_t textureObject, float x, float y,
6246  float2 dx, float2 dy) {
6247  TEXTURE_PARAMETERS_INIT;
6248  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6249  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6250  hc::short_vector::float2(dy.x, dy.y).get_vector());
6251  TEXTURE_RETURN_UINT_XYZW;
6252 }
6253 
6254 template <int texType, enum hipTextureReadMode mode>
6255 __TEXTURE_FUNCTIONS_DECL__ float tex2DGrad(texture<float, texType, mode> texRef,
6256  hipTextureObject_t textureObject, float x, float y,
6257  float2 dx, float2 dy) {
6258  TEXTURE_PARAMETERS_INIT;
6259  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6260  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6261  hc::short_vector::float2(dy.x, dy.y).get_vector());
6262  TEXTURE_RETURN_FLOAT;
6263 }
6264 
6265 template <int texType, enum hipTextureReadMode mode>
6266 __TEXTURE_FUNCTIONS_DECL__ float1 tex2DGrad(texture<float1, texType, mode> texRef,
6267  hipTextureObject_t textureObject, float x, float y,
6268  float2 dx, float2 dy) {
6269  TEXTURE_PARAMETERS_INIT;
6270  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6271  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6272  hc::short_vector::float2(dy.x, dy.y).get_vector());
6273  TEXTURE_RETURN_FLOAT_X;
6274 }
6275 
6276 template <int texType, enum hipTextureReadMode mode>
6277 __TEXTURE_FUNCTIONS_DECL__ float2 tex2DGrad(texture<float2, texType, mode> texRef,
6278  hipTextureObject_t textureObject, float x, float y,
6279  float2 dx, float2 dy) {
6280  TEXTURE_PARAMETERS_INIT;
6281  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6282  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6283  hc::short_vector::float2(dy.x, dy.y).get_vector());
6284  TEXTURE_RETURN_FLOAT_XY;
6285 }
6286 
6287 template <int texType, enum hipTextureReadMode mode>
6288 __TEXTURE_FUNCTIONS_DECL__ float4 tex2DGrad(texture<float4, texType, mode> texRef,
6289  hipTextureObject_t textureObject, float x, float y,
6290  float2 dx, float2 dy) {
6291  TEXTURE_PARAMETERS_INIT;
6292  texel.f = __ockl_image_sample_grad_2D(i, s, hc::short_vector::float2(x, y).get_vector(),
6293  hc::short_vector::float2(dx.x, dx.y).get_vector(),
6294  hc::short_vector::float2(dy.x, dy.y).get_vector());
6295  TEXTURE_RETURN_FLOAT_XYZW;
6296 }
6297 
6299 
6300 template <int texType, enum hipTextureReadMode mode>
6301 __TEXTURE_FUNCTIONS_DECL__ char tex3D(texture<char, texType, mode> texRef, float x, float y,
6302  float z) {
6303  TEXTURE_REF_PARAMETERS_INIT;
6304  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6305  TEXTURE_RETURN_CHAR;
6306 }
6307 
6308 template <int texType, enum hipTextureReadMode mode>
6309 __TEXTURE_FUNCTIONS_DECL__ char1 tex3D(texture<char1, texType, mode> texRef, float x, float y,
6310  float z) {
6311  TEXTURE_REF_PARAMETERS_INIT;
6312  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6313  TEXTURE_RETURN_CHAR_X;
6314 }
6315 
6316 template <int texType, enum hipTextureReadMode mode>
6317 __TEXTURE_FUNCTIONS_DECL__ char2 tex3D(texture<char2, texType, mode> texRef, float x, float y,
6318  float z) {
6319  TEXTURE_REF_PARAMETERS_INIT;
6320  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6321  TEXTURE_RETURN_CHAR_XY;
6322 }
6323 
6324 template <int texType, enum hipTextureReadMode mode>
6325 __TEXTURE_FUNCTIONS_DECL__ char4 tex3D(texture<char4, texType, mode> texRef, float x, float y,
6326  float z) {
6327  TEXTURE_REF_PARAMETERS_INIT;
6328  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6329  TEXTURE_RETURN_CHAR_XYZW;
6330 }
6331 
6332 template <int texType, enum hipTextureReadMode mode>
6333 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex3D(texture<unsigned char, texType, mode> texRef,
6334  float x, float y, float z) {
6335  TEXTURE_REF_PARAMETERS_INIT;
6336  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6337  TEXTURE_RETURN_UCHAR;
6338 }
6339 
6340 template <int texType, enum hipTextureReadMode mode>
6341 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex3D(texture<uchar1, texType, mode> texRef, float x, float y,
6342  float z) {
6343  TEXTURE_REF_PARAMETERS_INIT;
6344  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6345  TEXTURE_RETURN_UCHAR_X;
6346 }
6347 
6348 template <int texType, enum hipTextureReadMode mode>
6349 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex3D(texture<uchar2, texType, mode> texRef, float x, float y,
6350  float z) {
6351  TEXTURE_REF_PARAMETERS_INIT;
6352  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6353  TEXTURE_RETURN_UCHAR_XY;
6354 }
6355 
6356 template <int texType, enum hipTextureReadMode mode>
6357 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex3D(texture<uchar4, texType, mode> texRef, float x, float y,
6358  float z) {
6359  TEXTURE_REF_PARAMETERS_INIT;
6360  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6361  TEXTURE_RETURN_UCHAR_XYZW;
6362 }
6363 
6364 template <int texType, enum hipTextureReadMode mode>
6365 __TEXTURE_FUNCTIONS_DECL__ short tex3D(texture<short, texType, mode> texRef, float x, float y,
6366  float z) {
6367  TEXTURE_REF_PARAMETERS_INIT;
6368  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6369  TEXTURE_RETURN_SHORT;
6370 }
6371 
6372 template <int texType, enum hipTextureReadMode mode>
6373 __TEXTURE_FUNCTIONS_DECL__ short1 tex3D(texture<short1, texType, mode> texRef, float x, float y,
6374  float z) {
6375  TEXTURE_REF_PARAMETERS_INIT;
6376  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6377  TEXTURE_RETURN_SHORT_X;
6378 }
6379 
6380 template <int texType, enum hipTextureReadMode mode>
6381 __TEXTURE_FUNCTIONS_DECL__ short2 tex3D(texture<short2, texType, mode> texRef, float x, float y,
6382  float z) {
6383  TEXTURE_REF_PARAMETERS_INIT;
6384  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6385  TEXTURE_RETURN_SHORT_XY;
6386 }
6387 
6388 template <int texType, enum hipTextureReadMode mode>
6389 __TEXTURE_FUNCTIONS_DECL__ short4 tex3D(texture<short4, texType, mode> texRef, float x, float y,
6390  float z) {
6391  TEXTURE_REF_PARAMETERS_INIT;
6392  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6393  TEXTURE_RETURN_SHORT_XYZW;
6394 }
6395 
6396 template <int texType, enum hipTextureReadMode mode>
6397 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex3D(texture<unsigned short, texType, mode> texRef,
6398  float x, float y, float z) {
6399  TEXTURE_REF_PARAMETERS_INIT;
6400  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6401  TEXTURE_RETURN_USHORT;
6402 }
6403 
6404 template <int texType, enum hipTextureReadMode mode>
6405 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex3D(texture<ushort1, texType, mode> texRef, float x, float y,
6406  float z) {
6407  TEXTURE_REF_PARAMETERS_INIT;
6408  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6409  TEXTURE_RETURN_USHORT_X;
6410 }
6411 
6412 template <int texType, enum hipTextureReadMode mode>
6413 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex3D(texture<ushort2, texType, mode> texRef, float x, float y,
6414  float z) {
6415  TEXTURE_REF_PARAMETERS_INIT;
6416  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6417  TEXTURE_RETURN_USHORT_XY;
6418 }
6419 
6420 template <int texType, enum hipTextureReadMode mode>
6421 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex3D(texture<ushort4, texType, mode> texRef, float x, float y,
6422  float z) {
6423  TEXTURE_REF_PARAMETERS_INIT;
6424  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6425  TEXTURE_RETURN_USHORT_XYZW;
6426 }
6427 
6428 template <int texType, enum hipTextureReadMode mode>
6429 __TEXTURE_FUNCTIONS_DECL__ int tex3D(texture<int, texType, mode> texRef, float x, float y,
6430  float z) {
6431  TEXTURE_REF_PARAMETERS_INIT;
6432  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6433  TEXTURE_RETURN_INT;
6434 }
6435 
6436 template <int texType, enum hipTextureReadMode mode>
6437 __TEXTURE_FUNCTIONS_DECL__ int1 tex3D(texture<int1, texType, mode> texRef, float x, float y,
6438  float z) {
6439  TEXTURE_REF_PARAMETERS_INIT;
6440  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6441  TEXTURE_RETURN_INT_X;
6442 }
6443 
6444 template <int texType, enum hipTextureReadMode mode>
6445 __TEXTURE_FUNCTIONS_DECL__ int2 tex3D(texture<int2, texType, mode> texRef, float x, float y,
6446  float z) {
6447  TEXTURE_REF_PARAMETERS_INIT;
6448  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6449  TEXTURE_RETURN_INT_XY;
6450 }
6451 
6452 template <int texType, enum hipTextureReadMode mode>
6453 __TEXTURE_FUNCTIONS_DECL__ int4 tex3D(texture<int4, texType, mode> texRef, float x, float y,
6454  float z) {
6455  TEXTURE_REF_PARAMETERS_INIT;
6456  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6457  TEXTURE_RETURN_INT_XYZW;
6458 }
6459 
6460 template <int texType, enum hipTextureReadMode mode>
6461 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex3D(texture<unsigned int, texType, mode> texRef, float x,
6462  float y, float z) {
6463  TEXTURE_REF_PARAMETERS_INIT;
6464  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6465  TEXTURE_RETURN_UINT;
6466 }
6467 
6468 template <int texType, enum hipTextureReadMode mode>
6469 __TEXTURE_FUNCTIONS_DECL__ uint1 tex3D(texture<uint1, texType, mode> texRef, float x, float y,
6470  float z) {
6471  TEXTURE_REF_PARAMETERS_INIT;
6472  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6473  TEXTURE_RETURN_UINT_X;
6474 }
6475 
6476 template <int texType, enum hipTextureReadMode mode>
6477 __TEXTURE_FUNCTIONS_DECL__ uint2 tex3D(texture<uint2, texType, mode> texRef, float x, float y,
6478  float z) {
6479  TEXTURE_REF_PARAMETERS_INIT;
6480  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6481  TEXTURE_RETURN_UINT_XY;
6482 }
6483 
6484 template <int texType, enum hipTextureReadMode mode>
6485 __TEXTURE_FUNCTIONS_DECL__ uint4 tex3D(texture<uint4, texType, mode> texRef, float x, float y,
6486  float z) {
6487  TEXTURE_REF_PARAMETERS_INIT;
6488  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6489  TEXTURE_RETURN_UINT_XYZW;
6490 }
6491 
6492 template <int texType, enum hipTextureReadMode mode>
6493 __TEXTURE_FUNCTIONS_DECL__ float tex3D(texture<float, texType, mode> texRef, float x, float y,
6494  float z) {
6495  TEXTURE_REF_PARAMETERS_INIT;
6496  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6497  TEXTURE_RETURN_FLOAT;
6498 }
6499 
6500 template <int texType, enum hipTextureReadMode mode>
6501 __TEXTURE_FUNCTIONS_DECL__ float1 tex3D(texture<float1, texType, mode> texRef, float x, float y,
6502  float z) {
6503  TEXTURE_REF_PARAMETERS_INIT;
6504  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6505  TEXTURE_RETURN_FLOAT_X;
6506 }
6507 
6508 template <int texType, enum hipTextureReadMode mode>
6509 __TEXTURE_FUNCTIONS_DECL__ float2 tex3D(texture<float2, texType, mode> texRef, float x, float y,
6510  float z) {
6511  TEXTURE_REF_PARAMETERS_INIT;
6512  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6513  TEXTURE_RETURN_FLOAT_XY;
6514 }
6515 
6516 template <int texType, enum hipTextureReadMode mode>
6517 __TEXTURE_FUNCTIONS_DECL__ float4 tex3D(texture<float4, texType, mode> texRef, float x, float y,
6518  float z) {
6519  TEXTURE_REF_PARAMETERS_INIT;
6520  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6521  TEXTURE_RETURN_FLOAT_XYZW;
6522 }
6523 
6525 
6526 template <int texType, enum hipTextureReadMode mode>
6527 __TEXTURE_FUNCTIONS_DECL__ char tex3D(texture<char, texType, mode> texRef,
6528  hipTextureObject_t textureObject, float x, float y, float z) {
6529  TEXTURE_PARAMETERS_INIT;
6530  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6531  TEXTURE_RETURN_CHAR;
6532 }
6533 
6534 template <int texType, enum hipTextureReadMode mode>
6535 __TEXTURE_FUNCTIONS_DECL__ char1 tex3D(texture<char1, texType, mode> texRef,
6536  hipTextureObject_t textureObject, float x, float y,
6537  float z) {
6538  TEXTURE_PARAMETERS_INIT;
6539  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6540  TEXTURE_RETURN_CHAR_X;
6541 }
6542 
6543 template <int texType, enum hipTextureReadMode mode>
6544 __TEXTURE_FUNCTIONS_DECL__ char2 tex3D(texture<char2, texType, mode> texRef,
6545  hipTextureObject_t textureObject, float x, float y,
6546  float z) {
6547  TEXTURE_PARAMETERS_INIT;
6548  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6549  TEXTURE_RETURN_CHAR_XY;
6550 }
6551 
6552 template <int texType, enum hipTextureReadMode mode>
6553 __TEXTURE_FUNCTIONS_DECL__ char4 tex3D(texture<char4, texType, mode> texRef,
6554  hipTextureObject_t textureObject, float x, float y,
6555  float z) {
6556  TEXTURE_PARAMETERS_INIT;
6557  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6558  TEXTURE_RETURN_CHAR_XYZW;
6559 }
6560 
6561 template <int texType, enum hipTextureReadMode mode>
6562 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex3D(texture<unsigned char, texType, mode> texRef,
6563  hipTextureObject_t textureObject, float x, float y,
6564  float z) {
6565  TEXTURE_PARAMETERS_INIT;
6566  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6567  TEXTURE_RETURN_UCHAR;
6568 }
6569 
6570 template <int texType, enum hipTextureReadMode mode>
6571 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex3D(texture<uchar1, texType, mode> texRef,
6572  hipTextureObject_t textureObject, float x, float y,
6573  float z) {
6574  TEXTURE_PARAMETERS_INIT;
6575  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6576  TEXTURE_RETURN_UCHAR_X;
6577 }
6578 
6579 template <int texType, enum hipTextureReadMode mode>
6580 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex3D(texture<uchar2, texType, mode> texRef,
6581  hipTextureObject_t textureObject, float x, float y,
6582  float z) {
6583  TEXTURE_PARAMETERS_INIT;
6584  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6585  TEXTURE_RETURN_UCHAR_XY;
6586 }
6587 
6588 template <int texType, enum hipTextureReadMode mode>
6589 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex3D(texture<uchar4, texType, mode> texRef,
6590  hipTextureObject_t textureObject, float x, float y,
6591  float z) {
6592  TEXTURE_PARAMETERS_INIT;
6593  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6594  TEXTURE_RETURN_UCHAR_XYZW;
6595 }
6596 
6597 template <int texType, enum hipTextureReadMode mode>
6598 __TEXTURE_FUNCTIONS_DECL__ short tex3D(texture<short, texType, mode> texRef,
6599  hipTextureObject_t textureObject, float x, float y,
6600  float z) {
6601  TEXTURE_PARAMETERS_INIT;
6602  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6603  TEXTURE_RETURN_SHORT;
6604 }
6605 
6606 template <int texType, enum hipTextureReadMode mode>
6607 __TEXTURE_FUNCTIONS_DECL__ short1 tex3D(texture<short1, texType, mode> texRef,
6608  hipTextureObject_t textureObject, float x, float y,
6609  float z) {
6610  TEXTURE_PARAMETERS_INIT;
6611  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6612  TEXTURE_RETURN_SHORT_X;
6613 }
6614 
6615 template <int texType, enum hipTextureReadMode mode>
6616 __TEXTURE_FUNCTIONS_DECL__ short2 tex3D(texture<short2, texType, mode> texRef,
6617  hipTextureObject_t textureObject, float x, float y,
6618  float z) {
6619  TEXTURE_PARAMETERS_INIT;
6620  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6621  TEXTURE_RETURN_SHORT_XY;
6622 }
6623 
6624 template <int texType, enum hipTextureReadMode mode>
6625 __TEXTURE_FUNCTIONS_DECL__ short4 tex3D(texture<short4, texType, mode> texRef,
6626  hipTextureObject_t textureObject, float x, float y,
6627  float z) {
6628  TEXTURE_PARAMETERS_INIT;
6629  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6630  TEXTURE_RETURN_SHORT_XYZW;
6631 }
6632 
6633 template <int texType, enum hipTextureReadMode mode>
6634 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex3D(texture<unsigned short, texType, mode> texRef,
6635  hipTextureObject_t textureObject, float x, float y,
6636  float z) {
6637  TEXTURE_PARAMETERS_INIT;
6638  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6639  TEXTURE_RETURN_USHORT;
6640 }
6641 
6642 template <int texType, enum hipTextureReadMode mode>
6643 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex3D(texture<ushort1, texType, mode> texRef,
6644  hipTextureObject_t textureObject, float x, float y,
6645  float z) {
6646  TEXTURE_PARAMETERS_INIT;
6647  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6648  TEXTURE_RETURN_USHORT_X;
6649 }
6650 
6651 template <int texType, enum hipTextureReadMode mode>
6652 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex3D(texture<ushort2, texType, mode> texRef,
6653  hipTextureObject_t textureObject, float x, float y,
6654  float z) {
6655  TEXTURE_PARAMETERS_INIT;
6656  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6657  TEXTURE_RETURN_USHORT_XY;
6658 }
6659 
6660 template <int texType, enum hipTextureReadMode mode>
6661 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex3D(texture<ushort4, texType, mode> texRef,
6662  hipTextureObject_t textureObject, float x, float y,
6663  float z) {
6664  TEXTURE_PARAMETERS_INIT;
6665  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6666  TEXTURE_RETURN_USHORT_XYZW;
6667 }
6668 
6669 template <int texType, enum hipTextureReadMode mode>
6670 __TEXTURE_FUNCTIONS_DECL__ int tex3D(texture<int, texType, mode> texRef,
6671  hipTextureObject_t textureObject, float x, float y, float z) {
6672  TEXTURE_PARAMETERS_INIT;
6673  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6674  TEXTURE_RETURN_INT;
6675 }
6676 
6677 template <int texType, enum hipTextureReadMode mode>
6678 __TEXTURE_FUNCTIONS_DECL__ int1 tex3D(texture<int1, texType, mode> texRef,
6679  hipTextureObject_t textureObject, float x, float y, float z) {
6680  TEXTURE_PARAMETERS_INIT;
6681  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6682  TEXTURE_RETURN_INT_X;
6683 }
6684 
6685 template <int texType, enum hipTextureReadMode mode>
6686 __TEXTURE_FUNCTIONS_DECL__ int2 tex3D(texture<int2, texType, mode> texRef,
6687  hipTextureObject_t textureObject, float x, float y, float z) {
6688  TEXTURE_PARAMETERS_INIT;
6689  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6690  TEXTURE_RETURN_INT_XY;
6691 }
6692 
6693 template <int texType, enum hipTextureReadMode mode>
6694 __TEXTURE_FUNCTIONS_DECL__ int4 tex3D(texture<int4, texType, mode> texRef,
6695  hipTextureObject_t textureObject, float x, float y, float z) {
6696  TEXTURE_PARAMETERS_INIT;
6697  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6698  TEXTURE_RETURN_INT_XYZW;
6699 }
6700 
6701 template <int texType, enum hipTextureReadMode mode>
6702 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex3D(texture<unsigned int, texType, mode> texRef,
6703  hipTextureObject_t textureObject, float x, float y,
6704  float z) {
6705  TEXTURE_PARAMETERS_INIT;
6706  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6707  TEXTURE_RETURN_UINT;
6708 }
6709 
6710 template <int texType, enum hipTextureReadMode mode>
6711 __TEXTURE_FUNCTIONS_DECL__ uint1 tex3D(texture<uint1, texType, mode> texRef,
6712  hipTextureObject_t textureObject, float x, float y,
6713  float z) {
6714  TEXTURE_PARAMETERS_INIT;
6715  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6716  TEXTURE_RETURN_UINT_X;
6717 }
6718 
6719 template <int texType, enum hipTextureReadMode mode>
6720 __TEXTURE_FUNCTIONS_DECL__ uint2 tex3D(texture<uint2, texType, mode> texRef,
6721  hipTextureObject_t textureObject, float x, float y,
6722  float z) {
6723  TEXTURE_PARAMETERS_INIT;
6724  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6725  TEXTURE_RETURN_UINT_XY;
6726 }
6727 
6728 template <int texType, enum hipTextureReadMode mode>
6729 __TEXTURE_FUNCTIONS_DECL__ uint4 tex3D(texture<uint4, texType, mode> texRef,
6730  hipTextureObject_t textureObject, float x, float y,
6731  float z) {
6732  TEXTURE_PARAMETERS_INIT;
6733  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6734  TEXTURE_RETURN_UINT_XYZW;
6735 }
6736 
6737 template <int texType, enum hipTextureReadMode mode>
6738 __TEXTURE_FUNCTIONS_DECL__ float tex3D(texture<float, texType, mode> texRef,
6739  hipTextureObject_t textureObject, float x, float y,
6740  float z) {
6741  TEXTURE_PARAMETERS_INIT;
6742  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6743  TEXTURE_RETURN_FLOAT;
6744 }
6745 
6746 template <int texType, enum hipTextureReadMode mode>
6747 __TEXTURE_FUNCTIONS_DECL__ float1 tex3D(texture<float1, texType, mode> texRef,
6748  hipTextureObject_t textureObject, float x, float y,
6749  float z) {
6750  TEXTURE_PARAMETERS_INIT;
6751  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6752  TEXTURE_RETURN_FLOAT_X;
6753 }
6754 
6755 template <int texType, enum hipTextureReadMode mode>
6756 __TEXTURE_FUNCTIONS_DECL__ float2 tex3D(texture<float2, texType, mode> texRef,
6757  hipTextureObject_t textureObject, float x, float y,
6758  float z) {
6759  TEXTURE_PARAMETERS_INIT;
6760  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6761  TEXTURE_RETURN_FLOAT_XY;
6762 }
6763 
6764 template <int texType, enum hipTextureReadMode mode>
6765 __TEXTURE_FUNCTIONS_DECL__ float4 tex3D(texture<float4, texType, mode> texRef,
6766  hipTextureObject_t textureObject, float x, float y,
6767  float z) {
6768  TEXTURE_PARAMETERS_INIT;
6769  texel.f = __ockl_image_sample_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector());
6770  TEXTURE_RETURN_FLOAT_XYZW;
6771 }
6772 
6774 
6775 template <int texType, enum hipTextureReadMode mode>
6776 __TEXTURE_FUNCTIONS_DECL__ char tex3DLod(texture<char, texType, mode> texRef, float x, float y,
6777  float z, float level) {
6778  TEXTURE_REF_PARAMETERS_INIT;
6779  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6780  level);
6781  TEXTURE_RETURN_CHAR;
6782 }
6783 
6784 template <int texType, enum hipTextureReadMode mode>
6785 __TEXTURE_FUNCTIONS_DECL__ char1 tex3DLod(texture<char1, texType, mode> texRef, float x, float y,
6786  float z, float level) {
6787  TEXTURE_REF_PARAMETERS_INIT;
6788  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6789  level);
6790  TEXTURE_RETURN_CHAR_X;
6791 }
6792 
6793 template <int texType, enum hipTextureReadMode mode>
6794 __TEXTURE_FUNCTIONS_DECL__ char2 tex3DLod(texture<char2, texType, mode> texRef, float x, float y,
6795  float z, float level) {
6796  TEXTURE_REF_PARAMETERS_INIT;
6797  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6798  level);
6799  TEXTURE_RETURN_CHAR_XY;
6800 }
6801 
6802 template <int texType, enum hipTextureReadMode mode>
6803 __TEXTURE_FUNCTIONS_DECL__ char4 tex3DLod(texture<char4, texType, mode> texRef, float x, float y,
6804  float z, float level) {
6805  TEXTURE_REF_PARAMETERS_INIT;
6806  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6807  level);
6808  TEXTURE_RETURN_CHAR_XYZW;
6809 }
6810 
6811 template <int texType, enum hipTextureReadMode mode>
6812 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex3DLod(texture<unsigned char, texType, mode> texRef,
6813  float x, float y, float z, float level) {
6814  TEXTURE_REF_PARAMETERS_INIT;
6815  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6816  level);
6817  TEXTURE_RETURN_UCHAR;
6818 }
6819 
6820 template <int texType, enum hipTextureReadMode mode>
6821 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex3DLod(texture<uchar1, texType, mode> texRef, float x, float y,
6822  float z, float level) {
6823  TEXTURE_REF_PARAMETERS_INIT;
6824  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6825  level);
6826  TEXTURE_RETURN_UCHAR_X;
6827 }
6828 
6829 template <int texType, enum hipTextureReadMode mode>
6830 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex3DLod(texture<uchar2, texType, mode> texRef, float x, float y,
6831  float z, float level) {
6832  TEXTURE_REF_PARAMETERS_INIT;
6833  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6834  level);
6835  TEXTURE_RETURN_UCHAR_XY;
6836 }
6837 
6838 template <int texType, enum hipTextureReadMode mode>
6839 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex3DLod(texture<uchar4, texType, mode> texRef, float x, float y,
6840  float z, float level) {
6841  TEXTURE_REF_PARAMETERS_INIT;
6842  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6843  level);
6844  TEXTURE_RETURN_UCHAR_XYZW;
6845 }
6846 
6847 template <int texType, enum hipTextureReadMode mode>
6848 __TEXTURE_FUNCTIONS_DECL__ int tex3DLod(texture<int, texType, mode> texRef, float x, float y,
6849  float z, float level) {
6850  TEXTURE_REF_PARAMETERS_INIT;
6851  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6852  level);
6853  TEXTURE_RETURN_INT;
6854 }
6855 
6856 template <int texType, enum hipTextureReadMode mode>
6857 __TEXTURE_FUNCTIONS_DECL__ int1 tex3DLod(texture<int1, texType, mode> texRef, float x, float y,
6858  float z, float level) {
6859  TEXTURE_REF_PARAMETERS_INIT;
6860  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6861  level);
6862  TEXTURE_RETURN_INT_X;
6863 }
6864 
6865 template <int texType, enum hipTextureReadMode mode>
6866 __TEXTURE_FUNCTIONS_DECL__ int2 tex3DLod(texture<int2, texType, mode> texRef, float x, float y,
6867  float z, float level) {
6868  TEXTURE_REF_PARAMETERS_INIT;
6869  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6870  level);
6871  TEXTURE_RETURN_INT_XY;
6872 }
6873 
6874 template <int texType, enum hipTextureReadMode mode>
6875 __TEXTURE_FUNCTIONS_DECL__ int4 tex3DLod(texture<int4, texType, mode> texRef, float x, float y,
6876  float z, float level) {
6877  TEXTURE_REF_PARAMETERS_INIT;
6878  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6879  level);
6880  TEXTURE_RETURN_INT_XYZW;
6881 }
6882 
6883 template <int texType, enum hipTextureReadMode mode>
6884 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex3DLod(texture<unsigned int, texType, mode> texRef,
6885  float x, float y, float z, float level) {
6886  TEXTURE_REF_PARAMETERS_INIT;
6887  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6888  level);
6889  TEXTURE_RETURN_UINT;
6890 }
6891 
6892 template <int texType, enum hipTextureReadMode mode>
6893 __TEXTURE_FUNCTIONS_DECL__ uint1 tex3DLod(texture<uint1, texType, mode> texRef, float x, float y,
6894  float z, float level) {
6895  TEXTURE_REF_PARAMETERS_INIT;
6896  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6897  level);
6898  TEXTURE_RETURN_UINT_X;
6899 }
6900 
6901 template <int texType, enum hipTextureReadMode mode>
6902 __TEXTURE_FUNCTIONS_DECL__ uint2 tex3DLod(texture<uint2, texType, mode> texRef, float x, float y,
6903  float z, float level) {
6904  TEXTURE_REF_PARAMETERS_INIT;
6905  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6906  level);
6907  TEXTURE_RETURN_UINT_XY;
6908 }
6909 
6910 template <int texType, enum hipTextureReadMode mode>
6911 __TEXTURE_FUNCTIONS_DECL__ uint4 tex3DLod(texture<uint4, texType, mode> texRef, float x, float y,
6912  float z, float level) {
6913  TEXTURE_REF_PARAMETERS_INIT;
6914  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6915  level);
6916  TEXTURE_RETURN_UINT_XYZW;
6917 }
6918 
6919 template <int texType, enum hipTextureReadMode mode>
6920 __TEXTURE_FUNCTIONS_DECL__ float tex3DLod(texture<float, texType, mode> texRef, float x, float y,
6921  float z, float level) {
6922  TEXTURE_REF_PARAMETERS_INIT;
6923  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6924  level);
6925  TEXTURE_RETURN_FLOAT;
6926 }
6927 
6928 template <int texType, enum hipTextureReadMode mode>
6929 __TEXTURE_FUNCTIONS_DECL__ float1 tex3DLod(texture<float1, texType, mode> texRef, float x, float y,
6930  float z, float level) {
6931  TEXTURE_REF_PARAMETERS_INIT;
6932  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6933  level);
6934  TEXTURE_RETURN_FLOAT_X;
6935 }
6936 
6937 template <int texType, enum hipTextureReadMode mode>
6938 __TEXTURE_FUNCTIONS_DECL__ float2 tex3DLod(texture<float2, texType, mode> texRef, float x, float y,
6939  float z, float level) {
6940  TEXTURE_REF_PARAMETERS_INIT;
6941  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6942  level);
6943  TEXTURE_RETURN_FLOAT_XY;
6944 }
6945 
6946 template <int texType, enum hipTextureReadMode mode>
6947 __TEXTURE_FUNCTIONS_DECL__ float4 tex3DLod(texture<float4, texType, mode> texRef, float x, float y,
6948  float z, float level) {
6949  TEXTURE_REF_PARAMETERS_INIT;
6950  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6951  level);
6952  TEXTURE_RETURN_FLOAT_XYZW;
6953 }
6954 
6956 
6957 template <int texType, enum hipTextureReadMode mode>
6958 __TEXTURE_FUNCTIONS_DECL__ char tex3DLod(texture<char, texType, mode> texRef,
6959  hipTextureObject_t textureObject, float x, float y,
6960  float z, float level) {
6961  TEXTURE_PARAMETERS_INIT;
6962  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6963  level);
6964  TEXTURE_RETURN_CHAR;
6965 }
6966 
6967 template <int texType, enum hipTextureReadMode mode>
6968 __TEXTURE_FUNCTIONS_DECL__ char1 tex3DLod(texture<char1, texType, mode> texRef,
6969  hipTextureObject_t textureObject, float x, float y,
6970  float z, float level) {
6971  TEXTURE_PARAMETERS_INIT;
6972  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6973  level);
6974  TEXTURE_RETURN_CHAR_X;
6975 }
6976 
6977 template <int texType, enum hipTextureReadMode mode>
6978 __TEXTURE_FUNCTIONS_DECL__ char2 tex3DLod(texture<char2, texType, mode> texRef,
6979  hipTextureObject_t textureObject, float x, float y,
6980  float z, float level) {
6981  TEXTURE_PARAMETERS_INIT;
6982  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6983  level);
6984  TEXTURE_RETURN_CHAR_XY;
6985 }
6986 
6987 template <int texType, enum hipTextureReadMode mode>
6988 __TEXTURE_FUNCTIONS_DECL__ char4 tex3DLod(texture<char4, texType, mode> texRef,
6989  hipTextureObject_t textureObject, float x, float y,
6990  float z, float level) {
6991  TEXTURE_PARAMETERS_INIT;
6992  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
6993  level);
6994  TEXTURE_RETURN_CHAR_XYZW;
6995 }
6996 
6997 template <int texType, enum hipTextureReadMode mode>
6998 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex3DLod(texture<unsigned char, texType, mode> texRef,
6999  hipTextureObject_t textureObject, float x,
7000  float y, float z, float level) {
7001  TEXTURE_PARAMETERS_INIT;
7002  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7003  level);
7004  TEXTURE_RETURN_UCHAR;
7005 }
7006 
7007 template <int texType, enum hipTextureReadMode mode>
7008 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex3DLod(texture<uchar1, texType, mode> texRef,
7009  hipTextureObject_t textureObject, float x, float y,
7010  float z, float level) {
7011  TEXTURE_PARAMETERS_INIT;
7012  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7013  level);
7014  TEXTURE_RETURN_UCHAR_X;
7015 }
7016 
7017 template <int texType, enum hipTextureReadMode mode>
7018 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex3DLod(texture<uchar2, texType, mode> texRef,
7019  hipTextureObject_t textureObject, float x, float y,
7020  float z, float level) {
7021  TEXTURE_PARAMETERS_INIT;
7022  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7023  level);
7024  TEXTURE_RETURN_UCHAR_XY;
7025 }
7026 
7027 template <int texType, enum hipTextureReadMode mode>
7028 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex3DLod(texture<uchar4, texType, mode> texRef,
7029  hipTextureObject_t textureObject, float x, float y,
7030  float z, float level) {
7031  TEXTURE_PARAMETERS_INIT;
7032  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7033  level);
7034  TEXTURE_RETURN_UCHAR_XYZW;
7035 }
7036 
7037 template <int texType, enum hipTextureReadMode mode>
7038 __TEXTURE_FUNCTIONS_DECL__ int tex3DLod(texture<int, texType, mode> texRef,
7039  hipTextureObject_t textureObject, float x, float y, float z,
7040  float level) {
7041  TEXTURE_PARAMETERS_INIT;
7042  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7043  level);
7044  TEXTURE_RETURN_INT;
7045 }
7046 
7047 template <int texType, enum hipTextureReadMode mode>
7048 __TEXTURE_FUNCTIONS_DECL__ int1 tex3DLod(texture<int1, texType, mode> texRef,
7049  hipTextureObject_t textureObject, float x, float y,
7050  float z, float level) {
7051  TEXTURE_PARAMETERS_INIT;
7052  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7053  level);
7054  TEXTURE_RETURN_INT_X;
7055 }
7056 
7057 template <int texType, enum hipTextureReadMode mode>
7058 __TEXTURE_FUNCTIONS_DECL__ int2 tex3DLod(texture<int2, texType, mode> texRef,
7059  hipTextureObject_t textureObject, float x, float y,
7060  float z, float level) {
7061  TEXTURE_PARAMETERS_INIT;
7062  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7063  level);
7064  TEXTURE_RETURN_INT_XY;
7065 }
7066 
7067 template <int texType, enum hipTextureReadMode mode>
7068 __TEXTURE_FUNCTIONS_DECL__ int4 tex3DLod(texture<int4, texType, mode> texRef,
7069  hipTextureObject_t textureObject, float x, float y,
7070  float z, float level) {
7071  TEXTURE_PARAMETERS_INIT;
7072  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7073  level);
7074  TEXTURE_RETURN_INT_XYZW;
7075 }
7076 
7077 template <int texType, enum hipTextureReadMode mode>
7078 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex3DLod(texture<unsigned int, texType, mode> texRef,
7079  hipTextureObject_t textureObject, float x, float y,
7080  float z, float level) {
7081  TEXTURE_PARAMETERS_INIT;
7082  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7083  level);
7084  TEXTURE_RETURN_UINT;
7085 }
7086 
7087 template <int texType, enum hipTextureReadMode mode>
7088 __TEXTURE_FUNCTIONS_DECL__ uint1 tex3DLod(texture<uint1, texType, mode> texRef,
7089  hipTextureObject_t textureObject, float x, float y,
7090  float z, float level) {
7091  TEXTURE_PARAMETERS_INIT;
7092  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7093  level);
7094  TEXTURE_RETURN_UINT_X;
7095 }
7096 
7097 template <int texType, enum hipTextureReadMode mode>
7098 __TEXTURE_FUNCTIONS_DECL__ uint2 tex3DLod(texture<uint2, texType, mode> texRef,
7099  hipTextureObject_t textureObject, float x, float y,
7100  float z, float level) {
7101  TEXTURE_PARAMETERS_INIT;
7102  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7103  level);
7104  TEXTURE_RETURN_UINT_XY;
7105 }
7106 
7107 template <int texType, enum hipTextureReadMode mode>
7108 __TEXTURE_FUNCTIONS_DECL__ uint4 tex3DLod(texture<uint4, texType, mode> texRef,
7109  hipTextureObject_t textureObject, float x, float y,
7110  float z, float level) {
7111  TEXTURE_PARAMETERS_INIT;
7112  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7113  level);
7114  TEXTURE_RETURN_UINT_XYZW;
7115 }
7116 
7117 template <int texType, enum hipTextureReadMode mode>
7118 __TEXTURE_FUNCTIONS_DECL__ float tex3DLod(texture<float, texType, mode> texRef,
7119  hipTextureObject_t textureObject, float x, float y,
7120  float z, float level) {
7121  TEXTURE_PARAMETERS_INIT;
7122  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7123  level);
7124  TEXTURE_RETURN_FLOAT;
7125 }
7126 
7127 template <int texType, enum hipTextureReadMode mode>
7128 __TEXTURE_FUNCTIONS_DECL__ float1 tex3DLod(texture<float1, texType, mode> texRef,
7129  hipTextureObject_t textureObject, float x, float y,
7130  float z, float level) {
7131  TEXTURE_PARAMETERS_INIT;
7132  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7133  level);
7134  TEXTURE_RETURN_FLOAT_X;
7135 }
7136 
7137 template <int texType, enum hipTextureReadMode mode>
7138 __TEXTURE_FUNCTIONS_DECL__ float2 tex3DLod(texture<float2, texType, mode> texRef,
7139  hipTextureObject_t textureObject, float x, float y,
7140  float z, float level) {
7141  TEXTURE_PARAMETERS_INIT;
7142  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7143  level);
7144  TEXTURE_RETURN_FLOAT_XY;
7145 }
7146 
7147 template <int texType, enum hipTextureReadMode mode>
7148 __TEXTURE_FUNCTIONS_DECL__ float4 tex3DLod(texture<float4, texType, mode> texRef,
7149  hipTextureObject_t textureObject, float x, float y,
7150  float z, float level) {
7151  TEXTURE_PARAMETERS_INIT;
7152  texel.f = __ockl_image_sample_lod_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7153  level);
7154  TEXTURE_RETURN_FLOAT_XYZW;
7155 }
7156 
7158 
7159 template <int texType, enum hipTextureReadMode mode>
7160 __TEXTURE_FUNCTIONS_DECL__ char tex3DGrad(texture<char, texType, mode> texRef, float x, float y,
7161  float z, float4 dx, float4 dy) {
7162  TEXTURE_REF_PARAMETERS_INIT;
7163  texel.f =
7164  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7165  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7166  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7167  TEXTURE_RETURN_CHAR;
7168 }
7169 
7170 template <int texType, enum hipTextureReadMode mode>
7171 __TEXTURE_FUNCTIONS_DECL__ char1 tex3DGrad(texture<char1, texType, mode> texRef, float x, float y,
7172  float z, float4 dx, float4 dy) {
7173  TEXTURE_REF_PARAMETERS_INIT;
7174  texel.f =
7175  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7176  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7177  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7178  TEXTURE_RETURN_CHAR_X;
7179 }
7180 
7181 template <int texType, enum hipTextureReadMode mode>
7182 __TEXTURE_FUNCTIONS_DECL__ char2 tex3DGrad(texture<char2, texType, mode> texRef, float x, float y,
7183  float z, float4 dx, float4 dy) {
7184  TEXTURE_REF_PARAMETERS_INIT;
7185  texel.f =
7186  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7187  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7188  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7189  TEXTURE_RETURN_CHAR_XY;
7190 }
7191 
7192 template <int texType, enum hipTextureReadMode mode>
7193 __TEXTURE_FUNCTIONS_DECL__ char4 tex3DGrad(texture<char4, texType, mode> texRef, float x, float y,
7194  float z, float4 dx, float4 dy) {
7195  TEXTURE_REF_PARAMETERS_INIT;
7196  texel.f =
7197  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7198  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7199  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7200  TEXTURE_RETURN_CHAR_XYZW;
7201 }
7202 
7203 template <int texType, enum hipTextureReadMode mode>
7204 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex3DGrad(texture<unsigned char, texType, mode> texRef,
7205  float x, float y, float z, float4 dx,
7206  float4 dy) {
7207  TEXTURE_REF_PARAMETERS_INIT;
7208  texel.f =
7209  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7210  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7211  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7212  TEXTURE_RETURN_UCHAR;
7213 }
7214 
7215 template <int texType, enum hipTextureReadMode mode>
7216 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex3DGrad(texture<uchar1, texType, mode> texRef, float x, float y,
7217  float z, float4 dx, float4 dy) {
7218  TEXTURE_REF_PARAMETERS_INIT;
7219  texel.f =
7220  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7221  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7222  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7223  TEXTURE_RETURN_UCHAR_X;
7224 }
7225 
7226 template <int texType, enum hipTextureReadMode mode>
7227 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex3DGrad(texture<uchar2, texType, mode> texRef, float x, float y,
7228  float z, float4 dx, float4 dy) {
7229  TEXTURE_REF_PARAMETERS_INIT;
7230  texel.f =
7231  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7232  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7233  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7234  TEXTURE_RETURN_UCHAR_XY;
7235 }
7236 
7237 template <int texType, enum hipTextureReadMode mode>
7238 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex3DGrad(texture<uchar4, texType, mode> texRef, float x, float y,
7239  float z, float4 dx, float4 dy) {
7240  TEXTURE_REF_PARAMETERS_INIT;
7241  texel.f =
7242  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7243  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7244  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7245  TEXTURE_RETURN_UCHAR_XYZW;
7246 }
7247 
7248 template <int texType, enum hipTextureReadMode mode>
7249 __TEXTURE_FUNCTIONS_DECL__ short tex3DGrad(texture<short, texType, mode> texRef, float x, float y,
7250  float z, float4 dx, float4 dy) {
7251  TEXTURE_REF_PARAMETERS_INIT;
7252  texel.f =
7253  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7254  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7255  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7256  TEXTURE_RETURN_SHORT;
7257 }
7258 
7259 template <int texType, enum hipTextureReadMode mode>
7260 __TEXTURE_FUNCTIONS_DECL__ short1 tex3DGrad(texture<short1, texType, mode> texRef, float x, float y,
7261  float z, float4 dx, float4 dy) {
7262  TEXTURE_REF_PARAMETERS_INIT;
7263  texel.f =
7264  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7265  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7266  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7267  TEXTURE_RETURN_SHORT_X;
7268 }
7269 
7270 template <int texType, enum hipTextureReadMode mode>
7271 __TEXTURE_FUNCTIONS_DECL__ short2 tex3DGrad(texture<short2, texType, mode> texRef, float x, float y,
7272  float z, float4 dx, float4 dy) {
7273  TEXTURE_REF_PARAMETERS_INIT;
7274  texel.f =
7275  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7276  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7277  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7278  TEXTURE_RETURN_SHORT_XY;
7279 }
7280 
7281 template <int texType, enum hipTextureReadMode mode>
7282 __TEXTURE_FUNCTIONS_DECL__ short4 tex3DGrad(texture<short4, texType, mode> texRef, float x, float y,
7283  float z, float4 dx, float4 dy) {
7284  TEXTURE_REF_PARAMETERS_INIT;
7285  texel.f =
7286  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7287  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7288  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7289  TEXTURE_RETURN_SHORT_XYZW;
7290 }
7291 
7292 template <int texType, enum hipTextureReadMode mode>
7293 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex3DGrad(texture<unsigned short, texType, mode> texRef,
7294  float x, float y, float z, float4 dx,
7295  float4 dy) {
7296  TEXTURE_REF_PARAMETERS_INIT;
7297  texel.f =
7298  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7299  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7300  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7301  TEXTURE_RETURN_USHORT;
7302 }
7303 
7304 template <int texType, enum hipTextureReadMode mode>
7305 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex3DGrad(texture<ushort1, texType, mode> texRef, float x,
7306  float y, float z, float4 dx, float4 dy) {
7307  TEXTURE_REF_PARAMETERS_INIT;
7308  texel.f =
7309  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7310  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7311  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7312  TEXTURE_RETURN_USHORT_X;
7313 }
7314 
7315 template <int texType, enum hipTextureReadMode mode>
7316 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex3DGrad(texture<ushort2, texType, mode> texRef, float x,
7317  float y, float z, float4 dx, float4 dy) {
7318  TEXTURE_REF_PARAMETERS_INIT;
7319  texel.f =
7320  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7321  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7322  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7323  TEXTURE_RETURN_USHORT_XY;
7324 }
7325 
7326 template <int texType, enum hipTextureReadMode mode>
7327 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex3DGrad(texture<ushort4, texType, mode> texRef, float x,
7328  float y, float z, float4 dx, float4 dy) {
7329  TEXTURE_REF_PARAMETERS_INIT;
7330  texel.f =
7331  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7332  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7333  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7334  TEXTURE_RETURN_USHORT_XYZW;
7335 }
7336 
7337 template <int texType, enum hipTextureReadMode mode>
7338 __TEXTURE_FUNCTIONS_DECL__ int tex3DGrad(texture<int, texType, mode> texRef, float x, float y,
7339  float z, float4 dx, float4 dy) {
7340  TEXTURE_REF_PARAMETERS_INIT;
7341  texel.f =
7342  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7343  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7344  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7345  TEXTURE_RETURN_INT;
7346 }
7347 
7348 template <int texType, enum hipTextureReadMode mode>
7349 __TEXTURE_FUNCTIONS_DECL__ int1 tex3DGrad(texture<int1, texType, mode> texRef, float x, float y,
7350  float z, float4 dx, float4 dy) {
7351  TEXTURE_REF_PARAMETERS_INIT;
7352  texel.f =
7353  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7354  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7355  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7356  TEXTURE_RETURN_INT_X;
7357 }
7358 
7359 template <int texType, enum hipTextureReadMode mode>
7360 __TEXTURE_FUNCTIONS_DECL__ int2 tex3DGrad(texture<int2, texType, mode> texRef, float x, float y,
7361  float z, float4 dx, float4 dy) {
7362  TEXTURE_REF_PARAMETERS_INIT;
7363  texel.f =
7364  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7365  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7366  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7367  TEXTURE_RETURN_INT_XY;
7368 }
7369 
7370 template <int texType, enum hipTextureReadMode mode>
7371 __TEXTURE_FUNCTIONS_DECL__ int4 tex3DGrad(texture<int4, texType, mode> texRef, float x, float y,
7372  float z, float4 dx, float4 dy) {
7373  TEXTURE_REF_PARAMETERS_INIT;
7374  texel.f =
7375  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7376  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7377  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7378  TEXTURE_RETURN_INT_XYZW;
7379 }
7380 
7381 template <int texType, enum hipTextureReadMode mode>
7382 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex3DGrad(texture<unsigned int, texType, mode> texRef,
7383  float x, float y, float z, float4 dx, float4 dy) {
7384  TEXTURE_REF_PARAMETERS_INIT;
7385  texel.f =
7386  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7387  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7388  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7389  TEXTURE_RETURN_UINT;
7390 }
7391 
7392 template <int texType, enum hipTextureReadMode mode>
7393 __TEXTURE_FUNCTIONS_DECL__ uint1 tex3DGrad(texture<uint1, texType, mode> texRef, float x, float y,
7394  float z, float4 dx, float4 dy) {
7395  TEXTURE_REF_PARAMETERS_INIT;
7396  texel.f =
7397  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7398  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7399  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7400  TEXTURE_RETURN_UINT_X;
7401 }
7402 
7403 template <int texType, enum hipTextureReadMode mode>
7404 __TEXTURE_FUNCTIONS_DECL__ uint2 tex3DGrad(texture<uint2, texType, mode> texRef, float x, float y,
7405  float z, float4 dx, float4 dy) {
7406  TEXTURE_REF_PARAMETERS_INIT;
7407  texel.f =
7408  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7409  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7410  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7411  TEXTURE_RETURN_UINT_XY;
7412 }
7413 
7414 template <int texType, enum hipTextureReadMode mode>
7415 __TEXTURE_FUNCTIONS_DECL__ uint4 tex3DGrad(texture<uint4, texType, mode> texRef, float x, float y,
7416  float z, float4 dx, float4 dy) {
7417  TEXTURE_REF_PARAMETERS_INIT;
7418  texel.f =
7419  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7420  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7421  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7422  TEXTURE_RETURN_UINT_XYZW;
7423 }
7424 
7425 template <int texType, enum hipTextureReadMode mode>
7426 __TEXTURE_FUNCTIONS_DECL__ float tex3DGrad(texture<float, texType, mode> texRef, float x, float y,
7427  float z, float4 dx, float4 dy) {
7428  TEXTURE_REF_PARAMETERS_INIT;
7429  texel.f =
7430  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7431  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7432  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7433  TEXTURE_RETURN_FLOAT;
7434 }
7435 
7436 template <int texType, enum hipTextureReadMode mode>
7437 __TEXTURE_FUNCTIONS_DECL__ float1 tex3DGrad(texture<float1, texType, mode> texRef, float x, float y,
7438  float z, float4 dx, float4 dy) {
7439  TEXTURE_REF_PARAMETERS_INIT;
7440  texel.f =
7441  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7442  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7443  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7444  TEXTURE_RETURN_FLOAT_X;
7445 }
7446 
7447 template <int texType, enum hipTextureReadMode mode>
7448 __TEXTURE_FUNCTIONS_DECL__ float2 tex3DGrad(texture<float2, texType, mode> texRef, float x, float y,
7449  float z, float4 dx, float4 dy) {
7450  TEXTURE_REF_PARAMETERS_INIT;
7451  texel.f =
7452  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7453  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7454  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7455  TEXTURE_RETURN_FLOAT_XY;
7456 }
7457 
7458 template <int texType, enum hipTextureReadMode mode>
7459 __TEXTURE_FUNCTIONS_DECL__ float4 tex3DGrad(texture<float4, texType, mode> texRef, float x, float y,
7460  float z, float4 dx, float4 dy) {
7461  TEXTURE_REF_PARAMETERS_INIT;
7462  texel.f =
7463  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7464  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7465  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7466  TEXTURE_RETURN_FLOAT_XYZW;
7467 }
7468 
7470 template <int texType, enum hipTextureReadMode mode>
7471 __TEXTURE_FUNCTIONS_DECL__ char tex3DGrad(texture<char, texType, mode> texRef,
7472  hipTextureObject_t textureObject, float x, float y,
7473  float z, float4 dx, float4 dy) {
7474  TEXTURE_PARAMETERS_INIT;
7475  texel.f =
7476  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7477  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7478  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7479  TEXTURE_RETURN_CHAR;
7480 }
7481 
7482 template <int texType, enum hipTextureReadMode mode>
7483 __TEXTURE_FUNCTIONS_DECL__ char1 tex3DGrad(texture<char1, texType, mode> texRef,
7484  hipTextureObject_t textureObject, float x, float y,
7485  float z, float4 dx, float4 dy) {
7486  TEXTURE_PARAMETERS_INIT;
7487  texel.f =
7488  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7489  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7490  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7491  TEXTURE_RETURN_CHAR_X;
7492 }
7493 
7494 template <int texType, enum hipTextureReadMode mode>
7495 __TEXTURE_FUNCTIONS_DECL__ char2 tex3DGrad(texture<char2, texType, mode> texRef,
7496  hipTextureObject_t textureObject, float x, float y,
7497  float z, float4 dx, float4 dy) {
7498  TEXTURE_PARAMETERS_INIT;
7499  texel.f =
7500  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7501  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7502  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7503  TEXTURE_RETURN_CHAR_XY;
7504 }
7505 
7506 template <int texType, enum hipTextureReadMode mode>
7507 __TEXTURE_FUNCTIONS_DECL__ char4 tex3DGrad(texture<char4, texType, mode> texRef,
7508  hipTextureObject_t textureObject, float x, float y,
7509  float z, float4 dx, float4 dy) {
7510  TEXTURE_PARAMETERS_INIT;
7511  texel.f =
7512  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7513  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7514  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7515  TEXTURE_RETURN_CHAR_XYZW;
7516 }
7517 
7518 template <int texType, enum hipTextureReadMode mode>
7519 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex3DGrad(texture<unsigned char, texType, mode> texRef,
7520  hipTextureObject_t textureObject, float x,
7521  float y, float z, float4 dx, float4 dy) {
7522  TEXTURE_PARAMETERS_INIT;
7523  texel.f =
7524  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7525  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7526  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7527  TEXTURE_RETURN_UCHAR;
7528 }
7529 
7530 template <int texType, enum hipTextureReadMode mode>
7531 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex3DGrad(texture<uchar1, texType, mode> texRef,
7532  hipTextureObject_t textureObject, float x, float y,
7533  float z, float4 dx, float4 dy) {
7534  TEXTURE_PARAMETERS_INIT;
7535  texel.f =
7536  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7537  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7538  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7539  TEXTURE_RETURN_UCHAR_X;
7540 }
7541 
7542 template <int texType, enum hipTextureReadMode mode>
7543 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex3DGrad(texture<uchar2, texType, mode> texRef,
7544  hipTextureObject_t textureObject, float x, float y,
7545  float z, float4 dx, float4 dy) {
7546  TEXTURE_PARAMETERS_INIT;
7547  texel.f =
7548  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7549  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7550  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7551  TEXTURE_RETURN_UCHAR_XY;
7552 }
7553 
7554 template <int texType, enum hipTextureReadMode mode>
7555 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex3DGrad(texture<uchar4, texType, mode> texRef,
7556  hipTextureObject_t textureObject, float x, float y,
7557  float z, float4 dx, float4 dy) {
7558  TEXTURE_PARAMETERS_INIT;
7559  texel.f =
7560  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7561  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7562  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7563  TEXTURE_RETURN_UCHAR_XYZW;
7564 }
7565 
7566 template <int texType, enum hipTextureReadMode mode>
7567 __TEXTURE_FUNCTIONS_DECL__ short tex3DGrad(texture<short, texType, mode> texRef,
7568  hipTextureObject_t textureObject, float x, float y,
7569  float z, float4 dx, float4 dy) {
7570  TEXTURE_PARAMETERS_INIT;
7571  texel.f =
7572  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7573  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7574  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7575  TEXTURE_RETURN_SHORT;
7576 }
7577 
7578 template <int texType, enum hipTextureReadMode mode>
7579 __TEXTURE_FUNCTIONS_DECL__ short1 tex3DGrad(texture<short1, texType, mode> texRef,
7580  hipTextureObject_t textureObject, float x, float y,
7581  float z, float4 dx, float4 dy) {
7582  TEXTURE_PARAMETERS_INIT;
7583  texel.f =
7584  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7585  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7586  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7587  TEXTURE_RETURN_SHORT_X;
7588 }
7589 
7590 template <int texType, enum hipTextureReadMode mode>
7591 __TEXTURE_FUNCTIONS_DECL__ short2 tex3DGrad(texture<short2, texType, mode> texRef,
7592  hipTextureObject_t textureObject, float x, float y,
7593  float z, float4 dx, float4 dy) {
7594  TEXTURE_PARAMETERS_INIT;
7595  texel.f =
7596  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7597  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7598  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7599  TEXTURE_RETURN_SHORT_XY;
7600 }
7601 
7602 template <int texType, enum hipTextureReadMode mode>
7603 __TEXTURE_FUNCTIONS_DECL__ short4 tex3DGrad(texture<short4, texType, mode> texRef,
7604  hipTextureObject_t textureObject, float x, float y,
7605  float z, float4 dx, float4 dy) {
7606  TEXTURE_PARAMETERS_INIT;
7607  texel.f =
7608  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7609  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7610  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7611  TEXTURE_RETURN_SHORT_XYZW;
7612 }
7613 
7614 template <int texType, enum hipTextureReadMode mode>
7615 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex3DGrad(texture<unsigned short, texType, mode> texRef,
7616  hipTextureObject_t textureObject, float x,
7617  float y, float z, float4 dx, float4 dy) {
7618  TEXTURE_PARAMETERS_INIT;
7619  texel.f =
7620  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7621  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7622  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7623  TEXTURE_RETURN_USHORT;
7624 }
7625 
7626 template <int texType, enum hipTextureReadMode mode>
7627 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex3DGrad(texture<ushort1, texType, mode> texRef,
7628  hipTextureObject_t textureObject, float x, float y,
7629  float z, float4 dx, float4 dy) {
7630  TEXTURE_PARAMETERS_INIT;
7631  texel.f =
7632  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7633  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7634  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7635  TEXTURE_RETURN_USHORT_X;
7636 }
7637 
7638 template <int texType, enum hipTextureReadMode mode>
7639 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex3DGrad(texture<ushort2, texType, mode> texRef,
7640  hipTextureObject_t textureObject, float x, float y,
7641  float z, float4 dx, float4 dy) {
7642  TEXTURE_PARAMETERS_INIT;
7643  texel.f =
7644  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7645  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7646  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7647  TEXTURE_RETURN_USHORT_XY;
7648 }
7649 
7650 template <int texType, enum hipTextureReadMode mode>
7651 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex3DGrad(texture<ushort4, texType, mode> texRef,
7652  hipTextureObject_t textureObject, float x, float y,
7653  float z, float4 dx, float4 dy) {
7654  TEXTURE_PARAMETERS_INIT;
7655  texel.f =
7656  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7657  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7658  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7659  TEXTURE_RETURN_USHORT_XYZW;
7660 }
7661 
7662 template <int texType, enum hipTextureReadMode mode>
7663 __TEXTURE_FUNCTIONS_DECL__ int tex3DGrad(texture<int, texType, mode> texRef,
7664  hipTextureObject_t textureObject, float x, float y,
7665  float z, float4 dx, float4 dy) {
7666  TEXTURE_PARAMETERS_INIT;
7667  texel.f =
7668  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7669  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7670  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7671  TEXTURE_RETURN_INT;
7672 }
7673 
7674 template <int texType, enum hipTextureReadMode mode>
7675 __TEXTURE_FUNCTIONS_DECL__ int1 tex3DGrad(texture<int1, texType, mode> texRef,
7676  hipTextureObject_t textureObject, float x, float y,
7677  float z, float4 dx, float4 dy) {
7678  TEXTURE_PARAMETERS_INIT;
7679  texel.f =
7680  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7681  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7682  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7683  TEXTURE_RETURN_INT_X;
7684 }
7685 
7686 template <int texType, enum hipTextureReadMode mode>
7687 __TEXTURE_FUNCTIONS_DECL__ int2 tex3DGrad(texture<int2, texType, mode> texRef,
7688  hipTextureObject_t textureObject, float x, float y,
7689  float z, float4 dx, float4 dy) {
7690  TEXTURE_PARAMETERS_INIT;
7691  texel.f =
7692  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7693  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7694  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7695  TEXTURE_RETURN_INT_XY;
7696 }
7697 
7698 template <int texType, enum hipTextureReadMode mode>
7699 __TEXTURE_FUNCTIONS_DECL__ int4 tex3DGrad(texture<int4, texType, mode> texRef,
7700  hipTextureObject_t textureObject, float x, float y,
7701  float z, float4 dx, float4 dy) {
7702  TEXTURE_PARAMETERS_INIT;
7703  texel.f =
7704  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7705  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7706  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7707  TEXTURE_RETURN_INT_XYZW;
7708 }
7709 
7710 template <int texType, enum hipTextureReadMode mode>
7711 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex3DGrad(texture<unsigned int, texType, mode> texRef,
7712  hipTextureObject_t textureObject, float x,
7713  float y, float z, float4 dx, float4 dy) {
7714  TEXTURE_PARAMETERS_INIT;
7715  texel.f =
7716  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7717  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7718  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7719  TEXTURE_RETURN_UINT;
7720 }
7721 
7722 template <int texType, enum hipTextureReadMode mode>
7723 __TEXTURE_FUNCTIONS_DECL__ uint1 tex3DGrad(texture<uint1, texType, mode> texRef,
7724  hipTextureObject_t textureObject, float x, float y,
7725  float z, float4 dx, float4 dy) {
7726  TEXTURE_PARAMETERS_INIT;
7727  texel.f =
7728  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7729  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7730  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7731  TEXTURE_RETURN_UINT_X;
7732 }
7733 
7734 template <int texType, enum hipTextureReadMode mode>
7735 __TEXTURE_FUNCTIONS_DECL__ uint2 tex3DGrad(texture<uint2, texType, mode> texRef,
7736  hipTextureObject_t textureObject, float x, float y,
7737  float z, float4 dx, float4 dy) {
7738  TEXTURE_PARAMETERS_INIT;
7739  texel.f =
7740  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7741  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7742  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7743  TEXTURE_RETURN_UINT_XY;
7744 }
7745 
7746 template <int texType, enum hipTextureReadMode mode>
7747 __TEXTURE_FUNCTIONS_DECL__ uint4 tex3DGrad(texture<uint4, texType, mode> texRef,
7748  hipTextureObject_t textureObject, float x, float y,
7749  float z, float4 dx, float4 dy) {
7750  TEXTURE_PARAMETERS_INIT;
7751  texel.f =
7752  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7753  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7754  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7755  TEXTURE_RETURN_UINT_XYZW;
7756 }
7757 
7758 template <int texType, enum hipTextureReadMode mode>
7759 __TEXTURE_FUNCTIONS_DECL__ float tex3DGrad(texture<float, texType, mode> texRef,
7760  hipTextureObject_t textureObject, float x, float y,
7761  float z, float4 dx, float4 dy) {
7762  TEXTURE_PARAMETERS_INIT;
7763  texel.f =
7764  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7765  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7766  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7767  TEXTURE_RETURN_FLOAT;
7768 }
7769 
7770 template <int texType, enum hipTextureReadMode mode>
7771 __TEXTURE_FUNCTIONS_DECL__ float1 tex3DGrad(texture<float1, texType, mode> texRef,
7772  hipTextureObject_t textureObject, float x, float y,
7773  float z, float4 dx, float4 dy) {
7774  TEXTURE_PARAMETERS_INIT;
7775  texel.f =
7776  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7777  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7778  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7779  TEXTURE_RETURN_FLOAT_X;
7780 }
7781 
7782 template <int texType, enum hipTextureReadMode mode>
7783 __TEXTURE_FUNCTIONS_DECL__ float2 tex3DGrad(texture<float2, texType, mode> texRef,
7784  hipTextureObject_t textureObject, float x, float y,
7785  float z, float4 dx, float4 dy) {
7786  TEXTURE_PARAMETERS_INIT;
7787  texel.f =
7788  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7789  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7790  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7791  TEXTURE_RETURN_FLOAT_XY;
7792 }
7793 
7794 template <int texType, enum hipTextureReadMode mode>
7795 __TEXTURE_FUNCTIONS_DECL__ float4 tex3DGrad(texture<float4, texType, mode> texRef,
7796  hipTextureObject_t textureObject, float x, float y,
7797  float z, float4 dx, float4 dy) {
7798  TEXTURE_PARAMETERS_INIT;
7799  texel.f =
7800  __ockl_image_sample_grad_3D(i, s, hc::short_vector::float4(x, y, z, 0.0f).get_vector(),
7801  hc::short_vector::float4(dx.x, dx.y, dx.z, dx.w).get_vector(),
7802  hc::short_vector::float4(dy.x, dy.y, dy.z, dy.w).get_vector());
7803  TEXTURE_RETURN_FLOAT_XYZW;
7804 }
7805 
7807 
7808 template <int texType, enum hipTextureReadMode mode>
7809 __TEXTURE_FUNCTIONS_DECL__ char tex1DLayered(texture<char, texType, mode> texRef, float x,
7810  int layer) {
7811  TEXTURE_REF_PARAMETERS_INIT;
7812  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7813  TEXTURE_RETURN_CHAR;
7814 }
7815 
7816 template <int texType, enum hipTextureReadMode mode>
7817 __TEXTURE_FUNCTIONS_DECL__ char1 tex1DLayered(texture<char1, texType, mode> texRef, float x,
7818  int layer) {
7819  TEXTURE_REF_PARAMETERS_INIT;
7820  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7821  TEXTURE_RETURN_CHAR_X;
7822 }
7823 
7824 template <int texType, enum hipTextureReadMode mode>
7825 __TEXTURE_FUNCTIONS_DECL__ char2 tex1DLayered(texture<char2, texType, mode> texRef, float x,
7826  int layer) {
7827  TEXTURE_REF_PARAMETERS_INIT;
7828  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7829  TEXTURE_RETURN_CHAR_XY;
7830 }
7831 
7832 template <int texType, enum hipTextureReadMode mode>
7833 __TEXTURE_FUNCTIONS_DECL__ char4 tex1DLayered(texture<char4, texType, mode> texRef, float x,
7834  int layer) {
7835  TEXTURE_REF_PARAMETERS_INIT;
7836  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7837  TEXTURE_RETURN_CHAR_XYZW;
7838 }
7839 
7840 template <int texType, enum hipTextureReadMode mode>
7841 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1DLayered(texture<unsigned char, texType, mode> texRef,
7842  float x, int layer) {
7843  TEXTURE_REF_PARAMETERS_INIT;
7844  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7845  TEXTURE_RETURN_UCHAR;
7846 }
7847 
7848 template <int texType, enum hipTextureReadMode mode>
7849 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1DLayered(texture<uchar1, texType, mode> texRef, float x,
7850  int layer) {
7851  TEXTURE_REF_PARAMETERS_INIT;
7852  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7853  TEXTURE_RETURN_UCHAR_X;
7854 }
7855 
7856 template <int texType, enum hipTextureReadMode mode>
7857 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1DLayered(texture<uchar2, texType, mode> texRef, float x,
7858  int layer) {
7859  TEXTURE_REF_PARAMETERS_INIT;
7860  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7861  TEXTURE_RETURN_UCHAR_XY;
7862 }
7863 
7864 template <int texType, enum hipTextureReadMode mode>
7865 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1DLayered(texture<uchar4, texType, mode> texRef, float x,
7866  int layer) {
7867  TEXTURE_REF_PARAMETERS_INIT;
7868  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7869  TEXTURE_RETURN_UCHAR_XYZW;
7870 }
7871 
7872 template <int texType, enum hipTextureReadMode mode>
7873 __TEXTURE_FUNCTIONS_DECL__ short tex1DLayered(texture<short, texType, mode> texRef, float x,
7874  int layer) {
7875  TEXTURE_REF_PARAMETERS_INIT;
7876  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7877  TEXTURE_RETURN_SHORT;
7878 }
7879 
7880 template <int texType, enum hipTextureReadMode mode>
7881 __TEXTURE_FUNCTIONS_DECL__ short1 tex1DLayered(texture<short1, texType, mode> texRef, float x,
7882  int layer) {
7883  TEXTURE_REF_PARAMETERS_INIT;
7884  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7885  TEXTURE_RETURN_SHORT_X;
7886 }
7887 
7888 template <int texType, enum hipTextureReadMode mode>
7889 __TEXTURE_FUNCTIONS_DECL__ short2 tex1DLayered(texture<short2, texType, mode> texRef, float x,
7890  int layer) {
7891  TEXTURE_REF_PARAMETERS_INIT;
7892  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7893  TEXTURE_RETURN_SHORT_XY;
7894 }
7895 
7896 template <int texType, enum hipTextureReadMode mode>
7897 __TEXTURE_FUNCTIONS_DECL__ short4 tex1DLayered(texture<short4, texType, mode> texRef, float x,
7898  int layer) {
7899  TEXTURE_REF_PARAMETERS_INIT;
7900  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7901  TEXTURE_RETURN_SHORT_XYZW;
7902 }
7903 
7904 template <int texType, enum hipTextureReadMode mode>
7905 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1DLayered(
7906  texture<unsigned short, texType, mode> texRef, float x, int layer) {
7907  TEXTURE_REF_PARAMETERS_INIT;
7908  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7909  TEXTURE_RETURN_USHORT;
7910 }
7911 
7912 template <int texType, enum hipTextureReadMode mode>
7913 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1DLayered(texture<ushort1, texType, mode> texRef, float x,
7914  int layer) {
7915  TEXTURE_REF_PARAMETERS_INIT;
7916  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7917  TEXTURE_RETURN_USHORT_X;
7918 }
7919 
7920 template <int texType, enum hipTextureReadMode mode>
7921 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1DLayered(texture<ushort2, texType, mode> texRef, float x,
7922  int layer) {
7923  TEXTURE_REF_PARAMETERS_INIT;
7924  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7925  TEXTURE_RETURN_USHORT_XY;
7926 }
7927 
7928 template <int texType, enum hipTextureReadMode mode>
7929 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1DLayered(texture<ushort4, texType, mode> texRef, float x,
7930  int layer) {
7931  TEXTURE_REF_PARAMETERS_INIT;
7932  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7933  TEXTURE_RETURN_USHORT_XYZW;
7934 }
7935 
7936 template <int texType, enum hipTextureReadMode mode>
7937 __TEXTURE_FUNCTIONS_DECL__ int tex1DLayered(texture<int, texType, mode> texRef, float x,
7938  int layer) {
7939  TEXTURE_REF_PARAMETERS_INIT;
7940  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7941  TEXTURE_RETURN_INT;
7942 }
7943 
7944 template <int texType, enum hipTextureReadMode mode>
7945 __TEXTURE_FUNCTIONS_DECL__ int1 tex1DLayered(texture<int1, texType, mode> texRef, float x,
7946  int layer) {
7947  TEXTURE_REF_PARAMETERS_INIT;
7948  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7949  TEXTURE_RETURN_INT_X;
7950 }
7951 
7952 template <int texType, enum hipTextureReadMode mode>
7953 __TEXTURE_FUNCTIONS_DECL__ int2 tex1DLayered(texture<int2, texType, mode> texRef, float x,
7954  int layer) {
7955  TEXTURE_REF_PARAMETERS_INIT;
7956  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7957  TEXTURE_RETURN_INT_XY;
7958 }
7959 
7960 template <int texType, enum hipTextureReadMode mode>
7961 __TEXTURE_FUNCTIONS_DECL__ int4 tex1DLayered(texture<int4, texType, mode> texRef, float x,
7962  int layer) {
7963  TEXTURE_REF_PARAMETERS_INIT;
7964  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7965  TEXTURE_RETURN_INT_XYZW;
7966 }
7967 
7968 template <int texType, enum hipTextureReadMode mode>
7969 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1DLayered(texture<unsigned int, texType, mode> texRef,
7970  float x, int layer) {
7971  TEXTURE_REF_PARAMETERS_INIT;
7972  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7973  TEXTURE_RETURN_UINT;
7974 }
7975 
7976 template <int texType, enum hipTextureReadMode mode>
7977 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1DLayered(texture<uint1, texType, mode> texRef, float x,
7978  int layer) {
7979  TEXTURE_REF_PARAMETERS_INIT;
7980  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7981  TEXTURE_RETURN_UINT_X;
7982 }
7983 
7984 template <int texType, enum hipTextureReadMode mode>
7985 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1DLayered(texture<uint2, texType, mode> texRef, float x,
7986  int layer) {
7987  TEXTURE_REF_PARAMETERS_INIT;
7988  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7989  TEXTURE_RETURN_UINT_XY;
7990 }
7991 
7992 template <int texType, enum hipTextureReadMode mode>
7993 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1DLayered(texture<uint4, texType, mode> texRef, float x,
7994  int layer) {
7995  TEXTURE_REF_PARAMETERS_INIT;
7996  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
7997  TEXTURE_RETURN_UINT_XYZW;
7998 }
7999 
8000 template <int texType, enum hipTextureReadMode mode>
8001 __TEXTURE_FUNCTIONS_DECL__ float tex1DLayered(texture<float, texType, mode> texRef, float x,
8002  int layer) {
8003  TEXTURE_REF_PARAMETERS_INIT;
8004  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8005  TEXTURE_RETURN_FLOAT;
8006 }
8007 
8008 template <int texType, enum hipTextureReadMode mode>
8009 __TEXTURE_FUNCTIONS_DECL__ float1 tex1DLayered(texture<float1, texType, mode> texRef, float x,
8010  int layer) {
8011  TEXTURE_REF_PARAMETERS_INIT;
8012  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8013  TEXTURE_RETURN_FLOAT_X;
8014 }
8015 
8016 template <int texType, enum hipTextureReadMode mode>
8017 __TEXTURE_FUNCTIONS_DECL__ float2 tex1DLayered(texture<float2, texType, mode> texRef, float x,
8018  int layer) {
8019  TEXTURE_REF_PARAMETERS_INIT;
8020  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8021  TEXTURE_RETURN_FLOAT_XY;
8022 }
8023 
8024 template <int texType, enum hipTextureReadMode mode>
8025 __TEXTURE_FUNCTIONS_DECL__ float4 tex1DLayered(texture<float4, texType, mode> texRef, float x,
8026  int layer) {
8027  TEXTURE_REF_PARAMETERS_INIT;
8028  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8029  TEXTURE_RETURN_FLOAT_XYZW;
8030 }
8031 
8033 
8034 template <int texType, enum hipTextureReadMode mode>
8035 __TEXTURE_FUNCTIONS_DECL__ char tex1DLayered(texture<char, texType, mode> texRef,
8036  hipTextureObject_t textureObject, float x, int layer) {
8037  TEXTURE_PARAMETERS_INIT;
8038  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8039  TEXTURE_RETURN_CHAR;
8040 }
8041 
8042 template <int texType, enum hipTextureReadMode mode>
8043 __TEXTURE_FUNCTIONS_DECL__ char1 tex1DLayered(texture<char1, texType, mode> texRef,
8044  hipTextureObject_t textureObject, float x,
8045  int layer) {
8046  TEXTURE_PARAMETERS_INIT;
8047  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8048  TEXTURE_RETURN_CHAR_X;
8049 }
8050 
8051 template <int texType, enum hipTextureReadMode mode>
8052 __TEXTURE_FUNCTIONS_DECL__ char2 tex1DLayered(texture<char2, texType, mode> texRef,
8053  hipTextureObject_t textureObject, float x,
8054  int layer) {
8055  TEXTURE_PARAMETERS_INIT;
8056  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8057  TEXTURE_RETURN_CHAR_XY;
8058 }
8059 
8060 template <int texType, enum hipTextureReadMode mode>
8061 __TEXTURE_FUNCTIONS_DECL__ char4 tex1DLayered(texture<char4, texType, mode> texRef,
8062  hipTextureObject_t textureObject, float x,
8063  int layer) {
8064  TEXTURE_PARAMETERS_INIT;
8065  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8066  TEXTURE_RETURN_CHAR_XYZW;
8067 }
8068 
8069 template <int texType, enum hipTextureReadMode mode>
8070 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1DLayered(texture<unsigned char, texType, mode> texRef,
8071  hipTextureObject_t textureObject, float x,
8072  int layer) {
8073  TEXTURE_PARAMETERS_INIT;
8074  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8075  TEXTURE_RETURN_UCHAR;
8076 }
8077 
8078 template <int texType, enum hipTextureReadMode mode>
8079 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1DLayered(texture<uchar1, texType, mode> texRef,
8080  hipTextureObject_t textureObject, float x,
8081  int layer) {
8082  TEXTURE_PARAMETERS_INIT;
8083  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8084  TEXTURE_RETURN_UCHAR_X;
8085 }
8086 
8087 template <int texType, enum hipTextureReadMode mode>
8088 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1DLayered(texture<uchar2, texType, mode> texRef,
8089  hipTextureObject_t textureObject, float x,
8090  int layer) {
8091  TEXTURE_PARAMETERS_INIT;
8092  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8093  TEXTURE_RETURN_UCHAR_XY;
8094 }
8095 
8096 template <int texType, enum hipTextureReadMode mode>
8097 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1DLayered(texture<uchar4, texType, mode> texRef,
8098  hipTextureObject_t textureObject, float x,
8099  int layer) {
8100  TEXTURE_PARAMETERS_INIT;
8101  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8102  TEXTURE_RETURN_UCHAR_XYZW;
8103 }
8104 
8105 template <int texType, enum hipTextureReadMode mode>
8106 __TEXTURE_FUNCTIONS_DECL__ short tex1DLayered(texture<short, texType, mode> texRef,
8107  hipTextureObject_t textureObject, float x,
8108  int layer) {
8109  TEXTURE_PARAMETERS_INIT;
8110  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8111  TEXTURE_RETURN_SHORT;
8112 }
8113 
8114 template <int texType, enum hipTextureReadMode mode>
8115 __TEXTURE_FUNCTIONS_DECL__ short1 tex1DLayered(texture<short1, texType, mode> texRef,
8116  hipTextureObject_t textureObject, float x,
8117  int layer) {
8118  TEXTURE_PARAMETERS_INIT;
8119  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8120  TEXTURE_RETURN_SHORT_X;
8121 }
8122 
8123 template <int texType, enum hipTextureReadMode mode>
8124 __TEXTURE_FUNCTIONS_DECL__ short2 tex1DLayered(texture<short2, texType, mode> texRef,
8125  hipTextureObject_t textureObject, float x,
8126  int layer) {
8127  TEXTURE_PARAMETERS_INIT;
8128  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8129  TEXTURE_RETURN_SHORT_XY;
8130 }
8131 
8132 template <int texType, enum hipTextureReadMode mode>
8133 __TEXTURE_FUNCTIONS_DECL__ short4 tex1DLayered(texture<short4, texType, mode> texRef,
8134  hipTextureObject_t textureObject, float x,
8135  int layer) {
8136  TEXTURE_PARAMETERS_INIT;
8137  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8138  TEXTURE_RETURN_SHORT_XYZW;
8139 }
8140 
8141 template <int texType, enum hipTextureReadMode mode>
8142 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1DLayered(
8143  texture<unsigned short, texType, mode> texRef, hipTextureObject_t textureObject, float x,
8144  int layer) {
8145  TEXTURE_PARAMETERS_INIT;
8146  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8147  TEXTURE_RETURN_USHORT;
8148 }
8149 
8150 template <int texType, enum hipTextureReadMode mode>
8151 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1DLayered(texture<ushort1, texType, mode> texRef,
8152  hipTextureObject_t textureObject, float x,
8153  int layer) {
8154  TEXTURE_PARAMETERS_INIT;
8155  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8156  TEXTURE_RETURN_USHORT_X;
8157 }
8158 
8159 template <int texType, enum hipTextureReadMode mode>
8160 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1DLayered(texture<ushort2, texType, mode> texRef,
8161  hipTextureObject_t textureObject, float x,
8162  int layer) {
8163  TEXTURE_PARAMETERS_INIT;
8164  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8165  TEXTURE_RETURN_USHORT_XY;
8166 }
8167 
8168 template <int texType, enum hipTextureReadMode mode>
8169 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1DLayered(texture<ushort4, texType, mode> texRef,
8170  hipTextureObject_t textureObject, float x,
8171  int layer) {
8172  TEXTURE_PARAMETERS_INIT;
8173  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8174  TEXTURE_RETURN_USHORT_XYZW;
8175 }
8176 
8177 template <int texType, enum hipTextureReadMode mode>
8178 __TEXTURE_FUNCTIONS_DECL__ int tex1DLayered(texture<int, texType, mode> texRef,
8179  hipTextureObject_t textureObject, float x, int layer) {
8180  TEXTURE_PARAMETERS_INIT;
8181  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8182  TEXTURE_RETURN_INT;
8183 }
8184 
8185 template <int texType, enum hipTextureReadMode mode>
8186 __TEXTURE_FUNCTIONS_DECL__ int1 tex1DLayered(texture<int1, texType, mode> texRef,
8187  hipTextureObject_t textureObject, float x, int layer) {
8188  TEXTURE_PARAMETERS_INIT;
8189  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8190  TEXTURE_RETURN_INT_X;
8191 }
8192 
8193 template <int texType, enum hipTextureReadMode mode>
8194 __TEXTURE_FUNCTIONS_DECL__ int2 tex1DLayered(texture<int2, texType, mode> texRef,
8195  hipTextureObject_t textureObject, float x, int layer) {
8196  TEXTURE_PARAMETERS_INIT;
8197  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8198  TEXTURE_RETURN_INT_XY;
8199 }
8200 
8201 template <int texType, enum hipTextureReadMode mode>
8202 __TEXTURE_FUNCTIONS_DECL__ int4 tex1DLayered(texture<int4, texType, mode> texRef,
8203  hipTextureObject_t textureObject, float x, int layer) {
8204  TEXTURE_PARAMETERS_INIT;
8205  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8206  TEXTURE_RETURN_INT_XYZW;
8207 }
8208 
8209 template <int texType, enum hipTextureReadMode mode>
8210 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1DLayered(texture<unsigned int, texType, mode> texRef,
8211  hipTextureObject_t textureObject, float x,
8212  int layer) {
8213  TEXTURE_PARAMETERS_INIT;
8214  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8215  TEXTURE_RETURN_UINT;
8216 }
8217 
8218 template <int texType, enum hipTextureReadMode mode>
8219 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1DLayered(texture<uint1, texType, mode> texRef,
8220  hipTextureObject_t textureObject, float x,
8221  int layer) {
8222  TEXTURE_PARAMETERS_INIT;
8223  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8224  TEXTURE_RETURN_UINT_X;
8225 }
8226 
8227 template <int texType, enum hipTextureReadMode mode>
8228 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1DLayered(texture<uint2, texType, mode> texRef,
8229  hipTextureObject_t textureObject, float x,
8230  int layer) {
8231  TEXTURE_PARAMETERS_INIT;
8232  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8233  TEXTURE_RETURN_UINT_XY;
8234 }
8235 
8236 template <int texType, enum hipTextureReadMode mode>
8237 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1DLayered(texture<uint4, texType, mode> texRef,
8238  hipTextureObject_t textureObject, float x,
8239  int layer) {
8240  TEXTURE_PARAMETERS_INIT;
8241  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8242  TEXTURE_RETURN_UINT_XYZW;
8243 }
8244 
8245 template <int texType, enum hipTextureReadMode mode>
8246 __TEXTURE_FUNCTIONS_DECL__ float tex1DLayered(texture<float, texType, mode> texRef,
8247  hipTextureObject_t textureObject, float x,
8248  int layer) {
8249  TEXTURE_PARAMETERS_INIT;
8250  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8251  TEXTURE_RETURN_FLOAT;
8252 }
8253 
8254 template <int texType, enum hipTextureReadMode mode>
8255 __TEXTURE_FUNCTIONS_DECL__ float1 tex1DLayered(texture<float1, texType, mode> texRef,
8256  hipTextureObject_t textureObject, float x,
8257  int layer) {
8258  TEXTURE_PARAMETERS_INIT;
8259  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8260  TEXTURE_RETURN_FLOAT_X;
8261 }
8262 
8263 template <int texType, enum hipTextureReadMode mode>
8264 __TEXTURE_FUNCTIONS_DECL__ float2 tex1DLayered(texture<float2, texType, mode> texRef,
8265  hipTextureObject_t textureObject, float x,
8266  int layer) {
8267  TEXTURE_PARAMETERS_INIT;
8268  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8269  TEXTURE_RETURN_FLOAT_XY;
8270 }
8271 
8272 template <int texType, enum hipTextureReadMode mode>
8273 __TEXTURE_FUNCTIONS_DECL__ float4 tex1DLayered(texture<float4, texType, mode> texRef,
8274  hipTextureObject_t textureObject, float x,
8275  int layer) {
8276  TEXTURE_PARAMETERS_INIT;
8277  texel.f = __ockl_image_sample_1Da(i, s, hc::short_vector::float2(x, layer).get_vector());
8278  TEXTURE_RETURN_FLOAT_XYZW;
8279 }
8280 
8282 
8283 template <int texType, enum hipTextureReadMode mode>
8284 __TEXTURE_FUNCTIONS_DECL__ char tex1DLayeredLod(texture<char, texType, mode> texRef, float x,
8285  int layer, float level) {
8286  TEXTURE_REF_PARAMETERS_INIT;
8287  texel.f =
8288  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8289  TEXTURE_RETURN_CHAR;
8290 }
8291 
8292 template <int texType, enum hipTextureReadMode mode>
8293 __TEXTURE_FUNCTIONS_DECL__ char1 tex1DLayeredLod(texture<char1, texType, mode> texRef, float x,
8294  int layer, float level) {
8295  TEXTURE_REF_PARAMETERS_INIT;
8296  texel.f =
8297  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8298  TEXTURE_RETURN_CHAR_X;
8299 }
8300 
8301 template <int texType, enum hipTextureReadMode mode>
8302 __TEXTURE_FUNCTIONS_DECL__ char2 tex1DLayeredLod(texture<char2, texType, mode> texRef, float x,
8303  int layer, float level) {
8304  TEXTURE_REF_PARAMETERS_INIT;
8305  texel.f =
8306  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8307  TEXTURE_RETURN_CHAR_XY;
8308 }
8309 
8310 template <int texType, enum hipTextureReadMode mode>
8311 __TEXTURE_FUNCTIONS_DECL__ char4 tex1DLayeredLod(texture<char4, texType, mode> texRef, float x,
8312  int layer, float level) {
8313  TEXTURE_REF_PARAMETERS_INIT;
8314  texel.f =
8315  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8316  TEXTURE_RETURN_CHAR_XYZW;
8317 }
8318 
8319 template <int texType, enum hipTextureReadMode mode>
8320 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1DLayeredLod(
8321  texture<unsigned char, texType, mode> texRef, float x, int layer, float level) {
8322  TEXTURE_REF_PARAMETERS_INIT;
8323  texel.f =
8324  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8325  TEXTURE_RETURN_UCHAR;
8326 }
8327 
8328 template <int texType, enum hipTextureReadMode mode>
8329 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1DLayeredLod(texture<uchar1, texType, mode> texRef, float x,
8330  int layer, float level) {
8331  TEXTURE_REF_PARAMETERS_INIT;
8332  texel.f =
8333  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8334  TEXTURE_RETURN_UCHAR_X;
8335 }
8336 
8337 template <int texType, enum hipTextureReadMode mode>
8338 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1DLayeredLod(texture<uchar2, texType, mode> texRef, float x,
8339  int layer, float level) {
8340  TEXTURE_REF_PARAMETERS_INIT;
8341  texel.f =
8342  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8343  TEXTURE_RETURN_UCHAR_XY;
8344 }
8345 
8346 template <int texType, enum hipTextureReadMode mode>
8347 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1DLayeredLod(texture<uchar4, texType, mode> texRef, float x,
8348  int layer, float level) {
8349  TEXTURE_REF_PARAMETERS_INIT;
8350  texel.f =
8351  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8352  TEXTURE_RETURN_UCHAR_XYZW;
8353 }
8354 
8355 template <int texType, enum hipTextureReadMode mode>
8356 __TEXTURE_FUNCTIONS_DECL__ short tex1DLayeredLod(texture<short, texType, mode> texRef, float x,
8357  int layer, float level) {
8358  TEXTURE_REF_PARAMETERS_INIT;
8359  texel.f =
8360  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8361  TEXTURE_RETURN_SHORT;
8362 }
8363 
8364 template <int texType, enum hipTextureReadMode mode>
8365 __TEXTURE_FUNCTIONS_DECL__ short1 tex1DLayeredLod(texture<short1, texType, mode> texRef, float x,
8366  int layer, float level) {
8367  TEXTURE_REF_PARAMETERS_INIT;
8368  texel.f =
8369  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8370  TEXTURE_RETURN_SHORT_X;
8371 }
8372 
8373 template <int texType, enum hipTextureReadMode mode>
8374 __TEXTURE_FUNCTIONS_DECL__ short2 tex1DLayeredLod(texture<short2, texType, mode> texRef, float x,
8375  int layer, float level) {
8376  TEXTURE_REF_PARAMETERS_INIT;
8377  texel.f =
8378  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8379  TEXTURE_RETURN_SHORT_XY;
8380 }
8381 
8382 template <int texType, enum hipTextureReadMode mode>
8383 __TEXTURE_FUNCTIONS_DECL__ short4 tex1DLayeredLod(texture<short4, texType, mode> texRef, float x,
8384  int layer, float level) {
8385  TEXTURE_REF_PARAMETERS_INIT;
8386  texel.f =
8387  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8388  TEXTURE_RETURN_SHORT_XYZW;
8389 }
8390 
8391 template <int texType, enum hipTextureReadMode mode>
8392 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1DLayeredLod(
8393  texture<unsigned short, texType, mode> texRef, float x, int layer, float level) {
8394  TEXTURE_REF_PARAMETERS_INIT;
8395  texel.f =
8396  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8397  TEXTURE_RETURN_USHORT;
8398 }
8399 
8400 template <int texType, enum hipTextureReadMode mode>
8401 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1DLayeredLod(texture<ushort1, texType, mode> texRef, float x,
8402  int layer, float level) {
8403  TEXTURE_REF_PARAMETERS_INIT;
8404  texel.f =
8405  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8406  TEXTURE_RETURN_USHORT_X;
8407 }
8408 
8409 template <int texType, enum hipTextureReadMode mode>
8410 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1DLayeredLod(texture<ushort2, texType, mode> texRef, float x,
8411  int layer, float level) {
8412  TEXTURE_REF_PARAMETERS_INIT;
8413  texel.f =
8414  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8415  TEXTURE_RETURN_USHORT_XY;
8416 }
8417 
8418 template <int texType, enum hipTextureReadMode mode>
8419 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1DLayeredLod(texture<ushort4, texType, mode> texRef, float x,
8420  int layer, float level) {
8421  TEXTURE_REF_PARAMETERS_INIT;
8422  texel.f =
8423  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8424  TEXTURE_RETURN_USHORT_XYZW;
8425 }
8426 
8427 template <int texType, enum hipTextureReadMode mode>
8428 __TEXTURE_FUNCTIONS_DECL__ int tex1DLayeredLod(texture<int, texType, mode> texRef, float x,
8429  int layer, float level) {
8430  TEXTURE_REF_PARAMETERS_INIT;
8431  texel.f =
8432  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8433  TEXTURE_RETURN_INT;
8434 }
8435 
8436 template <int texType, enum hipTextureReadMode mode>
8437 __TEXTURE_FUNCTIONS_DECL__ int1 tex1DLayeredLod(texture<int1, texType, mode> texRef, float x,
8438  int layer, float level) {
8439  TEXTURE_REF_PARAMETERS_INIT;
8440  texel.f =
8441  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8442  TEXTURE_RETURN_INT_X;
8443 }
8444 
8445 template <int texType, enum hipTextureReadMode mode>
8446 __TEXTURE_FUNCTIONS_DECL__ int2 tex1DLayeredLod(texture<int2, texType, mode> texRef, float x,
8447  int layer, float level) {
8448  TEXTURE_REF_PARAMETERS_INIT;
8449  texel.f =
8450  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8451  TEXTURE_RETURN_INT_XY;
8452 }
8453 
8454 template <int texType, enum hipTextureReadMode mode>
8455 __TEXTURE_FUNCTIONS_DECL__ int4 tex1DLayeredLod(texture<int4, texType, mode> texRef, float x,
8456  int layer, float level) {
8457  TEXTURE_REF_PARAMETERS_INIT;
8458  texel.f =
8459  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8460  TEXTURE_RETURN_INT_XYZW;
8461 }
8462 
8463 template <int texType, enum hipTextureReadMode mode>
8464 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1DLayeredLod(texture<unsigned int, texType, mode> texRef,
8465  float x, int layer, float level) {
8466  TEXTURE_REF_PARAMETERS_INIT;
8467  texel.f =
8468  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8469  TEXTURE_RETURN_UINT;
8470 }
8471 
8472 template <int texType, enum hipTextureReadMode mode>
8473 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1DLayeredLod(texture<uint1, texType, mode> texRef, float x,
8474  int layer, float level) {
8475  TEXTURE_REF_PARAMETERS_INIT;
8476  texel.f =
8477  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8478  TEXTURE_RETURN_UINT_X;
8479 }
8480 
8481 template <int texType, enum hipTextureReadMode mode>
8482 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1DLayeredLod(texture<uint2, texType, mode> texRef, float x,
8483  int layer, float level) {
8484  TEXTURE_REF_PARAMETERS_INIT;
8485  texel.f =
8486  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8487  TEXTURE_RETURN_UINT_XY;
8488 }
8489 
8490 template <int texType, enum hipTextureReadMode mode>
8491 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1DLayeredLod(texture<uint4, texType, mode> texRef, float x,
8492  int layer, float level) {
8493  TEXTURE_REF_PARAMETERS_INIT;
8494  texel.f =
8495  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8496  TEXTURE_RETURN_UINT_XYZW;
8497 }
8498 
8499 template <int texType, enum hipTextureReadMode mode>
8500 __TEXTURE_FUNCTIONS_DECL__ float tex1DLayeredLod(texture<float, texType, mode> texRef, float x,
8501  int layer, float level) {
8502  TEXTURE_REF_PARAMETERS_INIT;
8503  texel.f =
8504  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8505  TEXTURE_RETURN_FLOAT;
8506 }
8507 
8508 template <int texType, enum hipTextureReadMode mode>
8509 __TEXTURE_FUNCTIONS_DECL__ float1 tex1DLayeredLod(texture<float1, texType, mode> texRef, float x,
8510  int layer, float level) {
8511  TEXTURE_REF_PARAMETERS_INIT;
8512  texel.f =
8513  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8514  TEXTURE_RETURN_FLOAT_X;
8515 }
8516 
8517 template <int texType, enum hipTextureReadMode mode>
8518 __TEXTURE_FUNCTIONS_DECL__ float2 tex1DLayeredLod(texture<float2, texType, mode> texRef, float x,
8519  int layer, float level) {
8520  TEXTURE_REF_PARAMETERS_INIT;
8521  texel.f =
8522  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8523  TEXTURE_RETURN_FLOAT_XY;
8524 }
8525 
8526 template <int texType, enum hipTextureReadMode mode>
8527 __TEXTURE_FUNCTIONS_DECL__ float4 tex1DLayeredLod(texture<float4, texType, mode> texRef, float x,
8528  int layer, float level) {
8529  TEXTURE_REF_PARAMETERS_INIT;
8530  texel.f =
8531  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8532  TEXTURE_RETURN_FLOAT_XYZW;
8533 }
8534 
8536 
8537 template <int texType, enum hipTextureReadMode mode>
8538 __TEXTURE_FUNCTIONS_DECL__ char tex1DLayeredLod(texture<char, texType, mode> texRef,
8539  hipTextureObject_t textureObject, float x,
8540  int layer, float level) {
8541  TEXTURE_PARAMETERS_INIT;
8542  texel.f =
8543  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8544  TEXTURE_RETURN_CHAR;
8545 }
8546 
8547 template <int texType, enum hipTextureReadMode mode>
8548 __TEXTURE_FUNCTIONS_DECL__ char1 tex1DLayeredLod(texture<char1, texType, mode> texRef,
8549  hipTextureObject_t textureObject, float x,
8550  int layer, float level) {
8551  TEXTURE_PARAMETERS_INIT;
8552  texel.f =
8553  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8554  TEXTURE_RETURN_CHAR_X;
8555 }
8556 
8557 template <int texType, enum hipTextureReadMode mode>
8558 __TEXTURE_FUNCTIONS_DECL__ char2 tex1DLayeredLod(texture<char2, texType, mode> texRef,
8559  hipTextureObject_t textureObject, float x,
8560  int layer, float level) {
8561  TEXTURE_PARAMETERS_INIT;
8562  texel.f =
8563  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8564  TEXTURE_RETURN_CHAR_XY;
8565 }
8566 
8567 template <int texType, enum hipTextureReadMode mode>
8568 __TEXTURE_FUNCTIONS_DECL__ char4 tex1DLayeredLod(texture<char4, texType, mode> texRef,
8569  hipTextureObject_t textureObject, float x,
8570  int layer, float level) {
8571  TEXTURE_PARAMETERS_INIT;
8572  texel.f =
8573  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8574  TEXTURE_RETURN_CHAR_XYZW;
8575 }
8576 
8577 template <int texType, enum hipTextureReadMode mode>
8578 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1DLayeredLod(
8579  texture<unsigned char, texType, mode> texRef, hipTextureObject_t textureObject, float x,
8580  int layer, float level) {
8581  TEXTURE_PARAMETERS_INIT;
8582  texel.f =
8583  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8584  TEXTURE_RETURN_UCHAR;
8585 }
8586 
8587 template <int texType, enum hipTextureReadMode mode>
8588 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1DLayeredLod(texture<uchar1, texType, mode> texRef,
8589  hipTextureObject_t textureObject, float x,
8590  int layer, float level) {
8591  TEXTURE_PARAMETERS_INIT;
8592  texel.f =
8593  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8594  TEXTURE_RETURN_UCHAR_X;
8595 }
8596 
8597 template <int texType, enum hipTextureReadMode mode>
8598 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1DLayeredLod(texture<uchar2, texType, mode> texRef,
8599  hipTextureObject_t textureObject, float x,
8600  int layer, float level) {
8601  TEXTURE_PARAMETERS_INIT;
8602  texel.f =
8603  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8604  TEXTURE_RETURN_UCHAR_XY;
8605 }
8606 
8607 template <int texType, enum hipTextureReadMode mode>
8608 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1DLayeredLod(texture<uchar4, texType, mode> texRef,
8609  hipTextureObject_t textureObject, float x,
8610  int layer, float level) {
8611  TEXTURE_PARAMETERS_INIT;
8612  texel.f =
8613  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8614  TEXTURE_RETURN_UCHAR_XYZW;
8615 }
8616 
8617 template <int texType, enum hipTextureReadMode mode>
8618 __TEXTURE_FUNCTIONS_DECL__ short tex1DLayeredLod(texture<short, texType, mode> texRef,
8619  hipTextureObject_t textureObject, float x,
8620  int layer, float level) {
8621  TEXTURE_PARAMETERS_INIT;
8622  texel.f =
8623  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8624  TEXTURE_RETURN_SHORT;
8625 }
8626 
8627 template <int texType, enum hipTextureReadMode mode>
8628 __TEXTURE_FUNCTIONS_DECL__ short1 tex1DLayeredLod(texture<short1, texType, mode> texRef,
8629  hipTextureObject_t textureObject, float x,
8630  int layer, float level) {
8631  TEXTURE_PARAMETERS_INIT;
8632  texel.f =
8633  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8634  TEXTURE_RETURN_SHORT_X;
8635 }
8636 
8637 template <int texType, enum hipTextureReadMode mode>
8638 __TEXTURE_FUNCTIONS_DECL__ short2 tex1DLayeredLod(texture<short2, texType, mode> texRef,
8639  hipTextureObject_t textureObject, float x,
8640  int layer, float level) {
8641  TEXTURE_PARAMETERS_INIT;
8642  texel.f =
8643  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8644  TEXTURE_RETURN_SHORT_XY;
8645 }
8646 
8647 template <int texType, enum hipTextureReadMode mode>
8648 __TEXTURE_FUNCTIONS_DECL__ short4 tex1DLayeredLod(texture<short4, texType, mode> texRef,
8649  hipTextureObject_t textureObject, float x,
8650  int layer, float level) {
8651  TEXTURE_PARAMETERS_INIT;
8652  texel.f =
8653  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8654  TEXTURE_RETURN_SHORT_XYZW;
8655 }
8656 
8657 template <int texType, enum hipTextureReadMode mode>
8658 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1DLayeredLod(
8659  texture<unsigned short, texType, mode> texRef, hipTextureObject_t textureObject, float x,
8660  int layer, float level) {
8661  TEXTURE_PARAMETERS_INIT;
8662  texel.f =
8663  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8664  TEXTURE_RETURN_USHORT;
8665 }
8666 
8667 template <int texType, enum hipTextureReadMode mode>
8668 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1DLayeredLod(texture<ushort1, texType, mode> texRef,
8669  hipTextureObject_t textureObject, float x,
8670  int layer, float level) {
8671  TEXTURE_PARAMETERS_INIT;
8672  texel.f =
8673  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8674  TEXTURE_RETURN_USHORT_X;
8675 }
8676 
8677 template <int texType, enum hipTextureReadMode mode>
8678 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1DLayeredLod(texture<ushort2, texType, mode> texRef,
8679  hipTextureObject_t textureObject, float x,
8680  int layer, float level) {
8681  TEXTURE_PARAMETERS_INIT;
8682  texel.f =
8683  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8684  TEXTURE_RETURN_USHORT_XY;
8685 }
8686 
8687 template <int texType, enum hipTextureReadMode mode>
8688 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1DLayeredLod(texture<ushort4, texType, mode> texRef,
8689  hipTextureObject_t textureObject, float x,
8690  int layer, float level) {
8691  TEXTURE_PARAMETERS_INIT;
8692  texel.f =
8693  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8694  TEXTURE_RETURN_USHORT_XYZW;
8695 }
8696 
8697 template <int texType, enum hipTextureReadMode mode>
8698 __TEXTURE_FUNCTIONS_DECL__ int tex1DLayeredLod(texture<int, texType, mode> texRef,
8699  hipTextureObject_t textureObject, float x, int layer,
8700  float level) {
8701  TEXTURE_PARAMETERS_INIT;
8702  texel.f =
8703  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8704  TEXTURE_RETURN_INT;
8705 }
8706 
8707 template <int texType, enum hipTextureReadMode mode>
8708 __TEXTURE_FUNCTIONS_DECL__ int1 tex1DLayeredLod(texture<int1, texType, mode> texRef,
8709  hipTextureObject_t textureObject, float x,
8710  int layer, float level) {
8711  TEXTURE_PARAMETERS_INIT;
8712  texel.f =
8713  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8714  TEXTURE_RETURN_INT_X;
8715 }
8716 
8717 template <int texType, enum hipTextureReadMode mode>
8718 __TEXTURE_FUNCTIONS_DECL__ int2 tex1DLayeredLod(texture<int2, texType, mode> texRef,
8719  hipTextureObject_t textureObject, float x,
8720  int layer, float level) {
8721  TEXTURE_PARAMETERS_INIT;
8722  texel.f =
8723  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8724  TEXTURE_RETURN_INT_XY;
8725 }
8726 
8727 template <int texType, enum hipTextureReadMode mode>
8728 __TEXTURE_FUNCTIONS_DECL__ int4 tex1DLayeredLod(texture<int4, texType, mode> texRef,
8729  hipTextureObject_t textureObject, float x,
8730  int layer, float level) {
8731  TEXTURE_PARAMETERS_INIT;
8732  texel.f =
8733  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8734  TEXTURE_RETURN_INT_XYZW;
8735 }
8736 
8737 template <int texType, enum hipTextureReadMode mode>
8738 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1DLayeredLod(texture<unsigned int, texType, mode> texRef,
8739  hipTextureObject_t textureObject, float x,
8740  int layer, float level) {
8741  TEXTURE_PARAMETERS_INIT;
8742  texel.f =
8743  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8744  TEXTURE_RETURN_UINT;
8745 }
8746 
8747 template <int texType, enum hipTextureReadMode mode>
8748 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1DLayeredLod(texture<uint1, texType, mode> texRef,
8749  hipTextureObject_t textureObject, float x,
8750  int layer, float level) {
8751  TEXTURE_PARAMETERS_INIT;
8752  texel.f =
8753  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8754  TEXTURE_RETURN_UINT_X;
8755 }
8756 
8757 template <int texType, enum hipTextureReadMode mode>
8758 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1DLayeredLod(texture<uint2, texType, mode> texRef,
8759  hipTextureObject_t textureObject, float x,
8760  int layer, float level) {
8761  TEXTURE_PARAMETERS_INIT;
8762  texel.f =
8763  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8764  TEXTURE_RETURN_UINT_XY;
8765 }
8766 
8767 template <int texType, enum hipTextureReadMode mode>
8768 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1DLayeredLod(texture<uint4, texType, mode> texRef,
8769  hipTextureObject_t textureObject, float x,
8770  int layer, float level) {
8771  TEXTURE_PARAMETERS_INIT;
8772  texel.f =
8773  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8774  TEXTURE_RETURN_UINT_XYZW;
8775 }
8776 
8777 template <int texType, enum hipTextureReadMode mode>
8778 __TEXTURE_FUNCTIONS_DECL__ float tex1DLayeredLod(texture<float, texType, mode> texRef,
8779  hipTextureObject_t textureObject, float x,
8780  int layer, float level) {
8781  TEXTURE_PARAMETERS_INIT;
8782  texel.f =
8783  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8784  TEXTURE_RETURN_FLOAT;
8785 }
8786 
8787 template <int texType, enum hipTextureReadMode mode>
8788 __TEXTURE_FUNCTIONS_DECL__ float1 tex1DLayeredLod(texture<float1, texType, mode> texRef,
8789  hipTextureObject_t textureObject, float x,
8790  int layer, float level) {
8791  TEXTURE_PARAMETERS_INIT;
8792  texel.f =
8793  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8794  TEXTURE_RETURN_FLOAT_X;
8795 }
8796 
8797 template <int texType, enum hipTextureReadMode mode>
8798 __TEXTURE_FUNCTIONS_DECL__ float2 tex1DLayeredLod(texture<float2, texType, mode> texRef,
8799  hipTextureObject_t textureObject, float x,
8800  int layer, float level) {
8801  TEXTURE_PARAMETERS_INIT;
8802  texel.f =
8803  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8804  TEXTURE_RETURN_FLOAT_XY;
8805 }
8806 
8807 template <int texType, enum hipTextureReadMode mode>
8808 __TEXTURE_FUNCTIONS_DECL__ float4 tex1DLayeredLod(texture<float4, texType, mode> texRef,
8809  hipTextureObject_t textureObject, float x,
8810  int layer, float level) {
8811  TEXTURE_PARAMETERS_INIT;
8812  texel.f =
8813  __ockl_image_sample_lod_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), level);
8814  TEXTURE_RETURN_FLOAT_XYZW;
8815 }
8816 
8818 
8819 template <int texType, enum hipTextureReadMode mode>
8820 __TEXTURE_FUNCTIONS_DECL__ char tex1DLayeredGrad(texture<char, texType, mode> texRef, float x,
8821  int layer, float dx, float dy) {
8822  TEXTURE_REF_PARAMETERS_INIT;
8823  texel.f =
8824  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8825  TEXTURE_RETURN_CHAR;
8826 }
8827 
8828 template <int texType, enum hipTextureReadMode mode>
8829 __TEXTURE_FUNCTIONS_DECL__ char tex1DLayeredGrad(texture<char, texType, mode> texRef,
8830  hipTextureObject_t textureObject, float x,
8831  int layer, float dx, float dy) {
8832  TEXTURE_PARAMETERS_INIT;
8833  texel.f =
8834  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8835  TEXTURE_RETURN_CHAR;
8836 }
8837 
8838 template <int texType, enum hipTextureReadMode mode>
8839 __TEXTURE_FUNCTIONS_DECL__ char1 tex1DLayeredGrad(texture<char1, texType, mode> texRef, float x,
8840  int layer, float dx, float dy) {
8841  TEXTURE_REF_PARAMETERS_INIT;
8842  texel.f =
8843  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8844  TEXTURE_RETURN_CHAR_X;
8845 }
8846 
8847 template <int texType, enum hipTextureReadMode mode>
8848 __TEXTURE_FUNCTIONS_DECL__ char1 tex1DLayeredGrad(texture<char1, texType, mode> texRef,
8849  hipTextureObject_t textureObject, float x,
8850  int layer, float dx, float dy) {
8851  TEXTURE_PARAMETERS_INIT;
8852  texel.f =
8853  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8854  TEXTURE_RETURN_CHAR_X;
8855 }
8856 
8857 template <int texType, enum hipTextureReadMode mode>
8858 __TEXTURE_FUNCTIONS_DECL__ char2 tex1DLayeredGrad(texture<char2, texType, mode> texRef, float x,
8859  int layer, float dx, float dy) {
8860  TEXTURE_REF_PARAMETERS_INIT;
8861  texel.f =
8862  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8863  TEXTURE_RETURN_CHAR_XY;
8864 }
8865 
8866 template <int texType, enum hipTextureReadMode mode>
8867 __TEXTURE_FUNCTIONS_DECL__ char2 tex1DLayeredGrad(texture<char2, texType, mode> texRef,
8868  hipTextureObject_t textureObject, float x,
8869  int layer, float dx, float dy) {
8870  TEXTURE_PARAMETERS_INIT;
8871  texel.f =
8872  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8873  TEXTURE_RETURN_CHAR_XY;
8874 }
8875 
8876 template <int texType, enum hipTextureReadMode mode>
8877 __TEXTURE_FUNCTIONS_DECL__ char4 tex1DLayeredGrad(texture<char4, texType, mode> texRef, float x,
8878  int layer, float dx, float dy) {
8879  TEXTURE_REF_PARAMETERS_INIT;
8880  texel.f =
8881  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8882  TEXTURE_RETURN_CHAR_XYZW;
8883 }
8884 
8885 template <int texType, enum hipTextureReadMode mode>
8886 __TEXTURE_FUNCTIONS_DECL__ char4 tex1DLayeredGrad(texture<char4, texType, mode> texRef,
8887  hipTextureObject_t textureObject, float x,
8888  int layer, float dx, float dy) {
8889  TEXTURE_PARAMETERS_INIT;
8890  texel.f =
8891  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8892  TEXTURE_RETURN_CHAR_XYZW;
8893 }
8894 
8895 template <int texType, enum hipTextureReadMode mode>
8896 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1DLayeredGrad(
8897  texture<unsigned char, texType, mode> texRef, float x, int layer, float dx, float dy) {
8898  TEXTURE_REF_PARAMETERS_INIT;
8899  texel.f =
8900  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8901  TEXTURE_RETURN_UCHAR;
8902 }
8903 
8904 template <int texType, enum hipTextureReadMode mode>
8905 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex1DLayeredGrad(
8906  texture<unsigned char, texType, mode> texRef, hipTextureObject_t textureObject, float x,
8907  int layer, float dx, float dy) {
8908  TEXTURE_PARAMETERS_INIT;
8909  texel.f =
8910  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8911  TEXTURE_RETURN_UCHAR;
8912 }
8913 
8914 template <int texType, enum hipTextureReadMode mode>
8915 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1DLayeredGrad(texture<uchar1, texType, mode> texRef, float x,
8916  int layer, float dx, float dy) {
8917  TEXTURE_REF_PARAMETERS_INIT;
8918  texel.f =
8919  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8920  TEXTURE_RETURN_UCHAR_X;
8921 }
8922 
8923 template <int texType, enum hipTextureReadMode mode>
8924 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex1DLayeredGrad(texture<uchar1, texType, mode> texRef,
8925  hipTextureObject_t textureObject, float x,
8926  int layer, float dx, float dy) {
8927  TEXTURE_PARAMETERS_INIT;
8928  texel.f =
8929  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8930  TEXTURE_RETURN_UCHAR_X;
8931 }
8932 
8933 template <int texType, enum hipTextureReadMode mode>
8934 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1DLayeredGrad(texture<uchar2, texType, mode> texRef, float x,
8935  int layer, float dx, float dy) {
8936  TEXTURE_REF_PARAMETERS_INIT;
8937  texel.f =
8938  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8939  TEXTURE_RETURN_UCHAR_XY;
8940 }
8941 
8942 template <int texType, enum hipTextureReadMode mode>
8943 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex1DLayeredGrad(texture<uchar2, texType, mode> texRef,
8944  hipTextureObject_t textureObject, float x,
8945  int layer, float dx, float dy) {
8946  TEXTURE_PARAMETERS_INIT;
8947  texel.f =
8948  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8949  TEXTURE_RETURN_UCHAR_XY;
8950 }
8951 
8952 template <int texType, enum hipTextureReadMode mode>
8953 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1DLayeredGrad(texture<uchar4, texType, mode> texRef, float x,
8954  int layer, float dx, float dy) {
8955  TEXTURE_REF_PARAMETERS_INIT;
8956  texel.f =
8957  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8958  TEXTURE_RETURN_UCHAR_XYZW;
8959 }
8960 
8961 template <int texType, enum hipTextureReadMode mode>
8962 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex1DLayeredGrad(texture<uchar4, texType, mode> texRef,
8963  hipTextureObject_t textureObject, float x,
8964  int layer, float dx, float dy) {
8965  TEXTURE_PARAMETERS_INIT;
8966  texel.f =
8967  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8968  TEXTURE_RETURN_UCHAR_XYZW;
8969 }
8970 
8971 template <int texType, enum hipTextureReadMode mode>
8972 __TEXTURE_FUNCTIONS_DECL__ short tex1DLayeredGrad(texture<short, texType, mode> texRef, float x,
8973  int layer, float dx, float dy) {
8974  TEXTURE_REF_PARAMETERS_INIT;
8975  texel.f =
8976  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8977  TEXTURE_RETURN_SHORT;
8978 }
8979 
8980 template <int texType, enum hipTextureReadMode mode>
8981 __TEXTURE_FUNCTIONS_DECL__ short tex1DLayeredGrad(texture<short, texType, mode> texRef,
8982  hipTextureObject_t textureObject, float x,
8983  int layer, float dx, float dy) {
8984  TEXTURE_PARAMETERS_INIT;
8985  texel.f =
8986  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8987  TEXTURE_RETURN_SHORT;
8988 }
8989 
8990 template <int texType, enum hipTextureReadMode mode>
8991 __TEXTURE_FUNCTIONS_DECL__ short1 tex1DLayeredGrad(texture<short1, texType, mode> texRef, float x,
8992  int layer, float dx, float dy) {
8993  TEXTURE_REF_PARAMETERS_INIT;
8994  texel.f =
8995  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
8996  TEXTURE_RETURN_SHORT_X;
8997 }
8998 
8999 template <int texType, enum hipTextureReadMode mode>
9000 __TEXTURE_FUNCTIONS_DECL__ short1 tex1DLayeredGrad(texture<short1, texType, mode> texRef,
9001  hipTextureObject_t textureObject, float x,
9002  int layer, float dx, float dy) {
9003  TEXTURE_PARAMETERS_INIT;
9004  texel.f =
9005  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9006  TEXTURE_RETURN_SHORT_X;
9007 }
9008 
9009 template <int texType, enum hipTextureReadMode mode>
9010 __TEXTURE_FUNCTIONS_DECL__ short2 tex1DLayeredGrad(texture<short2, texType, mode> texRef, float x,
9011  int layer, float dx, float dy) {
9012  TEXTURE_REF_PARAMETERS_INIT;
9013  texel.f =
9014  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9015  TEXTURE_RETURN_SHORT_XY;
9016 }
9017 
9018 template <int texType, enum hipTextureReadMode mode>
9019 __TEXTURE_FUNCTIONS_DECL__ short2 tex1DLayeredGrad(texture<short2, texType, mode> texRef,
9020  hipTextureObject_t textureObject, float x,
9021  int layer, float dx, float dy) {
9022  TEXTURE_PARAMETERS_INIT;
9023  texel.f =
9024  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9025  TEXTURE_RETURN_SHORT_XY;
9026 }
9027 
9028 template <int texType, enum hipTextureReadMode mode>
9029 __TEXTURE_FUNCTIONS_DECL__ short4 tex1DLayeredGrad(texture<short4, texType, mode> texRef, float x,
9030  int layer, float dx, float dy) {
9031  TEXTURE_REF_PARAMETERS_INIT;
9032  texel.f =
9033  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9034  TEXTURE_RETURN_SHORT_XYZW;
9035 }
9036 
9037 template <int texType, enum hipTextureReadMode mode>
9038 __TEXTURE_FUNCTIONS_DECL__ short4 tex1DLayeredGrad(texture<short4, texType, mode> texRef,
9039  hipTextureObject_t textureObject, float x,
9040  int layer, float dx, float dy) {
9041  TEXTURE_PARAMETERS_INIT;
9042  texel.f =
9043  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9044  TEXTURE_RETURN_SHORT_XYZW;
9045 }
9046 
9047 template <int texType, enum hipTextureReadMode mode>
9048 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1DLayeredGrad(
9049  texture<unsigned short, texType, mode> texRef, float x, int layer, float dx, float dy) {
9050  TEXTURE_REF_PARAMETERS_INIT;
9051  texel.f =
9052  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9053  TEXTURE_RETURN_USHORT;
9054 }
9055 
9056 template <int texType, enum hipTextureReadMode mode>
9057 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex1DLayeredGrad(
9058  texture<unsigned short, texType, mode> texRef, hipTextureObject_t textureObject, float x,
9059  int layer, float dx, float dy) {
9060  TEXTURE_PARAMETERS_INIT;
9061  texel.f =
9062  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9063  TEXTURE_RETURN_USHORT;
9064 }
9065 
9066 template <int texType, enum hipTextureReadMode mode>
9067 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1DLayeredGrad(texture<ushort1, texType, mode> texRef, float x,
9068  int layer, float dx, float dy) {
9069  TEXTURE_REF_PARAMETERS_INIT;
9070  texel.f =
9071  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9072  TEXTURE_RETURN_USHORT_X;
9073 }
9074 
9075 template <int texType, enum hipTextureReadMode mode>
9076 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex1DLayeredGrad(texture<ushort1, texType, mode> texRef,
9077  hipTextureObject_t textureObject, float x,
9078  int layer, float dx, float dy) {
9079  TEXTURE_PARAMETERS_INIT;
9080  texel.f =
9081  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9082  TEXTURE_RETURN_USHORT_X;
9083 }
9084 
9085 template <int texType, enum hipTextureReadMode mode>
9086 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1DLayeredGrad(texture<ushort2, texType, mode> texRef, float x,
9087  int layer, float dx, float dy) {
9088  TEXTURE_REF_PARAMETERS_INIT;
9089  texel.f =
9090  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9091  TEXTURE_RETURN_USHORT_XY;
9092 }
9093 
9094 template <int texType, enum hipTextureReadMode mode>
9095 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex1DLayeredGrad(texture<ushort2, texType, mode> texRef,
9096  hipTextureObject_t textureObject, float x,
9097  int layer, float dx, float dy) {
9098  TEXTURE_PARAMETERS_INIT;
9099  texel.f =
9100  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9101  TEXTURE_RETURN_USHORT_XY;
9102 }
9103 
9104 template <int texType, enum hipTextureReadMode mode>
9105 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1DLayeredGrad(texture<ushort4, texType, mode> texRef, float x,
9106  int layer, float dx, float dy) {
9107  TEXTURE_REF_PARAMETERS_INIT;
9108  texel.f =
9109  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9110  TEXTURE_RETURN_USHORT_XYZW;
9111 }
9112 
9113 template <int texType, enum hipTextureReadMode mode>
9114 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex1DLayeredGrad(texture<ushort4, texType, mode> texRef,
9115  hipTextureObject_t textureObject, float x,
9116  int layer, float dx, float dy) {
9117  TEXTURE_PARAMETERS_INIT;
9118  texel.f =
9119  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9120  TEXTURE_RETURN_USHORT_XYZW;
9121 }
9122 
9123 template <int texType, enum hipTextureReadMode mode>
9124 __TEXTURE_FUNCTIONS_DECL__ int tex1DLayeredGrad(texture<int, texType, mode> texRef, float x,
9125  int layer, float dx, float dy) {
9126  TEXTURE_REF_PARAMETERS_INIT;
9127  texel.f =
9128  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9129  TEXTURE_RETURN_INT;
9130 }
9131 
9132 template <int texType, enum hipTextureReadMode mode>
9133 __TEXTURE_FUNCTIONS_DECL__ int tex1DLayeredGrad(texture<int, texType, mode> texRef,
9134  hipTextureObject_t textureObject, float x,
9135  int layer, float dx, float dy) {
9136  TEXTURE_PARAMETERS_INIT;
9137  texel.f =
9138  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9139  TEXTURE_RETURN_INT;
9140 }
9141 
9142 template <int texType, enum hipTextureReadMode mode>
9143 __TEXTURE_FUNCTIONS_DECL__ int1 tex1DLayeredGrad(texture<int1, texType, mode> texRef, float x,
9144  int layer, float dx, float dy) {
9145  TEXTURE_REF_PARAMETERS_INIT;
9146  texel.f =
9147  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9148  TEXTURE_RETURN_INT_X;
9149 }
9150 
9151 template <int texType, enum hipTextureReadMode mode>
9152 __TEXTURE_FUNCTIONS_DECL__ int1 tex1DLayeredGrad(texture<int1, texType, mode> texRef,
9153  hipTextureObject_t textureObject, float x,
9154  int layer, float dx, float dy) {
9155  TEXTURE_PARAMETERS_INIT;
9156  texel.f =
9157  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9158  TEXTURE_RETURN_INT_X;
9159 }
9160 
9161 template <int texType, enum hipTextureReadMode mode>
9162 __TEXTURE_FUNCTIONS_DECL__ int2 tex1DLayeredGrad(texture<int2, texType, mode> texRef, float x,
9163  int layer, float dx, float dy) {
9164  TEXTURE_REF_PARAMETERS_INIT;
9165  texel.f =
9166  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9167  TEXTURE_RETURN_INT_XY;
9168 }
9169 
9170 template <int texType, enum hipTextureReadMode mode>
9171 __TEXTURE_FUNCTIONS_DECL__ int2 tex1DLayeredGrad(texture<int2, texType, mode> texRef,
9172  hipTextureObject_t textureObject, float x,
9173  int layer, float dx, float dy) {
9174  TEXTURE_PARAMETERS_INIT;
9175  texel.f =
9176  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9177  TEXTURE_RETURN_INT_XY;
9178 }
9179 
9180 template <int texType, enum hipTextureReadMode mode>
9181 __TEXTURE_FUNCTIONS_DECL__ int4 tex1DLayeredGrad(texture<int4, texType, mode> texRef, float x,
9182  int layer, float dx, float dy) {
9183  TEXTURE_REF_PARAMETERS_INIT;
9184  texel.f =
9185  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9186  TEXTURE_RETURN_INT_XYZW;
9187 }
9188 
9189 template <int texType, enum hipTextureReadMode mode>
9190 __TEXTURE_FUNCTIONS_DECL__ int4 tex1DLayeredGrad(texture<int4, texType, mode> texRef,
9191  hipTextureObject_t textureObject, float x,
9192  int layer, float dx, float dy) {
9193  TEXTURE_PARAMETERS_INIT;
9194  texel.f =
9195  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9196  TEXTURE_RETURN_INT_XYZW;
9197 }
9198 
9199 template <int texType, enum hipTextureReadMode mode>
9200 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1DLayeredGrad(
9201  texture<unsigned int, texType, mode> texRef, float x, int layer, float dx, float dy) {
9202  TEXTURE_REF_PARAMETERS_INIT;
9203  texel.f =
9204  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9205  TEXTURE_RETURN_UINT;
9206 }
9207 
9208 template <int texType, enum hipTextureReadMode mode>
9209 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex1DLayeredGrad(
9210  texture<unsigned int, texType, mode> texRef, hipTextureObject_t textureObject, float x,
9211  int layer, float dx, float dy) {
9212  TEXTURE_PARAMETERS_INIT;
9213  texel.f =
9214  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9215  TEXTURE_RETURN_UINT;
9216 }
9217 
9218 template <int texType, enum hipTextureReadMode mode>
9219 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1DLayeredGrad(texture<uint1, texType, mode> texRef, float x,
9220  int layer, float dx, float dy) {
9221  TEXTURE_REF_PARAMETERS_INIT;
9222  texel.f =
9223  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9224  TEXTURE_RETURN_UINT_X;
9225 }
9226 
9227 template <int texType, enum hipTextureReadMode mode>
9228 __TEXTURE_FUNCTIONS_DECL__ uint1 tex1DLayeredGrad(texture<uint1, texType, mode> texRef,
9229  hipTextureObject_t textureObject, float x,
9230  int layer, float dx, float dy) {
9231  TEXTURE_PARAMETERS_INIT;
9232  texel.f =
9233  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9234  TEXTURE_RETURN_UINT_X;
9235 }
9236 
9237 template <int texType, enum hipTextureReadMode mode>
9238 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1DLayeredGrad(texture<uint2, texType, mode> texRef, float x,
9239  int layer, float dx, float dy) {
9240  TEXTURE_REF_PARAMETERS_INIT;
9241  texel.f =
9242  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9243  TEXTURE_RETURN_UINT_XY;
9244 }
9245 
9246 template <int texType, enum hipTextureReadMode mode>
9247 __TEXTURE_FUNCTIONS_DECL__ uint2 tex1DLayeredGrad(texture<uint2, texType, mode> texRef,
9248  hipTextureObject_t textureObject, float x,
9249  int layer, float dx, float dy) {
9250  TEXTURE_PARAMETERS_INIT;
9251  texel.f =
9252  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9253  TEXTURE_RETURN_UINT_XY;
9254 }
9255 
9256 template <int texType, enum hipTextureReadMode mode>
9257 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1DLayeredGrad(texture<uint4, texType, mode> texRef, float x,
9258  int layer, float dx, float dy) {
9259  TEXTURE_REF_PARAMETERS_INIT;
9260  texel.f =
9261  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9262  TEXTURE_RETURN_UINT_XYZW;
9263 }
9264 
9265 template <int texType, enum hipTextureReadMode mode>
9266 __TEXTURE_FUNCTIONS_DECL__ uint4 tex1DLayeredGrad(texture<uint4, texType, mode> texRef,
9267  hipTextureObject_t textureObject, float x,
9268  int layer, float dx, float dy) {
9269  TEXTURE_PARAMETERS_INIT;
9270  texel.f =
9271  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9272  TEXTURE_RETURN_UINT_XYZW;
9273 }
9274 
9275 template <int texType, enum hipTextureReadMode mode>
9276 __TEXTURE_FUNCTIONS_DECL__ float tex1DLayeredGrad(texture<float, texType, mode> texRef, float x,
9277  int layer, float dx, float dy) {
9278  TEXTURE_REF_PARAMETERS_INIT;
9279  texel.f =
9280  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9281  TEXTURE_RETURN_FLOAT;
9282 }
9283 
9284 template <int texType, enum hipTextureReadMode mode>
9285 __TEXTURE_FUNCTIONS_DECL__ float tex1DLayeredGrad(texture<float, texType, mode> texRef,
9286  hipTextureObject_t textureObject, float x,
9287  int layer, float dx, float dy) {
9288  TEXTURE_PARAMETERS_INIT;
9289  texel.f =
9290  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9291  TEXTURE_RETURN_FLOAT;
9292 }
9293 
9294 template <int texType, enum hipTextureReadMode mode>
9295 __TEXTURE_FUNCTIONS_DECL__ float1 tex1DLayeredGrad(texture<float1, texType, mode> texRef, float x,
9296  int layer, float dx, float dy) {
9297  TEXTURE_REF_PARAMETERS_INIT;
9298  texel.f =
9299  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9300  TEXTURE_RETURN_FLOAT_X;
9301 }
9302 
9303 template <int texType, enum hipTextureReadMode mode>
9304 __TEXTURE_FUNCTIONS_DECL__ float1 tex1DLayeredGrad(texture<float1, texType, mode> texRef,
9305  hipTextureObject_t textureObject, float x,
9306  int layer, float dx, float dy) {
9307  TEXTURE_PARAMETERS_INIT;
9308  texel.f =
9309  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9310  TEXTURE_RETURN_FLOAT_X;
9311 }
9312 
9313 template <int texType, enum hipTextureReadMode mode>
9314 __TEXTURE_FUNCTIONS_DECL__ float2 tex1DLayeredGrad(texture<float2, texType, mode> texRef, float x,
9315  int layer, float dx, float dy) {
9316  TEXTURE_REF_PARAMETERS_INIT;
9317  texel.f =
9318  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9319  TEXTURE_RETURN_FLOAT_XY;
9320 }
9321 
9322 template <int texType, enum hipTextureReadMode mode>
9323 __TEXTURE_FUNCTIONS_DECL__ float2 tex1DLayeredGrad(texture<float2, texType, mode> texRef,
9324  hipTextureObject_t textureObject, float x,
9325  int layer, float dx, float dy) {
9326  TEXTURE_PARAMETERS_INIT;
9327  texel.f =
9328  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9329  TEXTURE_RETURN_FLOAT_XY;
9330 }
9331 
9332 template <int texType, enum hipTextureReadMode mode>
9333 __TEXTURE_FUNCTIONS_DECL__ float4 tex1DLayeredGrad(texture<float4, texType, mode> texRef, float x,
9334  int layer, float dx, float dy) {
9335  TEXTURE_REF_PARAMETERS_INIT;
9336  texel.f =
9337  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9338  TEXTURE_RETURN_FLOAT_XYZW;
9339 }
9340 
9341 template <int texType, enum hipTextureReadMode mode>
9342 __TEXTURE_FUNCTIONS_DECL__ float4 tex1DLayeredGrad(texture<float4, texType, mode> texRef,
9343  hipTextureObject_t textureObject, float x,
9344  int layer, float dx, float dy) {
9345  TEXTURE_PARAMETERS_INIT;
9346  texel.f =
9347  __ockl_image_sample_grad_1Da(i, s, hc::short_vector::float2(x, layer).get_vector(), dx, dy);
9348  TEXTURE_RETURN_FLOAT_XYZW;
9349 }
9350 
9352 
9353 template <int texType, enum hipTextureReadMode mode>
9354 __TEXTURE_FUNCTIONS_DECL__ char tex2DLayered(texture<char, texType, mode> texRef, float x, float y,
9355  int layer) {
9356  TEXTURE_REF_PARAMETERS_INIT;
9357  texel.f =
9358  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9359  TEXTURE_RETURN_CHAR;
9360 }
9361 
9362 template <int texType, enum hipTextureReadMode mode>
9363 __TEXTURE_FUNCTIONS_DECL__ char tex2DLayered(texture<char, texType, mode> texRef,
9364  hipTextureObject_t textureObject, float x, float y,
9365  int layer) {
9366  TEXTURE_PARAMETERS_INIT;
9367  texel.f =
9368  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9369  TEXTURE_RETURN_CHAR;
9370 }
9371 
9372 template <int texType, enum hipTextureReadMode mode>
9373 __TEXTURE_FUNCTIONS_DECL__ char1 tex2DLayered(texture<char1, texType, mode> texRef, float x,
9374  float y, int layer) {
9375  TEXTURE_REF_PARAMETERS_INIT;
9376  texel.f =
9377  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9378  TEXTURE_RETURN_CHAR_X;
9379 }
9380 
9381 template <int texType, enum hipTextureReadMode mode>
9382 __TEXTURE_FUNCTIONS_DECL__ char1 tex2DLayered(texture<char1, texType, mode> texRef,
9383  hipTextureObject_t textureObject, float x, float y,
9384  int layer) {
9385  TEXTURE_PARAMETERS_INIT;
9386  texel.f =
9387  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9388  TEXTURE_RETURN_CHAR_X;
9389 }
9390 
9391 template <int texType, enum hipTextureReadMode mode>
9392 __TEXTURE_FUNCTIONS_DECL__ char2 tex2DLayered(texture<char2, texType, mode> texRef, float x,
9393  float y, int layer) {
9394  TEXTURE_REF_PARAMETERS_INIT;
9395  texel.f =
9396  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9397  TEXTURE_RETURN_CHAR_XY;
9398 }
9399 
9400 template <int texType, enum hipTextureReadMode mode>
9401 __TEXTURE_FUNCTIONS_DECL__ char2 tex2DLayered(texture<char2, texType, mode> texRef,
9402  hipTextureObject_t textureObject, float x, float y,
9403  int layer) {
9404  TEXTURE_PARAMETERS_INIT;
9405  texel.f =
9406  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9407  TEXTURE_RETURN_CHAR_XY;
9408 }
9409 
9410 template <int texType, enum hipTextureReadMode mode>
9411 __TEXTURE_FUNCTIONS_DECL__ char4 tex2DLayered(texture<char4, texType, mode> texRef, float x,
9412  float y, int layer) {
9413  TEXTURE_REF_PARAMETERS_INIT;
9414  texel.f =
9415  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9416  TEXTURE_RETURN_CHAR_XYZW;
9417 }
9418 
9419 template <int texType, enum hipTextureReadMode mode>
9420 __TEXTURE_FUNCTIONS_DECL__ char4 tex2DLayered(texture<char4, texType, mode> texRef,
9421  hipTextureObject_t textureObject, float x, float y,
9422  int layer) {
9423  TEXTURE_PARAMETERS_INIT;
9424  texel.f =
9425  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9426  TEXTURE_RETURN_CHAR_XYZW;
9427 }
9428 
9429 template <int texType, enum hipTextureReadMode mode>
9430 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2DLayered(texture<unsigned char, texType, mode> texRef,
9431  float x, float y, int layer) {
9432  TEXTURE_REF_PARAMETERS_INIT;
9433  texel.f =
9434  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9435  TEXTURE_RETURN_UCHAR;
9436 }
9437 
9438 template <int texType, enum hipTextureReadMode mode>
9439 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2DLayered(texture<unsigned char, texType, mode> texRef,
9440  hipTextureObject_t textureObject, float x,
9441  float y, int layer) {
9442  TEXTURE_PARAMETERS_INIT;
9443  texel.f =
9444  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9445  TEXTURE_RETURN_UCHAR;
9446 }
9447 
9448 template <int texType, enum hipTextureReadMode mode>
9449 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2DLayered(texture<uchar1, texType, mode> texRef, float x,
9450  float y, int layer) {
9451  TEXTURE_REF_PARAMETERS_INIT;
9452  texel.f =
9453  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9454  TEXTURE_RETURN_UCHAR_X;
9455 }
9456 
9457 template <int texType, enum hipTextureReadMode mode>
9458 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2DLayered(texture<uchar1, texType, mode> texRef,
9459  hipTextureObject_t textureObject, float x, float y,
9460  int layer) {
9461  TEXTURE_PARAMETERS_INIT;
9462  texel.f =
9463  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9464  TEXTURE_RETURN_UCHAR_X;
9465 }
9466 
9467 template <int texType, enum hipTextureReadMode mode>
9468 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2DLayered(texture<uchar2, texType, mode> texRef, float x,
9469  float y, int layer) {
9470  TEXTURE_REF_PARAMETERS_INIT;
9471  texel.f =
9472  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9473  TEXTURE_RETURN_UCHAR_XY;
9474 }
9475 
9476 template <int texType, enum hipTextureReadMode mode>
9477 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2DLayered(texture<uchar2, texType, mode> texRef,
9478  hipTextureObject_t textureObject, float x, float y,
9479  int layer) {
9480  TEXTURE_PARAMETERS_INIT;
9481  texel.f =
9482  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9483  TEXTURE_RETURN_UCHAR_XY;
9484 }
9485 
9486 template <int texType, enum hipTextureReadMode mode>
9487 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2DLayered(texture<uchar4, texType, mode> texRef, float x,
9488  float y, int layer) {
9489  TEXTURE_REF_PARAMETERS_INIT;
9490  texel.f =
9491  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9492  TEXTURE_RETURN_UCHAR_XYZW;
9493 }
9494 
9495 template <int texType, enum hipTextureReadMode mode>
9496 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2DLayered(texture<uchar4, texType, mode> texRef,
9497  hipTextureObject_t textureObject, float x, float y,
9498  int layer) {
9499  TEXTURE_PARAMETERS_INIT;
9500  texel.f =
9501  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9502  TEXTURE_RETURN_UCHAR_XYZW;
9503 }
9504 
9505 template <int texType, enum hipTextureReadMode mode>
9506 __TEXTURE_FUNCTIONS_DECL__ short tex2DLayered(texture<short, texType, mode> texRef, float x,
9507  float y, int layer) {
9508  TEXTURE_REF_PARAMETERS_INIT;
9509  texel.f =
9510  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9511  TEXTURE_RETURN_SHORT;
9512 }
9513 
9514 template <int texType, enum hipTextureReadMode mode>
9515 __TEXTURE_FUNCTIONS_DECL__ short tex2DLayered(texture<short, texType, mode> texRef,
9516  hipTextureObject_t textureObject, float x, float y,
9517  int layer) {
9518  TEXTURE_PARAMETERS_INIT;
9519  texel.f =
9520  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9521  TEXTURE_RETURN_SHORT;
9522 }
9523 
9524 template <int texType, enum hipTextureReadMode mode>
9525 __TEXTURE_FUNCTIONS_DECL__ short1 tex2DLayered(texture<short1, texType, mode> texRef, float x,
9526  float y, int layer) {
9527  TEXTURE_REF_PARAMETERS_INIT;
9528  texel.f =
9529  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9530  TEXTURE_RETURN_SHORT_X;
9531 }
9532 
9533 template <int texType, enum hipTextureReadMode mode>
9534 __TEXTURE_FUNCTIONS_DECL__ short1 tex2DLayered(texture<short1, texType, mode> texRef,
9535  hipTextureObject_t textureObject, float x, float y,
9536  int layer) {
9537  TEXTURE_PARAMETERS_INIT;
9538  texel.f =
9539  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9540  TEXTURE_RETURN_SHORT_X;
9541 }
9542 
9543 template <int texType, enum hipTextureReadMode mode>
9544 __TEXTURE_FUNCTIONS_DECL__ short2 tex2DLayered(texture<short2, texType, mode> texRef, float x,
9545  float y, int layer) {
9546  TEXTURE_REF_PARAMETERS_INIT;
9547  texel.f =
9548  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9549  TEXTURE_RETURN_SHORT_XY;
9550 }
9551 
9552 template <int texType, enum hipTextureReadMode mode>
9553 __TEXTURE_FUNCTIONS_DECL__ short2 tex2DLayered(texture<short2, texType, mode> texRef,
9554  hipTextureObject_t textureObject, float x, float y,
9555  int layer) {
9556  TEXTURE_PARAMETERS_INIT;
9557  texel.f =
9558  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9559  TEXTURE_RETURN_SHORT_XY;
9560 }
9561 
9562 template <int texType, enum hipTextureReadMode mode>
9563 __TEXTURE_FUNCTIONS_DECL__ short4 tex2DLayered(texture<short4, texType, mode> texRef, float x,
9564  float y, int layer) {
9565  TEXTURE_REF_PARAMETERS_INIT;
9566  texel.f =
9567  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9568  TEXTURE_RETURN_SHORT_XYZW;
9569 }
9570 
9571 template <int texType, enum hipTextureReadMode mode>
9572 __TEXTURE_FUNCTIONS_DECL__ short4 tex2DLayered(texture<short4, texType, mode> texRef,
9573  hipTextureObject_t textureObject, float x, float y,
9574  int layer) {
9575  TEXTURE_PARAMETERS_INIT;
9576  texel.f =
9577  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9578  TEXTURE_RETURN_SHORT_XYZW;
9579 }
9580 
9581 template <int texType, enum hipTextureReadMode mode>
9582 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2DLayered(
9583  texture<unsigned short, texType, mode> texRef, float x, float y, int layer) {
9584  TEXTURE_REF_PARAMETERS_INIT;
9585  texel.f =
9586  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9587  TEXTURE_RETURN_USHORT;
9588 }
9589 
9590 template <int texType, enum hipTextureReadMode mode>
9591 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2DLayered(
9592  texture<unsigned short, texType, mode> texRef, hipTextureObject_t textureObject, float x,
9593  float y, int layer) {
9594  TEXTURE_PARAMETERS_INIT;
9595  texel.f =
9596  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9597  TEXTURE_RETURN_USHORT;
9598 }
9599 
9600 template <int texType, enum hipTextureReadMode mode>
9601 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2DLayered(texture<ushort1, texType, mode> texRef, float x,
9602  float y, int layer) {
9603  TEXTURE_REF_PARAMETERS_INIT;
9604  texel.f =
9605  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9606  TEXTURE_RETURN_USHORT_X;
9607 }
9608 
9609 template <int texType, enum hipTextureReadMode mode>
9610 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2DLayered(texture<ushort1, texType, mode> texRef,
9611  hipTextureObject_t textureObject, float x, float y,
9612  int layer) {
9613  TEXTURE_PARAMETERS_INIT;
9614  texel.f =
9615  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9616  TEXTURE_RETURN_USHORT_X;
9617 }
9618 
9619 template <int texType, enum hipTextureReadMode mode>
9620 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2DLayered(texture<ushort2, texType, mode> texRef, float x,
9621  float y, int layer) {
9622  TEXTURE_REF_PARAMETERS_INIT;
9623  texel.f =
9624  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9625  TEXTURE_RETURN_USHORT_XY;
9626 }
9627 
9628 template <int texType, enum hipTextureReadMode mode>
9629 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2DLayered(texture<ushort2, texType, mode> texRef,
9630  hipTextureObject_t textureObject, float x, float y,
9631  int layer) {
9632  TEXTURE_PARAMETERS_INIT;
9633  texel.f =
9634  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9635  TEXTURE_RETURN_USHORT_XY;
9636 }
9637 
9638 template <int texType, enum hipTextureReadMode mode>
9639 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2DLayered(texture<ushort4, texType, mode> texRef, float x,
9640  float y, int layer) {
9641  TEXTURE_REF_PARAMETERS_INIT;
9642  texel.f =
9643  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9644  TEXTURE_RETURN_USHORT_XYZW;
9645 }
9646 
9647 template <int texType, enum hipTextureReadMode mode>
9648 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2DLayered(texture<ushort4, texType, mode> texRef,
9649  hipTextureObject_t textureObject, float x, float y,
9650  int layer) {
9651  TEXTURE_PARAMETERS_INIT;
9652  texel.f =
9653  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9654  TEXTURE_RETURN_USHORT_XYZW;
9655 }
9656 
9657 template <int texType, enum hipTextureReadMode mode>
9658 __TEXTURE_FUNCTIONS_DECL__ int tex2DLayered(texture<int, texType, mode> texRef, float x, float y,
9659  int layer) {
9660  TEXTURE_REF_PARAMETERS_INIT;
9661  texel.f =
9662  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9663  TEXTURE_RETURN_INT;
9664 }
9665 
9666 template <int texType, enum hipTextureReadMode mode>
9667 __TEXTURE_FUNCTIONS_DECL__ int tex2DLayered(texture<int, texType, mode> texRef,
9668  hipTextureObject_t textureObject, float x, float y,
9669  int layer) {
9670  TEXTURE_PARAMETERS_INIT;
9671  texel.f =
9672  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9673  TEXTURE_RETURN_INT;
9674 }
9675 
9676 template <int texType, enum hipTextureReadMode mode>
9677 __TEXTURE_FUNCTIONS_DECL__ int1 tex2DLayered(texture<int1, texType, mode> texRef, float x, float y,
9678  int layer) {
9679  TEXTURE_REF_PARAMETERS_INIT;
9680  texel.f =
9681  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9682  TEXTURE_RETURN_INT_X;
9683 }
9684 
9685 template <int texType, enum hipTextureReadMode mode>
9686 __TEXTURE_FUNCTIONS_DECL__ int1 tex2DLayered(texture<int1, texType, mode> texRef,
9687  hipTextureObject_t textureObject, float x, float y,
9688  int layer) {
9689  TEXTURE_PARAMETERS_INIT;
9690  texel.f =
9691  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9692  TEXTURE_RETURN_INT_X;
9693 }
9694 
9695 template <int texType, enum hipTextureReadMode mode>
9696 __TEXTURE_FUNCTIONS_DECL__ int2 tex2DLayered(texture<int2, texType, mode> texRef, float x, float y,
9697  int layer) {
9698  TEXTURE_REF_PARAMETERS_INIT;
9699  texel.f =
9700  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9701  TEXTURE_RETURN_INT_XY;
9702 }
9703 
9704 template <int texType, enum hipTextureReadMode mode>
9705 __TEXTURE_FUNCTIONS_DECL__ int2 tex2DLayered(texture<int2, texType, mode> texRef,
9706  hipTextureObject_t textureObject, float x, float y,
9707  int layer) {
9708  TEXTURE_PARAMETERS_INIT;
9709  texel.f =
9710  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9711  TEXTURE_RETURN_INT_XY;
9712 }
9713 
9714 template <int texType, enum hipTextureReadMode mode>
9715 __TEXTURE_FUNCTIONS_DECL__ int4 tex2DLayered(texture<int4, texType, mode> texRef, float x, float y,
9716  int layer) {
9717  TEXTURE_REF_PARAMETERS_INIT;
9718  texel.f =
9719  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9720  TEXTURE_RETURN_INT_XYZW;
9721 }
9722 
9723 template <int texType, enum hipTextureReadMode mode>
9724 __TEXTURE_FUNCTIONS_DECL__ int4 tex2DLayered(texture<int4, texType, mode> texRef,
9725  hipTextureObject_t textureObject, float x, float y,
9726  int layer) {
9727  TEXTURE_PARAMETERS_INIT;
9728  texel.f =
9729  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9730  TEXTURE_RETURN_INT_XYZW;
9731 }
9732 
9733 template <int texType, enum hipTextureReadMode mode>
9734 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2DLayered(texture<unsigned int, texType, mode> texRef,
9735  float x, float y, int layer) {
9736  TEXTURE_REF_PARAMETERS_INIT;
9737  texel.f =
9738  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9739  TEXTURE_RETURN_UINT;
9740 }
9741 
9742 template <int texType, enum hipTextureReadMode mode>
9743 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2DLayered(texture<unsigned int, texType, mode> texRef,
9744  hipTextureObject_t textureObject, float x,
9745  float y, int layer) {
9746  TEXTURE_PARAMETERS_INIT;
9747  texel.f =
9748  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9749  TEXTURE_RETURN_UINT;
9750 }
9751 
9752 template <int texType, enum hipTextureReadMode mode>
9753 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2DLayered(texture<uint1, texType, mode> texRef, float x,
9754  float y, int layer) {
9755  TEXTURE_REF_PARAMETERS_INIT;
9756  texel.f =
9757  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9758  TEXTURE_RETURN_UINT_X;
9759 }
9760 
9761 template <int texType, enum hipTextureReadMode mode>
9762 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2DLayered(texture<uint1, texType, mode> texRef,
9763  hipTextureObject_t textureObject, float x, float y,
9764  int layer) {
9765  TEXTURE_PARAMETERS_INIT;
9766  texel.f =
9767  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9768  TEXTURE_RETURN_UINT_X;
9769 }
9770 
9771 template <int texType, enum hipTextureReadMode mode>
9772 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2DLayered(texture<uint2, texType, mode> texRef, float x,
9773  float y, int layer) {
9774  TEXTURE_REF_PARAMETERS_INIT;
9775  texel.f =
9776  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9777  TEXTURE_RETURN_UINT_XY;
9778 }
9779 
9780 template <int texType, enum hipTextureReadMode mode>
9781 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2DLayered(texture<uint2, texType, mode> texRef,
9782  hipTextureObject_t textureObject, float x, float y,
9783  int layer) {
9784  TEXTURE_PARAMETERS_INIT;
9785  texel.f =
9786  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9787  TEXTURE_RETURN_UINT_XY;
9788 }
9789 
9790 template <int texType, enum hipTextureReadMode mode>
9791 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2DLayered(texture<uint4, texType, mode> texRef, float x,
9792  float y, int layer) {
9793  TEXTURE_REF_PARAMETERS_INIT;
9794  texel.f =
9795  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9796  TEXTURE_RETURN_UINT_XYZW;
9797 }
9798 
9799 template <int texType, enum hipTextureReadMode mode>
9800 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2DLayered(texture<uint4, texType, mode> texRef,
9801  hipTextureObject_t textureObject, float x, float y,
9802  int layer) {
9803  TEXTURE_PARAMETERS_INIT;
9804  texel.f =
9805  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9806  TEXTURE_RETURN_UINT_XYZW;
9807 }
9808 
9809 template <int texType, enum hipTextureReadMode mode>
9810 __TEXTURE_FUNCTIONS_DECL__ float tex2DLayered(texture<float, texType, mode> texRef, float x,
9811  float y, int layer) {
9812  TEXTURE_REF_PARAMETERS_INIT;
9813  texel.f =
9814  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9815  TEXTURE_RETURN_FLOAT;
9816 }
9817 
9818 template <int texType, enum hipTextureReadMode mode>
9819 __TEXTURE_FUNCTIONS_DECL__ float tex2DLayered(texture<float, texType, mode> texRef,
9820  hipTextureObject_t textureObject, float x, float y,
9821  int layer) {
9822  TEXTURE_PARAMETERS_INIT;
9823  texel.f =
9824  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9825  TEXTURE_RETURN_FLOAT;
9826 }
9827 
9828 template <int texType, enum hipTextureReadMode mode>
9829 __TEXTURE_FUNCTIONS_DECL__ float1 tex2DLayered(texture<float1, texType, mode> texRef, float x,
9830  float y, int layer) {
9831  TEXTURE_REF_PARAMETERS_INIT;
9832  texel.f =
9833  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9834  TEXTURE_RETURN_FLOAT_X;
9835 }
9836 
9837 template <int texType, enum hipTextureReadMode mode>
9838 __TEXTURE_FUNCTIONS_DECL__ float1 tex2DLayered(texture<float1, texType, mode> texRef,
9839  hipTextureObject_t textureObject, float x, float y,
9840  int layer) {
9841  TEXTURE_PARAMETERS_INIT;
9842  texel.f =
9843  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9844  TEXTURE_RETURN_FLOAT_X;
9845 }
9846 
9847 template <int texType, enum hipTextureReadMode mode>
9848 __TEXTURE_FUNCTIONS_DECL__ float2 tex2DLayered(texture<float2, texType, mode> texRef, float x,
9849  float y, int layer) {
9850  TEXTURE_REF_PARAMETERS_INIT;
9851  texel.f =
9852  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9853  TEXTURE_RETURN_FLOAT_XY;
9854 }
9855 
9856 template <int texType, enum hipTextureReadMode mode>
9857 __TEXTURE_FUNCTIONS_DECL__ float2 tex2DLayered(texture<float2, texType, mode> texRef,
9858  hipTextureObject_t textureObject, float x, float y,
9859  int layer) {
9860  TEXTURE_PARAMETERS_INIT;
9861  texel.f =
9862  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9863  TEXTURE_RETURN_FLOAT_XY;
9864 }
9865 
9866 template <int texType, enum hipTextureReadMode mode>
9867 __TEXTURE_FUNCTIONS_DECL__ float4 tex2DLayered(texture<float4, texType, mode> texRef, float x,
9868  float y, int layer) {
9869  TEXTURE_REF_PARAMETERS_INIT;
9870  texel.f =
9871  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9872  TEXTURE_RETURN_FLOAT_XYZW;
9873 }
9874 
9875 template <int texType, enum hipTextureReadMode mode>
9876 __TEXTURE_FUNCTIONS_DECL__ float4 tex2DLayered(texture<float4, texType, mode> texRef,
9877  hipTextureObject_t textureObject, float x, float y,
9878  int layer) {
9879  TEXTURE_PARAMETERS_INIT;
9880  texel.f =
9881  __ockl_image_sample_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector());
9882  TEXTURE_RETURN_FLOAT_XYZW;
9883 }
9884 
9886 
9887 template <int texType, enum hipTextureReadMode mode>
9888 __TEXTURE_FUNCTIONS_DECL__ char tex2DLayeredLod(texture<char, texType, mode> texRef, float x,
9889  float y, int layer, float level) {
9890  TEXTURE_REF_PARAMETERS_INIT;
9891  texel.f = __ockl_image_sample_lod_2Da(
9892  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9893  TEXTURE_RETURN_CHAR;
9894 }
9895 
9896 template <int texType, enum hipTextureReadMode mode>
9897 __TEXTURE_FUNCTIONS_DECL__ char tex2DLayeredLod(texture<char, texType, mode> texRef,
9898  hipTextureObject_t textureObject, float x, float y,
9899  int layer, float level) {
9900  TEXTURE_PARAMETERS_INIT;
9901  texel.f = __ockl_image_sample_lod_2Da(
9902  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9903  TEXTURE_RETURN_CHAR;
9904 }
9905 
9906 template <int texType, enum hipTextureReadMode mode>
9907 __TEXTURE_FUNCTIONS_DECL__ char1 tex2DLayeredLod(texture<char1, texType, mode> texRef, float x,
9908  float y, int layer, float level) {
9909  TEXTURE_REF_PARAMETERS_INIT;
9910  texel.f = __ockl_image_sample_lod_2Da(
9911  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9912  TEXTURE_RETURN_CHAR_X;
9913 }
9914 
9915 template <int texType, enum hipTextureReadMode mode>
9916 __TEXTURE_FUNCTIONS_DECL__ char1 tex2DLayeredLod(texture<char1, texType, mode> texRef,
9917  hipTextureObject_t textureObject, float x, float y,
9918  int layer, float level) {
9919  TEXTURE_PARAMETERS_INIT;
9920  texel.f = __ockl_image_sample_lod_2Da(
9921  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9922  TEXTURE_RETURN_CHAR_X;
9923 }
9924 
9925 template <int texType, enum hipTextureReadMode mode>
9926 __TEXTURE_FUNCTIONS_DECL__ char2 tex2DLayeredLod(texture<char2, texType, mode> texRef, float x,
9927  float y, int layer, float level) {
9928  TEXTURE_REF_PARAMETERS_INIT;
9929  texel.f = __ockl_image_sample_lod_2Da(
9930  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9931  TEXTURE_RETURN_CHAR_XY;
9932 }
9933 
9934 template <int texType, enum hipTextureReadMode mode>
9935 __TEXTURE_FUNCTIONS_DECL__ char2 tex2DLayeredLod(texture<char2, texType, mode> texRef,
9936  hipTextureObject_t textureObject, float x, float y,
9937  int layer, float level) {
9938  TEXTURE_PARAMETERS_INIT;
9939  texel.f = __ockl_image_sample_lod_2Da(
9940  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9941  TEXTURE_RETURN_CHAR_XY;
9942 }
9943 
9944 template <int texType, enum hipTextureReadMode mode>
9945 __TEXTURE_FUNCTIONS_DECL__ char4 tex2DLayeredLod(texture<char4, texType, mode> texRef, float x,
9946  float y, int layer, float level) {
9947  TEXTURE_REF_PARAMETERS_INIT;
9948  texel.f = __ockl_image_sample_lod_2Da(
9949  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9950  TEXTURE_RETURN_CHAR_XYZW;
9951 }
9952 
9953 template <int texType, enum hipTextureReadMode mode>
9954 __TEXTURE_FUNCTIONS_DECL__ char4 tex2DLayeredLod(texture<char4, texType, mode> texRef,
9955  hipTextureObject_t textureObject, float x, float y,
9956  int layer, float level) {
9957  TEXTURE_PARAMETERS_INIT;
9958  texel.f = __ockl_image_sample_lod_2Da(
9959  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9960  TEXTURE_RETURN_CHAR_XYZW;
9961 }
9962 
9963 template <int texType, enum hipTextureReadMode mode>
9964 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2DLayeredLod(
9965  texture<unsigned char, texType, mode> texRef, float x, float y, int layer, float level) {
9966  TEXTURE_REF_PARAMETERS_INIT;
9967  texel.f = __ockl_image_sample_lod_2Da(
9968  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9969  TEXTURE_RETURN_UCHAR;
9970 }
9971 
9972 template <int texType, enum hipTextureReadMode mode>
9973 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2DLayeredLod(
9974  texture<unsigned char, texType, mode> texRef, hipTextureObject_t textureObject, float x,
9975  float y, int layer, float level) {
9976  TEXTURE_PARAMETERS_INIT;
9977  texel.f = __ockl_image_sample_lod_2Da(
9978  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9979  TEXTURE_RETURN_UCHAR;
9980 }
9981 
9982 template <int texType, enum hipTextureReadMode mode>
9983 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2DLayeredLod(texture<uchar1, texType, mode> texRef, float x,
9984  float y, int layer, float level) {
9985  TEXTURE_REF_PARAMETERS_INIT;
9986  texel.f = __ockl_image_sample_lod_2Da(
9987  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9988  TEXTURE_RETURN_UCHAR_X;
9989 }
9990 
9991 template <int texType, enum hipTextureReadMode mode>
9992 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2DLayeredLod(texture<uchar1, texType, mode> texRef,
9993  hipTextureObject_t textureObject, float x,
9994  float y, int layer, float level) {
9995  TEXTURE_PARAMETERS_INIT;
9996  texel.f = __ockl_image_sample_lod_2Da(
9997  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
9998  TEXTURE_RETURN_UCHAR_X;
9999 }
10000 
10001 template <int texType, enum hipTextureReadMode mode>
10002 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2DLayeredLod(texture<uchar2, texType, mode> texRef, float x,
10003  float y, int layer, float level) {
10004  TEXTURE_REF_PARAMETERS_INIT;
10005  texel.f = __ockl_image_sample_lod_2Da(
10006  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10007  TEXTURE_RETURN_UCHAR_XY;
10008 }
10009 
10010 template <int texType, enum hipTextureReadMode mode>
10011 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2DLayeredLod(texture<uchar2, texType, mode> texRef,
10012  hipTextureObject_t textureObject, float x,
10013  float y, int layer, float level) {
10014  TEXTURE_PARAMETERS_INIT;
10015  texel.f = __ockl_image_sample_lod_2Da(
10016  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10017  TEXTURE_RETURN_UCHAR_XY;
10018 }
10019 
10020 template <int texType, enum hipTextureReadMode mode>
10021 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2DLayeredLod(texture<uchar4, texType, mode> texRef, float x,
10022  float y, int layer, float level) {
10023  TEXTURE_REF_PARAMETERS_INIT;
10024  texel.f = __ockl_image_sample_lod_2Da(
10025  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10026  TEXTURE_RETURN_UCHAR_XYZW;
10027 }
10028 
10029 template <int texType, enum hipTextureReadMode mode>
10030 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2DLayeredLod(texture<uchar4, texType, mode> texRef,
10031  hipTextureObject_t textureObject, float x,
10032  float y, int layer, float level) {
10033  TEXTURE_PARAMETERS_INIT;
10034  texel.f = __ockl_image_sample_lod_2Da(
10035  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10036  TEXTURE_RETURN_UCHAR_XYZW;
10037 }
10038 
10039 template <int texType, enum hipTextureReadMode mode>
10040 __TEXTURE_FUNCTIONS_DECL__ short tex2DLayeredLod(texture<short, texType, mode> texRef, float x,
10041  float y, int layer, float level) {
10042  TEXTURE_REF_PARAMETERS_INIT;
10043  texel.f = __ockl_image_sample_lod_2Da(
10044  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10045  TEXTURE_RETURN_SHORT;
10046 }
10047 
10048 template <int texType, enum hipTextureReadMode mode>
10049 __TEXTURE_FUNCTIONS_DECL__ short tex2DLayeredLod(texture<short, texType, mode> texRef,
10050  hipTextureObject_t textureObject, float x, float y,
10051  int layer, float level) {
10052  TEXTURE_PARAMETERS_INIT;
10053  texel.f = __ockl_image_sample_lod_2Da(
10054  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10055  TEXTURE_RETURN_SHORT;
10056 }
10057 
10058 template <int texType, enum hipTextureReadMode mode>
10059 __TEXTURE_FUNCTIONS_DECL__ short1 tex2DLayeredLod(texture<short1, texType, mode> texRef, float x,
10060  float y, int layer, float level) {
10061  TEXTURE_REF_PARAMETERS_INIT;
10062  texel.f = __ockl_image_sample_lod_2Da(
10063  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10064  TEXTURE_RETURN_SHORT_X;
10065 }
10066 
10067 template <int texType, enum hipTextureReadMode mode>
10068 __TEXTURE_FUNCTIONS_DECL__ short1 tex2DLayeredLod(texture<short1, texType, mode> texRef,
10069  hipTextureObject_t textureObject, float x,
10070  float y, int layer, float level) {
10071  TEXTURE_PARAMETERS_INIT;
10072  texel.f = __ockl_image_sample_lod_2Da(
10073  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10074  TEXTURE_RETURN_SHORT_X;
10075 }
10076 
10077 template <int texType, enum hipTextureReadMode mode>
10078 __TEXTURE_FUNCTIONS_DECL__ short2 tex2DLayeredLod(texture<short2, texType, mode> texRef, float x,
10079  float y, int layer, float level) {
10080  TEXTURE_REF_PARAMETERS_INIT;
10081  texel.f = __ockl_image_sample_lod_2Da(
10082  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10083  TEXTURE_RETURN_SHORT_XY;
10084 }
10085 
10086 template <int texType, enum hipTextureReadMode mode>
10087 __TEXTURE_FUNCTIONS_DECL__ short2 tex2DLayeredLod(texture<short2, texType, mode> texRef,
10088  hipTextureObject_t textureObject, float x,
10089  float y, int layer, float level) {
10090  TEXTURE_PARAMETERS_INIT;
10091  texel.f = __ockl_image_sample_lod_2Da(
10092  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10093  TEXTURE_RETURN_SHORT_XY;
10094 }
10095 
10096 template <int texType, enum hipTextureReadMode mode>
10097 __TEXTURE_FUNCTIONS_DECL__ short4 tex2DLayeredLod(texture<short4, texType, mode> texRef, float x,
10098  float y, int layer, float level) {
10099  TEXTURE_REF_PARAMETERS_INIT;
10100  texel.f = __ockl_image_sample_lod_2Da(
10101  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10102  TEXTURE_RETURN_SHORT_XYZW;
10103 }
10104 
10105 template <int texType, enum hipTextureReadMode mode>
10106 __TEXTURE_FUNCTIONS_DECL__ short4 tex2DLayeredLod(texture<short4, texType, mode> texRef,
10107  hipTextureObject_t textureObject, float x,
10108  float y, int layer, float level) {
10109  TEXTURE_PARAMETERS_INIT;
10110  texel.f = __ockl_image_sample_lod_2Da(
10111  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10112  TEXTURE_RETURN_SHORT_XYZW;
10113 }
10114 
10115 template <int texType, enum hipTextureReadMode mode>
10116 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2DLayeredLod(
10117  texture<unsigned short, texType, mode> texRef, float x, float y, int layer, float level) {
10118  TEXTURE_REF_PARAMETERS_INIT;
10119  texel.f = __ockl_image_sample_lod_2Da(
10120  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10121  TEXTURE_RETURN_USHORT;
10122 }
10123 
10124 template <int texType, enum hipTextureReadMode mode>
10125 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2DLayeredLod(
10126  texture<unsigned short, texType, mode> texRef, hipTextureObject_t textureObject, float x,
10127  float y, int layer, float level) {
10128  TEXTURE_PARAMETERS_INIT;
10129  texel.f = __ockl_image_sample_lod_2Da(
10130  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10131  TEXTURE_RETURN_USHORT;
10132 }
10133 
10134 template <int texType, enum hipTextureReadMode mode>
10135 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2DLayeredLod(texture<ushort1, texType, mode> texRef, float x,
10136  float y, int layer, float level) {
10137  TEXTURE_REF_PARAMETERS_INIT;
10138  texel.f = __ockl_image_sample_lod_2Da(
10139  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10140  TEXTURE_RETURN_USHORT_X;
10141 }
10142 
10143 template <int texType, enum hipTextureReadMode mode>
10144 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2DLayeredLod(texture<ushort1, texType, mode> texRef,
10145  hipTextureObject_t textureObject, float x,
10146  float y, int layer, float level) {
10147  TEXTURE_PARAMETERS_INIT;
10148  texel.f = __ockl_image_sample_lod_2Da(
10149  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10150  TEXTURE_RETURN_USHORT_X;
10151 }
10152 
10153 template <int texType, enum hipTextureReadMode mode>
10154 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2DLayeredLod(texture<ushort2, texType, mode> texRef, float x,
10155  float y, int layer, float level) {
10156  TEXTURE_REF_PARAMETERS_INIT;
10157  texel.f = __ockl_image_sample_lod_2Da(
10158  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10159  TEXTURE_RETURN_USHORT_XY;
10160 }
10161 
10162 template <int texType, enum hipTextureReadMode mode>
10163 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2DLayeredLod(texture<ushort2, texType, mode> texRef,
10164  hipTextureObject_t textureObject, float x,
10165  float y, int layer, float level) {
10166  TEXTURE_PARAMETERS_INIT;
10167  texel.f = __ockl_image_sample_lod_2Da(
10168  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10169  TEXTURE_RETURN_USHORT_XY;
10170 }
10171 
10172 template <int texType, enum hipTextureReadMode mode>
10173 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2DLayeredLod(texture<ushort4, texType, mode> texRef, float x,
10174  float y, int layer, float level) {
10175  TEXTURE_REF_PARAMETERS_INIT;
10176  texel.f = __ockl_image_sample_lod_2Da(
10177  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10178  TEXTURE_RETURN_USHORT_XYZW;
10179 }
10180 
10181 template <int texType, enum hipTextureReadMode mode>
10182 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2DLayeredLod(texture<ushort4, texType, mode> texRef,
10183  hipTextureObject_t textureObject, float x,
10184  float y, int layer, float level) {
10185  TEXTURE_PARAMETERS_INIT;
10186  texel.f = __ockl_image_sample_lod_2Da(
10187  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10188  TEXTURE_RETURN_USHORT_XYZW;
10189 }
10190 
10191 template <int texType, enum hipTextureReadMode mode>
10192 __TEXTURE_FUNCTIONS_DECL__ int tex2DLayeredLod(texture<int, texType, mode> texRef, float x, float y,
10193  int layer, float level) {
10194  TEXTURE_REF_PARAMETERS_INIT;
10195  texel.f = __ockl_image_sample_lod_2Da(
10196  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10197  TEXTURE_RETURN_INT;
10198 }
10199 
10200 template <int texType, enum hipTextureReadMode mode>
10201 __TEXTURE_FUNCTIONS_DECL__ int tex2DLayeredLod(texture<int, texType, mode> texRef,
10202  hipTextureObject_t textureObject, float x, float y,
10203  int layer, float level) {
10204  TEXTURE_PARAMETERS_INIT;
10205  texel.f = __ockl_image_sample_lod_2Da(
10206  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10207  TEXTURE_RETURN_INT;
10208 }
10209 
10210 template <int texType, enum hipTextureReadMode mode>
10211 __TEXTURE_FUNCTIONS_DECL__ int1 tex2DLayeredLod(texture<int1, texType, mode> texRef, float x,
10212  float y, int layer, float level) {
10213  TEXTURE_REF_PARAMETERS_INIT;
10214  texel.f = __ockl_image_sample_lod_2Da(
10215  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10216  TEXTURE_RETURN_INT_X;
10217 }
10218 
10219 template <int texType, enum hipTextureReadMode mode>
10220 __TEXTURE_FUNCTIONS_DECL__ int1 tex2DLayeredLod(texture<int1, texType, mode> texRef,
10221  hipTextureObject_t textureObject, float x, float y,
10222  int layer, float level) {
10223  TEXTURE_PARAMETERS_INIT;
10224  texel.f = __ockl_image_sample_lod_2Da(
10225  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10226  TEXTURE_RETURN_INT_X;
10227 }
10228 
10229 template <int texType, enum hipTextureReadMode mode>
10230 __TEXTURE_FUNCTIONS_DECL__ int2 tex2DLayeredLod(texture<int2, texType, mode> texRef, float x,
10231  float y, int layer, float level) {
10232  TEXTURE_REF_PARAMETERS_INIT;
10233  texel.f = __ockl_image_sample_lod_2Da(
10234  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10235  TEXTURE_RETURN_INT_XY;
10236 }
10237 
10238 template <int texType, enum hipTextureReadMode mode>
10239 __TEXTURE_FUNCTIONS_DECL__ int2 tex2DLayeredLod(texture<int2, texType, mode> texRef,
10240  hipTextureObject_t textureObject, float x, float y,
10241  int layer, float level) {
10242  TEXTURE_PARAMETERS_INIT;
10243  texel.f = __ockl_image_sample_lod_2Da(
10244  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10245  TEXTURE_RETURN_INT_XY;
10246 }
10247 
10248 template <int texType, enum hipTextureReadMode mode>
10249 __TEXTURE_FUNCTIONS_DECL__ int4 tex2DLayeredLod(texture<int4, texType, mode> texRef, float x,
10250  float y, int layer, float level) {
10251  TEXTURE_REF_PARAMETERS_INIT;
10252  texel.f = __ockl_image_sample_lod_2Da(
10253  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10254  TEXTURE_RETURN_INT_XYZW;
10255 }
10256 
10257 template <int texType, enum hipTextureReadMode mode>
10258 __TEXTURE_FUNCTIONS_DECL__ int4 tex2DLayeredLod(texture<int4, texType, mode> texRef,
10259  hipTextureObject_t textureObject, float x, float y,
10260  int layer, float level) {
10261  TEXTURE_PARAMETERS_INIT;
10262  texel.f = __ockl_image_sample_lod_2Da(
10263  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10264  TEXTURE_RETURN_INT_XYZW;
10265 }
10266 
10267 template <int texType, enum hipTextureReadMode mode>
10268 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2DLayeredLod(texture<unsigned int, texType, mode> texRef,
10269  float x, float y, int layer, float level) {
10270  TEXTURE_REF_PARAMETERS_INIT;
10271  texel.f = __ockl_image_sample_lod_2Da(
10272  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10273  TEXTURE_RETURN_UINT;
10274 }
10275 
10276 template <int texType, enum hipTextureReadMode mode>
10277 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2DLayeredLod(texture<unsigned int, texType, mode> texRef,
10278  hipTextureObject_t textureObject, float x,
10279  float y, int layer, float level) {
10280  TEXTURE_PARAMETERS_INIT;
10281  texel.f = __ockl_image_sample_lod_2Da(
10282  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10283  TEXTURE_RETURN_UINT;
10284 }
10285 
10286 template <int texType, enum hipTextureReadMode mode>
10287 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2DLayeredLod(texture<uint1, texType, mode> texRef, float x,
10288  float y, int layer, float level) {
10289  TEXTURE_REF_PARAMETERS_INIT;
10290  texel.f = __ockl_image_sample_lod_2Da(
10291  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10292  TEXTURE_RETURN_UINT_X;
10293 }
10294 
10295 template <int texType, enum hipTextureReadMode mode>
10296 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2DLayeredLod(texture<uint1, texType, mode> texRef,
10297  hipTextureObject_t textureObject, float x, float y,
10298  int layer, float level) {
10299  TEXTURE_PARAMETERS_INIT;
10300  texel.f = __ockl_image_sample_lod_2Da(
10301  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10302  TEXTURE_RETURN_UINT_X;
10303 }
10304 
10305 template <int texType, enum hipTextureReadMode mode>
10306 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2DLayeredLod(texture<uint2, texType, mode> texRef, float x,
10307  float y, int layer, float level) {
10308  TEXTURE_REF_PARAMETERS_INIT;
10309  texel.f = __ockl_image_sample_lod_2Da(
10310  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10311  TEXTURE_RETURN_UINT_XY;
10312 }
10313 
10314 template <int texType, enum hipTextureReadMode mode>
10315 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2DLayeredLod(texture<uint2, texType, mode> texRef,
10316  hipTextureObject_t textureObject, float x, float y,
10317  int layer, float level) {
10318  TEXTURE_PARAMETERS_INIT;
10319  texel.f = __ockl_image_sample_lod_2Da(
10320  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10321  TEXTURE_RETURN_UINT_XY;
10322 }
10323 
10324 template <int texType, enum hipTextureReadMode mode>
10325 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2DLayeredLod(texture<uint4, texType, mode> texRef, float x,
10326  float y, int layer, float level) {
10327  TEXTURE_REF_PARAMETERS_INIT;
10328  texel.f = __ockl_image_sample_lod_2Da(
10329  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10330  TEXTURE_RETURN_UINT_XYZW;
10331 }
10332 
10333 template <int texType, enum hipTextureReadMode mode>
10334 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2DLayeredLod(texture<uint4, texType, mode> texRef,
10335  hipTextureObject_t textureObject, float x, float y,
10336  int layer, float level) {
10337  TEXTURE_PARAMETERS_INIT;
10338  texel.f = __ockl_image_sample_lod_2Da(
10339  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10340  TEXTURE_RETURN_UINT_XYZW;
10341 }
10342 
10343 template <int texType, enum hipTextureReadMode mode>
10344 __TEXTURE_FUNCTIONS_DECL__ float tex2DLayeredLod(texture<float, texType, mode> texRef, float x,
10345  float y, int layer, float level) {
10346  TEXTURE_REF_PARAMETERS_INIT;
10347  texel.f = __ockl_image_sample_lod_2Da(
10348  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10349  TEXTURE_RETURN_FLOAT;
10350 }
10351 
10352 template <int texType, enum hipTextureReadMode mode>
10353 __TEXTURE_FUNCTIONS_DECL__ float tex2DLayeredLod(texture<float, texType, mode> texRef,
10354  hipTextureObject_t textureObject, float x, float y,
10355  int layer, float level) {
10356  TEXTURE_PARAMETERS_INIT;
10357  texel.f = __ockl_image_sample_lod_2Da(
10358  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10359  TEXTURE_RETURN_FLOAT;
10360 }
10361 
10362 template <int texType, enum hipTextureReadMode mode>
10363 __TEXTURE_FUNCTIONS_DECL__ float1 tex2DLayeredLod(texture<float1, texType, mode> texRef, float x,
10364  float y, int layer, float level) {
10365  TEXTURE_REF_PARAMETERS_INIT;
10366  texel.f = __ockl_image_sample_lod_2Da(
10367  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10368  TEXTURE_RETURN_FLOAT_X;
10369 }
10370 
10371 template <int texType, enum hipTextureReadMode mode>
10372 __TEXTURE_FUNCTIONS_DECL__ float1 tex2DLayeredLod(texture<float1, texType, mode> texRef,
10373  hipTextureObject_t textureObject, float x,
10374  float y, int layer, float level) {
10375  TEXTURE_PARAMETERS_INIT;
10376  texel.f = __ockl_image_sample_lod_2Da(
10377  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10378  TEXTURE_RETURN_FLOAT_X;
10379 }
10380 
10381 template <int texType, enum hipTextureReadMode mode>
10382 __TEXTURE_FUNCTIONS_DECL__ float2 tex2DLayeredLod(texture<float2, texType, mode> texRef, float x,
10383  float y, int layer, float level) {
10384  TEXTURE_REF_PARAMETERS_INIT;
10385  texel.f = __ockl_image_sample_lod_2Da(
10386  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10387  TEXTURE_RETURN_FLOAT_XY;
10388 }
10389 
10390 template <int texType, enum hipTextureReadMode mode>
10391 __TEXTURE_FUNCTIONS_DECL__ float2 tex2DLayeredLod(texture<float2, texType, mode> texRef,
10392  hipTextureObject_t textureObject, float x,
10393  float y, int layer, float level) {
10394  TEXTURE_PARAMETERS_INIT;
10395  texel.f = __ockl_image_sample_lod_2Da(
10396  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10397  TEXTURE_RETURN_FLOAT_XY;
10398 }
10399 
10400 template <int texType, enum hipTextureReadMode mode>
10401 __TEXTURE_FUNCTIONS_DECL__ float4 tex2DLayeredLod(texture<float4, texType, mode> texRef, float x,
10402  float y, int layer, float level) {
10403  TEXTURE_REF_PARAMETERS_INIT;
10404  texel.f = __ockl_image_sample_lod_2Da(
10405  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10406  TEXTURE_RETURN_FLOAT_XYZW;
10407 }
10408 
10409 template <int texType, enum hipTextureReadMode mode>
10410 __TEXTURE_FUNCTIONS_DECL__ float4 tex2DLayeredLod(texture<float4, texType, mode> texRef,
10411  hipTextureObject_t textureObject, float x,
10412  float y, int layer, float level) {
10413  TEXTURE_PARAMETERS_INIT;
10414  texel.f = __ockl_image_sample_lod_2Da(
10415  i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(), level);
10416  TEXTURE_RETURN_FLOAT_XYZW;
10417 }
10418 
10420 
10421 template <int texType, enum hipTextureReadMode mode>
10422 __TEXTURE_FUNCTIONS_DECL__ char tex2DLayeredGrad(texture<char, texType, mode> texRef, float x,
10423  float y, int layer, float2 dx, float2 dy) {
10424  TEXTURE_REF_PARAMETERS_INIT;
10425  texel.f =
10426  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10427  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10428  hc::short_vector::float2(dy.x, dy.y).get_vector());
10429  TEXTURE_RETURN_CHAR;
10430 }
10431 
10432 template <int texType, enum hipTextureReadMode mode>
10433 __TEXTURE_FUNCTIONS_DECL__ char tex2DLayeredGrad(texture<char, texType, mode> texRef,
10434  hipTextureObject_t textureObject, float x, float y,
10435  int layer, float2 dx, float2 dy) {
10436  TEXTURE_PARAMETERS_INIT;
10437  texel.f =
10438  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10439  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10440  hc::short_vector::float2(dy.x, dy.y).get_vector());
10441  TEXTURE_RETURN_CHAR;
10442 }
10443 
10444 template <int texType, enum hipTextureReadMode mode>
10445 __TEXTURE_FUNCTIONS_DECL__ char1 tex2DLayeredGrad(texture<char1, texType, mode> texRef, float x,
10446  float y, int layer, float2 dx, float2 dy) {
10447  TEXTURE_REF_PARAMETERS_INIT;
10448  texel.f =
10449  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10450  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10451  hc::short_vector::float2(dy.x, dy.y).get_vector());
10452  TEXTURE_RETURN_CHAR_X;
10453 }
10454 
10455 template <int texType, enum hipTextureReadMode mode>
10456 __TEXTURE_FUNCTIONS_DECL__ char1 tex2DLayeredGrad(texture<char1, texType, mode> texRef,
10457  hipTextureObject_t textureObject, float x,
10458  float y, int layer, float2 dx, float2 dy) {
10459  TEXTURE_PARAMETERS_INIT;
10460  texel.f =
10461  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10462  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10463  hc::short_vector::float2(dy.x, dy.y).get_vector());
10464  TEXTURE_RETURN_CHAR_X;
10465 }
10466 
10467 template <int texType, enum hipTextureReadMode mode>
10468 __TEXTURE_FUNCTIONS_DECL__ char2 tex2DLayeredGrad(texture<char2, texType, mode> texRef, float x,
10469  float y, int layer, float2 dx, float2 dy) {
10470  TEXTURE_REF_PARAMETERS_INIT;
10471  texel.f =
10472  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10473  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10474  hc::short_vector::float2(dy.x, dy.y).get_vector());
10475  TEXTURE_RETURN_CHAR_XY;
10476 }
10477 
10478 template <int texType, enum hipTextureReadMode mode>
10479 __TEXTURE_FUNCTIONS_DECL__ char2 tex2DLayeredGrad(texture<char2, texType, mode> texRef,
10480  hipTextureObject_t textureObject, float x,
10481  float y, int layer, float2 dx, float2 dy) {
10482  TEXTURE_PARAMETERS_INIT;
10483  texel.f =
10484  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10485  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10486  hc::short_vector::float2(dy.x, dy.y).get_vector());
10487  TEXTURE_RETURN_CHAR_XY;
10488 }
10489 
10490 template <int texType, enum hipTextureReadMode mode>
10491 __TEXTURE_FUNCTIONS_DECL__ char4 tex2DLayeredGrad(texture<char4, texType, mode> texRef, float x,
10492  float y, int layer, float2 dx, float2 dy) {
10493  TEXTURE_REF_PARAMETERS_INIT;
10494  texel.f =
10495  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10496  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10497  hc::short_vector::float2(dy.x, dy.y).get_vector());
10498  TEXTURE_RETURN_CHAR_XYZW;
10499 }
10500 
10501 template <int texType, enum hipTextureReadMode mode>
10502 __TEXTURE_FUNCTIONS_DECL__ char4 tex2DLayeredGrad(texture<char4, texType, mode> texRef,
10503  hipTextureObject_t textureObject, float x,
10504  float y, int layer, float2 dx, float2 dy) {
10505  TEXTURE_PARAMETERS_INIT;
10506  texel.f =
10507  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10508  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10509  hc::short_vector::float2(dy.x, dy.y).get_vector());
10510  TEXTURE_RETURN_CHAR_XYZW;
10511 }
10512 
10513 template <int texType, enum hipTextureReadMode mode>
10514 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2DLayeredGrad(
10515  texture<unsigned char, texType, mode> texRef, float x, float y, int layer, float2 dx,
10516  float2 dy) {
10517  TEXTURE_REF_PARAMETERS_INIT;
10518  texel.f =
10519  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10520  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10521  hc::short_vector::float2(dy.x, dy.y).get_vector());
10522  TEXTURE_RETURN_UCHAR;
10523 }
10524 
10525 template <int texType, enum hipTextureReadMode mode>
10526 __TEXTURE_FUNCTIONS_DECL__ unsigned char tex2DLayeredGrad(
10527  texture<unsigned char, texType, mode> texRef, hipTextureObject_t textureObject, float x,
10528  float y, int layer, float2 dx, float2 dy) {
10529  TEXTURE_PARAMETERS_INIT;
10530  texel.f =
10531  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10532  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10533  hc::short_vector::float2(dy.x, dy.y).get_vector());
10534  TEXTURE_RETURN_UCHAR;
10535 }
10536 
10537 template <int texType, enum hipTextureReadMode mode>
10538 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2DLayeredGrad(texture<uchar1, texType, mode> texRef, float x,
10539  float y, int layer, float2 dx, float2 dy) {
10540  TEXTURE_REF_PARAMETERS_INIT;
10541  texel.f =
10542  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10543  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10544  hc::short_vector::float2(dy.x, dy.y).get_vector());
10545  TEXTURE_RETURN_UCHAR_X;
10546 }
10547 
10548 template <int texType, enum hipTextureReadMode mode>
10549 __TEXTURE_FUNCTIONS_DECL__ uchar1 tex2DLayeredGrad(texture<uchar1, texType, mode> texRef,
10550  hipTextureObject_t textureObject, float x,
10551  float y, int layer, float2 dx, float2 dy) {
10552  TEXTURE_PARAMETERS_INIT;
10553  texel.f =
10554  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10555  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10556  hc::short_vector::float2(dy.x, dy.y).get_vector());
10557  TEXTURE_RETURN_UCHAR_X;
10558 }
10559 
10560 template <int texType, enum hipTextureReadMode mode>
10561 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2DLayeredGrad(texture<uchar2, texType, mode> texRef, float x,
10562  float y, int layer, float2 dx, float2 dy) {
10563  TEXTURE_REF_PARAMETERS_INIT;
10564  texel.f =
10565  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10566  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10567  hc::short_vector::float2(dy.x, dy.y).get_vector());
10568  TEXTURE_RETURN_UCHAR_XY;
10569 }
10570 
10571 template <int texType, enum hipTextureReadMode mode>
10572 __TEXTURE_FUNCTIONS_DECL__ uchar2 tex2DLayeredGrad(texture<uchar2, texType, mode> texRef,
10573  hipTextureObject_t textureObject, float x,
10574  float y, int layer, float2 dx, float2 dy) {
10575  TEXTURE_PARAMETERS_INIT;
10576  texel.f =
10577  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10578  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10579  hc::short_vector::float2(dy.x, dy.y).get_vector());
10580  TEXTURE_RETURN_UCHAR_XY;
10581 }
10582 
10583 template <int texType, enum hipTextureReadMode mode>
10584 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2DLayeredGrad(texture<uchar4, texType, mode> texRef, float x,
10585  float y, int layer, float2 dx, float2 dy) {
10586  TEXTURE_REF_PARAMETERS_INIT;
10587  texel.f =
10588  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10589  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10590  hc::short_vector::float2(dy.x, dy.y).get_vector());
10591  TEXTURE_RETURN_UCHAR_XYZW;
10592 }
10593 
10594 template <int texType, enum hipTextureReadMode mode>
10595 __TEXTURE_FUNCTIONS_DECL__ uchar4 tex2DLayeredGrad(texture<uchar4, texType, mode> texRef,
10596  hipTextureObject_t textureObject, float x,
10597  float y, int layer, float2 dx, float2 dy) {
10598  TEXTURE_PARAMETERS_INIT;
10599  texel.f =
10600  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10601  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10602  hc::short_vector::float2(dy.x, dy.y).get_vector());
10603  TEXTURE_RETURN_UCHAR_XYZW;
10604 }
10605 
10606 template <int texType, enum hipTextureReadMode mode>
10607 __TEXTURE_FUNCTIONS_DECL__ short tex2DLayeredGrad(texture<short, texType, mode> texRef, float x,
10608  float y, int layer, float2 dx, float2 dy) {
10609  TEXTURE_REF_PARAMETERS_INIT;
10610  texel.f =
10611  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10612  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10613  hc::short_vector::float2(dy.x, dy.y).get_vector());
10614  TEXTURE_RETURN_SHORT;
10615 }
10616 
10617 template <int texType, enum hipTextureReadMode mode>
10618 __TEXTURE_FUNCTIONS_DECL__ short tex2DLayeredGrad(texture<short, texType, mode> texRef,
10619  hipTextureObject_t textureObject, float x,
10620  float y, int layer, float2 dx, float2 dy) {
10621  TEXTURE_PARAMETERS_INIT;
10622  texel.f =
10623  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10624  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10625  hc::short_vector::float2(dy.x, dy.y).get_vector());
10626  TEXTURE_RETURN_SHORT;
10627 }
10628 
10629 template <int texType, enum hipTextureReadMode mode>
10630 __TEXTURE_FUNCTIONS_DECL__ short1 tex2DLayeredGrad(texture<short1, texType, mode> texRef, float x,
10631  float y, int layer, float2 dx, float2 dy) {
10632  TEXTURE_REF_PARAMETERS_INIT;
10633  texel.f =
10634  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10635  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10636  hc::short_vector::float2(dy.x, dy.y).get_vector());
10637  TEXTURE_RETURN_SHORT_X;
10638 }
10639 
10640 template <int texType, enum hipTextureReadMode mode>
10641 __TEXTURE_FUNCTIONS_DECL__ short1 tex2DLayeredGrad(texture<short1, texType, mode> texRef,
10642  hipTextureObject_t textureObject, float x,
10643  float y, int layer, float2 dx, float2 dy) {
10644  TEXTURE_PARAMETERS_INIT;
10645  texel.f =
10646  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10647  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10648  hc::short_vector::float2(dy.x, dy.y).get_vector());
10649  TEXTURE_RETURN_SHORT_X;
10650 }
10651 
10652 template <int texType, enum hipTextureReadMode mode>
10653 __TEXTURE_FUNCTIONS_DECL__ short2 tex2DLayeredGrad(texture<short2, texType, mode> texRef, float x,
10654  float y, int layer, float2 dx, float2 dy) {
10655  TEXTURE_REF_PARAMETERS_INIT;
10656  texel.f =
10657  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10658  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10659  hc::short_vector::float2(dy.x, dy.y).get_vector());
10660  TEXTURE_RETURN_SHORT_XY;
10661 }
10662 
10663 template <int texType, enum hipTextureReadMode mode>
10664 __TEXTURE_FUNCTIONS_DECL__ short2 tex2DLayeredGrad(texture<short2, texType, mode> texRef,
10665  hipTextureObject_t textureObject, float x,
10666  float y, int layer, float2 dx, float2 dy) {
10667  TEXTURE_PARAMETERS_INIT;
10668  texel.f =
10669  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10670  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10671  hc::short_vector::float2(dy.x, dy.y).get_vector());
10672  TEXTURE_RETURN_SHORT_XY;
10673 }
10674 
10675 template <int texType, enum hipTextureReadMode mode>
10676 __TEXTURE_FUNCTIONS_DECL__ short4 tex2DLayeredGrad(texture<short4, texType, mode> texRef, float x,
10677  float y, int layer, float2 dx, float2 dy) {
10678  TEXTURE_REF_PARAMETERS_INIT;
10679  texel.f =
10680  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10681  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10682  hc::short_vector::float2(dy.x, dy.y).get_vector());
10683  TEXTURE_RETURN_SHORT_XYZW;
10684 }
10685 
10686 template <int texType, enum hipTextureReadMode mode>
10687 __TEXTURE_FUNCTIONS_DECL__ short4 tex2DLayeredGrad(texture<short4, texType, mode> texRef,
10688  hipTextureObject_t textureObject, float x,
10689  float y, int layer, float2 dx, float2 dy) {
10690  TEXTURE_PARAMETERS_INIT;
10691  texel.f =
10692  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10693  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10694  hc::short_vector::float2(dy.x, dy.y).get_vector());
10695  TEXTURE_RETURN_SHORT_XYZW;
10696 }
10697 
10698 template <int texType, enum hipTextureReadMode mode>
10699 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2DLayeredGrad(
10700  texture<unsigned short, texType, mode> texRef, float x, float y, int layer, float2 dx,
10701  float2 dy) {
10702  TEXTURE_REF_PARAMETERS_INIT;
10703  texel.f =
10704  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10705  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10706  hc::short_vector::float2(dy.x, dy.y).get_vector());
10707  TEXTURE_RETURN_USHORT;
10708 }
10709 
10710 template <int texType, enum hipTextureReadMode mode>
10711 __TEXTURE_FUNCTIONS_DECL__ unsigned short tex2DLayeredGrad(
10712  texture<unsigned short, texType, mode> texRef, hipTextureObject_t textureObject, float x,
10713  float y, int layer, float2 dx, float2 dy) {
10714  TEXTURE_PARAMETERS_INIT;
10715  texel.f =
10716  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10717  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10718  hc::short_vector::float2(dy.x, dy.y).get_vector());
10719  TEXTURE_RETURN_USHORT;
10720 }
10721 
10722 template <int texType, enum hipTextureReadMode mode>
10723 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2DLayeredGrad(texture<ushort1, texType, mode> texRef, float x,
10724  float y, int layer, float2 dx, float2 dy) {
10725  TEXTURE_REF_PARAMETERS_INIT;
10726  texel.f =
10727  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10728  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10729  hc::short_vector::float2(dy.x, dy.y).get_vector());
10730  TEXTURE_RETURN_USHORT_X;
10731 }
10732 
10733 template <int texType, enum hipTextureReadMode mode>
10734 __TEXTURE_FUNCTIONS_DECL__ ushort1 tex2DLayeredGrad(texture<ushort1, texType, mode> texRef,
10735  hipTextureObject_t textureObject, float x,
10736  float y, int layer, float2 dx, float2 dy) {
10737  TEXTURE_PARAMETERS_INIT;
10738  texel.f =
10739  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10740  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10741  hc::short_vector::float2(dy.x, dy.y).get_vector());
10742  TEXTURE_RETURN_USHORT_X;
10743 }
10744 
10745 template <int texType, enum hipTextureReadMode mode>
10746 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2DLayeredGrad(texture<ushort2, texType, mode> texRef, float x,
10747  float y, int layer, float2 dx, float2 dy) {
10748  TEXTURE_REF_PARAMETERS_INIT;
10749  texel.f =
10750  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10751  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10752  hc::short_vector::float2(dy.x, dy.y).get_vector());
10753  TEXTURE_RETURN_USHORT_XY;
10754 }
10755 
10756 template <int texType, enum hipTextureReadMode mode>
10757 __TEXTURE_FUNCTIONS_DECL__ ushort2 tex2DLayeredGrad(texture<ushort2, texType, mode> texRef,
10758  hipTextureObject_t textureObject, float x,
10759  float y, int layer, float2 dx, float2 dy) {
10760  TEXTURE_PARAMETERS_INIT;
10761  texel.f =
10762  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10763  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10764  hc::short_vector::float2(dy.x, dy.y).get_vector());
10765  TEXTURE_RETURN_USHORT_XY;
10766 }
10767 
10768 template <int texType, enum hipTextureReadMode mode>
10769 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2DLayeredGrad(texture<ushort4, texType, mode> texRef, float x,
10770  float y, int layer, float2 dx, float2 dy) {
10771  TEXTURE_REF_PARAMETERS_INIT;
10772  texel.f =
10773  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10774  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10775  hc::short_vector::float2(dy.x, dy.y).get_vector());
10776  TEXTURE_RETURN_USHORT_XYZW;
10777 }
10778 
10779 template <int texType, enum hipTextureReadMode mode>
10780 __TEXTURE_FUNCTIONS_DECL__ ushort4 tex2DLayeredGrad(texture<ushort4, texType, mode> texRef,
10781  hipTextureObject_t textureObject, float x,
10782  float y, int layer, float2 dx, float2 dy) {
10783  TEXTURE_PARAMETERS_INIT;
10784  texel.f =
10785  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10786  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10787  hc::short_vector::float2(dy.x, dy.y).get_vector());
10788  TEXTURE_RETURN_USHORT_XYZW;
10789 }
10790 
10791 template <int texType, enum hipTextureReadMode mode>
10792 __TEXTURE_FUNCTIONS_DECL__ int tex2DLayeredGrad(texture<int, texType, mode> texRef, float x,
10793  float y, int layer, float2 dx, float2 dy) {
10794  TEXTURE_REF_PARAMETERS_INIT;
10795  texel.f =
10796  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10797  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10798  hc::short_vector::float2(dy.x, dy.y).get_vector());
10799  TEXTURE_RETURN_INT;
10800 }
10801 
10802 template <int texType, enum hipTextureReadMode mode>
10803 __TEXTURE_FUNCTIONS_DECL__ int tex2DLayeredGrad(texture<int, texType, mode> texRef,
10804  hipTextureObject_t textureObject, float x, float y,
10805  int layer, float2 dx, float2 dy) {
10806  TEXTURE_PARAMETERS_INIT;
10807  texel.f =
10808  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10809  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10810  hc::short_vector::float2(dy.x, dy.y).get_vector());
10811  TEXTURE_RETURN_INT;
10812 }
10813 
10814 template <int texType, enum hipTextureReadMode mode>
10815 __TEXTURE_FUNCTIONS_DECL__ int1 tex2DLayeredGrad(texture<int1, texType, mode> texRef, float x,
10816  float y, int layer, float2 dx, float2 dy) {
10817  TEXTURE_REF_PARAMETERS_INIT;
10818  texel.f =
10819  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10820  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10821  hc::short_vector::float2(dy.x, dy.y).get_vector());
10822  TEXTURE_RETURN_INT_X;
10823 }
10824 
10825 template <int texType, enum hipTextureReadMode mode>
10826 __TEXTURE_FUNCTIONS_DECL__ int1 tex2DLayeredGrad(texture<int1, texType, mode> texRef,
10827  hipTextureObject_t textureObject, float x, float y,
10828  int layer, float2 dx, float2 dy) {
10829  TEXTURE_PARAMETERS_INIT;
10830  texel.f =
10831  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10832  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10833  hc::short_vector::float2(dy.x, dy.y).get_vector());
10834  TEXTURE_RETURN_INT_X;
10835 }
10836 
10837 template <int texType, enum hipTextureReadMode mode>
10838 __TEXTURE_FUNCTIONS_DECL__ int2 tex2DLayeredGrad(texture<int2, texType, mode> texRef, float x,
10839  float y, int layer, float2 dx, float2 dy) {
10840  TEXTURE_REF_PARAMETERS_INIT;
10841  texel.f =
10842  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10843  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10844  hc::short_vector::float2(dy.x, dy.y).get_vector());
10845  TEXTURE_RETURN_INT_XY;
10846 }
10847 
10848 template <int texType, enum hipTextureReadMode mode>
10849 __TEXTURE_FUNCTIONS_DECL__ int2 tex2DLayeredGrad(texture<int2, texType, mode> texRef,
10850  hipTextureObject_t textureObject, float x, float y,
10851  int layer, float2 dx, float2 dy) {
10852  TEXTURE_PARAMETERS_INIT;
10853  texel.f =
10854  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10855  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10856  hc::short_vector::float2(dy.x, dy.y).get_vector());
10857  TEXTURE_RETURN_INT_XY;
10858 }
10859 
10860 template <int texType, enum hipTextureReadMode mode>
10861 __TEXTURE_FUNCTIONS_DECL__ int4 tex2DLayeredGrad(texture<int4, texType, mode> texRef, float x,
10862  float y, int layer, float2 dx, float2 dy) {
10863  TEXTURE_REF_PARAMETERS_INIT;
10864  texel.f =
10865  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10866  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10867  hc::short_vector::float2(dy.x, dy.y).get_vector());
10868  TEXTURE_RETURN_INT_XYZW;
10869 }
10870 
10871 template <int texType, enum hipTextureReadMode mode>
10872 __TEXTURE_FUNCTIONS_DECL__ int4 tex2DLayeredGrad(texture<int4, texType, mode> texRef,
10873  hipTextureObject_t textureObject, float x, float y,
10874  int layer, float2 dx, float2 dy) {
10875  TEXTURE_PARAMETERS_INIT;
10876  texel.f =
10877  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10878  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10879  hc::short_vector::float2(dy.x, dy.y).get_vector());
10880  TEXTURE_RETURN_INT_XYZW;
10881 }
10882 
10883 template <int texType, enum hipTextureReadMode mode>
10884 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2DLayeredGrad(
10885  texture<unsigned int, texType, mode> texRef, float x, float y, int layer, float2 dx,
10886  float2 dy) {
10887  TEXTURE_REF_PARAMETERS_INIT;
10888  texel.f =
10889  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10890  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10891  hc::short_vector::float2(dy.x, dy.y).get_vector());
10892  TEXTURE_RETURN_UINT;
10893 }
10894 
10895 template <int texType, enum hipTextureReadMode mode>
10896 __TEXTURE_FUNCTIONS_DECL__ unsigned int tex2DLayeredGrad(
10897  texture<unsigned int, texType, mode> texRef, hipTextureObject_t textureObject, float x, float y,
10898  int layer, float2 dx, float2 dy) {
10899  TEXTURE_PARAMETERS_INIT;
10900  texel.f =
10901  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10902  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10903  hc::short_vector::float2(dy.x, dy.y).get_vector());
10904  TEXTURE_RETURN_UINT;
10905 }
10906 
10907 template <int texType, enum hipTextureReadMode mode>
10908 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2DLayeredGrad(texture<uint1, texType, mode> texRef, float x,
10909  float y, int layer, float2 dx, float2 dy) {
10910  TEXTURE_REF_PARAMETERS_INIT;
10911  texel.f =
10912  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10913  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10914  hc::short_vector::float2(dy.x, dy.y).get_vector());
10915  TEXTURE_RETURN_UINT_X;
10916 }
10917 
10918 template <int texType, enum hipTextureReadMode mode>
10919 __TEXTURE_FUNCTIONS_DECL__ uint1 tex2DLayeredGrad(texture<uint1, texType, mode> texRef,
10920  hipTextureObject_t textureObject, float x,
10921  float y, int layer, float2 dx, float2 dy) {
10922  TEXTURE_PARAMETERS_INIT;
10923  texel.f =
10924  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10925  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10926  hc::short_vector::float2(dy.x, dy.y).get_vector());
10927  TEXTURE_RETURN_UINT_X;
10928 }
10929 
10930 template <int texType, enum hipTextureReadMode mode>
10931 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2DLayeredGrad(texture<uint2, texType, mode> texRef, float x,
10932  float y, int layer, float2 dx, float2 dy) {
10933  TEXTURE_REF_PARAMETERS_INIT;
10934  texel.f =
10935  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10936  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10937  hc::short_vector::float2(dy.x, dy.y).get_vector());
10938  TEXTURE_RETURN_UINT_XY;
10939 }
10940 
10941 template <int texType, enum hipTextureReadMode mode>
10942 __TEXTURE_FUNCTIONS_DECL__ uint2 tex2DLayeredGrad(texture<uint2, texType, mode> texRef,
10943  hipTextureObject_t textureObject, float x,
10944  float y, int layer, float2 dx, float2 dy) {
10945  TEXTURE_PARAMETERS_INIT;
10946  texel.f =
10947  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10948  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10949  hc::short_vector::float2(dy.x, dy.y).get_vector());
10950  TEXTURE_RETURN_UINT_XY;
10951 }
10952 
10953 template <int texType, enum hipTextureReadMode mode>
10954 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2DLayeredGrad(texture<uint4, texType, mode> texRef, float x,
10955  float y, int layer, float2 dx, float2 dy) {
10956  TEXTURE_REF_PARAMETERS_INIT;
10957  texel.f =
10958  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10959  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10960  hc::short_vector::float2(dy.x, dy.y).get_vector());
10961  TEXTURE_RETURN_UINT_XYZW;
10962 }
10963 
10964 template <int texType, enum hipTextureReadMode mode>
10965 __TEXTURE_FUNCTIONS_DECL__ uint4 tex2DLayeredGrad(texture<uint4, texType, mode> texRef,
10966  hipTextureObject_t textureObject, float x,
10967  float y, int layer, float2 dx, float2 dy) {
10968  TEXTURE_PARAMETERS_INIT;
10969  texel.f =
10970  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10971  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10972  hc::short_vector::float2(dy.x, dy.y).get_vector());
10973  TEXTURE_RETURN_UINT_XYZW;
10974 }
10975 
10976 template <int texType, enum hipTextureReadMode mode>
10977 __TEXTURE_FUNCTIONS_DECL__ float tex2DLayeredGrad(texture<float, texType, mode> texRef, float x,
10978  float y, int layer, float2 dx, float2 dy) {
10979  TEXTURE_REF_PARAMETERS_INIT;
10980  texel.f =
10981  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10982  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10983  hc::short_vector::float2(dy.x, dy.y).get_vector());
10984  TEXTURE_RETURN_FLOAT;
10985 }
10986 
10987 template <int texType, enum hipTextureReadMode mode>
10988 __TEXTURE_FUNCTIONS_DECL__ float tex2DLayeredGrad(texture<float, texType, mode> texRef,
10989  hipTextureObject_t textureObject, float x,
10990  float y, int layer, float2 dx, float2 dy) {
10991  TEXTURE_PARAMETERS_INIT;
10992  texel.f =
10993  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
10994  hc::short_vector::float2(dx.x, dx.y).get_vector(),
10995  hc::short_vector::float2(dy.x, dy.y).get_vector());
10996  TEXTURE_RETURN_FLOAT;
10997 }
10998 
10999 template <int texType, enum hipTextureReadMode mode>
11000 __TEXTURE_FUNCTIONS_DECL__ float1 tex2DLayeredGrad(texture<float1, texType, mode> texRef, float x,
11001  float y, int layer, float2 dx, float2 dy) {
11002  TEXTURE_REF_PARAMETERS_INIT;
11003  texel.f =
11004  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
11005  hc::short_vector::float2(dx.x, dx.y).get_vector(),
11006  hc::short_vector::float2(dy.x, dy.y).get_vector());
11007  TEXTURE_RETURN_FLOAT_X;
11008 }
11009 
11010 template <int texType, enum hipTextureReadMode mode>
11011 __TEXTURE_FUNCTIONS_DECL__ float1 tex2DLayeredGrad(texture<float1, texType, mode> texRef,
11012  hipTextureObject_t textureObject, float x,
11013  float y, int layer, float2 dx, float2 dy) {
11014  TEXTURE_PARAMETERS_INIT;
11015  texel.f =
11016  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
11017  hc::short_vector::float2(dx.x, dx.y).get_vector(),
11018  hc::short_vector::float2(dy.x, dy.y).get_vector());
11019  TEXTURE_RETURN_FLOAT_X;
11020 }
11021 
11022 template <int texType, enum hipTextureReadMode mode>
11023 __TEXTURE_FUNCTIONS_DECL__ float2 tex2DLayeredGrad(texture<float2, texType, mode> texRef, float x,
11024  float y, int layer, float2 dx, float2 dy) {
11025  TEXTURE_REF_PARAMETERS_INIT;
11026  texel.f =
11027  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
11028  hc::short_vector::float2(dx.x, dx.y).get_vector(),
11029  hc::short_vector::float2(dy.x, dy.y).get_vector());
11030  TEXTURE_RETURN_FLOAT_XY;
11031 }
11032 
11033 template <int texType, enum hipTextureReadMode mode>
11034 __TEXTURE_FUNCTIONS_DECL__ float2 tex2DLayeredGrad(texture<float2, texType, mode> texRef,
11035  hipTextureObject_t textureObject, float x,
11036  float y, int layer, float2 dx, float2 dy) {
11037  TEXTURE_PARAMETERS_INIT;
11038  texel.f =
11039  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
11040  hc::short_vector::float2(dx.x, dx.y).get_vector(),
11041  hc::short_vector::float2(dy.x, dy.y).get_vector());
11042  TEXTURE_RETURN_FLOAT_XY;
11043 }
11044 
11045 template <int texType, enum hipTextureReadMode mode>
11046 __TEXTURE_FUNCTIONS_DECL__ float4 tex2DLayeredGrad(texture<float4, texType, mode> texRef, float x,
11047  float y, int layer, float2 dx, float2 dy) {
11048  TEXTURE_REF_PARAMETERS_INIT;
11049  texel.f =
11050  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
11051  hc::short_vector::float2(dx.x, dx.y).get_vector(),
11052  hc::short_vector::float2(dy.x, dy.y).get_vector());
11053  TEXTURE_RETURN_FLOAT_XYZW;
11054 }
11055 
11056 template <int texType, enum hipTextureReadMode mode>
11057 __TEXTURE_FUNCTIONS_DECL__ float4 tex2DLayeredGrad(texture<float4, texType, mode> texRef,
11058  hipTextureObject_t textureObject, float x,
11059  float y, int layer, float2 dx, float2 dy) {
11060  TEXTURE_PARAMETERS_INIT;
11061  texel.f =
11062  __ockl_image_sample_grad_2Da(i, s, hc::short_vector::float4(x, y, layer, 0.0f).get_vector(),
11063  hc::short_vector::float2(dx.x, dx.y).get_vector(),
11064  hc::short_vector::float2(dy.x, dy.y).get_vector());
11065  TEXTURE_RETURN_FLOAT_XYZW;
11066 }
11067 #endif
Definition: hip_vector_types.h:537
Definition: hip_vector_types.h:643
Definition: hip_vector_types.h:558
Definition: hip_vector_types.h:190
Definition: hip_vector_types.h:685
Definition: hip_vector_types.h:600
Definition: hip_vector_types.h:331
Definition: hip_vector_types.h:95
Definition: hip_vector_types.h:284
Definition: hip_vector_types.h:236
Definition: hip_vector_types.h:169
Defines the different newt vector types for HIP runtime.
Definition: hip_vector_types.h:474
Definition: hip_vector_types.h:378
Definition: hip_vector_types.h:73
Definition: hip_vector_types.h:263
Definition: hip_vector_types.h:142
Definition: hip_vector_types.h:516
Definition: hip_vector_types.h:622
Definition: hip_vector_types.h:453
Definition: hip_hcc.h:31
Definition: hip_vector_types.h:357
Definition: texture_functions.h:30
Definition: hip_vector_types.h:426