Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 17 | // Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. |
| 18 | |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 19 | #ifndef __rs_core_math_rsh__ |
| 20 | #define __rs_core_math_rsh__ |
| 21 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 22 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 135 | extern float __attribute__((const, overloadable))acos(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 136 | #endif |
| 137 | |
| 138 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 139 | /* |
| 140 | * acos |
| 141 | * |
| 142 | * Supported by API versions 9 and newer. |
| 143 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 144 | extern float2 __attribute__((const, overloadable))acos(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 145 | #endif |
| 146 | |
| 147 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 148 | /* |
| 149 | * acos |
| 150 | * |
| 151 | * Supported by API versions 9 and newer. |
| 152 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 153 | extern float3 __attribute__((const, overloadable))acos(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 154 | #endif |
| 155 | |
| 156 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 157 | /* |
| 158 | * acos |
| 159 | * |
| 160 | * Supported by API versions 9 and newer. |
| 161 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 162 | extern float4 __attribute__((const, overloadable))acos(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 207 | extern float __attribute__((const, overloadable))acospi(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 208 | #endif |
| 209 | |
| 210 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 211 | /* |
| 212 | * acospi |
| 213 | * |
| 214 | * Supported by API versions 9 and newer. |
| 215 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 216 | extern float2 __attribute__((const, overloadable))acospi(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 217 | #endif |
| 218 | |
| 219 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 220 | /* |
| 221 | * acospi |
| 222 | * |
| 223 | * Supported by API versions 9 and newer. |
| 224 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 225 | extern float3 __attribute__((const, overloadable))acospi(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 226 | #endif |
| 227 | |
| 228 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 229 | /* |
| 230 | * acospi |
| 231 | * |
| 232 | * Supported by API versions 9 and newer. |
| 233 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 234 | extern float4 __attribute__((const, overloadable))acospi(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 235 | #endif |
| 236 | |
| 237 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 238 | /* |
| 239 | * asin |
| 240 | * |
| 241 | * Supported by API versions 9 and newer. |
| 242 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 243 | extern float __attribute__((const, overloadable))asin(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 244 | #endif |
| 245 | |
| 246 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 247 | /* |
| 248 | * asin |
| 249 | * |
| 250 | * Supported by API versions 9 and newer. |
| 251 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 252 | extern float2 __attribute__((const, overloadable))asin(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 253 | #endif |
| 254 | |
| 255 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 256 | /* |
| 257 | * asin |
| 258 | * |
| 259 | * Supported by API versions 9 and newer. |
| 260 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 261 | extern float3 __attribute__((const, overloadable))asin(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 262 | #endif |
| 263 | |
| 264 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 265 | /* |
| 266 | * asin |
| 267 | * |
| 268 | * Supported by API versions 9 and newer. |
| 269 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 270 | extern float4 __attribute__((const, overloadable))asin(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 315 | extern float __attribute__((const, overloadable))asinpi(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 324 | extern float2 __attribute__((const, overloadable))asinpi(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 333 | extern float3 __attribute__((const, overloadable))asinpi(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 342 | extern float4 __attribute__((const, overloadable))asinpi(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 351 | extern float __attribute__((const, overloadable))atan(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 360 | extern float2 __attribute__((const, overloadable))atan(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 369 | extern float3 __attribute__((const, overloadable))atan(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 378 | extern float4 __attribute__((const, overloadable))atan(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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); |
| 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); |
| 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); |
| 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); |
| 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 495 | extern float __attribute__((const, overloadable))atanpi(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 504 | extern float2 __attribute__((const, overloadable))atanpi(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 513 | extern float3 __attribute__((const, overloadable))atanpi(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 522 | extern float4 __attribute__((const, overloadable))atanpi(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 1634 | * Component wise conversion from float2 to float2 |
| 1635 | * |
| 1636 | * Supported by API versions 9 and newer. |
| 1637 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1638 | extern float2 __attribute__((const, overloadable))convert_float2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1647 | extern float3 __attribute__((const, overloadable))convert_float3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1656 | extern float4 __attribute__((const, overloadable))convert_float4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 1657 | #endif |
| 1658 | |
| 1659 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 1660 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 1661 | * Component wise conversion from char2 to float2 |
| 1662 | * |
| 1663 | * Supported by API versions 9 and newer. |
| 1664 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1665 | extern float2 __attribute__((const, overloadable))convert_float2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1674 | extern float3 __attribute__((const, overloadable))convert_float3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1683 | extern float4 __attribute__((const, overloadable))convert_float4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1692 | extern float2 __attribute__((const, overloadable))convert_float2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1701 | extern float3 __attribute__((const, overloadable))convert_float3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1710 | extern float4 __attribute__((const, overloadable))convert_float4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1719 | extern float2 __attribute__((const, overloadable))convert_float2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1728 | extern float3 __attribute__((const, overloadable))convert_float3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1737 | extern float4 __attribute__((const, overloadable))convert_float4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1746 | extern float2 __attribute__((const, overloadable))convert_float2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1755 | extern float3 __attribute__((const, overloadable))convert_float3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1764 | extern float4 __attribute__((const, overloadable))convert_float4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1773 | extern float2 __attribute__((const, overloadable))convert_float2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1782 | extern float3 __attribute__((const, overloadable))convert_float3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1791 | extern float4 __attribute__((const, overloadable))convert_float4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1800 | extern float2 __attribute__((const, overloadable))convert_float2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1809 | extern float3 __attribute__((const, overloadable))convert_float3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1818 | extern float4 __attribute__((const, overloadable))convert_float4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 1819 | #endif |
| 1820 | |
| 1821 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 1822 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 1823 | * Component wise conversion from float2 to char2 |
| 1824 | * |
| 1825 | * Supported by API versions 9 and newer. |
| 1826 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1827 | extern char2 __attribute__((const, overloadable))convert_char2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1836 | extern char3 __attribute__((const, overloadable))convert_char3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1845 | extern char4 __attribute__((const, overloadable))convert_char4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 1846 | #endif |
| 1847 | |
| 1848 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 1849 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 1850 | * Component wise conversion from char2 to char2 |
| 1851 | * |
| 1852 | * Supported by API versions 9 and newer. |
| 1853 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1854 | extern char2 __attribute__((const, overloadable))convert_char2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1863 | extern char3 __attribute__((const, overloadable))convert_char3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1872 | extern char4 __attribute__((const, overloadable))convert_char4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1881 | extern char2 __attribute__((const, overloadable))convert_char2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1890 | extern char3 __attribute__((const, overloadable))convert_char3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1899 | extern char4 __attribute__((const, overloadable))convert_char4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1908 | extern char2 __attribute__((const, overloadable))convert_char2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1917 | extern char3 __attribute__((const, overloadable))convert_char3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1926 | extern char4 __attribute__((const, overloadable))convert_char4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1935 | extern char2 __attribute__((const, overloadable))convert_char2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1944 | extern char3 __attribute__((const, overloadable))convert_char3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1953 | extern char4 __attribute__((const, overloadable))convert_char4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1962 | extern char2 __attribute__((const, overloadable))convert_char2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1971 | extern char3 __attribute__((const, overloadable))convert_char3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1980 | extern char4 __attribute__((const, overloadable))convert_char4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1989 | extern char2 __attribute__((const, overloadable))convert_char2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 1998 | extern char3 __attribute__((const, overloadable))convert_char3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2007 | extern char4 __attribute__((const, overloadable))convert_char4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2008 | #endif |
| 2009 | |
| 2010 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 2011 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2012 | * Component wise conversion from float2 to uchar2 |
| 2013 | * |
| 2014 | * Supported by API versions 9 and newer. |
| 2015 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2016 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2025 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2034 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2035 | #endif |
| 2036 | |
| 2037 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 2038 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2039 | * Component wise conversion from char2 to uchar2 |
| 2040 | * |
| 2041 | * Supported by API versions 9 and newer. |
| 2042 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2043 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2052 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2061 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2070 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2079 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2088 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2097 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2106 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2115 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2124 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2133 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2142 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2151 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2160 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2169 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2178 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2187 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2196 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2197 | #endif |
| 2198 | |
| 2199 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 2200 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2201 | * Component wise conversion from float2 to short2 |
| 2202 | * |
| 2203 | * Supported by API versions 9 and newer. |
| 2204 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2205 | extern short2 __attribute__((const, overloadable))convert_short2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2214 | extern short3 __attribute__((const, overloadable))convert_short3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2223 | extern short4 __attribute__((const, overloadable))convert_short4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2224 | #endif |
| 2225 | |
| 2226 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 2227 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2228 | * Component wise conversion from char2 to short2 |
| 2229 | * |
| 2230 | * Supported by API versions 9 and newer. |
| 2231 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2232 | extern short2 __attribute__((const, overloadable))convert_short2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2241 | extern short3 __attribute__((const, overloadable))convert_short3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2250 | extern short4 __attribute__((const, overloadable))convert_short4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2259 | extern short2 __attribute__((const, overloadable))convert_short2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2268 | extern short3 __attribute__((const, overloadable))convert_short3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2277 | extern short4 __attribute__((const, overloadable))convert_short4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2286 | extern short2 __attribute__((const, overloadable))convert_short2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2295 | extern short3 __attribute__((const, overloadable))convert_short3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2304 | extern short4 __attribute__((const, overloadable))convert_short4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2313 | extern short2 __attribute__((const, overloadable))convert_short2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2322 | extern short3 __attribute__((const, overloadable))convert_short3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2331 | extern short4 __attribute__((const, overloadable))convert_short4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2340 | extern short2 __attribute__((const, overloadable))convert_short2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2349 | extern short3 __attribute__((const, overloadable))convert_short3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2358 | extern short4 __attribute__((const, overloadable))convert_short4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2367 | extern short2 __attribute__((const, overloadable))convert_short2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2376 | extern short3 __attribute__((const, overloadable))convert_short3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2385 | extern short4 __attribute__((const, overloadable))convert_short4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2386 | #endif |
| 2387 | |
| 2388 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 2389 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2390 | * Component wise conversion from float2 to ushort2 |
| 2391 | * |
| 2392 | * Supported by API versions 9 and newer. |
| 2393 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2394 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2403 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2412 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2413 | #endif |
| 2414 | |
| 2415 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 2416 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2417 | * Component wise conversion from char2 to ushort2 |
| 2418 | * |
| 2419 | * Supported by API versions 9 and newer. |
| 2420 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2421 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2430 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2439 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2448 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2457 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2466 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2475 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2484 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2493 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2502 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2511 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2520 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2529 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2538 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2547 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2556 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2565 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2574 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2575 | #endif |
| 2576 | |
| 2577 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 2578 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2579 | * Component wise conversion from float2 to int2 |
| 2580 | * |
| 2581 | * Supported by API versions 9 and newer. |
| 2582 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2583 | extern int2 __attribute__((const, overloadable))convert_int2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2592 | extern int3 __attribute__((const, overloadable))convert_int3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2601 | extern int4 __attribute__((const, overloadable))convert_int4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2602 | #endif |
| 2603 | |
| 2604 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 2605 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2606 | * Component wise conversion from char2 to int2 |
| 2607 | * |
| 2608 | * Supported by API versions 9 and newer. |
| 2609 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2610 | extern int2 __attribute__((const, overloadable))convert_int2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2619 | extern int3 __attribute__((const, overloadable))convert_int3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2628 | extern int4 __attribute__((const, overloadable))convert_int4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2637 | extern int2 __attribute__((const, overloadable))convert_int2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2646 | extern int3 __attribute__((const, overloadable))convert_int3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2655 | extern int4 __attribute__((const, overloadable))convert_int4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2664 | extern int2 __attribute__((const, overloadable))convert_int2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2673 | extern int3 __attribute__((const, overloadable))convert_int3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2682 | extern int4 __attribute__((const, overloadable))convert_int4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2691 | extern int2 __attribute__((const, overloadable))convert_int2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2700 | extern int3 __attribute__((const, overloadable))convert_int3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2709 | extern int4 __attribute__((const, overloadable))convert_int4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2718 | extern int2 __attribute__((const, overloadable))convert_int2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2727 | extern int3 __attribute__((const, overloadable))convert_int3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2736 | extern int4 __attribute__((const, overloadable))convert_int4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2745 | extern int2 __attribute__((const, overloadable))convert_int2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2754 | extern int3 __attribute__((const, overloadable))convert_int3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2763 | extern int4 __attribute__((const, overloadable))convert_int4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2764 | #endif |
| 2765 | |
| 2766 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 2767 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2768 | * Component wise conversion from float2 to uint2 |
| 2769 | * |
| 2770 | * Supported by API versions 9 and newer. |
| 2771 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2772 | extern uint2 __attribute__((const, overloadable))convert_uint2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2781 | extern uint3 __attribute__((const, overloadable))convert_uint3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2790 | extern uint4 __attribute__((const, overloadable))convert_uint4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2791 | #endif |
| 2792 | |
| 2793 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 2794 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2795 | * Component wise conversion from char2 to uint2 |
| 2796 | * |
| 2797 | * Supported by API versions 9 and newer. |
| 2798 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2799 | extern uint2 __attribute__((const, overloadable))convert_uint2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2808 | extern uint3 __attribute__((const, overloadable))convert_uint3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2817 | extern uint4 __attribute__((const, overloadable))convert_uint4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2826 | extern uint2 __attribute__((const, overloadable))convert_uint2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2835 | extern uint3 __attribute__((const, overloadable))convert_uint3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2844 | extern uint4 __attribute__((const, overloadable))convert_uint4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2853 | extern uint2 __attribute__((const, overloadable))convert_uint2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2862 | extern uint3 __attribute__((const, overloadable))convert_uint3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2871 | extern uint4 __attribute__((const, overloadable))convert_uint4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2880 | extern uint2 __attribute__((const, overloadable))convert_uint2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2889 | extern uint3 __attribute__((const, overloadable))convert_uint3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2898 | extern uint4 __attribute__((const, overloadable))convert_uint4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2907 | extern uint2 __attribute__((const, overloadable))convert_uint2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2916 | extern uint3 __attribute__((const, overloadable))convert_uint3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2925 | extern uint4 __attribute__((const, overloadable))convert_uint4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2934 | extern uint2 __attribute__((const, overloadable))convert_uint2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2943 | extern uint3 __attribute__((const, overloadable))convert_uint3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2952 | extern uint4 __attribute__((const, overloadable))convert_uint4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2953 | #endif |
| 2954 | |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 2955 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 2956 | /* |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 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 | /* |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 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 | /* |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 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)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3712 | /* |
| 3713 | * Component wise conversion from long2 to uint2 |
| 3714 | * |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3715 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3716 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3717 | extern uint2 __attribute__((const, overloadable))convert_uint2(long2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3718 | #endif |
| 3719 | |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3720 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3721 | /* |
| 3722 | * Component wise conversion from long3 to uint3 |
| 3723 | * |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3724 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3725 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3726 | extern uint3 __attribute__((const, overloadable))convert_uint3(long3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3727 | #endif |
| 3728 | |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3729 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3730 | /* |
| 3731 | * Component wise conversion from long4 to uint4 |
| 3732 | * |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3733 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3734 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3735 | extern uint4 __attribute__((const, overloadable))convert_uint4(long4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3736 | #endif |
| 3737 | |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3738 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3739 | /* |
| 3740 | * Component wise conversion from ulong2 to uint2 |
| 3741 | * |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3742 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3743 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3744 | extern uint2 __attribute__((const, overloadable))convert_uint2(ulong2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3745 | #endif |
| 3746 | |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3747 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3748 | /* |
| 3749 | * Component wise conversion from ulong3 to uint3 |
| 3750 | * |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3751 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3752 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3753 | extern uint3 __attribute__((const, overloadable))convert_uint3(ulong3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3754 | #endif |
| 3755 | |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3756 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3757 | /* |
| 3758 | * Component wise conversion from ulong4 to uint4 |
| 3759 | * |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3760 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3761 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3762 | extern uint4 __attribute__((const, overloadable))convert_uint4(ulong4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3763 | #endif |
| 3764 | |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3765 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3766 | /* |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 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 | /* |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 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 | /* |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 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 | /* |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 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 | /* |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 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 | /* |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 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 | |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 4332 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 4333 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4478 | * Compute the cross product of two vectors. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 4479 | * |
| 4480 | * Supported by API versions 9 and newer. |
| 4481 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4482 | extern float3 __attribute__((const, overloadable))cross(float3 lhs, float3 rhs); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 4483 | #endif |
| 4484 | |
| 4485 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 4486 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4487 | * Compute the cross product of two vectors. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 4488 | * |
| 4489 | * Supported by API versions 9 and newer. |
| 4490 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4491 | extern float4 __attribute__((const, overloadable))cross(float4 lhs, float4 rhs); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 4492 | #endif |
| 4493 | |
| 4494 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 4495 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4496 | * Convert from radians to degrees. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 4497 | * |
| 4498 | * Supported by API versions 9 and newer. |
| 4499 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4500 | extern float __attribute__((const, overloadable))degrees(float value); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 4501 | #endif |
| 4502 | |
| 4503 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 4504 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4505 | * Convert from radians to degrees. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 4506 | * |
| 4507 | * Supported by API versions 9 and newer. |
| 4508 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4854 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 4855 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4856 | * Compute the approximate distance between two points. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 4857 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4858 | * Supported by API versions 17 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 4859 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4968 | extern float __attribute__((const, overloadable))fdim(float a, float b); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 4977 | extern float2 __attribute__((const, overloadable))fdim(float2 a, float2 b); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5236 | * @param floor floor[0] will be set to the floor of the input value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5237 | * |
| 5238 | * Supported by API versions 9 and newer. |
| 5239 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5240 | extern float __attribute__((overloadable))fract(float v, float* floor); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5241 | #endif |
| 5242 | |
| 5243 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 5244 | /* |
| 5245 | * Return fractional part of v |
| 5246 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5247 | * @param floor floor[0] will be set to the floor of the input value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5248 | * |
| 5249 | * Supported by API versions 9 and newer. |
| 5250 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5251 | extern float2 __attribute__((overloadable))fract(float2 v, float2* floor); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5252 | #endif |
| 5253 | |
| 5254 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 5255 | /* |
| 5256 | * Return fractional part of v |
| 5257 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5258 | * @param floor floor[0] will be set to the floor of the input value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5259 | * |
| 5260 | * Supported by API versions 9 and newer. |
| 5261 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5262 | extern float3 __attribute__((overloadable))fract(float3 v, float3* floor); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5263 | #endif |
| 5264 | |
| 5265 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 5266 | /* |
| 5267 | * Return fractional part of v |
| 5268 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5269 | * @param floor floor[0] will be set to the floor of the input value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5270 | * |
| 5271 | * Supported by API versions 9 and newer. |
| 5272 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5273 | extern float4 __attribute__((overloadable))fract(float4 v, float4* floor); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5332 | extern float __attribute__((overloadable))frexp(float v, int* iptr); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5343 | extern float2 __attribute__((overloadable))frexp(float2 v, int2* iptr); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5354 | extern float3 __attribute__((overloadable))frexp(float3 v, int3* iptr); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5365 | extern float4 __attribute__((overloadable))frexp(float4 v, int4* iptr); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | * |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5634 | * Compute the length of a vector. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5635 | * |
| 5636 | * Supported by API versions 9 and newer. |
| 5637 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5666 | #endif |
| 5667 | |
| 5668 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 5669 | /* |
| 5670 | * Return the log gamma and sign |
| 5671 | * |
| 5672 | * Supported by API versions 9 and newer. |
| 5673 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5674 | extern float __attribute__((const, overloadable))lgamma(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5675 | #endif |
| 5676 | |
| 5677 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 5678 | /* |
| 5679 | * Return the log gamma and sign |
| 5680 | * |
| 5681 | * Supported by API versions 9 and newer. |
| 5682 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5683 | extern float2 __attribute__((const, overloadable))lgamma(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5684 | #endif |
| 5685 | |
| 5686 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 5687 | /* |
| 5688 | * Return the log gamma and sign |
| 5689 | * |
| 5690 | * Supported by API versions 9 and newer. |
| 5691 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5692 | extern float3 __attribute__((const, overloadable))lgamma(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5693 | #endif |
| 5694 | |
| 5695 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 5696 | /* |
| 5697 | * Return the log gamma and sign |
| 5698 | * |
| 5699 | * Supported by API versions 9 and newer. |
| 5700 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5701 | extern float4 __attribute__((const, overloadable))lgamma(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5710 | extern float __attribute__((overloadable))lgamma(float x, int* y); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5719 | extern float2 __attribute__((overloadable))lgamma(float2 x, int2* y); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5728 | extern float3 __attribute__((overloadable))lgamma(float3 x, int3* y); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 5737 | extern float4 __attribute__((overloadable))lgamma(float4 x, int4* y); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5746 | extern float __attribute__((const, overloadable))log(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5755 | extern float2 __attribute__((const, overloadable))log(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5764 | extern float3 __attribute__((const, overloadable))log(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5773 | extern float4 __attribute__((const, overloadable))log(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5782 | extern float __attribute__((const, overloadable))log10(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5791 | extern float2 __attribute__((const, overloadable))log10(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5800 | extern float3 __attribute__((const, overloadable))log10(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5809 | extern float4 __attribute__((const, overloadable))log10(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5818 | extern float __attribute__((const, overloadable))log1p(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5827 | extern float2 __attribute__((const, overloadable))log1p(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5836 | extern float3 __attribute__((const, overloadable))log1p(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5890 | extern float __attribute__((const, overloadable))logb(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5899 | extern float2 __attribute__((const, overloadable))logb(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5908 | extern float3 __attribute__((const, overloadable))logb(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 5917 | extern float4 __attribute__((const, overloadable))logb(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 >= 20)) |
| 6329 | /* |
| 6330 | * Return the maximum value from two arguments |
| 6331 | * |
| 6332 | * Supported by API versions 20 and newer. |
| 6333 | */ |
| 6334 | extern char __attribute__((const, overloadable))max(char v1, char v2); |
| 6335 | #endif |
| 6336 | |
| 6337 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6338 | /* |
| 6339 | * Return the maximum value from two arguments |
| 6340 | * |
| 6341 | * Supported by API versions 20 and newer. |
| 6342 | */ |
| 6343 | extern char2 __attribute__((const, overloadable))max(char2 v1, char2 v2); |
| 6344 | #endif |
| 6345 | |
| 6346 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6347 | /* |
| 6348 | * Return the maximum value from two arguments |
| 6349 | * |
| 6350 | * Supported by API versions 20 and newer. |
| 6351 | */ |
| 6352 | extern char3 __attribute__((const, overloadable))max(char3 v1, char3 v2); |
| 6353 | #endif |
| 6354 | |
| 6355 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6356 | /* |
| 6357 | * Return the maximum value from two arguments |
| 6358 | * |
| 6359 | * Supported by API versions 20 and newer. |
| 6360 | */ |
| 6361 | extern char4 __attribute__((const, overloadable))max(char4 v1, char4 v2); |
| 6362 | #endif |
| 6363 | |
| 6364 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6365 | /* |
| 6366 | * Return the maximum value from two arguments |
| 6367 | * |
| 6368 | * Supported by API versions 20 and newer. |
| 6369 | */ |
| 6370 | extern uchar __attribute__((const, overloadable))max(uchar v1, uchar v2); |
| 6371 | #endif |
| 6372 | |
| 6373 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6374 | /* |
| 6375 | * Return the maximum value from two arguments |
| 6376 | * |
| 6377 | * Supported by API versions 20 and newer. |
| 6378 | */ |
| 6379 | extern uchar2 __attribute__((const, overloadable))max(uchar2 v1, uchar2 v2); |
| 6380 | #endif |
| 6381 | |
| 6382 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6383 | /* |
| 6384 | * Return the maximum value from two arguments |
| 6385 | * |
| 6386 | * Supported by API versions 20 and newer. |
| 6387 | */ |
| 6388 | extern uchar3 __attribute__((const, overloadable))max(uchar3 v1, uchar3 v2); |
| 6389 | #endif |
| 6390 | |
| 6391 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6392 | /* |
| 6393 | * Return the maximum value from two arguments |
| 6394 | * |
| 6395 | * Supported by API versions 20 and newer. |
| 6396 | */ |
| 6397 | extern uchar4 __attribute__((const, overloadable))max(uchar4 v1, uchar4 v2); |
| 6398 | #endif |
| 6399 | |
| 6400 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6401 | /* |
| 6402 | * Return the maximum value from two arguments |
| 6403 | * |
| 6404 | * Supported by API versions 20 and newer. |
| 6405 | */ |
| 6406 | extern short __attribute__((const, overloadable))max(short v1, short v2); |
| 6407 | #endif |
| 6408 | |
| 6409 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6410 | /* |
| 6411 | * Return the maximum value from two arguments |
| 6412 | * |
| 6413 | * Supported by API versions 20 and newer. |
| 6414 | */ |
| 6415 | extern short2 __attribute__((const, overloadable))max(short2 v1, short2 v2); |
| 6416 | #endif |
| 6417 | |
| 6418 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6419 | /* |
| 6420 | * Return the maximum value from two arguments |
| 6421 | * |
| 6422 | * Supported by API versions 20 and newer. |
| 6423 | */ |
| 6424 | extern short3 __attribute__((const, overloadable))max(short3 v1, short3 v2); |
| 6425 | #endif |
| 6426 | |
| 6427 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6428 | /* |
| 6429 | * Return the maximum value from two arguments |
| 6430 | * |
| 6431 | * Supported by API versions 20 and newer. |
| 6432 | */ |
| 6433 | extern short4 __attribute__((const, overloadable))max(short4 v1, short4 v2); |
| 6434 | #endif |
| 6435 | |
| 6436 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6437 | /* |
| 6438 | * Return the maximum value from two arguments |
| 6439 | * |
| 6440 | * Supported by API versions 20 and newer. |
| 6441 | */ |
| 6442 | extern ushort __attribute__((const, overloadable))max(ushort v1, ushort v2); |
| 6443 | #endif |
| 6444 | |
| 6445 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6446 | /* |
| 6447 | * Return the maximum value from two arguments |
| 6448 | * |
| 6449 | * Supported by API versions 20 and newer. |
| 6450 | */ |
| 6451 | extern ushort2 __attribute__((const, overloadable))max(ushort2 v1, ushort2 v2); |
| 6452 | #endif |
| 6453 | |
| 6454 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6455 | /* |
| 6456 | * Return the maximum value from two arguments |
| 6457 | * |
| 6458 | * Supported by API versions 20 and newer. |
| 6459 | */ |
| 6460 | extern ushort3 __attribute__((const, overloadable))max(ushort3 v1, ushort3 v2); |
| 6461 | #endif |
| 6462 | |
| 6463 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6464 | /* |
| 6465 | * Return the maximum value from two arguments |
| 6466 | * |
| 6467 | * Supported by API versions 20 and newer. |
| 6468 | */ |
| 6469 | extern ushort4 __attribute__((const, overloadable))max(ushort4 v1, ushort4 v2); |
| 6470 | #endif |
| 6471 | |
| 6472 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6473 | /* |
| 6474 | * Return the maximum value from two arguments |
| 6475 | * |
| 6476 | * Supported by API versions 20 and newer. |
| 6477 | */ |
| 6478 | extern int __attribute__((const, overloadable))max(int v1, int v2); |
| 6479 | #endif |
| 6480 | |
| 6481 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6482 | /* |
| 6483 | * Return the maximum value from two arguments |
| 6484 | * |
| 6485 | * Supported by API versions 20 and newer. |
| 6486 | */ |
| 6487 | extern int2 __attribute__((const, overloadable))max(int2 v1, int2 v2); |
| 6488 | #endif |
| 6489 | |
| 6490 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6491 | /* |
| 6492 | * Return the maximum value from two arguments |
| 6493 | * |
| 6494 | * Supported by API versions 20 and newer. |
| 6495 | */ |
| 6496 | extern int3 __attribute__((const, overloadable))max(int3 v1, int3 v2); |
| 6497 | #endif |
| 6498 | |
| 6499 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6500 | /* |
| 6501 | * Return the maximum value from two arguments |
| 6502 | * |
| 6503 | * Supported by API versions 20 and newer. |
| 6504 | */ |
| 6505 | extern int4 __attribute__((const, overloadable))max(int4 v1, int4 v2); |
| 6506 | #endif |
| 6507 | |
| 6508 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6509 | /* |
| 6510 | * Return the maximum value from two arguments |
| 6511 | * |
| 6512 | * Supported by API versions 20 and newer. |
| 6513 | */ |
| 6514 | extern uint __attribute__((const, overloadable))max(uint v1, uint v2); |
| 6515 | #endif |
| 6516 | |
| 6517 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6518 | /* |
| 6519 | * Return the maximum value from two arguments |
| 6520 | * |
| 6521 | * Supported by API versions 20 and newer. |
| 6522 | */ |
| 6523 | extern uint2 __attribute__((const, overloadable))max(uint2 v1, uint2 v2); |
| 6524 | #endif |
| 6525 | |
| 6526 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6527 | /* |
| 6528 | * Return the maximum value from two arguments |
| 6529 | * |
| 6530 | * Supported by API versions 20 and newer. |
| 6531 | */ |
| 6532 | extern uint3 __attribute__((const, overloadable))max(uint3 v1, uint3 v2); |
| 6533 | #endif |
| 6534 | |
| 6535 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6536 | /* |
| 6537 | * Return the maximum value from two arguments |
| 6538 | * |
| 6539 | * Supported by API versions 20 and newer. |
| 6540 | */ |
| 6541 | extern uint4 __attribute__((const, overloadable))max(uint4 v1, uint4 v2); |
| 6542 | #endif |
| 6543 | |
| 6544 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6545 | /* |
| 6546 | * Return the maximum value from two arguments |
| 6547 | * |
| 6548 | * Supported by API versions 20 and newer. |
| 6549 | */ |
| 6550 | extern long __attribute__((const, overloadable))max(long v1, long v2); |
| 6551 | #endif |
| 6552 | |
| 6553 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6554 | /* |
| 6555 | * Return the maximum value from two arguments |
| 6556 | * |
| 6557 | * Supported by API versions 20 and newer. |
| 6558 | */ |
| 6559 | extern long2 __attribute__((const, overloadable))max(long2 v1, long2 v2); |
| 6560 | #endif |
| 6561 | |
| 6562 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6563 | /* |
| 6564 | * Return the maximum value from two arguments |
| 6565 | * |
| 6566 | * Supported by API versions 20 and newer. |
| 6567 | */ |
| 6568 | extern long3 __attribute__((const, overloadable))max(long3 v1, long3 v2); |
| 6569 | #endif |
| 6570 | |
| 6571 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6572 | /* |
| 6573 | * Return the maximum value from two arguments |
| 6574 | * |
| 6575 | * Supported by API versions 20 and newer. |
| 6576 | */ |
| 6577 | extern long4 __attribute__((const, overloadable))max(long4 v1, long4 v2); |
| 6578 | #endif |
| 6579 | |
| 6580 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6581 | /* |
| 6582 | * Return the maximum value from two arguments |
| 6583 | * |
| 6584 | * Supported by API versions 20 and newer. |
| 6585 | */ |
| 6586 | extern ulong __attribute__((const, overloadable))max(ulong v1, ulong v2); |
| 6587 | #endif |
| 6588 | |
| 6589 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6590 | /* |
| 6591 | * Return the maximum value from two arguments |
| 6592 | * |
| 6593 | * Supported by API versions 20 and newer. |
| 6594 | */ |
| 6595 | extern ulong2 __attribute__((const, overloadable))max(ulong2 v1, ulong2 v2); |
| 6596 | #endif |
| 6597 | |
| 6598 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6599 | /* |
| 6600 | * Return the maximum value from two arguments |
| 6601 | * |
| 6602 | * Supported by API versions 20 and newer. |
| 6603 | */ |
| 6604 | extern ulong3 __attribute__((const, overloadable))max(ulong3 v1, ulong3 v2); |
| 6605 | #endif |
| 6606 | |
| 6607 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 6608 | /* |
| 6609 | * Return the maximum value from two arguments |
| 6610 | * |
| 6611 | * Supported by API versions 20 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 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6618 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6619 | * |
| 6620 | * Supported by API versions 9 and newer. |
| 6621 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6622 | extern float __attribute__((const, overloadable))min(float, float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6623 | #endif |
| 6624 | |
| 6625 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 6626 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6627 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6628 | * |
| 6629 | * Supported by API versions 9 and newer. |
| 6630 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6631 | extern float2 __attribute__((const, overloadable))min(float2, float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6632 | #endif |
| 6633 | |
| 6634 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 6635 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6636 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6637 | * |
| 6638 | * Supported by API versions 9 and newer. |
| 6639 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6640 | extern float3 __attribute__((const, overloadable))min(float3, float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6641 | #endif |
| 6642 | |
| 6643 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 6644 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6645 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6646 | * |
| 6647 | * Supported by API versions 9 and newer. |
| 6648 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6649 | extern float4 __attribute__((const, overloadable))min(float4, float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6650 | #endif |
| 6651 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6652 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6653 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6654 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6655 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6656 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6657 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6658 | static char __attribute__((const, overloadable))min(char v1, char v2) { |
| 6659 | return (v1 < v2 ? v1 : v2); |
| 6660 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6661 | #endif |
| 6662 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6663 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6664 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6665 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6666 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6667 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6668 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6669 | static uchar __attribute__((const, overloadable))min(uchar v1, uchar v2) { |
| 6670 | return (v1 < v2 ? v1 : v2); |
| 6671 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6672 | #endif |
| 6673 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6674 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6675 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6676 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6677 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6678 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6679 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6680 | static short __attribute__((const, overloadable))min(short v1, short v2) { |
| 6681 | return (v1 < v2 ? v1 : v2); |
| 6682 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6683 | #endif |
| 6684 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6685 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6686 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6687 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6688 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6689 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6690 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6691 | static ushort __attribute__((const, overloadable))min(ushort v1, ushort v2) { |
| 6692 | return (v1 < v2 ? v1 : v2); |
| 6693 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6694 | #endif |
| 6695 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6696 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6697 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6698 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6699 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6700 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6701 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6702 | static int __attribute__((const, overloadable))min(int v1, int v2) { |
| 6703 | return (v1 < v2 ? v1 : v2); |
| 6704 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6705 | #endif |
| 6706 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6707 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6708 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6709 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6710 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6711 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6712 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6713 | static uint __attribute__((const, overloadable))min(uint v1, uint v2) { |
| 6714 | return (v1 < v2 ? v1 : v2); |
| 6715 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6716 | #endif |
| 6717 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6718 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6719 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6720 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6721 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6722 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6723 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6730 | #endif |
| 6731 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6732 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6733 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6734 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6735 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6736 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6737 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6744 | #endif |
| 6745 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6746 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6747 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6748 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6749 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6750 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6751 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6758 | #endif |
| 6759 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6760 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6761 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6762 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6763 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6764 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6765 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6772 | #endif |
| 6773 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6774 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6775 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6776 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6777 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6778 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6779 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6786 | #endif |
| 6787 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6788 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6789 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6790 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6791 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6792 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6793 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6800 | #endif |
| 6801 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6802 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6803 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6804 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6805 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6806 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6807 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6815 | #endif |
| 6816 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6817 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6818 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6819 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6820 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6821 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6822 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6830 | #endif |
| 6831 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6832 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6833 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6834 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6835 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6836 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6837 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6845 | #endif |
| 6846 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6847 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6848 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6849 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6850 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6851 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6852 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6860 | #endif |
| 6861 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6862 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6863 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6864 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6865 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6866 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6867 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6875 | #endif |
| 6876 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6877 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6878 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6879 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6880 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6881 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6882 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6890 | #endif |
| 6891 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6892 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6893 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6894 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6895 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6896 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6897 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6906 | #endif |
| 6907 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6908 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6909 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6910 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6911 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6912 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6913 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6922 | #endif |
| 6923 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6924 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6925 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6926 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6927 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6928 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6929 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6938 | #endif |
| 6939 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6940 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6941 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6942 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6943 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6944 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6945 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6954 | #endif |
| 6955 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6956 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6957 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6958 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6959 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6960 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6961 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6970 | #endif |
| 6971 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6972 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6973 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6974 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6975 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6976 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6977 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6986 | #endif |
| 6987 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6988 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6989 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6990 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6991 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6992 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6993 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6994 | extern char __attribute__((const, overloadable))min(char v1, char v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6995 | #endif |
| 6996 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6997 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6998 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6999 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7000 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7001 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7002 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7003 | extern char2 __attribute__((const, overloadable))min(char2 v1, char2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7004 | #endif |
| 7005 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7006 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7007 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7008 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7009 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7010 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7011 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7012 | extern char3 __attribute__((const, overloadable))min(char3 v1, char3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7013 | #endif |
| 7014 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7015 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7016 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7017 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7018 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7019 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7020 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7021 | extern char4 __attribute__((const, overloadable))min(char4 v1, char4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7022 | #endif |
| 7023 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7024 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7025 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7026 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7027 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7028 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7029 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7030 | extern uchar __attribute__((const, overloadable))min(uchar v1, uchar v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7031 | #endif |
| 7032 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7033 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7034 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7035 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7036 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7037 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7038 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7039 | extern uchar2 __attribute__((const, overloadable))min(uchar2 v1, uchar2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7040 | #endif |
| 7041 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7042 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7043 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7044 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7045 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7046 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7047 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7048 | extern uchar3 __attribute__((const, overloadable))min(uchar3 v1, uchar3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7049 | #endif |
| 7050 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7051 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7052 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7053 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7054 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7055 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7056 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7057 | extern uchar4 __attribute__((const, overloadable))min(uchar4 v1, uchar4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7058 | #endif |
| 7059 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7060 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7061 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7062 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7063 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7064 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7065 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7066 | extern short __attribute__((const, overloadable))min(short v1, short v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7067 | #endif |
| 7068 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7069 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7070 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7071 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7072 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7073 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7074 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7075 | extern short2 __attribute__((const, overloadable))min(short2 v1, short2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7076 | #endif |
| 7077 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7078 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7079 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7080 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7081 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7082 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7083 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7084 | extern short3 __attribute__((const, overloadable))min(short3 v1, short3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7085 | #endif |
| 7086 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7087 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7088 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7089 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7090 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7091 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7092 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7093 | extern short4 __attribute__((const, overloadable))min(short4 v1, short4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7094 | #endif |
| 7095 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7096 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7097 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7098 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7099 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7100 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7101 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7102 | extern ushort __attribute__((const, overloadable))min(ushort v1, ushort v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7103 | #endif |
| 7104 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7105 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7106 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7107 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7108 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7109 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7110 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7111 | extern ushort2 __attribute__((const, overloadable))min(ushort2 v1, ushort2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7112 | #endif |
| 7113 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7114 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7115 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7116 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7117 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7118 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7119 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7120 | extern ushort3 __attribute__((const, overloadable))min(ushort3 v1, ushort3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7121 | #endif |
| 7122 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7123 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7124 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7125 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7126 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7127 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7128 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7129 | extern ushort4 __attribute__((const, overloadable))min(ushort4 v1, ushort4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7130 | #endif |
| 7131 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7132 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7133 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7134 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7135 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7136 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7137 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7138 | extern int __attribute__((const, overloadable))min(int v1, int v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7139 | #endif |
| 7140 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7141 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7142 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7143 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7144 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7145 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7146 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7147 | extern int2 __attribute__((const, overloadable))min(int2 v1, int2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7148 | #endif |
| 7149 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7150 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7151 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7152 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7153 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7154 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7155 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7156 | extern int3 __attribute__((const, overloadable))min(int3 v1, int3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7157 | #endif |
| 7158 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7159 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7160 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7161 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7162 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7163 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7164 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7165 | extern int4 __attribute__((const, overloadable))min(int4 v1, int4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7166 | #endif |
| 7167 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7168 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7169 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7170 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7171 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7172 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7173 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7174 | extern uint __attribute__((const, overloadable))min(uint v1, uint v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7175 | #endif |
| 7176 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7177 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7178 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7179 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7180 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7181 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7182 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7183 | extern uint2 __attribute__((const, overloadable))min(uint2 v1, uint2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7184 | #endif |
| 7185 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7186 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7187 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7188 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7189 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7190 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7191 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7192 | extern uint3 __attribute__((const, overloadable))min(uint3 v1, uint3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7193 | #endif |
| 7194 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7195 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7196 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7197 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7198 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7199 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7200 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7201 | extern uint4 __attribute__((const, overloadable))min(uint4 v1, uint4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7202 | #endif |
| 7203 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7204 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7205 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7206 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7207 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7208 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7209 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7210 | extern long __attribute__((const, overloadable))min(long v1, long v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7211 | #endif |
| 7212 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7213 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7214 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7215 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7216 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7217 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7218 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7219 | extern long2 __attribute__((const, overloadable))min(long2 v1, long2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7220 | #endif |
| 7221 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7222 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7223 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7224 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7225 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7226 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7227 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7228 | extern long3 __attribute__((const, overloadable))min(long3 v1, long3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7229 | #endif |
| 7230 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7231 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7232 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7233 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7234 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7235 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7236 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7237 | extern long4 __attribute__((const, overloadable))min(long4 v1, long4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7238 | #endif |
| 7239 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7240 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7241 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7242 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7243 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7244 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7245 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7246 | extern ulong __attribute__((const, overloadable))min(ulong v1, ulong v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7247 | #endif |
| 7248 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7249 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7250 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7251 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7252 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7253 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7254 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7255 | extern ulong2 __attribute__((const, overloadable))min(ulong2 v1, ulong2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7256 | #endif |
| 7257 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7258 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7259 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7260 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7261 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7262 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7263 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7264 | extern ulong3 __attribute__((const, overloadable))min(ulong3 v1, ulong3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7265 | #endif |
| 7266 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7267 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7268 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7269 | * Return the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7270 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7271 | * Supported by API versions 20 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7272 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7273 | extern ulong4 __attribute__((const, overloadable))min(ulong4 v1, ulong4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | */ |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 7349 | extern float __attribute__((overloadable))modf(float x, float* iret); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 7362 | extern float2 __attribute__((overloadable))modf(float2 x, float2* iret); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 7375 | extern float3 __attribute__((overloadable))modf(float3 x, float3* iret); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 7388 | extern float4 __attribute__((overloadable))modf(float4 x, float4* iret); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | |
Jason Sams | a140d9d | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 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); |
| 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); |
| 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); |
| 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); |
| 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 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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 | |
Jason Sams | a140d9d | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 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 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8252 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8253 | /* |
| 8254 | * Fast approximate log |
| 8255 | * |
| 8256 | * Supported by API versions 18 and newer. |
| 8257 | */ |
| 8258 | extern float __attribute__((const, overloadable))native_log(float v); |
| 8259 | #endif |
| 8260 | |
| 8261 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8262 | /* |
| 8263 | * Fast approximate log |
| 8264 | * |
| 8265 | * Supported by API versions 18 and newer. |
| 8266 | */ |
| 8267 | extern float2 __attribute__((const, overloadable))native_log(float2 v); |
| 8268 | #endif |
| 8269 | |
| 8270 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8271 | /* |
| 8272 | * Fast approximate log |
| 8273 | * |
| 8274 | * Supported by API versions 18 and newer. |
| 8275 | */ |
| 8276 | extern float3 __attribute__((const, overloadable))native_log(float3 v); |
| 8277 | #endif |
| 8278 | |
| 8279 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8280 | /* |
| 8281 | * Fast approximate log |
| 8282 | * |
| 8283 | * Supported by API versions 18 and newer. |
| 8284 | */ |
| 8285 | extern float4 __attribute__((const, overloadable))native_log(float4 v); |
| 8286 | #endif |
| 8287 | |
| 8288 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8289 | /* |
| 8290 | * Fast approximate log10 |
| 8291 | * |
| 8292 | * Supported by API versions 18 and newer. |
| 8293 | */ |
| 8294 | extern float __attribute__((const, overloadable))native_log10(float v); |
| 8295 | #endif |
| 8296 | |
| 8297 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8298 | /* |
| 8299 | * Fast approximate log10 |
| 8300 | * |
| 8301 | * Supported by API versions 18 and newer. |
| 8302 | */ |
| 8303 | extern float2 __attribute__((const, overloadable))native_log10(float2 v); |
| 8304 | #endif |
| 8305 | |
| 8306 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8307 | /* |
| 8308 | * Fast approximate log10 |
| 8309 | * |
| 8310 | * Supported by API versions 18 and newer. |
| 8311 | */ |
| 8312 | extern float3 __attribute__((const, overloadable))native_log10(float3 v); |
| 8313 | #endif |
| 8314 | |
| 8315 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8316 | /* |
| 8317 | * Fast approximate log10 |
| 8318 | * |
| 8319 | * Supported by API versions 18 and newer. |
| 8320 | */ |
| 8321 | extern float4 __attribute__((const, overloadable))native_log10(float4 v); |
| 8322 | #endif |
| 8323 | |
Jason Sams | a140d9d | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 8324 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8325 | /* |
| 8326 | * Return the natural logarithm of (v + 1.0f) |
| 8327 | * |
| 8328 | * Supported by API versions 21 and newer. |
| 8329 | */ |
| 8330 | extern float __attribute__((const, overloadable))native_log1p(float); |
| 8331 | #endif |
| 8332 | |
| 8333 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8334 | /* |
| 8335 | * Return the natural logarithm of (v + 1.0f) |
| 8336 | * |
| 8337 | * Supported by API versions 21 and newer. |
| 8338 | */ |
| 8339 | extern float2 __attribute__((const, overloadable))native_log1p(float2); |
| 8340 | #endif |
| 8341 | |
| 8342 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8343 | /* |
| 8344 | * Return the natural logarithm of (v + 1.0f) |
| 8345 | * |
| 8346 | * Supported by API versions 21 and newer. |
| 8347 | */ |
| 8348 | extern float3 __attribute__((const, overloadable))native_log1p(float3); |
| 8349 | #endif |
| 8350 | |
| 8351 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8352 | /* |
| 8353 | * Return the natural logarithm of (v + 1.0f) |
| 8354 | * |
| 8355 | * Supported by API versions 21 and newer. |
| 8356 | */ |
| 8357 | extern float4 __attribute__((const, overloadable))native_log1p(float4); |
| 8358 | #endif |
| 8359 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8360 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8361 | /* |
| 8362 | * Fast approximate log2 |
| 8363 | * |
| 8364 | * Supported by API versions 18 and newer. |
| 8365 | */ |
| 8366 | extern float __attribute__((const, overloadable))native_log2(float v); |
| 8367 | #endif |
| 8368 | |
| 8369 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8370 | /* |
| 8371 | * Fast approximate log2 |
| 8372 | * |
| 8373 | * Supported by API versions 18 and newer. |
| 8374 | */ |
| 8375 | extern float2 __attribute__((const, overloadable))native_log2(float2 v); |
| 8376 | #endif |
| 8377 | |
| 8378 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8379 | /* |
| 8380 | * Fast approximate log2 |
| 8381 | * |
| 8382 | * Supported by API versions 18 and newer. |
| 8383 | */ |
| 8384 | extern float3 __attribute__((const, overloadable))native_log2(float3 v); |
| 8385 | #endif |
| 8386 | |
| 8387 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8388 | /* |
| 8389 | * Fast approximate log2 |
| 8390 | * |
| 8391 | * Supported by API versions 18 and newer. |
| 8392 | */ |
| 8393 | extern float4 __attribute__((const, overloadable))native_log2(float4 v); |
| 8394 | #endif |
| 8395 | |
Jason Sams | a140d9d | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 8396 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8397 | /* |
| 8398 | * Normalize a vector. |
| 8399 | * |
| 8400 | * Supported by API versions 21 and newer. |
| 8401 | */ |
| 8402 | extern float __attribute__((const, overloadable))native_normalize(float v); |
| 8403 | #endif |
| 8404 | |
| 8405 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8406 | /* |
| 8407 | * Normalize a vector. |
| 8408 | * |
| 8409 | * Supported by API versions 21 and newer. |
| 8410 | */ |
| 8411 | extern float2 __attribute__((const, overloadable))native_normalize(float2 v); |
| 8412 | #endif |
| 8413 | |
| 8414 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8415 | /* |
| 8416 | * Normalize a vector. |
| 8417 | * |
| 8418 | * Supported by API versions 21 and newer. |
| 8419 | */ |
| 8420 | extern float3 __attribute__((const, overloadable))native_normalize(float3 v); |
| 8421 | #endif |
| 8422 | |
| 8423 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8424 | /* |
| 8425 | * Normalize a vector. |
| 8426 | * |
| 8427 | * Supported by API versions 21 and newer. |
| 8428 | */ |
| 8429 | extern float4 __attribute__((const, overloadable))native_normalize(float4 v); |
| 8430 | #endif |
| 8431 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8432 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8433 | /* |
| 8434 | * Fast approximate v ^ y |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 8435 | * v must be between 0.f and 256.f |
| 8436 | * y must be between -15.f and 15.f |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8437 | * |
| 8438 | * Supported by API versions 18 and newer. |
| 8439 | */ |
| 8440 | extern float __attribute__((const, overloadable))native_powr(float v, float y); |
| 8441 | #endif |
| 8442 | |
| 8443 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8444 | /* |
| 8445 | * Fast approximate v ^ y |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 8446 | * v must be between 0.f and 256.f |
| 8447 | * y must be between -15.f and 15.f |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8448 | * |
| 8449 | * Supported by API versions 18 and newer. |
| 8450 | */ |
| 8451 | extern float2 __attribute__((const, overloadable))native_powr(float2 v, float2 y); |
| 8452 | #endif |
| 8453 | |
| 8454 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8455 | /* |
| 8456 | * Fast approximate v ^ y |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 8457 | * v must be between 0.f and 256.f |
| 8458 | * y must be between -15.f and 15.f |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8459 | * |
| 8460 | * Supported by API versions 18 and newer. |
| 8461 | */ |
| 8462 | extern float3 __attribute__((const, overloadable))native_powr(float3 v, float3 y); |
| 8463 | #endif |
| 8464 | |
| 8465 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
| 8466 | /* |
| 8467 | * Fast approximate v ^ y |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 8468 | * v must be between 0.f and 256.f |
| 8469 | * y must be between -15.f and 15.f |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8470 | * |
| 8471 | * Supported by API versions 18 and newer. |
| 8472 | */ |
| 8473 | extern float4 __attribute__((const, overloadable))native_powr(float4 v, float4 y); |
| 8474 | #endif |
| 8475 | |
Jason Sams | a140d9d | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 8476 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8477 | /* |
| 8478 | * Return the approximate reciprocal of a value. |
| 8479 | * |
| 8480 | * Supported by API versions 21 and newer. |
| 8481 | */ |
| 8482 | extern float __attribute__((const, overloadable))native_recip(float v); |
| 8483 | #endif |
| 8484 | |
| 8485 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8486 | /* |
| 8487 | * Return the approximate reciprocal of a value. |
| 8488 | * |
| 8489 | * Supported by API versions 21 and newer. |
| 8490 | */ |
| 8491 | extern float2 __attribute__((const, overloadable))native_recip(float2 v); |
| 8492 | #endif |
| 8493 | |
| 8494 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8495 | /* |
| 8496 | * Return the approximate reciprocal of a value. |
| 8497 | * |
| 8498 | * Supported by API versions 21 and newer. |
| 8499 | */ |
| 8500 | extern float3 __attribute__((const, overloadable))native_recip(float3 v); |
| 8501 | #endif |
| 8502 | |
| 8503 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8504 | /* |
| 8505 | * Return the approximate reciprocal of a value. |
| 8506 | * |
| 8507 | * Supported by API versions 21 and newer. |
| 8508 | */ |
| 8509 | extern float4 __attribute__((const, overloadable))native_recip(float4 v); |
| 8510 | #endif |
| 8511 | |
| 8512 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8513 | /* |
| 8514 | * Compute the Nth root of a value. |
| 8515 | * |
| 8516 | * Supported by API versions 21 and newer. |
| 8517 | */ |
| 8518 | extern float __attribute__((const, overloadable))native_rootn(float v, int n); |
| 8519 | #endif |
| 8520 | |
| 8521 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8522 | /* |
| 8523 | * Compute the Nth root of a value. |
| 8524 | * |
| 8525 | * Supported by API versions 21 and newer. |
| 8526 | */ |
| 8527 | extern float2 __attribute__((const, overloadable))native_rootn(float2 v, int2 n); |
| 8528 | #endif |
| 8529 | |
| 8530 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8531 | /* |
| 8532 | * Compute the Nth root of a value. |
| 8533 | * |
| 8534 | * Supported by API versions 21 and newer. |
| 8535 | */ |
| 8536 | extern float3 __attribute__((const, overloadable))native_rootn(float3 v, int3 n); |
| 8537 | #endif |
| 8538 | |
| 8539 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8540 | /* |
| 8541 | * Compute the Nth root of a value. |
| 8542 | * |
| 8543 | * Supported by API versions 21 and newer. |
| 8544 | */ |
| 8545 | extern float4 __attribute__((const, overloadable))native_rootn(float4 v, int4 n); |
| 8546 | #endif |
| 8547 | |
| 8548 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8549 | /* |
| 8550 | * Return (1 / sqrt(value)). |
| 8551 | * |
| 8552 | * Supported by API versions 21 and newer. |
| 8553 | */ |
| 8554 | extern float __attribute__((const, overloadable))native_rsqrt(float); |
| 8555 | #endif |
| 8556 | |
| 8557 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8558 | /* |
| 8559 | * Return (1 / sqrt(value)). |
| 8560 | * |
| 8561 | * Supported by API versions 21 and newer. |
| 8562 | */ |
| 8563 | extern float2 __attribute__((const, overloadable))native_rsqrt(float2); |
| 8564 | #endif |
| 8565 | |
| 8566 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8567 | /* |
| 8568 | * Return (1 / sqrt(value)). |
| 8569 | * |
| 8570 | * Supported by API versions 21 and newer. |
| 8571 | */ |
| 8572 | extern float3 __attribute__((const, overloadable))native_rsqrt(float3); |
| 8573 | #endif |
| 8574 | |
| 8575 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8576 | /* |
| 8577 | * Return (1 / sqrt(value)). |
| 8578 | * |
| 8579 | * Supported by API versions 21 and newer. |
| 8580 | */ |
| 8581 | extern float4 __attribute__((const, overloadable))native_rsqrt(float4); |
| 8582 | #endif |
| 8583 | |
| 8584 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8585 | /* |
| 8586 | * Return the sine of a value specified in radians. |
| 8587 | * |
| 8588 | * Supported by API versions 21 and newer. |
| 8589 | */ |
| 8590 | extern float __attribute__((const, overloadable))native_sin(float); |
| 8591 | #endif |
| 8592 | |
| 8593 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8594 | /* |
| 8595 | * Return the sine of a value specified in radians. |
| 8596 | * |
| 8597 | * Supported by API versions 21 and newer. |
| 8598 | */ |
| 8599 | extern float2 __attribute__((const, overloadable))native_sin(float2); |
| 8600 | #endif |
| 8601 | |
| 8602 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8603 | /* |
| 8604 | * Return the sine of a value specified in radians. |
| 8605 | * |
| 8606 | * Supported by API versions 21 and newer. |
| 8607 | */ |
| 8608 | extern float3 __attribute__((const, overloadable))native_sin(float3); |
| 8609 | #endif |
| 8610 | |
| 8611 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8612 | /* |
| 8613 | * Return the sine of a value specified in radians. |
| 8614 | * |
| 8615 | * Supported by API versions 21 and newer. |
| 8616 | */ |
| 8617 | extern float4 __attribute__((const, overloadable))native_sin(float4); |
| 8618 | #endif |
| 8619 | |
| 8620 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8621 | /* |
| 8622 | * Return the sine and cosine of a value. |
| 8623 | * |
| 8624 | * @return sine |
| 8625 | * @param v The incoming value in radians |
| 8626 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 8627 | * |
| 8628 | * Supported by API versions 21 and newer. |
| 8629 | */ |
| 8630 | extern float __attribute__((overloadable))native_sincos(float v, float* cosptr); |
| 8631 | #endif |
| 8632 | |
| 8633 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8634 | /* |
| 8635 | * Return the sine and cosine of a value. |
| 8636 | * |
| 8637 | * @return sine |
| 8638 | * @param v The incoming value in radians |
| 8639 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 8640 | * |
| 8641 | * Supported by API versions 21 and newer. |
| 8642 | */ |
| 8643 | extern float2 __attribute__((overloadable))native_sincos(float2 v, float2* cosptr); |
| 8644 | #endif |
| 8645 | |
| 8646 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8647 | /* |
| 8648 | * Return the sine and cosine of a value. |
| 8649 | * |
| 8650 | * @return sine |
| 8651 | * @param v The incoming value in radians |
| 8652 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 8653 | * |
| 8654 | * Supported by API versions 21 and newer. |
| 8655 | */ |
| 8656 | extern float3 __attribute__((overloadable))native_sincos(float3 v, float3* cosptr); |
| 8657 | #endif |
| 8658 | |
| 8659 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8660 | /* |
| 8661 | * Return the sine and cosine of a value. |
| 8662 | * |
| 8663 | * @return sine |
| 8664 | * @param v The incoming value in radians |
| 8665 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 8666 | * |
| 8667 | * Supported by API versions 21 and newer. |
| 8668 | */ |
| 8669 | extern float4 __attribute__((overloadable))native_sincos(float4 v, float4* cosptr); |
| 8670 | #endif |
| 8671 | |
| 8672 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8673 | /* |
| 8674 | * Return the hyperbolic sine of a value specified in radians. |
| 8675 | * |
| 8676 | * Supported by API versions 21 and newer. |
| 8677 | */ |
| 8678 | extern float __attribute__((const, overloadable))native_sinh(float); |
| 8679 | #endif |
| 8680 | |
| 8681 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8682 | /* |
| 8683 | * Return the hyperbolic sine of a value specified in radians. |
| 8684 | * |
| 8685 | * Supported by API versions 21 and newer. |
| 8686 | */ |
| 8687 | extern float2 __attribute__((const, overloadable))native_sinh(float2); |
| 8688 | #endif |
| 8689 | |
| 8690 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8691 | /* |
| 8692 | * Return the hyperbolic sine of a value specified in radians. |
| 8693 | * |
| 8694 | * Supported by API versions 21 and newer. |
| 8695 | */ |
| 8696 | extern float3 __attribute__((const, overloadable))native_sinh(float3); |
| 8697 | #endif |
| 8698 | |
| 8699 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8700 | /* |
| 8701 | * Return the hyperbolic sine of a value specified in radians. |
| 8702 | * |
| 8703 | * Supported by API versions 21 and newer. |
| 8704 | */ |
| 8705 | extern float4 __attribute__((const, overloadable))native_sinh(float4); |
| 8706 | #endif |
| 8707 | |
| 8708 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8709 | /* |
| 8710 | * Return the sin(v * PI). |
| 8711 | * |
| 8712 | * Supported by API versions 21 and newer. |
| 8713 | */ |
| 8714 | extern float __attribute__((const, overloadable))native_sinpi(float); |
| 8715 | #endif |
| 8716 | |
| 8717 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8718 | /* |
| 8719 | * Return the sin(v * PI). |
| 8720 | * |
| 8721 | * Supported by API versions 21 and newer. |
| 8722 | */ |
| 8723 | extern float2 __attribute__((const, overloadable))native_sinpi(float2); |
| 8724 | #endif |
| 8725 | |
| 8726 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8727 | /* |
| 8728 | * Return the sin(v * PI). |
| 8729 | * |
| 8730 | * Supported by API versions 21 and newer. |
| 8731 | */ |
| 8732 | extern float3 __attribute__((const, overloadable))native_sinpi(float3); |
| 8733 | #endif |
| 8734 | |
| 8735 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8736 | /* |
| 8737 | * Return the sin(v * PI). |
| 8738 | * |
| 8739 | * Supported by API versions 21 and newer. |
| 8740 | */ |
| 8741 | extern float4 __attribute__((const, overloadable))native_sinpi(float4); |
| 8742 | #endif |
| 8743 | |
| 8744 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8745 | /* |
Jason Sams | a140d9d | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 8746 | * Return the aproximate sqrt(v). |
| 8747 | * |
| 8748 | * Supported by API versions 21 and newer. |
| 8749 | */ |
| 8750 | extern float __attribute__((const, overloadable))native_sqrt(float); |
| 8751 | #endif |
| 8752 | |
| 8753 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8754 | /* |
| 8755 | * Return the aproximate sqrt(v). |
| 8756 | * |
| 8757 | * Supported by API versions 21 and newer. |
| 8758 | */ |
| 8759 | extern float2 __attribute__((const, overloadable))native_sqrt(float2); |
| 8760 | #endif |
| 8761 | |
| 8762 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8763 | /* |
| 8764 | * Return the aproximate sqrt(v). |
| 8765 | * |
| 8766 | * Supported by API versions 21 and newer. |
| 8767 | */ |
| 8768 | extern float3 __attribute__((const, overloadable))native_sqrt(float3); |
| 8769 | #endif |
| 8770 | |
| 8771 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8772 | /* |
| 8773 | * Return the aproximate sqrt(v). |
| 8774 | * |
| 8775 | * Supported by API versions 21 and newer. |
| 8776 | */ |
| 8777 | extern float4 __attribute__((const, overloadable))native_sqrt(float4); |
| 8778 | #endif |
| 8779 | |
| 8780 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8781 | /* |
| 8782 | * Return the tangent of a value. |
| 8783 | * |
| 8784 | * Supported by API versions 21 and newer. |
| 8785 | */ |
| 8786 | extern float __attribute__((const, overloadable))native_tan(float); |
| 8787 | #endif |
| 8788 | |
| 8789 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8790 | /* |
| 8791 | * Return the tangent of a value. |
| 8792 | * |
| 8793 | * Supported by API versions 21 and newer. |
| 8794 | */ |
| 8795 | extern float2 __attribute__((const, overloadable))native_tan(float2); |
| 8796 | #endif |
| 8797 | |
| 8798 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8799 | /* |
| 8800 | * Return the tangent of a value. |
| 8801 | * |
| 8802 | * Supported by API versions 21 and newer. |
| 8803 | */ |
| 8804 | extern float3 __attribute__((const, overloadable))native_tan(float3); |
| 8805 | #endif |
| 8806 | |
| 8807 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8808 | /* |
| 8809 | * Return the tangent of a value. |
| 8810 | * |
| 8811 | * Supported by API versions 21 and newer. |
| 8812 | */ |
| 8813 | extern float4 __attribute__((const, overloadable))native_tan(float4); |
| 8814 | #endif |
| 8815 | |
| 8816 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8817 | /* |
| 8818 | * Return the hyperbolic tangent of a value. |
| 8819 | * |
| 8820 | * Supported by API versions 21 and newer. |
| 8821 | */ |
| 8822 | extern float __attribute__((const, overloadable))native_tanh(float); |
| 8823 | #endif |
| 8824 | |
| 8825 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8826 | /* |
| 8827 | * Return the hyperbolic tangent of a value. |
| 8828 | * |
| 8829 | * Supported by API versions 21 and newer. |
| 8830 | */ |
| 8831 | extern float2 __attribute__((const, overloadable))native_tanh(float2); |
| 8832 | #endif |
| 8833 | |
| 8834 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8835 | /* |
| 8836 | * Return the hyperbolic tangent of a value. |
| 8837 | * |
| 8838 | * Supported by API versions 21 and newer. |
| 8839 | */ |
| 8840 | extern float3 __attribute__((const, overloadable))native_tanh(float3); |
| 8841 | #endif |
| 8842 | |
| 8843 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8844 | /* |
| 8845 | * Return the hyperbolic tangent of a value. |
| 8846 | * |
| 8847 | * Supported by API versions 21 and newer. |
| 8848 | */ |
| 8849 | extern float4 __attribute__((const, overloadable))native_tanh(float4); |
| 8850 | #endif |
| 8851 | |
| 8852 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8853 | /* |
| 8854 | * Return tan(v * PI) |
| 8855 | * |
| 8856 | * Supported by API versions 21 and newer. |
| 8857 | */ |
| 8858 | extern float __attribute__((const, overloadable))native_tanpi(float); |
| 8859 | #endif |
| 8860 | |
| 8861 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8862 | /* |
| 8863 | * Return tan(v * PI) |
| 8864 | * |
| 8865 | * Supported by API versions 21 and newer. |
| 8866 | */ |
| 8867 | extern float2 __attribute__((const, overloadable))native_tanpi(float2); |
| 8868 | #endif |
| 8869 | |
| 8870 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8871 | /* |
| 8872 | * Return tan(v * PI) |
| 8873 | * |
| 8874 | * Supported by API versions 21 and newer. |
| 8875 | */ |
| 8876 | extern float3 __attribute__((const, overloadable))native_tanpi(float3); |
| 8877 | #endif |
| 8878 | |
| 8879 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 8880 | /* |
| 8881 | * Return tan(v * PI) |
| 8882 | * |
| 8883 | * Supported by API versions 21 and newer. |
| 8884 | */ |
| 8885 | extern float4 __attribute__((const, overloadable))native_tanpi(float4); |
| 8886 | #endif |
| 8887 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8888 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8889 | /* |
| 8890 | * Return the next floating point number from x towards y. |
| 8891 | * |
| 8892 | * Supported by API versions 9 and newer. |
| 8893 | */ |
| 8894 | extern float __attribute__((const, overloadable))nextafter(float x, float y); |
| 8895 | #endif |
| 8896 | |
| 8897 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8898 | /* |
| 8899 | * Return the next floating point number from x towards y. |
| 8900 | * |
| 8901 | * Supported by API versions 9 and newer. |
| 8902 | */ |
| 8903 | extern float2 __attribute__((const, overloadable))nextafter(float2 x, float2 y); |
| 8904 | #endif |
| 8905 | |
| 8906 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8907 | /* |
| 8908 | * Return the next floating point number from x towards y. |
| 8909 | * |
| 8910 | * Supported by API versions 9 and newer. |
| 8911 | */ |
| 8912 | extern float3 __attribute__((const, overloadable))nextafter(float3 x, float3 y); |
| 8913 | #endif |
| 8914 | |
| 8915 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8916 | /* |
| 8917 | * Return the next floating point number from x towards y. |
| 8918 | * |
| 8919 | * Supported by API versions 9 and newer. |
| 8920 | */ |
| 8921 | extern float4 __attribute__((const, overloadable))nextafter(float4 x, float4 y); |
| 8922 | #endif |
| 8923 | |
| 8924 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8925 | /* |
| 8926 | * Normalize a vector. |
| 8927 | * |
| 8928 | * Supported by API versions 9 and newer. |
| 8929 | */ |
| 8930 | extern float __attribute__((const, overloadable))normalize(float v); |
| 8931 | #endif |
| 8932 | |
| 8933 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8934 | /* |
| 8935 | * Normalize a vector. |
| 8936 | * |
| 8937 | * Supported by API versions 9 and newer. |
| 8938 | */ |
| 8939 | extern float2 __attribute__((const, overloadable))normalize(float2 v); |
| 8940 | #endif |
| 8941 | |
| 8942 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8943 | /* |
| 8944 | * Normalize a vector. |
| 8945 | * |
| 8946 | * Supported by API versions 9 and newer. |
| 8947 | */ |
| 8948 | extern float3 __attribute__((const, overloadable))normalize(float3 v); |
| 8949 | #endif |
| 8950 | |
| 8951 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8952 | /* |
| 8953 | * Normalize a vector. |
| 8954 | * |
| 8955 | * Supported by API versions 9 and newer. |
| 8956 | */ |
| 8957 | extern float4 __attribute__((const, overloadable))normalize(float4 v); |
| 8958 | #endif |
| 8959 | |
| 8960 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8961 | /* |
| 8962 | * Return x ^ y. |
| 8963 | * |
| 8964 | * Supported by API versions 9 and newer. |
| 8965 | */ |
| 8966 | extern float __attribute__((const, overloadable))pow(float x, float y); |
| 8967 | #endif |
| 8968 | |
| 8969 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8970 | /* |
| 8971 | * Return x ^ y. |
| 8972 | * |
| 8973 | * Supported by API versions 9 and newer. |
| 8974 | */ |
| 8975 | extern float2 __attribute__((const, overloadable))pow(float2 x, float2 y); |
| 8976 | #endif |
| 8977 | |
| 8978 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8979 | /* |
| 8980 | * Return x ^ y. |
| 8981 | * |
| 8982 | * Supported by API versions 9 and newer. |
| 8983 | */ |
| 8984 | extern float3 __attribute__((const, overloadable))pow(float3 x, float3 y); |
| 8985 | #endif |
| 8986 | |
| 8987 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8988 | /* |
| 8989 | * Return x ^ y. |
| 8990 | * |
| 8991 | * Supported by API versions 9 and newer. |
| 8992 | */ |
| 8993 | extern float4 __attribute__((const, overloadable))pow(float4 x, float4 y); |
| 8994 | #endif |
| 8995 | |
| 8996 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 8997 | /* |
| 8998 | * Return x ^ y. |
| 8999 | * |
| 9000 | * Supported by API versions 9 and newer. |
| 9001 | */ |
| 9002 | extern float __attribute__((const, overloadable))pown(float x, int y); |
| 9003 | #endif |
| 9004 | |
| 9005 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9006 | /* |
| 9007 | * Return x ^ y. |
| 9008 | * |
| 9009 | * Supported by API versions 9 and newer. |
| 9010 | */ |
| 9011 | extern float2 __attribute__((const, overloadable))pown(float2 x, int2 y); |
| 9012 | #endif |
| 9013 | |
| 9014 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9015 | /* |
| 9016 | * Return x ^ y. |
| 9017 | * |
| 9018 | * Supported by API versions 9 and newer. |
| 9019 | */ |
| 9020 | extern float3 __attribute__((const, overloadable))pown(float3 x, int3 y); |
| 9021 | #endif |
| 9022 | |
| 9023 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9024 | /* |
| 9025 | * Return x ^ y. |
| 9026 | * |
| 9027 | * Supported by API versions 9 and newer. |
| 9028 | */ |
| 9029 | extern float4 __attribute__((const, overloadable))pown(float4 x, int4 y); |
| 9030 | #endif |
| 9031 | |
| 9032 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9033 | /* |
| 9034 | * Return x ^ y. |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9035 | * x must be >= 0 |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9036 | * |
| 9037 | * Supported by API versions 9 and newer. |
| 9038 | */ |
| 9039 | extern float __attribute__((const, overloadable))powr(float x, float y); |
| 9040 | #endif |
| 9041 | |
| 9042 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9043 | /* |
| 9044 | * Return x ^ y. |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9045 | * x must be >= 0 |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9046 | * |
| 9047 | * Supported by API versions 9 and newer. |
| 9048 | */ |
| 9049 | extern float2 __attribute__((const, overloadable))powr(float2 x, float2 y); |
| 9050 | #endif |
| 9051 | |
| 9052 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9053 | /* |
| 9054 | * Return x ^ y. |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9055 | * x must be >= 0 |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9056 | * |
| 9057 | * Supported by API versions 9 and newer. |
| 9058 | */ |
| 9059 | extern float3 __attribute__((const, overloadable))powr(float3 x, float3 y); |
| 9060 | #endif |
| 9061 | |
| 9062 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9063 | /* |
| 9064 | * Return x ^ y. |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9065 | * x must be >= 0 |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9066 | * |
| 9067 | * Supported by API versions 9 and newer. |
| 9068 | */ |
| 9069 | extern float4 __attribute__((const, overloadable))powr(float4 x, float4 y); |
| 9070 | #endif |
| 9071 | |
| 9072 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9073 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9074 | * Convert from degrees to radians. |
| 9075 | * |
| 9076 | * Supported by API versions 9 and newer. |
| 9077 | */ |
| 9078 | extern float __attribute__((const, overloadable))radians(float value); |
| 9079 | #endif |
| 9080 | |
| 9081 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9082 | /* |
| 9083 | * Convert from degrees to radians. |
| 9084 | * |
| 9085 | * Supported by API versions 9 and newer. |
| 9086 | */ |
| 9087 | extern float2 __attribute__((const, overloadable))radians(float2 value); |
| 9088 | #endif |
| 9089 | |
| 9090 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9091 | /* |
| 9092 | * Convert from degrees to radians. |
| 9093 | * |
| 9094 | * Supported by API versions 9 and newer. |
| 9095 | */ |
| 9096 | extern float3 __attribute__((const, overloadable))radians(float3 value); |
| 9097 | #endif |
| 9098 | |
| 9099 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9100 | /* |
| 9101 | * Convert from degrees to radians. |
| 9102 | * |
| 9103 | * Supported by API versions 9 and newer. |
| 9104 | */ |
| 9105 | extern float4 __attribute__((const, overloadable))radians(float4 value); |
| 9106 | #endif |
| 9107 | |
| 9108 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9109 | /* |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9110 | * Return round x/y to the nearest integer then compute the remainder. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9111 | * |
| 9112 | * Supported by API versions 9 and newer. |
| 9113 | */ |
| 9114 | extern float __attribute__((const, overloadable))remainder(float x, float y); |
| 9115 | #endif |
| 9116 | |
| 9117 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9118 | /* |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9119 | * Return round x/y to the nearest integer then compute the remainder. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9120 | * |
| 9121 | * Supported by API versions 9 and newer. |
| 9122 | */ |
| 9123 | extern float2 __attribute__((const, overloadable))remainder(float2 x, float2 y); |
| 9124 | #endif |
| 9125 | |
| 9126 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9127 | /* |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9128 | * Return round x/y to the nearest integer then compute the remainder. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9129 | * |
| 9130 | * Supported by API versions 9 and newer. |
| 9131 | */ |
| 9132 | extern float3 __attribute__((const, overloadable))remainder(float3 x, float3 y); |
| 9133 | #endif |
| 9134 | |
| 9135 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9136 | /* |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9137 | * Return round x/y to the nearest integer then compute the remainder. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9138 | * |
| 9139 | * Supported by API versions 9 and newer. |
| 9140 | */ |
| 9141 | extern float4 __attribute__((const, overloadable))remainder(float4 x, float4 y); |
| 9142 | #endif |
| 9143 | |
| 9144 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9145 | /* |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9146 | * Return the quotient and the remainder of b/c |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9147 | * |
| 9148 | * Supported by API versions 9 and newer. |
| 9149 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9150 | extern float __attribute__((overloadable))remquo(float b, float c, int* d); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9151 | #endif |
| 9152 | |
| 9153 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9154 | /* |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9155 | * Return the quotient and the remainder of b/c |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9156 | * |
| 9157 | * Supported by API versions 9 and newer. |
| 9158 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9159 | extern float2 __attribute__((overloadable))remquo(float2 b, float2 c, int2* d); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9160 | #endif |
| 9161 | |
| 9162 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9163 | /* |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9164 | * Return the quotient and the remainder of b/c |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9165 | * |
| 9166 | * Supported by API versions 9 and newer. |
| 9167 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9168 | extern float3 __attribute__((overloadable))remquo(float3 b, float3 c, int3* d); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9169 | #endif |
| 9170 | |
| 9171 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9172 | /* |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9173 | * Return the quotient and the remainder of b/c |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9174 | * |
| 9175 | * Supported by API versions 9 and newer. |
| 9176 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9177 | extern float4 __attribute__((overloadable))remquo(float4 b, float4 c, int4* d); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9178 | #endif |
| 9179 | |
| 9180 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9181 | /* |
| 9182 | * Round to the nearest integral value. |
| 9183 | * |
| 9184 | * Supported by API versions 9 and newer. |
| 9185 | */ |
| 9186 | extern float __attribute__((const, overloadable))rint(float); |
| 9187 | #endif |
| 9188 | |
| 9189 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9190 | /* |
| 9191 | * Round to the nearest integral value. |
| 9192 | * |
| 9193 | * Supported by API versions 9 and newer. |
| 9194 | */ |
| 9195 | extern float2 __attribute__((const, overloadable))rint(float2); |
| 9196 | #endif |
| 9197 | |
| 9198 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9199 | /* |
| 9200 | * Round to the nearest integral value. |
| 9201 | * |
| 9202 | * Supported by API versions 9 and newer. |
| 9203 | */ |
| 9204 | extern float3 __attribute__((const, overloadable))rint(float3); |
| 9205 | #endif |
| 9206 | |
| 9207 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9208 | /* |
| 9209 | * Round to the nearest integral value. |
| 9210 | * |
| 9211 | * Supported by API versions 9 and newer. |
| 9212 | */ |
| 9213 | extern float4 __attribute__((const, overloadable))rint(float4); |
| 9214 | #endif |
| 9215 | |
| 9216 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9217 | /* |
| 9218 | * Compute the Nth root of a value. |
| 9219 | * |
| 9220 | * Supported by API versions 9 and newer. |
| 9221 | */ |
| 9222 | extern float __attribute__((const, overloadable))rootn(float v, int n); |
| 9223 | #endif |
| 9224 | |
| 9225 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9226 | /* |
| 9227 | * Compute the Nth root of a value. |
| 9228 | * |
| 9229 | * Supported by API versions 9 and newer. |
| 9230 | */ |
| 9231 | extern float2 __attribute__((const, overloadable))rootn(float2 v, int2 n); |
| 9232 | #endif |
| 9233 | |
| 9234 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9235 | /* |
| 9236 | * Compute the Nth root of a value. |
| 9237 | * |
| 9238 | * Supported by API versions 9 and newer. |
| 9239 | */ |
| 9240 | extern float3 __attribute__((const, overloadable))rootn(float3 v, int3 n); |
| 9241 | #endif |
| 9242 | |
| 9243 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9244 | /* |
| 9245 | * Compute the Nth root of a value. |
| 9246 | * |
| 9247 | * Supported by API versions 9 and newer. |
| 9248 | */ |
| 9249 | extern float4 __attribute__((const, overloadable))rootn(float4 v, int4 n); |
| 9250 | #endif |
| 9251 | |
| 9252 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9253 | /* |
| 9254 | * Round to the nearest integral value. Half values are rounded away from zero. |
| 9255 | * |
| 9256 | * Supported by API versions 9 and newer. |
| 9257 | */ |
| 9258 | extern float __attribute__((const, overloadable))round(float); |
| 9259 | #endif |
| 9260 | |
| 9261 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9262 | /* |
| 9263 | * Round to the nearest integral value. Half values are rounded away from zero. |
| 9264 | * |
| 9265 | * Supported by API versions 9 and newer. |
| 9266 | */ |
| 9267 | extern float2 __attribute__((const, overloadable))round(float2); |
| 9268 | #endif |
| 9269 | |
| 9270 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9271 | /* |
| 9272 | * Round to the nearest integral value. Half values are rounded away from zero. |
| 9273 | * |
| 9274 | * Supported by API versions 9 and newer. |
| 9275 | */ |
| 9276 | extern float3 __attribute__((const, overloadable))round(float3); |
| 9277 | #endif |
| 9278 | |
| 9279 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9280 | /* |
| 9281 | * Round to the nearest integral value. Half values are rounded away from zero. |
| 9282 | * |
| 9283 | * Supported by API versions 9 and newer. |
| 9284 | */ |
| 9285 | extern float4 __attribute__((const, overloadable))round(float4); |
| 9286 | #endif |
| 9287 | |
| 9288 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9289 | /* |
| 9290 | * Return (1 / sqrt(value)). |
| 9291 | * |
| 9292 | * Supported by API versions 9 and newer. |
| 9293 | */ |
| 9294 | extern float __attribute__((const, overloadable))rsqrt(float); |
| 9295 | #endif |
| 9296 | |
| 9297 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9298 | /* |
| 9299 | * Return (1 / sqrt(value)). |
| 9300 | * |
| 9301 | * Supported by API versions 9 and newer. |
| 9302 | */ |
| 9303 | extern float2 __attribute__((const, overloadable))rsqrt(float2); |
| 9304 | #endif |
| 9305 | |
| 9306 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9307 | /* |
| 9308 | * Return (1 / sqrt(value)). |
| 9309 | * |
| 9310 | * Supported by API versions 9 and newer. |
| 9311 | */ |
| 9312 | extern float3 __attribute__((const, overloadable))rsqrt(float3); |
| 9313 | #endif |
| 9314 | |
| 9315 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9316 | /* |
| 9317 | * Return (1 / sqrt(value)). |
| 9318 | * |
| 9319 | * Supported by API versions 9 and newer. |
| 9320 | */ |
| 9321 | extern float4 __attribute__((const, overloadable))rsqrt(float4); |
| 9322 | #endif |
| 9323 | |
| 9324 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9325 | /* |
| 9326 | * Return the sign of a value. |
| 9327 | * |
| 9328 | * if (v < 0) return -1.f; |
| 9329 | * else if (v > 0) return 1.f; |
| 9330 | * else return 0.f; |
| 9331 | * |
| 9332 | * Supported by API versions 9 and newer. |
| 9333 | */ |
| 9334 | extern float __attribute__((const, overloadable))sign(float v); |
| 9335 | #endif |
| 9336 | |
| 9337 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9338 | /* |
| 9339 | * Return the sign of a value. |
| 9340 | * |
| 9341 | * if (v < 0) return -1.f; |
| 9342 | * else if (v > 0) return 1.f; |
| 9343 | * else return 0.f; |
| 9344 | * |
| 9345 | * Supported by API versions 9 and newer. |
| 9346 | */ |
| 9347 | extern float2 __attribute__((const, overloadable))sign(float2 v); |
| 9348 | #endif |
| 9349 | |
| 9350 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9351 | /* |
| 9352 | * Return the sign of a value. |
| 9353 | * |
| 9354 | * if (v < 0) return -1.f; |
| 9355 | * else if (v > 0) return 1.f; |
| 9356 | * else return 0.f; |
| 9357 | * |
| 9358 | * Supported by API versions 9 and newer. |
| 9359 | */ |
| 9360 | extern float3 __attribute__((const, overloadable))sign(float3 v); |
| 9361 | #endif |
| 9362 | |
| 9363 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9364 | /* |
| 9365 | * Return the sign of a value. |
| 9366 | * |
| 9367 | * if (v < 0) return -1.f; |
| 9368 | * else if (v > 0) return 1.f; |
| 9369 | * else return 0.f; |
| 9370 | * |
| 9371 | * Supported by API versions 9 and newer. |
| 9372 | */ |
| 9373 | extern float4 __attribute__((const, overloadable))sign(float4 v); |
| 9374 | #endif |
| 9375 | |
| 9376 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9377 | /* |
| 9378 | * Return the sine of a value specified in radians. |
| 9379 | * |
| 9380 | * Supported by API versions 9 and newer. |
| 9381 | */ |
| 9382 | extern float __attribute__((const, overloadable))sin(float); |
| 9383 | #endif |
| 9384 | |
| 9385 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9386 | /* |
| 9387 | * Return the sine of a value specified in radians. |
| 9388 | * |
| 9389 | * Supported by API versions 9 and newer. |
| 9390 | */ |
| 9391 | extern float2 __attribute__((const, overloadable))sin(float2); |
| 9392 | #endif |
| 9393 | |
| 9394 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9395 | /* |
| 9396 | * Return the sine of a value specified in radians. |
| 9397 | * |
| 9398 | * Supported by API versions 9 and newer. |
| 9399 | */ |
| 9400 | extern float3 __attribute__((const, overloadable))sin(float3); |
| 9401 | #endif |
| 9402 | |
| 9403 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9404 | /* |
| 9405 | * Return the sine of a value specified in radians. |
| 9406 | * |
| 9407 | * Supported by API versions 9 and newer. |
| 9408 | */ |
| 9409 | extern float4 __attribute__((const, overloadable))sin(float4); |
| 9410 | #endif |
| 9411 | |
| 9412 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9413 | /* |
| 9414 | * Return the sine and cosine of a value. |
| 9415 | * |
| 9416 | * @return sine |
| 9417 | * @param v The incoming value in radians |
| 9418 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 9419 | * |
| 9420 | * Supported by API versions 9 and newer. |
| 9421 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9422 | extern float __attribute__((overloadable))sincos(float v, float* cosptr); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9423 | #endif |
| 9424 | |
| 9425 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9426 | /* |
| 9427 | * Return the sine and cosine of a value. |
| 9428 | * |
| 9429 | * @return sine |
| 9430 | * @param v The incoming value in radians |
| 9431 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 9432 | * |
| 9433 | * Supported by API versions 9 and newer. |
| 9434 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9435 | extern float2 __attribute__((overloadable))sincos(float2 v, float2* cosptr); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9436 | #endif |
| 9437 | |
| 9438 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9439 | /* |
| 9440 | * Return the sine and cosine of a value. |
| 9441 | * |
| 9442 | * @return sine |
| 9443 | * @param v The incoming value in radians |
| 9444 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 9445 | * |
| 9446 | * Supported by API versions 9 and newer. |
| 9447 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9448 | extern float3 __attribute__((overloadable))sincos(float3 v, float3* cosptr); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9449 | #endif |
| 9450 | |
| 9451 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9452 | /* |
| 9453 | * Return the sine and cosine of a value. |
| 9454 | * |
| 9455 | * @return sine |
| 9456 | * @param v The incoming value in radians |
| 9457 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 9458 | * |
| 9459 | * Supported by API versions 9 and newer. |
| 9460 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9461 | extern float4 __attribute__((overloadable))sincos(float4 v, float4* cosptr); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9462 | #endif |
| 9463 | |
| 9464 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9465 | /* |
| 9466 | * Return the hyperbolic sine of a value specified in radians. |
| 9467 | * |
| 9468 | * Supported by API versions 9 and newer. |
| 9469 | */ |
| 9470 | extern float __attribute__((const, overloadable))sinh(float); |
| 9471 | #endif |
| 9472 | |
| 9473 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9474 | /* |
| 9475 | * Return the hyperbolic sine of a value specified in radians. |
| 9476 | * |
| 9477 | * Supported by API versions 9 and newer. |
| 9478 | */ |
| 9479 | extern float2 __attribute__((const, overloadable))sinh(float2); |
| 9480 | #endif |
| 9481 | |
| 9482 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9483 | /* |
| 9484 | * Return the hyperbolic sine of a value specified in radians. |
| 9485 | * |
| 9486 | * Supported by API versions 9 and newer. |
| 9487 | */ |
| 9488 | extern float3 __attribute__((const, overloadable))sinh(float3); |
| 9489 | #endif |
| 9490 | |
| 9491 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9492 | /* |
| 9493 | * Return the hyperbolic sine of a value specified in radians. |
| 9494 | * |
| 9495 | * Supported by API versions 9 and newer. |
| 9496 | */ |
| 9497 | extern float4 __attribute__((const, overloadable))sinh(float4); |
| 9498 | #endif |
| 9499 | |
| 9500 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9501 | /* |
| 9502 | * Return the sin(v * PI). |
| 9503 | * |
| 9504 | * Supported by API versions 9 and newer. |
| 9505 | */ |
| 9506 | extern float __attribute__((const, overloadable))sinpi(float); |
| 9507 | #endif |
| 9508 | |
| 9509 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9510 | /* |
| 9511 | * Return the sin(v * PI). |
| 9512 | * |
| 9513 | * Supported by API versions 9 and newer. |
| 9514 | */ |
| 9515 | extern float2 __attribute__((const, overloadable))sinpi(float2); |
| 9516 | #endif |
| 9517 | |
| 9518 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9519 | /* |
| 9520 | * Return the sin(v * PI). |
| 9521 | * |
| 9522 | * Supported by API versions 9 and newer. |
| 9523 | */ |
| 9524 | extern float3 __attribute__((const, overloadable))sinpi(float3); |
| 9525 | #endif |
| 9526 | |
| 9527 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9528 | /* |
| 9529 | * Return the sin(v * PI). |
| 9530 | * |
| 9531 | * Supported by API versions 9 and newer. |
| 9532 | */ |
| 9533 | extern float4 __attribute__((const, overloadable))sinpi(float4); |
| 9534 | #endif |
| 9535 | |
| 9536 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9537 | /* |
| 9538 | * Return the square root of a value. |
| 9539 | * |
| 9540 | * Supported by API versions 9 and newer. |
| 9541 | */ |
| 9542 | extern float __attribute__((const, overloadable))sqrt(float); |
| 9543 | #endif |
| 9544 | |
| 9545 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9546 | /* |
| 9547 | * Return the square root of a value. |
| 9548 | * |
| 9549 | * Supported by API versions 9 and newer. |
| 9550 | */ |
| 9551 | extern float2 __attribute__((const, overloadable))sqrt(float2); |
| 9552 | #endif |
| 9553 | |
| 9554 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9555 | /* |
| 9556 | * Return the square root of a value. |
| 9557 | * |
| 9558 | * Supported by API versions 9 and newer. |
| 9559 | */ |
| 9560 | extern float3 __attribute__((const, overloadable))sqrt(float3); |
| 9561 | #endif |
| 9562 | |
| 9563 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9564 | /* |
| 9565 | * Return the square root of a value. |
| 9566 | * |
| 9567 | * Supported by API versions 9 and newer. |
| 9568 | */ |
| 9569 | extern float4 __attribute__((const, overloadable))sqrt(float4); |
| 9570 | #endif |
| 9571 | |
| 9572 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9573 | /* |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9574 | * if (v < edge) |
| 9575 | * return 0.f; |
| 9576 | * else |
| 9577 | * return 1.f; |
| 9578 | * |
| 9579 | * Supported by API versions 9 and newer. |
| 9580 | */ |
| 9581 | extern float __attribute__((const, overloadable))step(float edge, float v); |
| 9582 | #endif |
| 9583 | |
| 9584 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9585 | /* |
| 9586 | * if (v < edge) |
| 9587 | * return 0.f; |
| 9588 | * else |
| 9589 | * return 1.f; |
| 9590 | * |
| 9591 | * Supported by API versions 9 and newer. |
| 9592 | */ |
| 9593 | extern float2 __attribute__((const, overloadable))step(float2 edge, float2 v); |
| 9594 | #endif |
| 9595 | |
| 9596 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9597 | /* |
| 9598 | * if (v < edge) |
| 9599 | * return 0.f; |
| 9600 | * else |
| 9601 | * return 1.f; |
| 9602 | * |
| 9603 | * Supported by API versions 9 and newer. |
| 9604 | */ |
| 9605 | extern float3 __attribute__((const, overloadable))step(float3 edge, float3 v); |
| 9606 | #endif |
| 9607 | |
| 9608 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9609 | /* |
| 9610 | * if (v < edge) |
| 9611 | * return 0.f; |
| 9612 | * else |
| 9613 | * return 1.f; |
| 9614 | * |
| 9615 | * Supported by API versions 9 and newer. |
| 9616 | */ |
| 9617 | extern float4 __attribute__((const, overloadable))step(float4 edge, float4 v); |
| 9618 | #endif |
| 9619 | |
| 9620 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9621 | /* |
| 9622 | * if (v < edge) |
| 9623 | * return 0.f; |
| 9624 | * else |
| 9625 | * return 1.f; |
| 9626 | * |
| 9627 | * Supported by API versions 9 and newer. |
| 9628 | */ |
| 9629 | extern float2 __attribute__((const, overloadable))step(float2 edge, float v); |
| 9630 | #endif |
| 9631 | |
| 9632 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9633 | /* |
| 9634 | * if (v < edge) |
| 9635 | * return 0.f; |
| 9636 | * else |
| 9637 | * return 1.f; |
| 9638 | * |
| 9639 | * Supported by API versions 9 and newer. |
| 9640 | */ |
| 9641 | extern float3 __attribute__((const, overloadable))step(float3 edge, float v); |
| 9642 | #endif |
| 9643 | |
| 9644 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9645 | /* |
| 9646 | * if (v < edge) |
| 9647 | * return 0.f; |
| 9648 | * else |
| 9649 | * return 1.f; |
| 9650 | * |
| 9651 | * Supported by API versions 9 and newer. |
| 9652 | */ |
| 9653 | extern float4 __attribute__((const, overloadable))step(float4 edge, float v); |
| 9654 | #endif |
| 9655 | |
Jean-Luc Brouillet | 0ec1635 | 2014-01-22 15:23:30 -0800 | [diff] [blame] | 9656 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 9657 | /* |
| 9658 | * if (v < edge) |
| 9659 | * return 0.f; |
| 9660 | * else |
| 9661 | * return 1.f; |
| 9662 | * |
| 9663 | * Supported by API versions 20 and newer. |
| 9664 | */ |
| 9665 | extern float2 __attribute__((const, overloadable))step(float edge, float2 v); |
| 9666 | #endif |
| 9667 | |
| 9668 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 9669 | /* |
| 9670 | * if (v < edge) |
| 9671 | * return 0.f; |
| 9672 | * else |
| 9673 | * return 1.f; |
| 9674 | * |
| 9675 | * Supported by API versions 20 and newer. |
| 9676 | */ |
| 9677 | extern float3 __attribute__((const, overloadable))step(float edge, float3 v); |
| 9678 | #endif |
| 9679 | |
| 9680 | #if (defined(RS_VERSION) && (RS_VERSION >= 20)) |
| 9681 | /* |
| 9682 | * if (v < edge) |
| 9683 | * return 0.f; |
| 9684 | * else |
| 9685 | * return 1.f; |
| 9686 | * |
| 9687 | * Supported by API versions 20 and newer. |
| 9688 | */ |
| 9689 | extern float4 __attribute__((const, overloadable))step(float edge, float4 v); |
| 9690 | #endif |
| 9691 | |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9692 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9693 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9694 | * Return the tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9695 | * |
| 9696 | * Supported by API versions 9 and newer. |
| 9697 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9698 | extern float __attribute__((const, overloadable))tan(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9699 | #endif |
| 9700 | |
| 9701 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9702 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9703 | * Return the tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9704 | * |
| 9705 | * Supported by API versions 9 and newer. |
| 9706 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9707 | extern float2 __attribute__((const, overloadable))tan(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9708 | #endif |
| 9709 | |
| 9710 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9711 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9712 | * Return the tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9713 | * |
| 9714 | * Supported by API versions 9 and newer. |
| 9715 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9716 | extern float3 __attribute__((const, overloadable))tan(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9717 | #endif |
| 9718 | |
| 9719 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9720 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9721 | * Return the tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9722 | * |
| 9723 | * Supported by API versions 9 and newer. |
| 9724 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9725 | extern float4 __attribute__((const, overloadable))tan(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9726 | #endif |
| 9727 | |
| 9728 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9729 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9730 | * Return the hyperbolic tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9731 | * |
| 9732 | * Supported by API versions 9 and newer. |
| 9733 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9734 | extern float __attribute__((const, overloadable))tanh(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9735 | #endif |
| 9736 | |
| 9737 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9738 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9739 | * Return the hyperbolic tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9740 | * |
| 9741 | * Supported by API versions 9 and newer. |
| 9742 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9743 | extern float2 __attribute__((const, overloadable))tanh(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9744 | #endif |
| 9745 | |
| 9746 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9747 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9748 | * Return the hyperbolic tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9749 | * |
| 9750 | * Supported by API versions 9 and newer. |
| 9751 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9752 | extern float3 __attribute__((const, overloadable))tanh(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9753 | #endif |
| 9754 | |
| 9755 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9756 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9757 | * Return the hyperbolic tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9758 | * |
| 9759 | * Supported by API versions 9 and newer. |
| 9760 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9761 | extern float4 __attribute__((const, overloadable))tanh(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9762 | #endif |
| 9763 | |
| 9764 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9765 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9766 | * Return tan(v * PI) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9767 | * |
| 9768 | * Supported by API versions 9 and newer. |
| 9769 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9770 | extern float __attribute__((const, overloadable))tanpi(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9771 | #endif |
| 9772 | |
| 9773 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9774 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9775 | * Return tan(v * PI) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9776 | * |
| 9777 | * Supported by API versions 9 and newer. |
| 9778 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9779 | extern float2 __attribute__((const, overloadable))tanpi(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9780 | #endif |
| 9781 | |
| 9782 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9783 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9784 | * Return tan(v * PI) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9785 | * |
| 9786 | * Supported by API versions 9 and newer. |
| 9787 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9788 | extern float3 __attribute__((const, overloadable))tanpi(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9789 | #endif |
| 9790 | |
| 9791 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9792 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9793 | * Return tan(v * PI) |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9794 | * |
| 9795 | * Supported by API versions 9 and newer. |
| 9796 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9797 | extern float4 __attribute__((const, overloadable))tanpi(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9798 | #endif |
| 9799 | |
| 9800 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9801 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9802 | * Compute the gamma function of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9803 | * |
| 9804 | * Supported by API versions 9 and newer. |
| 9805 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9806 | extern float __attribute__((const, overloadable))tgamma(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9807 | #endif |
| 9808 | |
| 9809 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9810 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9811 | * Compute the gamma function of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9812 | * |
| 9813 | * Supported by API versions 9 and newer. |
| 9814 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9815 | extern float2 __attribute__((const, overloadable))tgamma(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9816 | #endif |
| 9817 | |
| 9818 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9819 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9820 | * Compute the gamma function of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9821 | * |
| 9822 | * Supported by API versions 9 and newer. |
| 9823 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9824 | extern float3 __attribute__((const, overloadable))tgamma(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9825 | #endif |
| 9826 | |
| 9827 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9828 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9829 | * Compute the gamma function of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9830 | * |
| 9831 | * Supported by API versions 9 and newer. |
| 9832 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9833 | extern float4 __attribute__((const, overloadable))tgamma(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9834 | #endif |
| 9835 | |
| 9836 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9837 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9838 | * ound to integral using truncation. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9839 | * |
| 9840 | * Supported by API versions 9 and newer. |
| 9841 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9842 | extern float __attribute__((const, overloadable))trunc(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9843 | #endif |
| 9844 | |
| 9845 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9846 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9847 | * ound to integral using truncation. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9848 | * |
| 9849 | * Supported by API versions 9 and newer. |
| 9850 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9851 | extern float2 __attribute__((const, overloadable))trunc(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9852 | #endif |
| 9853 | |
| 9854 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9855 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9856 | * ound to integral using truncation. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9857 | * |
| 9858 | * Supported by API versions 9 and newer. |
| 9859 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9860 | extern float3 __attribute__((const, overloadable))trunc(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9861 | #endif |
| 9862 | |
| 9863 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
| 9864 | /* |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9865 | * ound to integral using truncation. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9866 | * |
| 9867 | * Supported by API versions 9 and newer. |
| 9868 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9869 | extern float4 __attribute__((const, overloadable))trunc(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9870 | #endif |
| 9871 | |
| 9872 | #endif // __rs_core_math_rsh__ |