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