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 | |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 19 | /** @file |
| 20 | * |
| 21 | */ |
| 22 | |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 23 | #ifndef __rs_core_math_rsh__ |
| 24 | #define __rs_core_math_rsh__ |
| 25 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 26 | /** |
| 27 | * Returns the absolute value of the integer n. |
| 28 | * |
| 29 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 30 | * |
| 31 | * Supported by API versions 9 and newer. |
| 32 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 33 | extern uchar __attribute__((const, overloadable))abs(char n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 34 | #endif |
| 35 | |
| 36 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 37 | /** |
| 38 | * Returns the absolute value of the integer n. |
| 39 | * |
| 40 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 41 | * |
| 42 | * Supported by API versions 9 and newer. |
| 43 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 44 | extern uchar2 __attribute__((const, overloadable))abs(char2 n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 45 | #endif |
| 46 | |
| 47 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 48 | /** |
| 49 | * Returns the absolute value of the integer n. |
| 50 | * |
| 51 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 52 | * |
| 53 | * Supported by API versions 9 and newer. |
| 54 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 55 | extern uchar3 __attribute__((const, overloadable))abs(char3 n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 56 | #endif |
| 57 | |
| 58 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 59 | /** |
| 60 | * Returns the absolute value of the integer n. |
| 61 | * |
| 62 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 63 | * |
| 64 | * Supported by API versions 9 and newer. |
| 65 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 66 | extern uchar4 __attribute__((const, overloadable))abs(char4 n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 67 | #endif |
| 68 | |
| 69 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 70 | /** |
| 71 | * Returns the absolute value of the integer n. |
| 72 | * |
| 73 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 74 | * |
| 75 | * Supported by API versions 9 and newer. |
| 76 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 77 | extern ushort __attribute__((const, overloadable))abs(short n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 78 | #endif |
| 79 | |
| 80 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 81 | /** |
| 82 | * Returns the absolute value of the integer n. |
| 83 | * |
| 84 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 85 | * |
| 86 | * Supported by API versions 9 and newer. |
| 87 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 88 | extern ushort2 __attribute__((const, overloadable))abs(short2 n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 89 | #endif |
| 90 | |
| 91 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 92 | /** |
| 93 | * Returns the absolute value of the integer n. |
| 94 | * |
| 95 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 96 | * |
| 97 | * Supported by API versions 9 and newer. |
| 98 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 99 | extern ushort3 __attribute__((const, overloadable))abs(short3 n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 100 | #endif |
| 101 | |
| 102 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 103 | /** |
| 104 | * Returns the absolute value of the integer n. |
| 105 | * |
| 106 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 107 | * |
| 108 | * Supported by API versions 9 and newer. |
| 109 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 110 | extern ushort4 __attribute__((const, overloadable))abs(short4 n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 111 | #endif |
| 112 | |
| 113 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 114 | /** |
| 115 | * Returns the absolute value of the integer n. |
| 116 | * |
| 117 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 118 | * |
| 119 | * Supported by API versions 9 and newer. |
| 120 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 121 | extern uint __attribute__((const, overloadable))abs(int n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 122 | #endif |
| 123 | |
| 124 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 125 | /** |
| 126 | * Returns the absolute value of the integer n. |
| 127 | * |
| 128 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 129 | * |
| 130 | * Supported by API versions 9 and newer. |
| 131 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 132 | extern uint2 __attribute__((const, overloadable))abs(int2 n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 133 | #endif |
| 134 | |
| 135 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 136 | /** |
| 137 | * Returns the absolute value of the integer n. |
| 138 | * |
| 139 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 140 | * |
| 141 | * Supported by API versions 9 and newer. |
| 142 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 143 | extern uint3 __attribute__((const, overloadable))abs(int3 n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 144 | #endif |
| 145 | |
| 146 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 147 | /** |
| 148 | * Returns the absolute value of the integer n. |
| 149 | * |
| 150 | * For floats, use fabs(). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 151 | * |
| 152 | * Supported by API versions 9 and newer. |
| 153 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 154 | extern uint4 __attribute__((const, overloadable))abs(int4 n); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 155 | #endif |
| 156 | |
| 157 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 158 | /** |
| 159 | * Returns the inverse cosine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 160 | * |
| 161 | * Supported by API versions 9 and newer. |
| 162 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 163 | extern float __attribute__((const, overloadable))acos(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 164 | #endif |
| 165 | |
| 166 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 167 | /** |
| 168 | * Returns the inverse cosine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 169 | * |
| 170 | * Supported by API versions 9 and newer. |
| 171 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 172 | extern float2 __attribute__((const, overloadable))acos(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 173 | #endif |
| 174 | |
| 175 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 176 | /** |
| 177 | * Returns the inverse cosine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 178 | * |
| 179 | * Supported by API versions 9 and newer. |
| 180 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 181 | extern float3 __attribute__((const, overloadable))acos(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 182 | #endif |
| 183 | |
| 184 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 185 | /** |
| 186 | * Returns the inverse cosine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 187 | * |
| 188 | * Supported by API versions 9 and newer. |
| 189 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 190 | extern float4 __attribute__((const, overloadable))acos(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 191 | #endif |
| 192 | |
| 193 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 194 | /** |
| 195 | * Returns the inverse hyperbolic cosine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 196 | * |
| 197 | * Supported by API versions 9 and newer. |
| 198 | */ |
| 199 | extern float __attribute__((const, overloadable))acosh(float); |
| 200 | #endif |
| 201 | |
| 202 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 203 | /** |
| 204 | * Returns the inverse hyperbolic cosine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 205 | * |
| 206 | * Supported by API versions 9 and newer. |
| 207 | */ |
| 208 | extern float2 __attribute__((const, overloadable))acosh(float2); |
| 209 | #endif |
| 210 | |
| 211 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 212 | /** |
| 213 | * Returns the inverse hyperbolic cosine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 214 | * |
| 215 | * Supported by API versions 9 and newer. |
| 216 | */ |
| 217 | extern float3 __attribute__((const, overloadable))acosh(float3); |
| 218 | #endif |
| 219 | |
| 220 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 221 | /** |
| 222 | * Returns the inverse hyperbolic cosine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 223 | * |
| 224 | * Supported by API versions 9 and newer. |
| 225 | */ |
| 226 | extern float4 __attribute__((const, overloadable))acosh(float4); |
| 227 | #endif |
| 228 | |
| 229 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 230 | /** |
| 231 | * Returns the inverse cosine in radians, divided by pi. |
| 232 | * |
| 233 | * To get an inverse cosine measured in degrees, use acospi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 234 | * |
| 235 | * Supported by API versions 9 and newer. |
| 236 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 237 | extern float __attribute__((const, overloadable))acospi(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 238 | #endif |
| 239 | |
| 240 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 241 | /** |
| 242 | * Returns the inverse cosine in radians, divided by pi. |
| 243 | * |
| 244 | * To get an inverse cosine measured in degrees, use acospi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 245 | * |
| 246 | * Supported by API versions 9 and newer. |
| 247 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 248 | extern float2 __attribute__((const, overloadable))acospi(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 249 | #endif |
| 250 | |
| 251 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 252 | /** |
| 253 | * Returns the inverse cosine in radians, divided by pi. |
| 254 | * |
| 255 | * To get an inverse cosine measured in degrees, use acospi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 256 | * |
| 257 | * Supported by API versions 9 and newer. |
| 258 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 259 | extern float3 __attribute__((const, overloadable))acospi(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 260 | #endif |
| 261 | |
| 262 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 263 | /** |
| 264 | * Returns the inverse cosine in radians, divided by pi. |
| 265 | * |
| 266 | * To get an inverse cosine measured in degrees, use acospi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 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))acospi(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)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 274 | /** |
| 275 | * Returns the inverse sine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 276 | * |
| 277 | * Supported by API versions 9 and newer. |
| 278 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 279 | extern float __attribute__((const, overloadable))asin(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 280 | #endif |
| 281 | |
| 282 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 283 | /** |
| 284 | * Returns the inverse sine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 285 | * |
| 286 | * Supported by API versions 9 and newer. |
| 287 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 288 | extern float2 __attribute__((const, overloadable))asin(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 289 | #endif |
| 290 | |
| 291 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 292 | /** |
| 293 | * Returns the inverse sine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 294 | * |
| 295 | * Supported by API versions 9 and newer. |
| 296 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 297 | extern float3 __attribute__((const, overloadable))asin(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 298 | #endif |
| 299 | |
| 300 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 301 | /** |
| 302 | * Returns the inverse sine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 303 | * |
| 304 | * Supported by API versions 9 and newer. |
| 305 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 306 | extern float4 __attribute__((const, overloadable))asin(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 307 | #endif |
| 308 | |
| 309 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 310 | /** |
| 311 | * Returns the inverse hyperbolic sine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 312 | * |
| 313 | * Supported by API versions 9 and newer. |
| 314 | */ |
| 315 | extern float __attribute__((const, overloadable))asinh(float); |
| 316 | #endif |
| 317 | |
| 318 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 319 | /** |
| 320 | * Returns the inverse hyperbolic sine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 321 | * |
| 322 | * Supported by API versions 9 and newer. |
| 323 | */ |
| 324 | extern float2 __attribute__((const, overloadable))asinh(float2); |
| 325 | #endif |
| 326 | |
| 327 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 328 | /** |
| 329 | * Returns the inverse hyperbolic sine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 330 | * |
| 331 | * Supported by API versions 9 and newer. |
| 332 | */ |
| 333 | extern float3 __attribute__((const, overloadable))asinh(float3); |
| 334 | #endif |
| 335 | |
| 336 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 337 | /** |
| 338 | * Returns the inverse hyperbolic sine, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 339 | * |
| 340 | * Supported by API versions 9 and newer. |
| 341 | */ |
| 342 | extern float4 __attribute__((const, overloadable))asinh(float4); |
| 343 | #endif |
| 344 | |
| 345 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 346 | /** |
| 347 | * Returns the inverse sine in radians, divided by pi. |
| 348 | * |
| 349 | * To get an inverse sine measured in degrees, use asinpi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 350 | * |
| 351 | * Supported by API versions 9 and newer. |
| 352 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 353 | extern float __attribute__((const, overloadable))asinpi(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 354 | #endif |
| 355 | |
| 356 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 357 | /** |
| 358 | * Returns the inverse sine in radians, divided by pi. |
| 359 | * |
| 360 | * To get an inverse sine measured in degrees, use asinpi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 361 | * |
| 362 | * Supported by API versions 9 and newer. |
| 363 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 364 | extern float2 __attribute__((const, overloadable))asinpi(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 365 | #endif |
| 366 | |
| 367 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 368 | /** |
| 369 | * Returns the inverse sine in radians, divided by pi. |
| 370 | * |
| 371 | * To get an inverse sine measured in degrees, use asinpi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 372 | * |
| 373 | * Supported by API versions 9 and newer. |
| 374 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 375 | extern float3 __attribute__((const, overloadable))asinpi(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 376 | #endif |
| 377 | |
| 378 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 379 | /** |
| 380 | * Returns the inverse sine in radians, divided by pi. |
| 381 | * |
| 382 | * To get an inverse sine measured in degrees, use asinpi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 383 | * |
| 384 | * Supported by API versions 9 and newer. |
| 385 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 386 | extern float4 __attribute__((const, overloadable))asinpi(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 387 | #endif |
| 388 | |
| 389 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 390 | /** |
| 391 | * Returns the inverse tangent, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 392 | * |
| 393 | * Supported by API versions 9 and newer. |
| 394 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 395 | extern float __attribute__((const, overloadable))atan(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 396 | #endif |
| 397 | |
| 398 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 399 | /** |
| 400 | * Returns the inverse tangent, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 401 | * |
| 402 | * Supported by API versions 9 and newer. |
| 403 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 404 | extern float2 __attribute__((const, overloadable))atan(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 405 | #endif |
| 406 | |
| 407 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 408 | /** |
| 409 | * Returns the inverse tangent, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 410 | * |
| 411 | * Supported by API versions 9 and newer. |
| 412 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 413 | extern float3 __attribute__((const, overloadable))atan(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 414 | #endif |
| 415 | |
| 416 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 417 | /** |
| 418 | * Returns the inverse tangent, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 419 | * |
| 420 | * Supported by API versions 9 and newer. |
| 421 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 422 | extern float4 __attribute__((const, overloadable))atan(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 423 | #endif |
| 424 | |
| 425 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 426 | /** |
| 427 | * Returns the inverse tangent of y / x, in radians. |
| 428 | * |
| 429 | * x can be 0. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 430 | * |
| 431 | * Supported by API versions 9 and newer. |
| 432 | */ |
| 433 | extern float __attribute__((const, overloadable))atan2(float y, float x); |
| 434 | #endif |
| 435 | |
| 436 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 437 | /** |
| 438 | * Returns the inverse tangent of y / x, in radians. |
| 439 | * |
| 440 | * x can be 0. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 441 | * |
| 442 | * Supported by API versions 9 and newer. |
| 443 | */ |
| 444 | extern float2 __attribute__((const, overloadable))atan2(float2 y, float2 x); |
| 445 | #endif |
| 446 | |
| 447 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 448 | /** |
| 449 | * Returns the inverse tangent of y / x, in radians. |
| 450 | * |
| 451 | * x can be 0. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 452 | * |
| 453 | * Supported by API versions 9 and newer. |
| 454 | */ |
| 455 | extern float3 __attribute__((const, overloadable))atan2(float3 y, float3 x); |
| 456 | #endif |
| 457 | |
| 458 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 459 | /** |
| 460 | * Returns the inverse tangent of y / x, in radians. |
| 461 | * |
| 462 | * x can be 0. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 463 | * |
| 464 | * Supported by API versions 9 and newer. |
| 465 | */ |
| 466 | extern float4 __attribute__((const, overloadable))atan2(float4 y, float4 x); |
| 467 | #endif |
| 468 | |
| 469 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 470 | /** |
| 471 | * Returns the inverse tangent of y / x, in radians, divided by pi. |
| 472 | * |
| 473 | * To get an inverse tangent measured in degrees, use atan2pi(x, y) * 180.f. |
| 474 | * |
| 475 | * x can be 0. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 476 | * |
| 477 | * Supported by API versions 9 and newer. |
| 478 | */ |
| 479 | extern float __attribute__((const, overloadable))atan2pi(float y, float x); |
| 480 | #endif |
| 481 | |
| 482 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 483 | /** |
| 484 | * Returns the inverse tangent of y / x, in radians, divided by pi. |
| 485 | * |
| 486 | * To get an inverse tangent measured in degrees, use atan2pi(x, y) * 180.f. |
| 487 | * |
| 488 | * x can be 0. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 489 | * |
| 490 | * Supported by API versions 9 and newer. |
| 491 | */ |
| 492 | extern float2 __attribute__((const, overloadable))atan2pi(float2 y, float2 x); |
| 493 | #endif |
| 494 | |
| 495 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 496 | /** |
| 497 | * Returns the inverse tangent of y / x, in radians, divided by pi. |
| 498 | * |
| 499 | * To get an inverse tangent measured in degrees, use atan2pi(x, y) * 180.f. |
| 500 | * |
| 501 | * x can be 0. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 502 | * |
| 503 | * Supported by API versions 9 and newer. |
| 504 | */ |
| 505 | extern float3 __attribute__((const, overloadable))atan2pi(float3 y, float3 x); |
| 506 | #endif |
| 507 | |
| 508 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 509 | /** |
| 510 | * Returns the inverse tangent of y / x, in radians, divided by pi. |
| 511 | * |
| 512 | * To get an inverse tangent measured in degrees, use atan2pi(x, y) * 180.f. |
| 513 | * |
| 514 | * x can be 0. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 515 | * |
| 516 | * Supported by API versions 9 and newer. |
| 517 | */ |
| 518 | extern float4 __attribute__((const, overloadable))atan2pi(float4 y, float4 x); |
| 519 | #endif |
| 520 | |
| 521 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 522 | /** |
| 523 | * Returns the inverse hyperbolic tangent, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 524 | * |
| 525 | * Supported by API versions 9 and newer. |
| 526 | */ |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 527 | extern float __attribute__((const, overloadable))atanh(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 528 | #endif |
| 529 | |
| 530 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 531 | /** |
| 532 | * Returns the inverse hyperbolic tangent, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 533 | * |
| 534 | * Supported by API versions 9 and newer. |
| 535 | */ |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 536 | extern float2 __attribute__((const, overloadable))atanh(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 537 | #endif |
| 538 | |
| 539 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 540 | /** |
| 541 | * Returns the inverse hyperbolic tangent, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 542 | * |
| 543 | * Supported by API versions 9 and newer. |
| 544 | */ |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 545 | extern float3 __attribute__((const, overloadable))atanh(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 546 | #endif |
| 547 | |
| 548 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 549 | /** |
| 550 | * Returns the inverse hyperbolic tangent, in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 551 | * |
| 552 | * Supported by API versions 9 and newer. |
| 553 | */ |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 554 | extern float4 __attribute__((const, overloadable))atanh(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 555 | #endif |
| 556 | |
| 557 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 558 | /** |
| 559 | * Returns the inverse tangent in radians, divided by pi. |
| 560 | * |
| 561 | * To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 562 | * |
| 563 | * Supported by API versions 9 and newer. |
| 564 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 565 | extern float __attribute__((const, overloadable))atanpi(float v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 566 | #endif |
| 567 | |
| 568 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 569 | /** |
| 570 | * Returns the inverse tangent in radians, divided by pi. |
| 571 | * |
| 572 | * To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 573 | * |
| 574 | * Supported by API versions 9 and newer. |
| 575 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 576 | extern float2 __attribute__((const, overloadable))atanpi(float2 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 577 | #endif |
| 578 | |
| 579 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 580 | /** |
| 581 | * Returns the inverse tangent in radians, divided by pi. |
| 582 | * |
| 583 | * To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 584 | * |
| 585 | * Supported by API versions 9 and newer. |
| 586 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 587 | extern float3 __attribute__((const, overloadable))atanpi(float3 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 588 | #endif |
| 589 | |
| 590 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 591 | /** |
| 592 | * Returns the inverse tangent in radians, divided by pi. |
| 593 | * |
| 594 | * To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 595 | * |
| 596 | * Supported by API versions 9 and newer. |
| 597 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 598 | extern float4 __attribute__((const, overloadable))atanpi(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 599 | #endif |
| 600 | |
| 601 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 602 | /** |
| 603 | * Returns the cube root. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 604 | * |
| 605 | * Supported by API versions 9 and newer. |
| 606 | */ |
| 607 | extern float __attribute__((const, overloadable))cbrt(float); |
| 608 | #endif |
| 609 | |
| 610 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 611 | /** |
| 612 | * Returns the cube root. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 613 | * |
| 614 | * Supported by API versions 9 and newer. |
| 615 | */ |
| 616 | extern float2 __attribute__((const, overloadable))cbrt(float2); |
| 617 | #endif |
| 618 | |
| 619 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 620 | /** |
| 621 | * Returns the cube root. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 622 | * |
| 623 | * Supported by API versions 9 and newer. |
| 624 | */ |
| 625 | extern float3 __attribute__((const, overloadable))cbrt(float3); |
| 626 | #endif |
| 627 | |
| 628 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 629 | /** |
| 630 | * Returns the cube root. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 631 | * |
| 632 | * Supported by API versions 9 and newer. |
| 633 | */ |
| 634 | extern float4 __attribute__((const, overloadable))cbrt(float4); |
| 635 | #endif |
| 636 | |
| 637 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 638 | /** |
| 639 | * Returns the smallest integer not less than a value. |
| 640 | * |
| 641 | * For example, ceil(1.2f) returns 2.f, and ceil(-1.2f) returns -1.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 642 | * |
| 643 | * Supported by API versions 9 and newer. |
| 644 | */ |
| 645 | extern float __attribute__((const, overloadable))ceil(float); |
| 646 | #endif |
| 647 | |
| 648 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 649 | /** |
| 650 | * Returns the smallest integer not less than a value. |
| 651 | * |
| 652 | * For example, ceil(1.2f) returns 2.f, and ceil(-1.2f) returns -1.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 653 | * |
| 654 | * Supported by API versions 9 and newer. |
| 655 | */ |
| 656 | extern float2 __attribute__((const, overloadable))ceil(float2); |
| 657 | #endif |
| 658 | |
| 659 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 660 | /** |
| 661 | * Returns the smallest integer not less than a value. |
| 662 | * |
| 663 | * For example, ceil(1.2f) returns 2.f, and ceil(-1.2f) returns -1.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 664 | * |
| 665 | * Supported by API versions 9 and newer. |
| 666 | */ |
| 667 | extern float3 __attribute__((const, overloadable))ceil(float3); |
| 668 | #endif |
| 669 | |
| 670 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 671 | /** |
| 672 | * Returns the smallest integer not less than a value. |
| 673 | * |
| 674 | * For example, ceil(1.2f) returns 2.f, and ceil(-1.2f) returns -1.f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 675 | * |
| 676 | * Supported by API versions 9 and newer. |
| 677 | */ |
| 678 | extern float4 __attribute__((const, overloadable))ceil(float4); |
| 679 | #endif |
| 680 | |
| 681 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 682 | /** |
| 683 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 684 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 685 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 686 | * |
| 687 | * If min_value is greater than max_value, the results are undefined. |
| 688 | * |
| 689 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 690 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 691 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 692 | * |
| 693 | * Supported by API versions 9 and newer. |
| 694 | */ |
| 695 | extern float __attribute__((const, overloadable))clamp(float value, float min_value, float max_value); |
| 696 | #endif |
| 697 | |
| 698 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 699 | /** |
| 700 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 701 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 702 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 703 | * |
| 704 | * If min_value is greater than max_value, the results are undefined. |
| 705 | * |
| 706 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 707 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 708 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 709 | * |
| 710 | * Supported by API versions 9 and newer. |
| 711 | */ |
| 712 | extern float2 __attribute__((const, overloadable))clamp(float2 value, float2 min_value, float2 max_value); |
| 713 | #endif |
| 714 | |
| 715 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 716 | /** |
| 717 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 718 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 719 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 720 | * |
| 721 | * If min_value is greater than max_value, the results are undefined. |
| 722 | * |
| 723 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 724 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 725 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 726 | * |
| 727 | * Supported by API versions 9 and newer. |
| 728 | */ |
| 729 | extern float3 __attribute__((const, overloadable))clamp(float3 value, float3 min_value, float3 max_value); |
| 730 | #endif |
| 731 | |
| 732 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 733 | /** |
| 734 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 735 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 736 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 737 | * |
| 738 | * If min_value is greater than max_value, the results are undefined. |
| 739 | * |
| 740 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 741 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 742 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 743 | * |
| 744 | * Supported by API versions 9 and newer. |
| 745 | */ |
| 746 | extern float4 __attribute__((const, overloadable))clamp(float4 value, float4 min_value, float4 max_value); |
| 747 | #endif |
| 748 | |
| 749 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 750 | /** |
| 751 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 752 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 753 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 754 | * |
| 755 | * If min_value is greater than max_value, the results are undefined. |
| 756 | * |
| 757 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 758 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 759 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 760 | * |
| 761 | * Supported by API versions 9 and newer. |
| 762 | */ |
| 763 | extern float2 __attribute__((const, overloadable))clamp(float2 value, float min_value, float max_value); |
| 764 | #endif |
| 765 | |
| 766 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 767 | /** |
| 768 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 769 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 770 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 771 | * |
| 772 | * If min_value is greater than max_value, the results are undefined. |
| 773 | * |
| 774 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 775 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 776 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 777 | * |
| 778 | * Supported by API versions 9 and newer. |
| 779 | */ |
| 780 | extern float3 __attribute__((const, overloadable))clamp(float3 value, float min_value, float max_value); |
| 781 | #endif |
| 782 | |
| 783 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 784 | /** |
| 785 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 786 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 787 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 788 | * |
| 789 | * If min_value is greater than max_value, the results are undefined. |
| 790 | * |
| 791 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 792 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 793 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 794 | * |
| 795 | * Supported by API versions 9 and newer. |
| 796 | */ |
| 797 | extern float4 __attribute__((const, overloadable))clamp(float4 value, float min_value, float max_value); |
| 798 | #endif |
| 799 | |
| 800 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 801 | /** |
| 802 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 803 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 804 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 805 | * |
| 806 | * If min_value is greater than max_value, the results are undefined. |
| 807 | * |
| 808 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 809 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 810 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 811 | * |
| 812 | * Supported by API versions 19 and newer. |
| 813 | */ |
| 814 | extern char __attribute__((const, overloadable))clamp(char value, char min_value, char max_value); |
| 815 | #endif |
| 816 | |
| 817 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 818 | /** |
| 819 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 820 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 821 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 822 | * |
| 823 | * If min_value is greater than max_value, the results are undefined. |
| 824 | * |
| 825 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 826 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 827 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 828 | * |
| 829 | * Supported by API versions 19 and newer. |
| 830 | */ |
| 831 | extern char2 __attribute__((const, overloadable))clamp(char2 value, char2 min_value, char2 max_value); |
| 832 | #endif |
| 833 | |
| 834 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 835 | /** |
| 836 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 837 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 838 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 839 | * |
| 840 | * If min_value is greater than max_value, the results are undefined. |
| 841 | * |
| 842 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 843 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 844 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 845 | * |
| 846 | * Supported by API versions 19 and newer. |
| 847 | */ |
| 848 | extern char3 __attribute__((const, overloadable))clamp(char3 value, char3 min_value, char3 max_value); |
| 849 | #endif |
| 850 | |
| 851 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 852 | /** |
| 853 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 854 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 855 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 856 | * |
| 857 | * If min_value is greater than max_value, the results are undefined. |
| 858 | * |
| 859 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 860 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 861 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 862 | * |
| 863 | * Supported by API versions 19 and newer. |
| 864 | */ |
| 865 | extern char4 __attribute__((const, overloadable))clamp(char4 value, char4 min_value, char4 max_value); |
| 866 | #endif |
| 867 | |
| 868 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 869 | /** |
| 870 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 871 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 872 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 873 | * |
| 874 | * If min_value is greater than max_value, the results are undefined. |
| 875 | * |
| 876 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 877 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 878 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 879 | * |
| 880 | * Supported by API versions 19 and newer. |
| 881 | */ |
| 882 | extern uchar __attribute__((const, overloadable))clamp(uchar value, uchar min_value, uchar max_value); |
| 883 | #endif |
| 884 | |
| 885 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 886 | /** |
| 887 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 888 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 889 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 890 | * |
| 891 | * If min_value is greater than max_value, the results are undefined. |
| 892 | * |
| 893 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 894 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 895 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 896 | * |
| 897 | * Supported by API versions 19 and newer. |
| 898 | */ |
| 899 | extern uchar2 __attribute__((const, overloadable))clamp(uchar2 value, uchar2 min_value, uchar2 max_value); |
| 900 | #endif |
| 901 | |
| 902 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 903 | /** |
| 904 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 905 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 906 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 907 | * |
| 908 | * If min_value is greater than max_value, the results are undefined. |
| 909 | * |
| 910 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 911 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 912 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 913 | * |
| 914 | * Supported by API versions 19 and newer. |
| 915 | */ |
| 916 | extern uchar3 __attribute__((const, overloadable))clamp(uchar3 value, uchar3 min_value, uchar3 max_value); |
| 917 | #endif |
| 918 | |
| 919 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 920 | /** |
| 921 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 922 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 923 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 924 | * |
| 925 | * If min_value is greater than max_value, the results are undefined. |
| 926 | * |
| 927 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 928 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 929 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 930 | * |
| 931 | * Supported by API versions 19 and newer. |
| 932 | */ |
| 933 | extern uchar4 __attribute__((const, overloadable))clamp(uchar4 value, uchar4 min_value, uchar4 max_value); |
| 934 | #endif |
| 935 | |
| 936 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 937 | /** |
| 938 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 939 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 940 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 941 | * |
| 942 | * If min_value is greater than max_value, the results are undefined. |
| 943 | * |
| 944 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 945 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 946 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 947 | * |
| 948 | * Supported by API versions 19 and newer. |
| 949 | */ |
| 950 | extern short __attribute__((const, overloadable))clamp(short value, short min_value, short max_value); |
| 951 | #endif |
| 952 | |
| 953 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 954 | /** |
| 955 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 956 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 957 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 958 | * |
| 959 | * If min_value is greater than max_value, the results are undefined. |
| 960 | * |
| 961 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 962 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 963 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 964 | * |
| 965 | * Supported by API versions 19 and newer. |
| 966 | */ |
| 967 | extern short2 __attribute__((const, overloadable))clamp(short2 value, short2 min_value, short2 max_value); |
| 968 | #endif |
| 969 | |
| 970 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 971 | /** |
| 972 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 973 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 974 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 975 | * |
| 976 | * If min_value is greater than max_value, the results are undefined. |
| 977 | * |
| 978 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 979 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 980 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 981 | * |
| 982 | * Supported by API versions 19 and newer. |
| 983 | */ |
| 984 | extern short3 __attribute__((const, overloadable))clamp(short3 value, short3 min_value, short3 max_value); |
| 985 | #endif |
| 986 | |
| 987 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 988 | /** |
| 989 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 990 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 991 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 992 | * |
| 993 | * If min_value is greater than max_value, the results are undefined. |
| 994 | * |
| 995 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 996 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 997 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 998 | * |
| 999 | * Supported by API versions 19 and newer. |
| 1000 | */ |
| 1001 | extern short4 __attribute__((const, overloadable))clamp(short4 value, short4 min_value, short4 max_value); |
| 1002 | #endif |
| 1003 | |
| 1004 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1005 | /** |
| 1006 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1007 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1008 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1009 | * |
| 1010 | * If min_value is greater than max_value, the results are undefined. |
| 1011 | * |
| 1012 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1013 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1014 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1015 | * |
| 1016 | * Supported by API versions 19 and newer. |
| 1017 | */ |
| 1018 | extern ushort __attribute__((const, overloadable))clamp(ushort value, ushort min_value, ushort max_value); |
| 1019 | #endif |
| 1020 | |
| 1021 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1022 | /** |
| 1023 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1024 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1025 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1026 | * |
| 1027 | * If min_value is greater than max_value, the results are undefined. |
| 1028 | * |
| 1029 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1030 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1031 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1032 | * |
| 1033 | * Supported by API versions 19 and newer. |
| 1034 | */ |
| 1035 | extern ushort2 __attribute__((const, overloadable))clamp(ushort2 value, ushort2 min_value, ushort2 max_value); |
| 1036 | #endif |
| 1037 | |
| 1038 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1039 | /** |
| 1040 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1041 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1042 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1043 | * |
| 1044 | * If min_value is greater than max_value, the results are undefined. |
| 1045 | * |
| 1046 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1047 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1048 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1049 | * |
| 1050 | * Supported by API versions 19 and newer. |
| 1051 | */ |
| 1052 | extern ushort3 __attribute__((const, overloadable))clamp(ushort3 value, ushort3 min_value, ushort3 max_value); |
| 1053 | #endif |
| 1054 | |
| 1055 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1056 | /** |
| 1057 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1058 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1059 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1060 | * |
| 1061 | * If min_value is greater than max_value, the results are undefined. |
| 1062 | * |
| 1063 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1064 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1065 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1066 | * |
| 1067 | * Supported by API versions 19 and newer. |
| 1068 | */ |
| 1069 | extern ushort4 __attribute__((const, overloadable))clamp(ushort4 value, ushort4 min_value, ushort4 max_value); |
| 1070 | #endif |
| 1071 | |
| 1072 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1073 | /** |
| 1074 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1075 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1076 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1077 | * |
| 1078 | * If min_value is greater than max_value, the results are undefined. |
| 1079 | * |
| 1080 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1081 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1082 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1083 | * |
| 1084 | * Supported by API versions 19 and newer. |
| 1085 | */ |
| 1086 | extern int __attribute__((const, overloadable))clamp(int value, int min_value, int max_value); |
| 1087 | #endif |
| 1088 | |
| 1089 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1090 | /** |
| 1091 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1092 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1093 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1094 | * |
| 1095 | * If min_value is greater than max_value, the results are undefined. |
| 1096 | * |
| 1097 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1098 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1099 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1100 | * |
| 1101 | * Supported by API versions 19 and newer. |
| 1102 | */ |
| 1103 | extern int2 __attribute__((const, overloadable))clamp(int2 value, int2 min_value, int2 max_value); |
| 1104 | #endif |
| 1105 | |
| 1106 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1107 | /** |
| 1108 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1109 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1110 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1111 | * |
| 1112 | * If min_value is greater than max_value, the results are undefined. |
| 1113 | * |
| 1114 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1115 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1116 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1117 | * |
| 1118 | * Supported by API versions 19 and newer. |
| 1119 | */ |
| 1120 | extern int3 __attribute__((const, overloadable))clamp(int3 value, int3 min_value, int3 max_value); |
| 1121 | #endif |
| 1122 | |
| 1123 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1124 | /** |
| 1125 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1126 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1127 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1128 | * |
| 1129 | * If min_value is greater than max_value, the results are undefined. |
| 1130 | * |
| 1131 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1132 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1133 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1134 | * |
| 1135 | * Supported by API versions 19 and newer. |
| 1136 | */ |
| 1137 | extern int4 __attribute__((const, overloadable))clamp(int4 value, int4 min_value, int4 max_value); |
| 1138 | #endif |
| 1139 | |
| 1140 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1141 | /** |
| 1142 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1143 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1144 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1145 | * |
| 1146 | * If min_value is greater than max_value, the results are undefined. |
| 1147 | * |
| 1148 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1149 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1150 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1151 | * |
| 1152 | * Supported by API versions 19 and newer. |
| 1153 | */ |
| 1154 | extern uint __attribute__((const, overloadable))clamp(uint value, uint min_value, uint max_value); |
| 1155 | #endif |
| 1156 | |
| 1157 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1158 | /** |
| 1159 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1160 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1161 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1162 | * |
| 1163 | * If min_value is greater than max_value, the results are undefined. |
| 1164 | * |
| 1165 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1166 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1167 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1168 | * |
| 1169 | * Supported by API versions 19 and newer. |
| 1170 | */ |
| 1171 | extern uint2 __attribute__((const, overloadable))clamp(uint2 value, uint2 min_value, uint2 max_value); |
| 1172 | #endif |
| 1173 | |
| 1174 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1175 | /** |
| 1176 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1177 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1178 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1179 | * |
| 1180 | * If min_value is greater than max_value, the results are undefined. |
| 1181 | * |
| 1182 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1183 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1184 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1185 | * |
| 1186 | * Supported by API versions 19 and newer. |
| 1187 | */ |
| 1188 | extern uint3 __attribute__((const, overloadable))clamp(uint3 value, uint3 min_value, uint3 max_value); |
| 1189 | #endif |
| 1190 | |
| 1191 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1192 | /** |
| 1193 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1194 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1195 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1196 | * |
| 1197 | * If min_value is greater than max_value, the results are undefined. |
| 1198 | * |
| 1199 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1200 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1201 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1202 | * |
| 1203 | * Supported by API versions 19 and newer. |
| 1204 | */ |
| 1205 | extern uint4 __attribute__((const, overloadable))clamp(uint4 value, uint4 min_value, uint4 max_value); |
| 1206 | #endif |
| 1207 | |
| 1208 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1209 | /** |
| 1210 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1211 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1212 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1213 | * |
| 1214 | * If min_value is greater than max_value, the results are undefined. |
| 1215 | * |
| 1216 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1217 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1218 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1219 | * |
| 1220 | * Supported by API versions 19 and newer. |
| 1221 | */ |
| 1222 | extern long __attribute__((const, overloadable))clamp(long value, long min_value, long max_value); |
| 1223 | #endif |
| 1224 | |
| 1225 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1226 | /** |
| 1227 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1228 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1229 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1230 | * |
| 1231 | * If min_value is greater than max_value, the results are undefined. |
| 1232 | * |
| 1233 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1234 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1235 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1236 | * |
| 1237 | * Supported by API versions 19 and newer. |
| 1238 | */ |
| 1239 | extern long2 __attribute__((const, overloadable))clamp(long2 value, long2 min_value, long2 max_value); |
| 1240 | #endif |
| 1241 | |
| 1242 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1243 | /** |
| 1244 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1245 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1246 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1247 | * |
| 1248 | * If min_value is greater than max_value, the results are undefined. |
| 1249 | * |
| 1250 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1251 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1252 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1253 | * |
| 1254 | * Supported by API versions 19 and newer. |
| 1255 | */ |
| 1256 | extern long3 __attribute__((const, overloadable))clamp(long3 value, long3 min_value, long3 max_value); |
| 1257 | #endif |
| 1258 | |
| 1259 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1260 | /** |
| 1261 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1262 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1263 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1264 | * |
| 1265 | * If min_value is greater than max_value, the results are undefined. |
| 1266 | * |
| 1267 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1268 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1269 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1270 | * |
| 1271 | * Supported by API versions 19 and newer. |
| 1272 | */ |
| 1273 | extern long4 __attribute__((const, overloadable))clamp(long4 value, long4 min_value, long4 max_value); |
| 1274 | #endif |
| 1275 | |
| 1276 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1277 | /** |
| 1278 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1279 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1280 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1281 | * |
| 1282 | * If min_value is greater than max_value, the results are undefined. |
| 1283 | * |
| 1284 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1285 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1286 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1287 | * |
| 1288 | * Supported by API versions 19 and newer. |
| 1289 | */ |
| 1290 | extern ulong __attribute__((const, overloadable))clamp(ulong value, ulong min_value, ulong max_value); |
| 1291 | #endif |
| 1292 | |
| 1293 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1294 | /** |
| 1295 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1296 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1297 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1298 | * |
| 1299 | * If min_value is greater than max_value, the results are undefined. |
| 1300 | * |
| 1301 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1302 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1303 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1304 | * |
| 1305 | * Supported by API versions 19 and newer. |
| 1306 | */ |
| 1307 | extern ulong2 __attribute__((const, overloadable))clamp(ulong2 value, ulong2 min_value, ulong2 max_value); |
| 1308 | #endif |
| 1309 | |
| 1310 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1311 | /** |
| 1312 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1313 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1314 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1315 | * |
| 1316 | * If min_value is greater than max_value, the results are undefined. |
| 1317 | * |
| 1318 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1319 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1320 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1321 | * |
| 1322 | * Supported by API versions 19 and newer. |
| 1323 | */ |
| 1324 | extern ulong3 __attribute__((const, overloadable))clamp(ulong3 value, ulong3 min_value, ulong3 max_value); |
| 1325 | #endif |
| 1326 | |
| 1327 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1328 | /** |
| 1329 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1330 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1331 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1332 | * |
| 1333 | * If min_value is greater than max_value, the results are undefined. |
| 1334 | * |
| 1335 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1336 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1337 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1338 | * |
| 1339 | * Supported by API versions 19 and newer. |
| 1340 | */ |
| 1341 | extern ulong4 __attribute__((const, overloadable))clamp(ulong4 value, ulong4 min_value, ulong4 max_value); |
| 1342 | #endif |
| 1343 | |
| 1344 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1345 | /** |
| 1346 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1347 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1348 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1349 | * |
| 1350 | * If min_value is greater than max_value, the results are undefined. |
| 1351 | * |
| 1352 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1353 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1354 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1355 | * |
| 1356 | * Supported by API versions 19 and newer. |
| 1357 | */ |
| 1358 | extern char2 __attribute__((const, overloadable))clamp(char2 value, char min_value, char max_value); |
| 1359 | #endif |
| 1360 | |
| 1361 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1362 | /** |
| 1363 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1364 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1365 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1366 | * |
| 1367 | * If min_value is greater than max_value, the results are undefined. |
| 1368 | * |
| 1369 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1370 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1371 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1372 | * |
| 1373 | * Supported by API versions 19 and newer. |
| 1374 | */ |
| 1375 | extern char3 __attribute__((const, overloadable))clamp(char3 value, char min_value, char max_value); |
| 1376 | #endif |
| 1377 | |
| 1378 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1379 | /** |
| 1380 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1381 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1382 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1383 | * |
| 1384 | * If min_value is greater than max_value, the results are undefined. |
| 1385 | * |
| 1386 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1387 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1388 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1389 | * |
| 1390 | * Supported by API versions 19 and newer. |
| 1391 | */ |
| 1392 | extern char4 __attribute__((const, overloadable))clamp(char4 value, char min_value, char max_value); |
| 1393 | #endif |
| 1394 | |
| 1395 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1396 | /** |
| 1397 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1398 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1399 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1400 | * |
| 1401 | * If min_value is greater than max_value, the results are undefined. |
| 1402 | * |
| 1403 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1404 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1405 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1406 | * |
| 1407 | * Supported by API versions 19 and newer. |
| 1408 | */ |
| 1409 | extern uchar2 __attribute__((const, overloadable))clamp(uchar2 value, uchar min_value, uchar max_value); |
| 1410 | #endif |
| 1411 | |
| 1412 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1413 | /** |
| 1414 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1415 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1416 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1417 | * |
| 1418 | * If min_value is greater than max_value, the results are undefined. |
| 1419 | * |
| 1420 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1421 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1422 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1423 | * |
| 1424 | * Supported by API versions 19 and newer. |
| 1425 | */ |
| 1426 | extern uchar3 __attribute__((const, overloadable))clamp(uchar3 value, uchar min_value, uchar max_value); |
| 1427 | #endif |
| 1428 | |
| 1429 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1430 | /** |
| 1431 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1432 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1433 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1434 | * |
| 1435 | * If min_value is greater than max_value, the results are undefined. |
| 1436 | * |
| 1437 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1438 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1439 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1440 | * |
| 1441 | * Supported by API versions 19 and newer. |
| 1442 | */ |
| 1443 | extern uchar4 __attribute__((const, overloadable))clamp(uchar4 value, uchar min_value, uchar max_value); |
| 1444 | #endif |
| 1445 | |
| 1446 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1447 | /** |
| 1448 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1449 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1450 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1451 | * |
| 1452 | * If min_value is greater than max_value, the results are undefined. |
| 1453 | * |
| 1454 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1455 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1456 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1457 | * |
| 1458 | * Supported by API versions 19 and newer. |
| 1459 | */ |
| 1460 | extern short2 __attribute__((const, overloadable))clamp(short2 value, short min_value, short max_value); |
| 1461 | #endif |
| 1462 | |
| 1463 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1464 | /** |
| 1465 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1466 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1467 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1468 | * |
| 1469 | * If min_value is greater than max_value, the results are undefined. |
| 1470 | * |
| 1471 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1472 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1473 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1474 | * |
| 1475 | * Supported by API versions 19 and newer. |
| 1476 | */ |
| 1477 | extern short3 __attribute__((const, overloadable))clamp(short3 value, short min_value, short max_value); |
| 1478 | #endif |
| 1479 | |
| 1480 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1481 | /** |
| 1482 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1483 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1484 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1485 | * |
| 1486 | * If min_value is greater than max_value, the results are undefined. |
| 1487 | * |
| 1488 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1489 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1490 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1491 | * |
| 1492 | * Supported by API versions 19 and newer. |
| 1493 | */ |
| 1494 | extern short4 __attribute__((const, overloadable))clamp(short4 value, short min_value, short max_value); |
| 1495 | #endif |
| 1496 | |
| 1497 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1498 | /** |
| 1499 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1500 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1501 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1502 | * |
| 1503 | * If min_value is greater than max_value, the results are undefined. |
| 1504 | * |
| 1505 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1506 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1507 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1508 | * |
| 1509 | * Supported by API versions 19 and newer. |
| 1510 | */ |
| 1511 | extern ushort2 __attribute__((const, overloadable))clamp(ushort2 value, ushort min_value, ushort max_value); |
| 1512 | #endif |
| 1513 | |
| 1514 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1515 | /** |
| 1516 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1517 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1518 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1519 | * |
| 1520 | * If min_value is greater than max_value, the results are undefined. |
| 1521 | * |
| 1522 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1523 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1524 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1525 | * |
| 1526 | * Supported by API versions 19 and newer. |
| 1527 | */ |
| 1528 | extern ushort3 __attribute__((const, overloadable))clamp(ushort3 value, ushort min_value, ushort max_value); |
| 1529 | #endif |
| 1530 | |
| 1531 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1532 | /** |
| 1533 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1534 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1535 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1536 | * |
| 1537 | * If min_value is greater than max_value, the results are undefined. |
| 1538 | * |
| 1539 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1540 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1541 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1542 | * |
| 1543 | * Supported by API versions 19 and newer. |
| 1544 | */ |
| 1545 | extern ushort4 __attribute__((const, overloadable))clamp(ushort4 value, ushort min_value, ushort max_value); |
| 1546 | #endif |
| 1547 | |
| 1548 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1549 | /** |
| 1550 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1551 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1552 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1553 | * |
| 1554 | * If min_value is greater than max_value, the results are undefined. |
| 1555 | * |
| 1556 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1557 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1558 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1559 | * |
| 1560 | * Supported by API versions 19 and newer. |
| 1561 | */ |
| 1562 | extern int2 __attribute__((const, overloadable))clamp(int2 value, int min_value, int max_value); |
| 1563 | #endif |
| 1564 | |
| 1565 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1566 | /** |
| 1567 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1568 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1569 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1570 | * |
| 1571 | * If min_value is greater than max_value, the results are undefined. |
| 1572 | * |
| 1573 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1574 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1575 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1576 | * |
| 1577 | * Supported by API versions 19 and newer. |
| 1578 | */ |
| 1579 | extern int3 __attribute__((const, overloadable))clamp(int3 value, int min_value, int max_value); |
| 1580 | #endif |
| 1581 | |
| 1582 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1583 | /** |
| 1584 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1585 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1586 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1587 | * |
| 1588 | * If min_value is greater than max_value, the results are undefined. |
| 1589 | * |
| 1590 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1591 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1592 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1593 | * |
| 1594 | * Supported by API versions 19 and newer. |
| 1595 | */ |
| 1596 | extern int4 __attribute__((const, overloadable))clamp(int4 value, int min_value, int max_value); |
| 1597 | #endif |
| 1598 | |
| 1599 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1600 | /** |
| 1601 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1602 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1603 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1604 | * |
| 1605 | * If min_value is greater than max_value, the results are undefined. |
| 1606 | * |
| 1607 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1608 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1609 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1610 | * |
| 1611 | * Supported by API versions 19 and newer. |
| 1612 | */ |
| 1613 | extern uint2 __attribute__((const, overloadable))clamp(uint2 value, uint min_value, uint max_value); |
| 1614 | #endif |
| 1615 | |
| 1616 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1617 | /** |
| 1618 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1619 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1620 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1621 | * |
| 1622 | * If min_value is greater than max_value, the results are undefined. |
| 1623 | * |
| 1624 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1625 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1626 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1627 | * |
| 1628 | * Supported by API versions 19 and newer. |
| 1629 | */ |
| 1630 | extern uint3 __attribute__((const, overloadable))clamp(uint3 value, uint min_value, uint max_value); |
| 1631 | #endif |
| 1632 | |
| 1633 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1634 | /** |
| 1635 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1636 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1637 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1638 | * |
| 1639 | * If min_value is greater than max_value, the results are undefined. |
| 1640 | * |
| 1641 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1642 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1643 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1644 | * |
| 1645 | * Supported by API versions 19 and newer. |
| 1646 | */ |
| 1647 | extern uint4 __attribute__((const, overloadable))clamp(uint4 value, uint min_value, uint max_value); |
| 1648 | #endif |
| 1649 | |
| 1650 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1651 | /** |
| 1652 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1653 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1654 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1655 | * |
| 1656 | * If min_value is greater than max_value, the results are undefined. |
| 1657 | * |
| 1658 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1659 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1660 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1661 | * |
| 1662 | * Supported by API versions 19 and newer. |
| 1663 | */ |
| 1664 | extern long2 __attribute__((const, overloadable))clamp(long2 value, long min_value, long max_value); |
| 1665 | #endif |
| 1666 | |
| 1667 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1668 | /** |
| 1669 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1670 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1671 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1672 | * |
| 1673 | * If min_value is greater than max_value, the results are undefined. |
| 1674 | * |
| 1675 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1676 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1677 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1678 | * |
| 1679 | * Supported by API versions 19 and newer. |
| 1680 | */ |
| 1681 | extern long3 __attribute__((const, overloadable))clamp(long3 value, long min_value, long max_value); |
| 1682 | #endif |
| 1683 | |
| 1684 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1685 | /** |
| 1686 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1687 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1688 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1689 | * |
| 1690 | * If min_value is greater than max_value, the results are undefined. |
| 1691 | * |
| 1692 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1693 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1694 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1695 | * |
| 1696 | * Supported by API versions 19 and newer. |
| 1697 | */ |
| 1698 | extern long4 __attribute__((const, overloadable))clamp(long4 value, long min_value, long max_value); |
| 1699 | #endif |
| 1700 | |
| 1701 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1702 | /** |
| 1703 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1704 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1705 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1706 | * |
| 1707 | * If min_value is greater than max_value, the results are undefined. |
| 1708 | * |
| 1709 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1710 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1711 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1712 | * |
| 1713 | * Supported by API versions 19 and newer. |
| 1714 | */ |
| 1715 | extern ulong2 __attribute__((const, overloadable))clamp(ulong2 value, ulong min_value, ulong max_value); |
| 1716 | #endif |
| 1717 | |
| 1718 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1719 | /** |
| 1720 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1721 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1722 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1723 | * |
| 1724 | * If min_value is greater than max_value, the results are undefined. |
| 1725 | * |
| 1726 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1727 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1728 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1729 | * |
| 1730 | * Supported by API versions 19 and newer. |
| 1731 | */ |
| 1732 | extern ulong3 __attribute__((const, overloadable))clamp(ulong3 value, ulong min_value, ulong max_value); |
| 1733 | #endif |
| 1734 | |
| 1735 | #if (defined(RS_VERSION) && (RS_VERSION >= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1736 | /** |
| 1737 | * Clamps a value to a specified high and low bound. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1738 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1739 | * clamp() returns min_value if value < min_value, max_value if value > max_value, otherwise value. |
| 1740 | * |
| 1741 | * If min_value is greater than max_value, the results are undefined. |
| 1742 | * |
| 1743 | * @param value Value to be clamped. Supports 1, 2, 3, 4 components. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1744 | * @param min_value Lower bound, must be scalar or matching vector. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1745 | * @param max_value High bound, must match the type of low. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1746 | * |
| 1747 | * Supported by API versions 19 and newer. |
| 1748 | */ |
| 1749 | extern ulong4 __attribute__((const, overloadable))clamp(ulong4 value, ulong min_value, ulong max_value); |
| 1750 | #endif |
| 1751 | |
| 1752 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1753 | /** |
| 1754 | * Returns the number of leading 0-bits in a value. |
| 1755 | * |
| 1756 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1757 | * |
| 1758 | * Supported by API versions 9 and newer. |
| 1759 | */ |
| 1760 | extern char __attribute__((const, overloadable))clz(char value); |
| 1761 | #endif |
| 1762 | |
| 1763 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1764 | /** |
| 1765 | * Returns the number of leading 0-bits in a value. |
| 1766 | * |
| 1767 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1768 | * |
| 1769 | * Supported by API versions 9 and newer. |
| 1770 | */ |
| 1771 | extern char2 __attribute__((const, overloadable))clz(char2 value); |
| 1772 | #endif |
| 1773 | |
| 1774 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1775 | /** |
| 1776 | * Returns the number of leading 0-bits in a value. |
| 1777 | * |
| 1778 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1779 | * |
| 1780 | * Supported by API versions 9 and newer. |
| 1781 | */ |
| 1782 | extern char3 __attribute__((const, overloadable))clz(char3 value); |
| 1783 | #endif |
| 1784 | |
| 1785 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1786 | /** |
| 1787 | * Returns the number of leading 0-bits in a value. |
| 1788 | * |
| 1789 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1790 | * |
| 1791 | * Supported by API versions 9 and newer. |
| 1792 | */ |
| 1793 | extern char4 __attribute__((const, overloadable))clz(char4 value); |
| 1794 | #endif |
| 1795 | |
| 1796 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1797 | /** |
| 1798 | * Returns the number of leading 0-bits in a value. |
| 1799 | * |
| 1800 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1801 | * |
| 1802 | * Supported by API versions 9 and newer. |
| 1803 | */ |
| 1804 | extern uchar __attribute__((const, overloadable))clz(uchar value); |
| 1805 | #endif |
| 1806 | |
| 1807 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1808 | /** |
| 1809 | * Returns the number of leading 0-bits in a value. |
| 1810 | * |
| 1811 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1812 | * |
| 1813 | * Supported by API versions 9 and newer. |
| 1814 | */ |
| 1815 | extern uchar2 __attribute__((const, overloadable))clz(uchar2 value); |
| 1816 | #endif |
| 1817 | |
| 1818 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1819 | /** |
| 1820 | * Returns the number of leading 0-bits in a value. |
| 1821 | * |
| 1822 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1823 | * |
| 1824 | * Supported by API versions 9 and newer. |
| 1825 | */ |
| 1826 | extern uchar3 __attribute__((const, overloadable))clz(uchar3 value); |
| 1827 | #endif |
| 1828 | |
| 1829 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1830 | /** |
| 1831 | * Returns the number of leading 0-bits in a value. |
| 1832 | * |
| 1833 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1834 | * |
| 1835 | * Supported by API versions 9 and newer. |
| 1836 | */ |
| 1837 | extern uchar4 __attribute__((const, overloadable))clz(uchar4 value); |
| 1838 | #endif |
| 1839 | |
| 1840 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1841 | /** |
| 1842 | * Returns the number of leading 0-bits in a value. |
| 1843 | * |
| 1844 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1845 | * |
| 1846 | * Supported by API versions 9 and newer. |
| 1847 | */ |
| 1848 | extern short __attribute__((const, overloadable))clz(short value); |
| 1849 | #endif |
| 1850 | |
| 1851 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1852 | /** |
| 1853 | * Returns the number of leading 0-bits in a value. |
| 1854 | * |
| 1855 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1856 | * |
| 1857 | * Supported by API versions 9 and newer. |
| 1858 | */ |
| 1859 | extern short2 __attribute__((const, overloadable))clz(short2 value); |
| 1860 | #endif |
| 1861 | |
| 1862 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1863 | /** |
| 1864 | * Returns the number of leading 0-bits in a value. |
| 1865 | * |
| 1866 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1867 | * |
| 1868 | * Supported by API versions 9 and newer. |
| 1869 | */ |
| 1870 | extern short3 __attribute__((const, overloadable))clz(short3 value); |
| 1871 | #endif |
| 1872 | |
| 1873 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1874 | /** |
| 1875 | * Returns the number of leading 0-bits in a value. |
| 1876 | * |
| 1877 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1878 | * |
| 1879 | * Supported by API versions 9 and newer. |
| 1880 | */ |
| 1881 | extern short4 __attribute__((const, overloadable))clz(short4 value); |
| 1882 | #endif |
| 1883 | |
| 1884 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1885 | /** |
| 1886 | * Returns the number of leading 0-bits in a value. |
| 1887 | * |
| 1888 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1889 | * |
| 1890 | * Supported by API versions 9 and newer. |
| 1891 | */ |
| 1892 | extern ushort __attribute__((const, overloadable))clz(ushort value); |
| 1893 | #endif |
| 1894 | |
| 1895 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1896 | /** |
| 1897 | * Returns the number of leading 0-bits in a value. |
| 1898 | * |
| 1899 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1900 | * |
| 1901 | * Supported by API versions 9 and newer. |
| 1902 | */ |
| 1903 | extern ushort2 __attribute__((const, overloadable))clz(ushort2 value); |
| 1904 | #endif |
| 1905 | |
| 1906 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1907 | /** |
| 1908 | * Returns the number of leading 0-bits in a value. |
| 1909 | * |
| 1910 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1911 | * |
| 1912 | * Supported by API versions 9 and newer. |
| 1913 | */ |
| 1914 | extern ushort3 __attribute__((const, overloadable))clz(ushort3 value); |
| 1915 | #endif |
| 1916 | |
| 1917 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1918 | /** |
| 1919 | * Returns the number of leading 0-bits in a value. |
| 1920 | * |
| 1921 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1922 | * |
| 1923 | * Supported by API versions 9 and newer. |
| 1924 | */ |
| 1925 | extern ushort4 __attribute__((const, overloadable))clz(ushort4 value); |
| 1926 | #endif |
| 1927 | |
| 1928 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1929 | /** |
| 1930 | * Returns the number of leading 0-bits in a value. |
| 1931 | * |
| 1932 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1933 | * |
| 1934 | * Supported by API versions 9 and newer. |
| 1935 | */ |
| 1936 | extern int __attribute__((const, overloadable))clz(int value); |
| 1937 | #endif |
| 1938 | |
| 1939 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1940 | /** |
| 1941 | * Returns the number of leading 0-bits in a value. |
| 1942 | * |
| 1943 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1944 | * |
| 1945 | * Supported by API versions 9 and newer. |
| 1946 | */ |
| 1947 | extern int2 __attribute__((const, overloadable))clz(int2 value); |
| 1948 | #endif |
| 1949 | |
| 1950 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1951 | /** |
| 1952 | * Returns the number of leading 0-bits in a value. |
| 1953 | * |
| 1954 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1955 | * |
| 1956 | * Supported by API versions 9 and newer. |
| 1957 | */ |
| 1958 | extern int3 __attribute__((const, overloadable))clz(int3 value); |
| 1959 | #endif |
| 1960 | |
| 1961 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1962 | /** |
| 1963 | * Returns the number of leading 0-bits in a value. |
| 1964 | * |
| 1965 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1966 | * |
| 1967 | * Supported by API versions 9 and newer. |
| 1968 | */ |
| 1969 | extern int4 __attribute__((const, overloadable))clz(int4 value); |
| 1970 | #endif |
| 1971 | |
| 1972 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1973 | /** |
| 1974 | * Returns the number of leading 0-bits in a value. |
| 1975 | * |
| 1976 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1977 | * |
| 1978 | * Supported by API versions 9 and newer. |
| 1979 | */ |
| 1980 | extern uint __attribute__((const, overloadable))clz(uint value); |
| 1981 | #endif |
| 1982 | |
| 1983 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1984 | /** |
| 1985 | * Returns the number of leading 0-bits in a value. |
| 1986 | * |
| 1987 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1988 | * |
| 1989 | * Supported by API versions 9 and newer. |
| 1990 | */ |
| 1991 | extern uint2 __attribute__((const, overloadable))clz(uint2 value); |
| 1992 | #endif |
| 1993 | |
| 1994 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 1995 | /** |
| 1996 | * Returns the number of leading 0-bits in a value. |
| 1997 | * |
| 1998 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 1999 | * |
| 2000 | * Supported by API versions 9 and newer. |
| 2001 | */ |
| 2002 | extern uint3 __attribute__((const, overloadable))clz(uint3 value); |
| 2003 | #endif |
| 2004 | |
| 2005 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2006 | /** |
| 2007 | * Returns the number of leading 0-bits in a value. |
| 2008 | * |
| 2009 | * For example, clz((char)0x03) returns 5. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 2010 | * |
| 2011 | * Supported by API versions 9 and newer. |
| 2012 | */ |
| 2013 | extern uint4 __attribute__((const, overloadable))clz(uint4 value); |
| 2014 | #endif |
| 2015 | |
| 2016 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2017 | /** |
| 2018 | * Component wise conversion from float2 to float2. |
| 2019 | * |
| 2020 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2021 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2022 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2023 | * |
| 2024 | * Supported by API versions 9 and newer. |
| 2025 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2026 | extern float2 __attribute__((const, overloadable))convert_float2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2027 | #endif |
| 2028 | |
| 2029 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2030 | /** |
| 2031 | * Component wise conversion from float3 to float3. |
| 2032 | * |
| 2033 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2034 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2035 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2036 | * |
| 2037 | * Supported by API versions 9 and newer. |
| 2038 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2039 | extern float3 __attribute__((const, overloadable))convert_float3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2040 | #endif |
| 2041 | |
| 2042 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2043 | /** |
| 2044 | * Component wise conversion from float4 to float4. |
| 2045 | * |
| 2046 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2047 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2048 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 float4 __attribute__((const, overloadable))convert_float4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2053 | #endif |
| 2054 | |
| 2055 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2056 | /** |
| 2057 | * Component wise conversion from char2 to float2. |
| 2058 | * |
| 2059 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2060 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2061 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2062 | * |
| 2063 | * Supported by API versions 9 and newer. |
| 2064 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2065 | extern float2 __attribute__((const, overloadable))convert_float2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2066 | #endif |
| 2067 | |
| 2068 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2069 | /** |
| 2070 | * Component wise conversion from char3 to float3. |
| 2071 | * |
| 2072 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2073 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2074 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2075 | * |
| 2076 | * Supported by API versions 9 and newer. |
| 2077 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2078 | extern float3 __attribute__((const, overloadable))convert_float3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2079 | #endif |
| 2080 | |
| 2081 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2082 | /** |
| 2083 | * Component wise conversion from char4 to float4. |
| 2084 | * |
| 2085 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2086 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2087 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2088 | * |
| 2089 | * Supported by API versions 9 and newer. |
| 2090 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2091 | extern float4 __attribute__((const, overloadable))convert_float4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2092 | #endif |
| 2093 | |
| 2094 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2095 | /** |
| 2096 | * Component wise conversion from uchar2 to float2. |
| 2097 | * |
| 2098 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2099 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2100 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2101 | * |
| 2102 | * Supported by API versions 9 and newer. |
| 2103 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2104 | extern float2 __attribute__((const, overloadable))convert_float2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2105 | #endif |
| 2106 | |
| 2107 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2108 | /** |
| 2109 | * Component wise conversion from uchar3 to float3. |
| 2110 | * |
| 2111 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2112 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2113 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2114 | * |
| 2115 | * Supported by API versions 9 and newer. |
| 2116 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2117 | extern float3 __attribute__((const, overloadable))convert_float3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2118 | #endif |
| 2119 | |
| 2120 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2121 | /** |
| 2122 | * Component wise conversion from uchar4 to float4. |
| 2123 | * |
| 2124 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2125 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2126 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2127 | * |
| 2128 | * Supported by API versions 9 and newer. |
| 2129 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2130 | extern float4 __attribute__((const, overloadable))convert_float4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2131 | #endif |
| 2132 | |
| 2133 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2134 | /** |
| 2135 | * Component wise conversion from short2 to float2. |
| 2136 | * |
| 2137 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2138 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2139 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2140 | * |
| 2141 | * Supported by API versions 9 and newer. |
| 2142 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2143 | extern float2 __attribute__((const, overloadable))convert_float2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2144 | #endif |
| 2145 | |
| 2146 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2147 | /** |
| 2148 | * Component wise conversion from short3 to float3. |
| 2149 | * |
| 2150 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2151 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2152 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2153 | * |
| 2154 | * Supported by API versions 9 and newer. |
| 2155 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2156 | extern float3 __attribute__((const, overloadable))convert_float3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2157 | #endif |
| 2158 | |
| 2159 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2160 | /** |
| 2161 | * Component wise conversion from short4 to float4. |
| 2162 | * |
| 2163 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2164 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2165 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 float4 __attribute__((const, overloadable))convert_float4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2170 | #endif |
| 2171 | |
| 2172 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2173 | /** |
| 2174 | * Component wise conversion from ushort2 to float2. |
| 2175 | * |
| 2176 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2177 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2178 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2179 | * |
| 2180 | * Supported by API versions 9 and newer. |
| 2181 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2182 | extern float2 __attribute__((const, overloadable))convert_float2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2183 | #endif |
| 2184 | |
| 2185 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2186 | /** |
| 2187 | * Component wise conversion from ushort3 to float3. |
| 2188 | * |
| 2189 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2190 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2191 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2192 | * |
| 2193 | * Supported by API versions 9 and newer. |
| 2194 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2195 | extern float3 __attribute__((const, overloadable))convert_float3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2196 | #endif |
| 2197 | |
| 2198 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2199 | /** |
| 2200 | * Component wise conversion from ushort4 to float4. |
| 2201 | * |
| 2202 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2203 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2204 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2205 | * |
| 2206 | * Supported by API versions 9 and newer. |
| 2207 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2208 | extern float4 __attribute__((const, overloadable))convert_float4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2209 | #endif |
| 2210 | |
| 2211 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2212 | /** |
| 2213 | * Component wise conversion from int2 to float2. |
| 2214 | * |
| 2215 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2216 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2217 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2218 | * |
| 2219 | * Supported by API versions 9 and newer. |
| 2220 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2221 | extern float2 __attribute__((const, overloadable))convert_float2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2222 | #endif |
| 2223 | |
| 2224 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2225 | /** |
| 2226 | * Component wise conversion from int3 to float3. |
| 2227 | * |
| 2228 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2229 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2230 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2231 | * |
| 2232 | * Supported by API versions 9 and newer. |
| 2233 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2234 | extern float3 __attribute__((const, overloadable))convert_float3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2235 | #endif |
| 2236 | |
| 2237 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2238 | /** |
| 2239 | * Component wise conversion from int4 to float4. |
| 2240 | * |
| 2241 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2242 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2243 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2244 | * |
| 2245 | * Supported by API versions 9 and newer. |
| 2246 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2247 | extern float4 __attribute__((const, overloadable))convert_float4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2248 | #endif |
| 2249 | |
| 2250 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2251 | /** |
| 2252 | * Component wise conversion from uint2 to float2. |
| 2253 | * |
| 2254 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2255 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2256 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2257 | * |
| 2258 | * Supported by API versions 9 and newer. |
| 2259 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2260 | extern float2 __attribute__((const, overloadable))convert_float2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2261 | #endif |
| 2262 | |
| 2263 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2264 | /** |
| 2265 | * Component wise conversion from uint3 to float3. |
| 2266 | * |
| 2267 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2268 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2269 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2270 | * |
| 2271 | * Supported by API versions 9 and newer. |
| 2272 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2273 | extern float3 __attribute__((const, overloadable))convert_float3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2274 | #endif |
| 2275 | |
| 2276 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2277 | /** |
| 2278 | * Component wise conversion from uint4 to float4. |
| 2279 | * |
| 2280 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2281 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2282 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 float4 __attribute__((const, overloadable))convert_float4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2287 | #endif |
| 2288 | |
| 2289 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2290 | /** |
| 2291 | * Component wise conversion from float2 to char2. |
| 2292 | * |
| 2293 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2294 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2295 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2296 | * |
| 2297 | * Supported by API versions 9 and newer. |
| 2298 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2299 | extern char2 __attribute__((const, overloadable))convert_char2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2300 | #endif |
| 2301 | |
| 2302 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2303 | /** |
| 2304 | * Component wise conversion from float3 to char3. |
| 2305 | * |
| 2306 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2307 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2308 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2309 | * |
| 2310 | * Supported by API versions 9 and newer. |
| 2311 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2312 | extern char3 __attribute__((const, overloadable))convert_char3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2313 | #endif |
| 2314 | |
| 2315 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2316 | /** |
| 2317 | * Component wise conversion from float4 to char4. |
| 2318 | * |
| 2319 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2320 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2321 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2322 | * |
| 2323 | * Supported by API versions 9 and newer. |
| 2324 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2325 | extern char4 __attribute__((const, overloadable))convert_char4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2326 | #endif |
| 2327 | |
| 2328 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2329 | /** |
| 2330 | * Component wise conversion from char2 to char2. |
| 2331 | * |
| 2332 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2333 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2334 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2335 | * |
| 2336 | * Supported by API versions 9 and newer. |
| 2337 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2338 | extern char2 __attribute__((const, overloadable))convert_char2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2339 | #endif |
| 2340 | |
| 2341 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2342 | /** |
| 2343 | * Component wise conversion from char3 to char3. |
| 2344 | * |
| 2345 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2346 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2347 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2348 | * |
| 2349 | * Supported by API versions 9 and newer. |
| 2350 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2351 | extern char3 __attribute__((const, overloadable))convert_char3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2352 | #endif |
| 2353 | |
| 2354 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2355 | /** |
| 2356 | * Component wise conversion from char4 to char4. |
| 2357 | * |
| 2358 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2359 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2360 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2361 | * |
| 2362 | * Supported by API versions 9 and newer. |
| 2363 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2364 | extern char4 __attribute__((const, overloadable))convert_char4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2365 | #endif |
| 2366 | |
| 2367 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2368 | /** |
| 2369 | * Component wise conversion from uchar2 to char2. |
| 2370 | * |
| 2371 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2372 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2373 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2374 | * |
| 2375 | * Supported by API versions 9 and newer. |
| 2376 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2377 | extern char2 __attribute__((const, overloadable))convert_char2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2378 | #endif |
| 2379 | |
| 2380 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2381 | /** |
| 2382 | * Component wise conversion from uchar3 to char3. |
| 2383 | * |
| 2384 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2385 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2386 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2387 | * |
| 2388 | * Supported by API versions 9 and newer. |
| 2389 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2390 | extern char3 __attribute__((const, overloadable))convert_char3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2391 | #endif |
| 2392 | |
| 2393 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2394 | /** |
| 2395 | * Component wise conversion from uchar4 to char4. |
| 2396 | * |
| 2397 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2398 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2399 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 char4 __attribute__((const, overloadable))convert_char4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2404 | #endif |
| 2405 | |
| 2406 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2407 | /** |
| 2408 | * Component wise conversion from short2 to char2. |
| 2409 | * |
| 2410 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2411 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2412 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2413 | * |
| 2414 | * Supported by API versions 9 and newer. |
| 2415 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2416 | extern char2 __attribute__((const, overloadable))convert_char2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2417 | #endif |
| 2418 | |
| 2419 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2420 | /** |
| 2421 | * Component wise conversion from short3 to char3. |
| 2422 | * |
| 2423 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2424 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2425 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2426 | * |
| 2427 | * Supported by API versions 9 and newer. |
| 2428 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2429 | extern char3 __attribute__((const, overloadable))convert_char3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2430 | #endif |
| 2431 | |
| 2432 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2433 | /** |
| 2434 | * Component wise conversion from short4 to char4. |
| 2435 | * |
| 2436 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2437 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2438 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2439 | * |
| 2440 | * Supported by API versions 9 and newer. |
| 2441 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2442 | extern char4 __attribute__((const, overloadable))convert_char4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2443 | #endif |
| 2444 | |
| 2445 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2446 | /** |
| 2447 | * Component wise conversion from ushort2 to char2. |
| 2448 | * |
| 2449 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2450 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2451 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2452 | * |
| 2453 | * Supported by API versions 9 and newer. |
| 2454 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2455 | extern char2 __attribute__((const, overloadable))convert_char2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2456 | #endif |
| 2457 | |
| 2458 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2459 | /** |
| 2460 | * Component wise conversion from ushort3 to char3. |
| 2461 | * |
| 2462 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2463 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2464 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2465 | * |
| 2466 | * Supported by API versions 9 and newer. |
| 2467 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2468 | extern char3 __attribute__((const, overloadable))convert_char3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2469 | #endif |
| 2470 | |
| 2471 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2472 | /** |
| 2473 | * Component wise conversion from ushort4 to char4. |
| 2474 | * |
| 2475 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2476 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2477 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2478 | * |
| 2479 | * Supported by API versions 9 and newer. |
| 2480 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2481 | extern char4 __attribute__((const, overloadable))convert_char4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2482 | #endif |
| 2483 | |
| 2484 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2485 | /** |
| 2486 | * Component wise conversion from int2 to char2. |
| 2487 | * |
| 2488 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2489 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2490 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2491 | * |
| 2492 | * Supported by API versions 9 and newer. |
| 2493 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2494 | extern char2 __attribute__((const, overloadable))convert_char2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2495 | #endif |
| 2496 | |
| 2497 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2498 | /** |
| 2499 | * Component wise conversion from int3 to char3. |
| 2500 | * |
| 2501 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2502 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2503 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2504 | * |
| 2505 | * Supported by API versions 9 and newer. |
| 2506 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2507 | extern char3 __attribute__((const, overloadable))convert_char3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2508 | #endif |
| 2509 | |
| 2510 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2511 | /** |
| 2512 | * Component wise conversion from int4 to char4. |
| 2513 | * |
| 2514 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2515 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2516 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 char4 __attribute__((const, overloadable))convert_char4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2521 | #endif |
| 2522 | |
| 2523 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2524 | /** |
| 2525 | * Component wise conversion from uint2 to char2. |
| 2526 | * |
| 2527 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2528 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2529 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2530 | * |
| 2531 | * Supported by API versions 9 and newer. |
| 2532 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2533 | extern char2 __attribute__((const, overloadable))convert_char2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2534 | #endif |
| 2535 | |
| 2536 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2537 | /** |
| 2538 | * Component wise conversion from uint3 to char3. |
| 2539 | * |
| 2540 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2541 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2542 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2543 | * |
| 2544 | * Supported by API versions 9 and newer. |
| 2545 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2546 | extern char3 __attribute__((const, overloadable))convert_char3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2547 | #endif |
| 2548 | |
| 2549 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2550 | /** |
| 2551 | * Component wise conversion from uint4 to char4. |
| 2552 | * |
| 2553 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2554 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2555 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2556 | * |
| 2557 | * Supported by API versions 9 and newer. |
| 2558 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2559 | extern char4 __attribute__((const, overloadable))convert_char4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2560 | #endif |
| 2561 | |
| 2562 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2563 | /** |
| 2564 | * Component wise conversion from float2 to uchar2. |
| 2565 | * |
| 2566 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2567 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2568 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2569 | * |
| 2570 | * Supported by API versions 9 and newer. |
| 2571 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2572 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2573 | #endif |
| 2574 | |
| 2575 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2576 | /** |
| 2577 | * Component wise conversion from float3 to uchar3. |
| 2578 | * |
| 2579 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2580 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2581 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2582 | * |
| 2583 | * Supported by API versions 9 and newer. |
| 2584 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2585 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2586 | #endif |
| 2587 | |
| 2588 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2589 | /** |
| 2590 | * Component wise conversion from float4 to uchar4. |
| 2591 | * |
| 2592 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2593 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2594 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2595 | * |
| 2596 | * Supported by API versions 9 and newer. |
| 2597 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2598 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2599 | #endif |
| 2600 | |
| 2601 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2602 | /** |
| 2603 | * Component wise conversion from char2 to uchar2. |
| 2604 | * |
| 2605 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2606 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2607 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2608 | * |
| 2609 | * Supported by API versions 9 and newer. |
| 2610 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2611 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2612 | #endif |
| 2613 | |
| 2614 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2615 | /** |
| 2616 | * Component wise conversion from char3 to uchar3. |
| 2617 | * |
| 2618 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2619 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2620 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2621 | * |
| 2622 | * Supported by API versions 9 and newer. |
| 2623 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2624 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2625 | #endif |
| 2626 | |
| 2627 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2628 | /** |
| 2629 | * Component wise conversion from char4 to uchar4. |
| 2630 | * |
| 2631 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2632 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2633 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 uchar4 __attribute__((const, overloadable))convert_uchar4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2638 | #endif |
| 2639 | |
| 2640 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2641 | /** |
| 2642 | * Component wise conversion from uchar2 to uchar2. |
| 2643 | * |
| 2644 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2645 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2646 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2647 | * |
| 2648 | * Supported by API versions 9 and newer. |
| 2649 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2650 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2651 | #endif |
| 2652 | |
| 2653 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2654 | /** |
| 2655 | * Component wise conversion from uchar3 to uchar3. |
| 2656 | * |
| 2657 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2658 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2659 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2660 | * |
| 2661 | * Supported by API versions 9 and newer. |
| 2662 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2663 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2664 | #endif |
| 2665 | |
| 2666 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2667 | /** |
| 2668 | * Component wise conversion from uchar4 to uchar4. |
| 2669 | * |
| 2670 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2671 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2672 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2673 | * |
| 2674 | * Supported by API versions 9 and newer. |
| 2675 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2676 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2677 | #endif |
| 2678 | |
| 2679 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2680 | /** |
| 2681 | * Component wise conversion from short2 to uchar2. |
| 2682 | * |
| 2683 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2684 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2685 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2686 | * |
| 2687 | * Supported by API versions 9 and newer. |
| 2688 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2689 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2690 | #endif |
| 2691 | |
| 2692 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2693 | /** |
| 2694 | * Component wise conversion from short3 to uchar3. |
| 2695 | * |
| 2696 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2697 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2698 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2699 | * |
| 2700 | * Supported by API versions 9 and newer. |
| 2701 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2702 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2703 | #endif |
| 2704 | |
| 2705 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2706 | /** |
| 2707 | * Component wise conversion from short4 to uchar4. |
| 2708 | * |
| 2709 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2710 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2711 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2712 | * |
| 2713 | * Supported by API versions 9 and newer. |
| 2714 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2715 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2716 | #endif |
| 2717 | |
| 2718 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2719 | /** |
| 2720 | * Component wise conversion from ushort2 to uchar2. |
| 2721 | * |
| 2722 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2723 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2724 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2725 | * |
| 2726 | * Supported by API versions 9 and newer. |
| 2727 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2728 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2729 | #endif |
| 2730 | |
| 2731 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2732 | /** |
| 2733 | * Component wise conversion from ushort3 to uchar3. |
| 2734 | * |
| 2735 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2736 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2737 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2738 | * |
| 2739 | * Supported by API versions 9 and newer. |
| 2740 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2741 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2742 | #endif |
| 2743 | |
| 2744 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2745 | /** |
| 2746 | * Component wise conversion from ushort4 to uchar4. |
| 2747 | * |
| 2748 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2749 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2750 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 uchar4 __attribute__((const, overloadable))convert_uchar4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2755 | #endif |
| 2756 | |
| 2757 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2758 | /** |
| 2759 | * Component wise conversion from int2 to uchar2. |
| 2760 | * |
| 2761 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2762 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2763 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2764 | * |
| 2765 | * Supported by API versions 9 and newer. |
| 2766 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2767 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2768 | #endif |
| 2769 | |
| 2770 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2771 | /** |
| 2772 | * Component wise conversion from int3 to uchar3. |
| 2773 | * |
| 2774 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2775 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2776 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2777 | * |
| 2778 | * Supported by API versions 9 and newer. |
| 2779 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2780 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2781 | #endif |
| 2782 | |
| 2783 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2784 | /** |
| 2785 | * Component wise conversion from int4 to uchar4. |
| 2786 | * |
| 2787 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2788 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2789 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2790 | * |
| 2791 | * Supported by API versions 9 and newer. |
| 2792 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2793 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2794 | #endif |
| 2795 | |
| 2796 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2797 | /** |
| 2798 | * Component wise conversion from uint2 to uchar2. |
| 2799 | * |
| 2800 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2801 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2802 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2803 | * |
| 2804 | * Supported by API versions 9 and newer. |
| 2805 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2806 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2807 | #endif |
| 2808 | |
| 2809 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2810 | /** |
| 2811 | * Component wise conversion from uint3 to uchar3. |
| 2812 | * |
| 2813 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2814 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2815 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2816 | * |
| 2817 | * Supported by API versions 9 and newer. |
| 2818 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2819 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2820 | #endif |
| 2821 | |
| 2822 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2823 | /** |
| 2824 | * Component wise conversion from uint4 to uchar4. |
| 2825 | * |
| 2826 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2827 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2828 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2829 | * |
| 2830 | * Supported by API versions 9 and newer. |
| 2831 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2832 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2833 | #endif |
| 2834 | |
| 2835 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2836 | /** |
| 2837 | * Component wise conversion from float2 to short2. |
| 2838 | * |
| 2839 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2840 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2841 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2842 | * |
| 2843 | * Supported by API versions 9 and newer. |
| 2844 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2845 | extern short2 __attribute__((const, overloadable))convert_short2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2846 | #endif |
| 2847 | |
| 2848 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2849 | /** |
| 2850 | * Component wise conversion from float3 to short3. |
| 2851 | * |
| 2852 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2853 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2854 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2855 | * |
| 2856 | * Supported by API versions 9 and newer. |
| 2857 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2858 | extern short3 __attribute__((const, overloadable))convert_short3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2859 | #endif |
| 2860 | |
| 2861 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2862 | /** |
| 2863 | * Component wise conversion from float4 to short4. |
| 2864 | * |
| 2865 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2866 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2867 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 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 short4 __attribute__((const, overloadable))convert_short4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2872 | #endif |
| 2873 | |
| 2874 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2875 | /** |
| 2876 | * Component wise conversion from char2 to short2. |
| 2877 | * |
| 2878 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2879 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2880 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2881 | * |
| 2882 | * Supported by API versions 9 and newer. |
| 2883 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2884 | extern short2 __attribute__((const, overloadable))convert_short2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2885 | #endif |
| 2886 | |
| 2887 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2888 | /** |
| 2889 | * Component wise conversion from char3 to short3. |
| 2890 | * |
| 2891 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2892 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2893 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2894 | * |
| 2895 | * Supported by API versions 9 and newer. |
| 2896 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2897 | extern short3 __attribute__((const, overloadable))convert_short3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2898 | #endif |
| 2899 | |
| 2900 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2901 | /** |
| 2902 | * Component wise conversion from char4 to short4. |
| 2903 | * |
| 2904 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2905 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2906 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2907 | * |
| 2908 | * Supported by API versions 9 and newer. |
| 2909 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2910 | extern short4 __attribute__((const, overloadable))convert_short4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2911 | #endif |
| 2912 | |
| 2913 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2914 | /** |
| 2915 | * Component wise conversion from uchar2 to short2. |
| 2916 | * |
| 2917 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2918 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2919 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2920 | * |
| 2921 | * Supported by API versions 9 and newer. |
| 2922 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2923 | extern short2 __attribute__((const, overloadable))convert_short2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2924 | #endif |
| 2925 | |
| 2926 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2927 | /** |
| 2928 | * Component wise conversion from uchar3 to short3. |
| 2929 | * |
| 2930 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2931 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2932 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2933 | * |
| 2934 | * Supported by API versions 9 and newer. |
| 2935 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2936 | extern short3 __attribute__((const, overloadable))convert_short3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2937 | #endif |
| 2938 | |
| 2939 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2940 | /** |
| 2941 | * Component wise conversion from uchar4 to short4. |
| 2942 | * |
| 2943 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2944 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2945 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2946 | * |
| 2947 | * Supported by API versions 9 and newer. |
| 2948 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2949 | extern short4 __attribute__((const, overloadable))convert_short4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2950 | #endif |
| 2951 | |
| 2952 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2953 | /** |
| 2954 | * Component wise conversion from short2 to short2. |
| 2955 | * |
| 2956 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2957 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2958 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2959 | * |
| 2960 | * Supported by API versions 9 and newer. |
| 2961 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2962 | extern short2 __attribute__((const, overloadable))convert_short2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2963 | #endif |
| 2964 | |
| 2965 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2966 | /** |
| 2967 | * Component wise conversion from short3 to short3. |
| 2968 | * |
| 2969 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2970 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2971 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2972 | * |
| 2973 | * Supported by API versions 9 and newer. |
| 2974 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2975 | extern short3 __attribute__((const, overloadable))convert_short3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2976 | #endif |
| 2977 | |
| 2978 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2979 | /** |
| 2980 | * Component wise conversion from short4 to short4. |
| 2981 | * |
| 2982 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2983 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2984 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2985 | * |
| 2986 | * Supported by API versions 9 and newer. |
| 2987 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 2988 | extern short4 __attribute__((const, overloadable))convert_short4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2989 | #endif |
| 2990 | |
| 2991 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 2992 | /** |
| 2993 | * Component wise conversion from ushort2 to short2. |
| 2994 | * |
| 2995 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 2996 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 2997 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 2998 | * |
| 2999 | * Supported by API versions 9 and newer. |
| 3000 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3001 | extern short2 __attribute__((const, overloadable))convert_short2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3002 | #endif |
| 3003 | |
| 3004 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3005 | /** |
| 3006 | * Component wise conversion from ushort3 to short3. |
| 3007 | * |
| 3008 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3009 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3010 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3011 | * |
| 3012 | * Supported by API versions 9 and newer. |
| 3013 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3014 | extern short3 __attribute__((const, overloadable))convert_short3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3015 | #endif |
| 3016 | |
| 3017 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3018 | /** |
| 3019 | * Component wise conversion from ushort4 to short4. |
| 3020 | * |
| 3021 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3022 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3023 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3024 | * |
| 3025 | * Supported by API versions 9 and newer. |
| 3026 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3027 | extern short4 __attribute__((const, overloadable))convert_short4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3028 | #endif |
| 3029 | |
| 3030 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3031 | /** |
| 3032 | * Component wise conversion from int2 to short2. |
| 3033 | * |
| 3034 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3035 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3036 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3037 | * |
| 3038 | * Supported by API versions 9 and newer. |
| 3039 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3040 | extern short2 __attribute__((const, overloadable))convert_short2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3041 | #endif |
| 3042 | |
| 3043 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3044 | /** |
| 3045 | * Component wise conversion from int3 to short3. |
| 3046 | * |
| 3047 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3048 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3049 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3050 | * |
| 3051 | * Supported by API versions 9 and newer. |
| 3052 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3053 | extern short3 __attribute__((const, overloadable))convert_short3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3054 | #endif |
| 3055 | |
| 3056 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3057 | /** |
| 3058 | * Component wise conversion from int4 to short4. |
| 3059 | * |
| 3060 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3061 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3062 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3063 | * |
| 3064 | * Supported by API versions 9 and newer. |
| 3065 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3066 | extern short4 __attribute__((const, overloadable))convert_short4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3067 | #endif |
| 3068 | |
| 3069 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3070 | /** |
| 3071 | * Component wise conversion from uint2 to short2. |
| 3072 | * |
| 3073 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3074 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3075 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3076 | * |
| 3077 | * Supported by API versions 9 and newer. |
| 3078 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3079 | extern short2 __attribute__((const, overloadable))convert_short2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3080 | #endif |
| 3081 | |
| 3082 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3083 | /** |
| 3084 | * Component wise conversion from uint3 to short3. |
| 3085 | * |
| 3086 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3087 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3088 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3089 | * |
| 3090 | * Supported by API versions 9 and newer. |
| 3091 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3092 | extern short3 __attribute__((const, overloadable))convert_short3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3093 | #endif |
| 3094 | |
| 3095 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3096 | /** |
| 3097 | * Component wise conversion from uint4 to short4. |
| 3098 | * |
| 3099 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3100 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3101 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3102 | * |
| 3103 | * Supported by API versions 9 and newer. |
| 3104 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3105 | extern short4 __attribute__((const, overloadable))convert_short4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3106 | #endif |
| 3107 | |
| 3108 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3109 | /** |
| 3110 | * Component wise conversion from float2 to ushort2. |
| 3111 | * |
| 3112 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3113 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3114 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3115 | * |
| 3116 | * Supported by API versions 9 and newer. |
| 3117 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3118 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3119 | #endif |
| 3120 | |
| 3121 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3122 | /** |
| 3123 | * Component wise conversion from float3 to ushort3. |
| 3124 | * |
| 3125 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3126 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3127 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3128 | * |
| 3129 | * Supported by API versions 9 and newer. |
| 3130 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3131 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3132 | #endif |
| 3133 | |
| 3134 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3135 | /** |
| 3136 | * Component wise conversion from float4 to ushort4. |
| 3137 | * |
| 3138 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3139 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3140 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3141 | * |
| 3142 | * Supported by API versions 9 and newer. |
| 3143 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3144 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3145 | #endif |
| 3146 | |
| 3147 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3148 | /** |
| 3149 | * Component wise conversion from char2 to ushort2. |
| 3150 | * |
| 3151 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3152 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3153 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3154 | * |
| 3155 | * Supported by API versions 9 and newer. |
| 3156 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3157 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3158 | #endif |
| 3159 | |
| 3160 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3161 | /** |
| 3162 | * Component wise conversion from char3 to ushort3. |
| 3163 | * |
| 3164 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3165 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3166 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3167 | * |
| 3168 | * Supported by API versions 9 and newer. |
| 3169 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3170 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3171 | #endif |
| 3172 | |
| 3173 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3174 | /** |
| 3175 | * Component wise conversion from char4 to ushort4. |
| 3176 | * |
| 3177 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3178 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3179 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3180 | * |
| 3181 | * Supported by API versions 9 and newer. |
| 3182 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3183 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3184 | #endif |
| 3185 | |
| 3186 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3187 | /** |
| 3188 | * Component wise conversion from uchar2 to ushort2. |
| 3189 | * |
| 3190 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3191 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3192 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3193 | * |
| 3194 | * Supported by API versions 9 and newer. |
| 3195 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3196 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3197 | #endif |
| 3198 | |
| 3199 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3200 | /** |
| 3201 | * Component wise conversion from uchar3 to ushort3. |
| 3202 | * |
| 3203 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3204 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3205 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3206 | * |
| 3207 | * Supported by API versions 9 and newer. |
| 3208 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3209 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3210 | #endif |
| 3211 | |
| 3212 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3213 | /** |
| 3214 | * Component wise conversion from uchar4 to ushort4. |
| 3215 | * |
| 3216 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3217 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3218 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3219 | * |
| 3220 | * Supported by API versions 9 and newer. |
| 3221 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3222 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3223 | #endif |
| 3224 | |
| 3225 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3226 | /** |
| 3227 | * Component wise conversion from short2 to ushort2. |
| 3228 | * |
| 3229 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3230 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3231 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3232 | * |
| 3233 | * Supported by API versions 9 and newer. |
| 3234 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3235 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3236 | #endif |
| 3237 | |
| 3238 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3239 | /** |
| 3240 | * Component wise conversion from short3 to ushort3. |
| 3241 | * |
| 3242 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3243 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3244 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3245 | * |
| 3246 | * Supported by API versions 9 and newer. |
| 3247 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3248 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3249 | #endif |
| 3250 | |
| 3251 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3252 | /** |
| 3253 | * Component wise conversion from short4 to ushort4. |
| 3254 | * |
| 3255 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3256 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3257 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3258 | * |
| 3259 | * Supported by API versions 9 and newer. |
| 3260 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3261 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3262 | #endif |
| 3263 | |
| 3264 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3265 | /** |
| 3266 | * Component wise conversion from ushort2 to ushort2. |
| 3267 | * |
| 3268 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3269 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3270 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3271 | * |
| 3272 | * Supported by API versions 9 and newer. |
| 3273 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3274 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3275 | #endif |
| 3276 | |
| 3277 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3278 | /** |
| 3279 | * Component wise conversion from ushort3 to ushort3. |
| 3280 | * |
| 3281 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3282 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3283 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3284 | * |
| 3285 | * Supported by API versions 9 and newer. |
| 3286 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3287 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3288 | #endif |
| 3289 | |
| 3290 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3291 | /** |
| 3292 | * Component wise conversion from ushort4 to ushort4. |
| 3293 | * |
| 3294 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3295 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3296 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3297 | * |
| 3298 | * Supported by API versions 9 and newer. |
| 3299 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3300 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3301 | #endif |
| 3302 | |
| 3303 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3304 | /** |
| 3305 | * Component wise conversion from int2 to ushort2. |
| 3306 | * |
| 3307 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3308 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3309 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3310 | * |
| 3311 | * Supported by API versions 9 and newer. |
| 3312 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3313 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3314 | #endif |
| 3315 | |
| 3316 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3317 | /** |
| 3318 | * Component wise conversion from int3 to ushort3. |
| 3319 | * |
| 3320 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3321 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3322 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3323 | * |
| 3324 | * Supported by API versions 9 and newer. |
| 3325 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3326 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3327 | #endif |
| 3328 | |
| 3329 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3330 | /** |
| 3331 | * Component wise conversion from int4 to ushort4. |
| 3332 | * |
| 3333 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3334 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3335 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3336 | * |
| 3337 | * Supported by API versions 9 and newer. |
| 3338 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3339 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3340 | #endif |
| 3341 | |
| 3342 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3343 | /** |
| 3344 | * Component wise conversion from uint2 to ushort2. |
| 3345 | * |
| 3346 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3347 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3348 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3349 | * |
| 3350 | * Supported by API versions 9 and newer. |
| 3351 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3352 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3353 | #endif |
| 3354 | |
| 3355 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3356 | /** |
| 3357 | * Component wise conversion from uint3 to ushort3. |
| 3358 | * |
| 3359 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3360 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3361 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3362 | * |
| 3363 | * Supported by API versions 9 and newer. |
| 3364 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3365 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3366 | #endif |
| 3367 | |
| 3368 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3369 | /** |
| 3370 | * Component wise conversion from uint4 to ushort4. |
| 3371 | * |
| 3372 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3373 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3374 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3375 | * |
| 3376 | * Supported by API versions 9 and newer. |
| 3377 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3378 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3379 | #endif |
| 3380 | |
| 3381 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3382 | /** |
| 3383 | * Component wise conversion from float2 to int2. |
| 3384 | * |
| 3385 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3386 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3387 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3388 | * |
| 3389 | * Supported by API versions 9 and newer. |
| 3390 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3391 | extern int2 __attribute__((const, overloadable))convert_int2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3392 | #endif |
| 3393 | |
| 3394 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3395 | /** |
| 3396 | * Component wise conversion from float3 to int3. |
| 3397 | * |
| 3398 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3399 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3400 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3401 | * |
| 3402 | * Supported by API versions 9 and newer. |
| 3403 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3404 | extern int3 __attribute__((const, overloadable))convert_int3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3405 | #endif |
| 3406 | |
| 3407 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3408 | /** |
| 3409 | * Component wise conversion from float4 to int4. |
| 3410 | * |
| 3411 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3412 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3413 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3414 | * |
| 3415 | * Supported by API versions 9 and newer. |
| 3416 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3417 | extern int4 __attribute__((const, overloadable))convert_int4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3418 | #endif |
| 3419 | |
| 3420 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3421 | /** |
| 3422 | * Component wise conversion from char2 to int2. |
| 3423 | * |
| 3424 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3425 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3426 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3427 | * |
| 3428 | * Supported by API versions 9 and newer. |
| 3429 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3430 | extern int2 __attribute__((const, overloadable))convert_int2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3431 | #endif |
| 3432 | |
| 3433 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3434 | /** |
| 3435 | * Component wise conversion from char3 to int3. |
| 3436 | * |
| 3437 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3438 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3439 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3440 | * |
| 3441 | * Supported by API versions 9 and newer. |
| 3442 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3443 | extern int3 __attribute__((const, overloadable))convert_int3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3444 | #endif |
| 3445 | |
| 3446 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3447 | /** |
| 3448 | * Component wise conversion from char4 to int4. |
| 3449 | * |
| 3450 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3451 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3452 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3453 | * |
| 3454 | * Supported by API versions 9 and newer. |
| 3455 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3456 | extern int4 __attribute__((const, overloadable))convert_int4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3457 | #endif |
| 3458 | |
| 3459 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3460 | /** |
| 3461 | * Component wise conversion from uchar2 to int2. |
| 3462 | * |
| 3463 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3464 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3465 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3466 | * |
| 3467 | * Supported by API versions 9 and newer. |
| 3468 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3469 | extern int2 __attribute__((const, overloadable))convert_int2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3470 | #endif |
| 3471 | |
| 3472 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3473 | /** |
| 3474 | * Component wise conversion from uchar3 to int3. |
| 3475 | * |
| 3476 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3477 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3478 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3479 | * |
| 3480 | * Supported by API versions 9 and newer. |
| 3481 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3482 | extern int3 __attribute__((const, overloadable))convert_int3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3483 | #endif |
| 3484 | |
| 3485 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3486 | /** |
| 3487 | * Component wise conversion from uchar4 to int4. |
| 3488 | * |
| 3489 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3490 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3491 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3492 | * |
| 3493 | * Supported by API versions 9 and newer. |
| 3494 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3495 | extern int4 __attribute__((const, overloadable))convert_int4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3496 | #endif |
| 3497 | |
| 3498 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3499 | /** |
| 3500 | * Component wise conversion from short2 to int2. |
| 3501 | * |
| 3502 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3503 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3504 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3505 | * |
| 3506 | * Supported by API versions 9 and newer. |
| 3507 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3508 | extern int2 __attribute__((const, overloadable))convert_int2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3509 | #endif |
| 3510 | |
| 3511 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3512 | /** |
| 3513 | * Component wise conversion from short3 to int3. |
| 3514 | * |
| 3515 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3516 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3517 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3518 | * |
| 3519 | * Supported by API versions 9 and newer. |
| 3520 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3521 | extern int3 __attribute__((const, overloadable))convert_int3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3522 | #endif |
| 3523 | |
| 3524 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3525 | /** |
| 3526 | * Component wise conversion from short4 to int4. |
| 3527 | * |
| 3528 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3529 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3530 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3531 | * |
| 3532 | * Supported by API versions 9 and newer. |
| 3533 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3534 | extern int4 __attribute__((const, overloadable))convert_int4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3535 | #endif |
| 3536 | |
| 3537 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3538 | /** |
| 3539 | * Component wise conversion from ushort2 to int2. |
| 3540 | * |
| 3541 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3542 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3543 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3544 | * |
| 3545 | * Supported by API versions 9 and newer. |
| 3546 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3547 | extern int2 __attribute__((const, overloadable))convert_int2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3548 | #endif |
| 3549 | |
| 3550 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3551 | /** |
| 3552 | * Component wise conversion from ushort3 to int3. |
| 3553 | * |
| 3554 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3555 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3556 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3557 | * |
| 3558 | * Supported by API versions 9 and newer. |
| 3559 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3560 | extern int3 __attribute__((const, overloadable))convert_int3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3561 | #endif |
| 3562 | |
| 3563 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3564 | /** |
| 3565 | * Component wise conversion from ushort4 to int4. |
| 3566 | * |
| 3567 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3568 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3569 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3570 | * |
| 3571 | * Supported by API versions 9 and newer. |
| 3572 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3573 | extern int4 __attribute__((const, overloadable))convert_int4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3574 | #endif |
| 3575 | |
| 3576 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3577 | /** |
| 3578 | * Component wise conversion from int2 to int2. |
| 3579 | * |
| 3580 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3581 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3582 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3583 | * |
| 3584 | * Supported by API versions 9 and newer. |
| 3585 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3586 | extern int2 __attribute__((const, overloadable))convert_int2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3587 | #endif |
| 3588 | |
| 3589 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3590 | /** |
| 3591 | * Component wise conversion from int3 to int3. |
| 3592 | * |
| 3593 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3594 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3595 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3596 | * |
| 3597 | * Supported by API versions 9 and newer. |
| 3598 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3599 | extern int3 __attribute__((const, overloadable))convert_int3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3600 | #endif |
| 3601 | |
| 3602 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3603 | /** |
| 3604 | * Component wise conversion from int4 to int4. |
| 3605 | * |
| 3606 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3607 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3608 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3609 | * |
| 3610 | * Supported by API versions 9 and newer. |
| 3611 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3612 | extern int4 __attribute__((const, overloadable))convert_int4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3613 | #endif |
| 3614 | |
| 3615 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3616 | /** |
| 3617 | * Component wise conversion from uint2 to int2. |
| 3618 | * |
| 3619 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3620 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3621 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3622 | * |
| 3623 | * Supported by API versions 9 and newer. |
| 3624 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3625 | extern int2 __attribute__((const, overloadable))convert_int2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3626 | #endif |
| 3627 | |
| 3628 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3629 | /** |
| 3630 | * Component wise conversion from uint3 to int3. |
| 3631 | * |
| 3632 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3633 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3634 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3635 | * |
| 3636 | * Supported by API versions 9 and newer. |
| 3637 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3638 | extern int3 __attribute__((const, overloadable))convert_int3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3639 | #endif |
| 3640 | |
| 3641 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3642 | /** |
| 3643 | * Component wise conversion from uint4 to int4. |
| 3644 | * |
| 3645 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3646 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3647 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3648 | * |
| 3649 | * Supported by API versions 9 and newer. |
| 3650 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3651 | extern int4 __attribute__((const, overloadable))convert_int4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3652 | #endif |
| 3653 | |
| 3654 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3655 | /** |
| 3656 | * Component wise conversion from float2 to uint2. |
| 3657 | * |
| 3658 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3659 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3660 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3661 | * |
| 3662 | * Supported by API versions 9 and newer. |
| 3663 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3664 | extern uint2 __attribute__((const, overloadable))convert_uint2(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3665 | #endif |
| 3666 | |
| 3667 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3668 | /** |
| 3669 | * Component wise conversion from float3 to uint3. |
| 3670 | * |
| 3671 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3672 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3673 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3674 | * |
| 3675 | * Supported by API versions 9 and newer. |
| 3676 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3677 | extern uint3 __attribute__((const, overloadable))convert_uint3(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3678 | #endif |
| 3679 | |
| 3680 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3681 | /** |
| 3682 | * Component wise conversion from float4 to uint4. |
| 3683 | * |
| 3684 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3685 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3686 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3687 | * |
| 3688 | * Supported by API versions 9 and newer. |
| 3689 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3690 | extern uint4 __attribute__((const, overloadable))convert_uint4(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3691 | #endif |
| 3692 | |
| 3693 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3694 | /** |
| 3695 | * Component wise conversion from char2 to uint2. |
| 3696 | * |
| 3697 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3698 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3699 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3700 | * |
| 3701 | * Supported by API versions 9 and newer. |
| 3702 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3703 | extern uint2 __attribute__((const, overloadable))convert_uint2(char2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3704 | #endif |
| 3705 | |
| 3706 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3707 | /** |
| 3708 | * Component wise conversion from char3 to uint3. |
| 3709 | * |
| 3710 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3711 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3712 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3713 | * |
| 3714 | * Supported by API versions 9 and newer. |
| 3715 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3716 | extern uint3 __attribute__((const, overloadable))convert_uint3(char3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3717 | #endif |
| 3718 | |
| 3719 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3720 | /** |
| 3721 | * Component wise conversion from char4 to uint4. |
| 3722 | * |
| 3723 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3724 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3725 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3726 | * |
| 3727 | * Supported by API versions 9 and newer. |
| 3728 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3729 | extern uint4 __attribute__((const, overloadable))convert_uint4(char4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3730 | #endif |
| 3731 | |
| 3732 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3733 | /** |
| 3734 | * Component wise conversion from uchar2 to uint2. |
| 3735 | * |
| 3736 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3737 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3738 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3739 | * |
| 3740 | * Supported by API versions 9 and newer. |
| 3741 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3742 | extern uint2 __attribute__((const, overloadable))convert_uint2(uchar2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3743 | #endif |
| 3744 | |
| 3745 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3746 | /** |
| 3747 | * Component wise conversion from uchar3 to uint3. |
| 3748 | * |
| 3749 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3750 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3751 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3752 | * |
| 3753 | * Supported by API versions 9 and newer. |
| 3754 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3755 | extern uint3 __attribute__((const, overloadable))convert_uint3(uchar3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3756 | #endif |
| 3757 | |
| 3758 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3759 | /** |
| 3760 | * Component wise conversion from uchar4 to uint4. |
| 3761 | * |
| 3762 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3763 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3764 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3765 | * |
| 3766 | * Supported by API versions 9 and newer. |
| 3767 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3768 | extern uint4 __attribute__((const, overloadable))convert_uint4(uchar4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3769 | #endif |
| 3770 | |
| 3771 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3772 | /** |
| 3773 | * Component wise conversion from short2 to uint2. |
| 3774 | * |
| 3775 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3776 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3777 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3778 | * |
| 3779 | * Supported by API versions 9 and newer. |
| 3780 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3781 | extern uint2 __attribute__((const, overloadable))convert_uint2(short2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3782 | #endif |
| 3783 | |
| 3784 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3785 | /** |
| 3786 | * Component wise conversion from short3 to uint3. |
| 3787 | * |
| 3788 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3789 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3790 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3791 | * |
| 3792 | * Supported by API versions 9 and newer. |
| 3793 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3794 | extern uint3 __attribute__((const, overloadable))convert_uint3(short3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3795 | #endif |
| 3796 | |
| 3797 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3798 | /** |
| 3799 | * Component wise conversion from short4 to uint4. |
| 3800 | * |
| 3801 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3802 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3803 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3804 | * |
| 3805 | * Supported by API versions 9 and newer. |
| 3806 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3807 | extern uint4 __attribute__((const, overloadable))convert_uint4(short4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3808 | #endif |
| 3809 | |
| 3810 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3811 | /** |
| 3812 | * Component wise conversion from ushort2 to uint2. |
| 3813 | * |
| 3814 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3815 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3816 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3817 | * |
| 3818 | * Supported by API versions 9 and newer. |
| 3819 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3820 | extern uint2 __attribute__((const, overloadable))convert_uint2(ushort2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3821 | #endif |
| 3822 | |
| 3823 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3824 | /** |
| 3825 | * Component wise conversion from ushort3 to uint3. |
| 3826 | * |
| 3827 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3828 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3829 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3830 | * |
| 3831 | * Supported by API versions 9 and newer. |
| 3832 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3833 | extern uint3 __attribute__((const, overloadable))convert_uint3(ushort3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3834 | #endif |
| 3835 | |
| 3836 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3837 | /** |
| 3838 | * Component wise conversion from ushort4 to uint4. |
| 3839 | * |
| 3840 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3841 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3842 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3843 | * |
| 3844 | * Supported by API versions 9 and newer. |
| 3845 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3846 | extern uint4 __attribute__((const, overloadable))convert_uint4(ushort4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3847 | #endif |
| 3848 | |
| 3849 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3850 | /** |
| 3851 | * Component wise conversion from int2 to uint2. |
| 3852 | * |
| 3853 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3854 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3855 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3856 | * |
| 3857 | * Supported by API versions 9 and newer. |
| 3858 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3859 | extern uint2 __attribute__((const, overloadable))convert_uint2(int2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3860 | #endif |
| 3861 | |
| 3862 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3863 | /** |
| 3864 | * Component wise conversion from int3 to uint3. |
| 3865 | * |
| 3866 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3867 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3868 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3869 | * |
| 3870 | * Supported by API versions 9 and newer. |
| 3871 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3872 | extern uint3 __attribute__((const, overloadable))convert_uint3(int3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3873 | #endif |
| 3874 | |
| 3875 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3876 | /** |
| 3877 | * Component wise conversion from int4 to uint4. |
| 3878 | * |
| 3879 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3880 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3881 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3882 | * |
| 3883 | * Supported by API versions 9 and newer. |
| 3884 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3885 | extern uint4 __attribute__((const, overloadable))convert_uint4(int4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3886 | #endif |
| 3887 | |
| 3888 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3889 | /** |
| 3890 | * Component wise conversion from uint2 to uint2. |
| 3891 | * |
| 3892 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3893 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3894 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3895 | * |
| 3896 | * Supported by API versions 9 and newer. |
| 3897 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3898 | extern uint2 __attribute__((const, overloadable))convert_uint2(uint2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3899 | #endif |
| 3900 | |
| 3901 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3902 | /** |
| 3903 | * Component wise conversion from uint3 to uint3. |
| 3904 | * |
| 3905 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3906 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3907 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3908 | * |
| 3909 | * Supported by API versions 9 and newer. |
| 3910 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3911 | extern uint3 __attribute__((const, overloadable))convert_uint3(uint3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3912 | #endif |
| 3913 | |
| 3914 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3915 | /** |
| 3916 | * Component wise conversion from uint4 to uint4. |
| 3917 | * |
| 3918 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3919 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3920 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3921 | * |
| 3922 | * Supported by API versions 9 and newer. |
| 3923 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 3924 | extern uint4 __attribute__((const, overloadable))convert_uint4(uint4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 3925 | #endif |
| 3926 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 3927 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3928 | /** |
| 3929 | * Component wise conversion from double2 to double2. |
| 3930 | * |
| 3931 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3932 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3933 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3934 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 3935 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3936 | */ |
| 3937 | extern double2 __attribute__((const, overloadable))convert_double2(double2 v); |
| 3938 | #endif |
| 3939 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 3940 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3941 | /** |
| 3942 | * Component wise conversion from double3 to double3. |
| 3943 | * |
| 3944 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3945 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3946 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3947 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 3948 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3949 | */ |
| 3950 | extern double3 __attribute__((const, overloadable))convert_double3(double3 v); |
| 3951 | #endif |
| 3952 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 3953 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3954 | /** |
| 3955 | * Component wise conversion from double4 to double4. |
| 3956 | * |
| 3957 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3958 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3959 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3960 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 3961 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3962 | */ |
| 3963 | extern double4 __attribute__((const, overloadable))convert_double4(double4 v); |
| 3964 | #endif |
| 3965 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 3966 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3967 | /** |
| 3968 | * Component wise conversion from long2 to double2. |
| 3969 | * |
| 3970 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3971 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3972 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3973 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 3974 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3975 | */ |
| 3976 | extern double2 __attribute__((const, overloadable))convert_double2(long2 v); |
| 3977 | #endif |
| 3978 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 3979 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3980 | /** |
| 3981 | * Component wise conversion from long3 to double3. |
| 3982 | * |
| 3983 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3984 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3985 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3986 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 3987 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3988 | */ |
| 3989 | extern double3 __attribute__((const, overloadable))convert_double3(long3 v); |
| 3990 | #endif |
| 3991 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 3992 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 3993 | /** |
| 3994 | * Component wise conversion from long4 to double4. |
| 3995 | * |
| 3996 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 3997 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 3998 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 3999 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4000 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4001 | */ |
| 4002 | extern double4 __attribute__((const, overloadable))convert_double4(long4 v); |
| 4003 | #endif |
| 4004 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4005 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4006 | /** |
| 4007 | * Component wise conversion from ulong2 to double2. |
| 4008 | * |
| 4009 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4010 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4011 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4012 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4013 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4014 | */ |
| 4015 | extern double2 __attribute__((const, overloadable))convert_double2(ulong2 v); |
| 4016 | #endif |
| 4017 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4018 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4019 | /** |
| 4020 | * Component wise conversion from ulong3 to double3. |
| 4021 | * |
| 4022 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4023 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4024 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4025 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4026 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4027 | */ |
| 4028 | extern double3 __attribute__((const, overloadable))convert_double3(ulong3 v); |
| 4029 | #endif |
| 4030 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4031 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4032 | /** |
| 4033 | * Component wise conversion from ulong4 to double4. |
| 4034 | * |
| 4035 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4036 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4037 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4038 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4039 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4040 | */ |
| 4041 | extern double4 __attribute__((const, overloadable))convert_double4(ulong4 v); |
| 4042 | #endif |
| 4043 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4044 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4045 | /** |
| 4046 | * Component wise conversion from double2 to long2. |
| 4047 | * |
| 4048 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4049 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4050 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4051 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4052 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4053 | */ |
| 4054 | extern long2 __attribute__((const, overloadable))convert_long2(double2 v); |
| 4055 | #endif |
| 4056 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4057 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4058 | /** |
| 4059 | * Component wise conversion from double3 to long3. |
| 4060 | * |
| 4061 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4062 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4063 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4064 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4065 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4066 | */ |
| 4067 | extern long3 __attribute__((const, overloadable))convert_long3(double3 v); |
| 4068 | #endif |
| 4069 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4070 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4071 | /** |
| 4072 | * Component wise conversion from double4 to long4. |
| 4073 | * |
| 4074 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4075 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4076 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4077 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4078 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4079 | */ |
| 4080 | extern long4 __attribute__((const, overloadable))convert_long4(double4 v); |
| 4081 | #endif |
| 4082 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4083 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4084 | /** |
| 4085 | * Component wise conversion from long2 to long2. |
| 4086 | * |
| 4087 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4088 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4089 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4090 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4091 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4092 | */ |
| 4093 | extern long2 __attribute__((const, overloadable))convert_long2(long2 v); |
| 4094 | #endif |
| 4095 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4096 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4097 | /** |
| 4098 | * Component wise conversion from long3 to long3. |
| 4099 | * |
| 4100 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4101 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4102 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4103 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4104 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4105 | */ |
| 4106 | extern long3 __attribute__((const, overloadable))convert_long3(long3 v); |
| 4107 | #endif |
| 4108 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4109 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4110 | /** |
| 4111 | * Component wise conversion from long4 to long4. |
| 4112 | * |
| 4113 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4114 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4115 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4116 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4117 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4118 | */ |
| 4119 | extern long4 __attribute__((const, overloadable))convert_long4(long4 v); |
| 4120 | #endif |
| 4121 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4122 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4123 | /** |
| 4124 | * Component wise conversion from ulong2 to long2. |
| 4125 | * |
| 4126 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4127 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4128 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4129 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4130 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4131 | */ |
| 4132 | extern long2 __attribute__((const, overloadable))convert_long2(ulong2 v); |
| 4133 | #endif |
| 4134 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4135 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4136 | /** |
| 4137 | * Component wise conversion from ulong3 to long3. |
| 4138 | * |
| 4139 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4140 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4141 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4142 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4143 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4144 | */ |
| 4145 | extern long3 __attribute__((const, overloadable))convert_long3(ulong3 v); |
| 4146 | #endif |
| 4147 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4148 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4149 | /** |
| 4150 | * Component wise conversion from ulong4 to long4. |
| 4151 | * |
| 4152 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4153 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4154 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4155 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4156 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4157 | */ |
| 4158 | extern long4 __attribute__((const, overloadable))convert_long4(ulong4 v); |
| 4159 | #endif |
| 4160 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4161 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4162 | /** |
| 4163 | * Component wise conversion from double2 to ulong2. |
| 4164 | * |
| 4165 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4166 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4167 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4168 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4169 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4170 | */ |
| 4171 | extern ulong2 __attribute__((const, overloadable))convert_ulong2(double2 v); |
| 4172 | #endif |
| 4173 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4174 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4175 | /** |
| 4176 | * Component wise conversion from double3 to ulong3. |
| 4177 | * |
| 4178 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4179 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4180 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4181 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4182 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4183 | */ |
| 4184 | extern ulong3 __attribute__((const, overloadable))convert_ulong3(double3 v); |
| 4185 | #endif |
| 4186 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4187 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4188 | /** |
| 4189 | * Component wise conversion from double4 to ulong4. |
| 4190 | * |
| 4191 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4192 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4193 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4194 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4195 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4196 | */ |
| 4197 | extern ulong4 __attribute__((const, overloadable))convert_ulong4(double4 v); |
| 4198 | #endif |
| 4199 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4200 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4201 | /** |
| 4202 | * Component wise conversion from long2 to ulong2. |
| 4203 | * |
| 4204 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4205 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4206 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4207 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4208 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4209 | */ |
| 4210 | extern ulong2 __attribute__((const, overloadable))convert_ulong2(long2 v); |
| 4211 | #endif |
| 4212 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4213 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4214 | /** |
| 4215 | * Component wise conversion from long3 to ulong3. |
| 4216 | * |
| 4217 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4218 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4219 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4220 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4221 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4222 | */ |
| 4223 | extern ulong3 __attribute__((const, overloadable))convert_ulong3(long3 v); |
| 4224 | #endif |
| 4225 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4226 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4227 | /** |
| 4228 | * Component wise conversion from long4 to ulong4. |
| 4229 | * |
| 4230 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4231 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4232 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4233 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4234 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4235 | */ |
| 4236 | extern ulong4 __attribute__((const, overloadable))convert_ulong4(long4 v); |
| 4237 | #endif |
| 4238 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4239 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4240 | /** |
| 4241 | * Component wise conversion from ulong2 to ulong2. |
| 4242 | * |
| 4243 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4244 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4245 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4246 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4247 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4248 | */ |
| 4249 | extern ulong2 __attribute__((const, overloadable))convert_ulong2(ulong2 v); |
| 4250 | #endif |
| 4251 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4252 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4253 | /** |
| 4254 | * Component wise conversion from ulong3 to ulong3. |
| 4255 | * |
| 4256 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4257 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4258 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4259 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4260 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4261 | */ |
| 4262 | extern ulong3 __attribute__((const, overloadable))convert_ulong3(ulong3 v); |
| 4263 | #endif |
| 4264 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4265 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4266 | /** |
| 4267 | * Component wise conversion from ulong4 to ulong4. |
| 4268 | * |
| 4269 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4270 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4271 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4272 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4273 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4274 | */ |
| 4275 | extern ulong4 __attribute__((const, overloadable))convert_ulong4(ulong4 v); |
| 4276 | #endif |
| 4277 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4278 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4279 | /** |
| 4280 | * Component wise conversion from double2 to float2. |
| 4281 | * |
| 4282 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4283 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4284 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4285 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4286 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4287 | */ |
| 4288 | extern float2 __attribute__((const, overloadable))convert_float2(double2 v); |
| 4289 | #endif |
| 4290 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4291 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4292 | /** |
| 4293 | * Component wise conversion from double3 to float3. |
| 4294 | * |
| 4295 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4296 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4297 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4298 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4299 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4300 | */ |
| 4301 | extern float3 __attribute__((const, overloadable))convert_float3(double3 v); |
| 4302 | #endif |
| 4303 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4304 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4305 | /** |
| 4306 | * Component wise conversion from double4 to float4. |
| 4307 | * |
| 4308 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4309 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4310 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4311 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4312 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4313 | */ |
| 4314 | extern float4 __attribute__((const, overloadable))convert_float4(double4 v); |
| 4315 | #endif |
| 4316 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4317 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4318 | /** |
| 4319 | * Component wise conversion from long2 to float2. |
| 4320 | * |
| 4321 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4322 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4323 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4324 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4325 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4326 | */ |
| 4327 | extern float2 __attribute__((const, overloadable))convert_float2(long2 v); |
| 4328 | #endif |
| 4329 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4330 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4331 | /** |
| 4332 | * Component wise conversion from long3 to float3. |
| 4333 | * |
| 4334 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4335 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4336 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4337 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4338 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4339 | */ |
| 4340 | extern float3 __attribute__((const, overloadable))convert_float3(long3 v); |
| 4341 | #endif |
| 4342 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4343 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4344 | /** |
| 4345 | * Component wise conversion from long4 to float4. |
| 4346 | * |
| 4347 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4348 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4349 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4350 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4351 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4352 | */ |
| 4353 | extern float4 __attribute__((const, overloadable))convert_float4(long4 v); |
| 4354 | #endif |
| 4355 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4356 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4357 | /** |
| 4358 | * Component wise conversion from ulong2 to float2. |
| 4359 | * |
| 4360 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4361 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4362 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4363 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4364 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4365 | */ |
| 4366 | extern float2 __attribute__((const, overloadable))convert_float2(ulong2 v); |
| 4367 | #endif |
| 4368 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4369 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4370 | /** |
| 4371 | * Component wise conversion from ulong3 to float3. |
| 4372 | * |
| 4373 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4374 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4375 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4376 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4377 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4378 | */ |
| 4379 | extern float3 __attribute__((const, overloadable))convert_float3(ulong3 v); |
| 4380 | #endif |
| 4381 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4382 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4383 | /** |
| 4384 | * Component wise conversion from ulong4 to float4. |
| 4385 | * |
| 4386 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4387 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4388 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4389 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4390 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 46ebc97 | 2014-05-05 20:33:25 -0700 | [diff] [blame] | 4391 | */ |
| 4392 | extern float4 __attribute__((const, overloadable))convert_float4(ulong4 v); |
| 4393 | #endif |
| 4394 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4395 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4396 | /** |
| 4397 | * Component wise conversion from double2 to char2. |
| 4398 | * |
| 4399 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4400 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4401 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4402 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4403 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4404 | */ |
| 4405 | extern char2 __attribute__((const, overloadable))convert_char2(double2 v); |
| 4406 | #endif |
| 4407 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4408 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4409 | /** |
| 4410 | * Component wise conversion from double3 to char3. |
| 4411 | * |
| 4412 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4413 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4414 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4415 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4416 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4417 | */ |
| 4418 | extern char3 __attribute__((const, overloadable))convert_char3(double3 v); |
| 4419 | #endif |
| 4420 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4421 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4422 | /** |
| 4423 | * Component wise conversion from double4 to char4. |
| 4424 | * |
| 4425 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4426 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4427 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4428 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4429 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4430 | */ |
| 4431 | extern char4 __attribute__((const, overloadable))convert_char4(double4 v); |
| 4432 | #endif |
| 4433 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4434 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4435 | /** |
| 4436 | * Component wise conversion from long2 to char2. |
| 4437 | * |
| 4438 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4439 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4440 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4441 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4442 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4443 | */ |
| 4444 | extern char2 __attribute__((const, overloadable))convert_char2(long2 v); |
| 4445 | #endif |
| 4446 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4447 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4448 | /** |
| 4449 | * Component wise conversion from long3 to char3. |
| 4450 | * |
| 4451 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4452 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4453 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4454 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4455 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4456 | */ |
| 4457 | extern char3 __attribute__((const, overloadable))convert_char3(long3 v); |
| 4458 | #endif |
| 4459 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4460 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4461 | /** |
| 4462 | * Component wise conversion from long4 to char4. |
| 4463 | * |
| 4464 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4465 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4466 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4467 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4468 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4469 | */ |
| 4470 | extern char4 __attribute__((const, overloadable))convert_char4(long4 v); |
| 4471 | #endif |
| 4472 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4473 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4474 | /** |
| 4475 | * Component wise conversion from ulong2 to char2. |
| 4476 | * |
| 4477 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4478 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4479 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4480 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4481 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4482 | */ |
| 4483 | extern char2 __attribute__((const, overloadable))convert_char2(ulong2 v); |
| 4484 | #endif |
| 4485 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4486 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4487 | /** |
| 4488 | * Component wise conversion from ulong3 to char3. |
| 4489 | * |
| 4490 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4491 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4492 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4493 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4494 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4495 | */ |
| 4496 | extern char3 __attribute__((const, overloadable))convert_char3(ulong3 v); |
| 4497 | #endif |
| 4498 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4499 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4500 | /** |
| 4501 | * Component wise conversion from ulong4 to char4. |
| 4502 | * |
| 4503 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4504 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4505 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4506 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4507 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4508 | */ |
| 4509 | extern char4 __attribute__((const, overloadable))convert_char4(ulong4 v); |
| 4510 | #endif |
| 4511 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4512 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4513 | /** |
| 4514 | * Component wise conversion from double2 to uchar2. |
| 4515 | * |
| 4516 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4517 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4518 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4519 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4520 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4521 | */ |
| 4522 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(double2 v); |
| 4523 | #endif |
| 4524 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4525 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4526 | /** |
| 4527 | * Component wise conversion from double3 to uchar3. |
| 4528 | * |
| 4529 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4530 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4531 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4532 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4533 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4534 | */ |
| 4535 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(double3 v); |
| 4536 | #endif |
| 4537 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4538 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4539 | /** |
| 4540 | * Component wise conversion from double4 to uchar4. |
| 4541 | * |
| 4542 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4543 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4544 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4545 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4546 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4547 | */ |
| 4548 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(double4 v); |
| 4549 | #endif |
| 4550 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4551 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4552 | /** |
| 4553 | * Component wise conversion from long2 to uchar2. |
| 4554 | * |
| 4555 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4556 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4557 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4558 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4559 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4560 | */ |
| 4561 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(long2 v); |
| 4562 | #endif |
| 4563 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4564 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4565 | /** |
| 4566 | * Component wise conversion from long3 to uchar3. |
| 4567 | * |
| 4568 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4569 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4570 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4571 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4572 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4573 | */ |
| 4574 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(long3 v); |
| 4575 | #endif |
| 4576 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4577 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4578 | /** |
| 4579 | * Component wise conversion from long4 to uchar4. |
| 4580 | * |
| 4581 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4582 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4583 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4584 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4585 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4586 | */ |
| 4587 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(long4 v); |
| 4588 | #endif |
| 4589 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4590 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4591 | /** |
| 4592 | * Component wise conversion from ulong2 to uchar2. |
| 4593 | * |
| 4594 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4595 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4596 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4597 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4598 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4599 | */ |
| 4600 | extern uchar2 __attribute__((const, overloadable))convert_uchar2(ulong2 v); |
| 4601 | #endif |
| 4602 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4603 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4604 | /** |
| 4605 | * Component wise conversion from ulong3 to uchar3. |
| 4606 | * |
| 4607 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4608 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4609 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4610 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4611 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4612 | */ |
| 4613 | extern uchar3 __attribute__((const, overloadable))convert_uchar3(ulong3 v); |
| 4614 | #endif |
| 4615 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4616 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4617 | /** |
| 4618 | * Component wise conversion from ulong4 to uchar4. |
| 4619 | * |
| 4620 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4621 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4622 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4623 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4624 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4625 | */ |
| 4626 | extern uchar4 __attribute__((const, overloadable))convert_uchar4(ulong4 v); |
| 4627 | #endif |
| 4628 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4629 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4630 | /** |
| 4631 | * Component wise conversion from double2 to short2. |
| 4632 | * |
| 4633 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4634 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4635 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4636 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4637 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4638 | */ |
| 4639 | extern short2 __attribute__((const, overloadable))convert_short2(double2 v); |
| 4640 | #endif |
| 4641 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4642 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4643 | /** |
| 4644 | * Component wise conversion from double3 to short3. |
| 4645 | * |
| 4646 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4647 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4648 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4649 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4650 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4651 | */ |
| 4652 | extern short3 __attribute__((const, overloadable))convert_short3(double3 v); |
| 4653 | #endif |
| 4654 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4655 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4656 | /** |
| 4657 | * Component wise conversion from double4 to short4. |
| 4658 | * |
| 4659 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4660 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4661 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4662 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4663 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4664 | */ |
| 4665 | extern short4 __attribute__((const, overloadable))convert_short4(double4 v); |
| 4666 | #endif |
| 4667 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4668 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4669 | /** |
| 4670 | * Component wise conversion from long2 to short2. |
| 4671 | * |
| 4672 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4673 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4674 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4675 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4676 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4677 | */ |
| 4678 | extern short2 __attribute__((const, overloadable))convert_short2(long2 v); |
| 4679 | #endif |
| 4680 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4681 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4682 | /** |
| 4683 | * Component wise conversion from long3 to short3. |
| 4684 | * |
| 4685 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4686 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4687 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4688 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4689 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4690 | */ |
| 4691 | extern short3 __attribute__((const, overloadable))convert_short3(long3 v); |
| 4692 | #endif |
| 4693 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4694 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4695 | /** |
| 4696 | * Component wise conversion from long4 to short4. |
| 4697 | * |
| 4698 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4699 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4700 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4701 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4702 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4703 | */ |
| 4704 | extern short4 __attribute__((const, overloadable))convert_short4(long4 v); |
| 4705 | #endif |
| 4706 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4707 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4708 | /** |
| 4709 | * Component wise conversion from ulong2 to short2. |
| 4710 | * |
| 4711 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4712 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4713 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4714 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4715 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4716 | */ |
| 4717 | extern short2 __attribute__((const, overloadable))convert_short2(ulong2 v); |
| 4718 | #endif |
| 4719 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4720 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4721 | /** |
| 4722 | * Component wise conversion from ulong3 to short3. |
| 4723 | * |
| 4724 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4725 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4726 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4727 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4728 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4729 | */ |
| 4730 | extern short3 __attribute__((const, overloadable))convert_short3(ulong3 v); |
| 4731 | #endif |
| 4732 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4733 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4734 | /** |
| 4735 | * Component wise conversion from ulong4 to short4. |
| 4736 | * |
| 4737 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4738 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4739 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4740 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4741 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4742 | */ |
| 4743 | extern short4 __attribute__((const, overloadable))convert_short4(ulong4 v); |
| 4744 | #endif |
| 4745 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4746 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4747 | /** |
| 4748 | * Component wise conversion from double2 to ushort2. |
| 4749 | * |
| 4750 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4751 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4752 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4753 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4754 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4755 | */ |
| 4756 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(double2 v); |
| 4757 | #endif |
| 4758 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4759 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4760 | /** |
| 4761 | * Component wise conversion from double3 to ushort3. |
| 4762 | * |
| 4763 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4764 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4765 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4766 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4767 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4768 | */ |
| 4769 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(double3 v); |
| 4770 | #endif |
| 4771 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4772 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4773 | /** |
| 4774 | * Component wise conversion from double4 to ushort4. |
| 4775 | * |
| 4776 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4777 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4778 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4779 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4780 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4781 | */ |
| 4782 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(double4 v); |
| 4783 | #endif |
| 4784 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4785 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4786 | /** |
| 4787 | * Component wise conversion from long2 to ushort2. |
| 4788 | * |
| 4789 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4790 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4791 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4792 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4793 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4794 | */ |
| 4795 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(long2 v); |
| 4796 | #endif |
| 4797 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4798 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4799 | /** |
| 4800 | * Component wise conversion from long3 to ushort3. |
| 4801 | * |
| 4802 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4803 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4804 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4805 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4806 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4807 | */ |
| 4808 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(long3 v); |
| 4809 | #endif |
| 4810 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4811 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4812 | /** |
| 4813 | * Component wise conversion from long4 to ushort4. |
| 4814 | * |
| 4815 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4816 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4817 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4818 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4819 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4820 | */ |
| 4821 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(long4 v); |
| 4822 | #endif |
| 4823 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4824 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4825 | /** |
| 4826 | * Component wise conversion from ulong2 to ushort2. |
| 4827 | * |
| 4828 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4829 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4830 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4831 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4832 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4833 | */ |
| 4834 | extern ushort2 __attribute__((const, overloadable))convert_ushort2(ulong2 v); |
| 4835 | #endif |
| 4836 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4837 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4838 | /** |
| 4839 | * Component wise conversion from ulong3 to ushort3. |
| 4840 | * |
| 4841 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4842 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4843 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4844 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4845 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4846 | */ |
| 4847 | extern ushort3 __attribute__((const, overloadable))convert_ushort3(ulong3 v); |
| 4848 | #endif |
| 4849 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4850 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4851 | /** |
| 4852 | * Component wise conversion from ulong4 to ushort4. |
| 4853 | * |
| 4854 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4855 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4856 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4857 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4858 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4859 | */ |
| 4860 | extern ushort4 __attribute__((const, overloadable))convert_ushort4(ulong4 v); |
| 4861 | #endif |
| 4862 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4863 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4864 | /** |
| 4865 | * Component wise conversion from double2 to int2. |
| 4866 | * |
| 4867 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4868 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4869 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4870 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4871 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4872 | */ |
| 4873 | extern int2 __attribute__((const, overloadable))convert_int2(double2 v); |
| 4874 | #endif |
| 4875 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4876 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4877 | /** |
| 4878 | * Component wise conversion from double3 to int3. |
| 4879 | * |
| 4880 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4881 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4882 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4883 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4884 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4885 | */ |
| 4886 | extern int3 __attribute__((const, overloadable))convert_int3(double3 v); |
| 4887 | #endif |
| 4888 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4889 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4890 | /** |
| 4891 | * Component wise conversion from double4 to int4. |
| 4892 | * |
| 4893 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4894 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4895 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4896 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4897 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4898 | */ |
| 4899 | extern int4 __attribute__((const, overloadable))convert_int4(double4 v); |
| 4900 | #endif |
| 4901 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4902 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4903 | /** |
| 4904 | * Component wise conversion from long2 to int2. |
| 4905 | * |
| 4906 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4907 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4908 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4909 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4910 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4911 | */ |
| 4912 | extern int2 __attribute__((const, overloadable))convert_int2(long2 v); |
| 4913 | #endif |
| 4914 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4915 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4916 | /** |
| 4917 | * Component wise conversion from long3 to int3. |
| 4918 | * |
| 4919 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4920 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4921 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4922 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4923 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4924 | */ |
| 4925 | extern int3 __attribute__((const, overloadable))convert_int3(long3 v); |
| 4926 | #endif |
| 4927 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4928 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4929 | /** |
| 4930 | * Component wise conversion from long4 to int4. |
| 4931 | * |
| 4932 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4933 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4934 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4935 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4936 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4937 | */ |
| 4938 | extern int4 __attribute__((const, overloadable))convert_int4(long4 v); |
| 4939 | #endif |
| 4940 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4941 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4942 | /** |
| 4943 | * Component wise conversion from ulong2 to int2. |
| 4944 | * |
| 4945 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4946 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4947 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4948 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4949 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4950 | */ |
| 4951 | extern int2 __attribute__((const, overloadable))convert_int2(ulong2 v); |
| 4952 | #endif |
| 4953 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4954 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4955 | /** |
| 4956 | * Component wise conversion from ulong3 to int3. |
| 4957 | * |
| 4958 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4959 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4960 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4961 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4962 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4963 | */ |
| 4964 | extern int3 __attribute__((const, overloadable))convert_int3(ulong3 v); |
| 4965 | #endif |
| 4966 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4967 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4968 | /** |
| 4969 | * Component wise conversion from ulong4 to int4. |
| 4970 | * |
| 4971 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4972 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4973 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4974 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4975 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4976 | */ |
| 4977 | extern int4 __attribute__((const, overloadable))convert_int4(ulong4 v); |
| 4978 | #endif |
| 4979 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4980 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4981 | /** |
| 4982 | * Component wise conversion from double2 to uint2. |
| 4983 | * |
| 4984 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4985 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4986 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4987 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4988 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 4989 | */ |
| 4990 | extern uint2 __attribute__((const, overloadable))convert_uint2(double2 v); |
| 4991 | #endif |
| 4992 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 4993 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 4994 | /** |
| 4995 | * Component wise conversion from double3 to uint3. |
| 4996 | * |
| 4997 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 4998 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 4999 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5000 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5001 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5002 | */ |
| 5003 | extern uint3 __attribute__((const, overloadable))convert_uint3(double3 v); |
| 5004 | #endif |
| 5005 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5006 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5007 | /** |
| 5008 | * Component wise conversion from double4 to uint4. |
| 5009 | * |
| 5010 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5011 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5012 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5013 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5014 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5015 | */ |
| 5016 | extern uint4 __attribute__((const, overloadable))convert_uint4(double4 v); |
| 5017 | #endif |
| 5018 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5019 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5020 | /** |
| 5021 | * Component wise conversion from long2 to uint2. |
| 5022 | * |
| 5023 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5024 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5025 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5026 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5027 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5028 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 5029 | extern uint2 __attribute__((const, overloadable))convert_uint2(long2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5030 | #endif |
| 5031 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5032 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5033 | /** |
| 5034 | * Component wise conversion from long3 to uint3. |
| 5035 | * |
| 5036 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5037 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5038 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5039 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5040 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5041 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 5042 | extern uint3 __attribute__((const, overloadable))convert_uint3(long3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5043 | #endif |
| 5044 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5045 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5046 | /** |
| 5047 | * Component wise conversion from long4 to uint4. |
| 5048 | * |
| 5049 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5050 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5051 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5052 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5053 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5054 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 5055 | extern uint4 __attribute__((const, overloadable))convert_uint4(long4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5056 | #endif |
| 5057 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5058 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5059 | /** |
| 5060 | * Component wise conversion from ulong2 to uint2. |
| 5061 | * |
| 5062 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5063 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5064 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5065 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5066 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5067 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 5068 | extern uint2 __attribute__((const, overloadable))convert_uint2(ulong2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5069 | #endif |
| 5070 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5071 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5072 | /** |
| 5073 | * Component wise conversion from ulong3 to uint3. |
| 5074 | * |
| 5075 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5076 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5077 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5078 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5079 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5080 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 5081 | extern uint3 __attribute__((const, overloadable))convert_uint3(ulong3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5082 | #endif |
| 5083 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5084 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5085 | /** |
| 5086 | * Component wise conversion from ulong4 to uint4. |
| 5087 | * |
| 5088 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5089 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5090 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5091 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5092 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5093 | */ |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 5094 | extern uint4 __attribute__((const, overloadable))convert_uint4(ulong4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5095 | #endif |
| 5096 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5097 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5098 | /** |
| 5099 | * Component wise conversion from float2 to double2. |
| 5100 | * |
| 5101 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5102 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5103 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5104 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5105 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5106 | */ |
| 5107 | extern double2 __attribute__((const, overloadable))convert_double2(float2 v); |
| 5108 | #endif |
| 5109 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5110 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5111 | /** |
| 5112 | * Component wise conversion from float3 to double3. |
| 5113 | * |
| 5114 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5115 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5116 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5117 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5118 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5119 | */ |
| 5120 | extern double3 __attribute__((const, overloadable))convert_double3(float3 v); |
| 5121 | #endif |
| 5122 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5123 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5124 | /** |
| 5125 | * Component wise conversion from float4 to double4. |
| 5126 | * |
| 5127 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5128 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5129 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5130 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5131 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5132 | */ |
| 5133 | extern double4 __attribute__((const, overloadable))convert_double4(float4 v); |
| 5134 | #endif |
| 5135 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5136 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5137 | /** |
| 5138 | * Component wise conversion from char2 to double2. |
| 5139 | * |
| 5140 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5141 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5142 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5143 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5144 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5145 | */ |
| 5146 | extern double2 __attribute__((const, overloadable))convert_double2(char2 v); |
| 5147 | #endif |
| 5148 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5149 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5150 | /** |
| 5151 | * Component wise conversion from char3 to double3. |
| 5152 | * |
| 5153 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5154 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5155 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5156 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5157 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5158 | */ |
| 5159 | extern double3 __attribute__((const, overloadable))convert_double3(char3 v); |
| 5160 | #endif |
| 5161 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5162 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5163 | /** |
| 5164 | * Component wise conversion from char4 to double4. |
| 5165 | * |
| 5166 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5167 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5168 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5169 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5170 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5171 | */ |
| 5172 | extern double4 __attribute__((const, overloadable))convert_double4(char4 v); |
| 5173 | #endif |
| 5174 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5175 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5176 | /** |
| 5177 | * Component wise conversion from uchar2 to double2. |
| 5178 | * |
| 5179 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5180 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5181 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5182 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5183 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5184 | */ |
| 5185 | extern double2 __attribute__((const, overloadable))convert_double2(uchar2 v); |
| 5186 | #endif |
| 5187 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5188 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5189 | /** |
| 5190 | * Component wise conversion from uchar3 to double3. |
| 5191 | * |
| 5192 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5193 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5194 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5195 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5196 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5197 | */ |
| 5198 | extern double3 __attribute__((const, overloadable))convert_double3(uchar3 v); |
| 5199 | #endif |
| 5200 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5201 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5202 | /** |
| 5203 | * Component wise conversion from uchar4 to double4. |
| 5204 | * |
| 5205 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5206 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5207 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5208 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5209 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5210 | */ |
| 5211 | extern double4 __attribute__((const, overloadable))convert_double4(uchar4 v); |
| 5212 | #endif |
| 5213 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5214 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5215 | /** |
| 5216 | * Component wise conversion from short2 to double2. |
| 5217 | * |
| 5218 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5219 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5220 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5221 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5222 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5223 | */ |
| 5224 | extern double2 __attribute__((const, overloadable))convert_double2(short2 v); |
| 5225 | #endif |
| 5226 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5227 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5228 | /** |
| 5229 | * Component wise conversion from short3 to double3. |
| 5230 | * |
| 5231 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5232 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5233 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5234 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5235 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5236 | */ |
| 5237 | extern double3 __attribute__((const, overloadable))convert_double3(short3 v); |
| 5238 | #endif |
| 5239 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5240 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5241 | /** |
| 5242 | * Component wise conversion from short4 to double4. |
| 5243 | * |
| 5244 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5245 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5246 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5247 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5248 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5249 | */ |
| 5250 | extern double4 __attribute__((const, overloadable))convert_double4(short4 v); |
| 5251 | #endif |
| 5252 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5253 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5254 | /** |
| 5255 | * Component wise conversion from ushort2 to double2. |
| 5256 | * |
| 5257 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5258 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5259 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5260 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5261 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5262 | */ |
| 5263 | extern double2 __attribute__((const, overloadable))convert_double2(ushort2 v); |
| 5264 | #endif |
| 5265 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5266 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5267 | /** |
| 5268 | * Component wise conversion from ushort3 to double3. |
| 5269 | * |
| 5270 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5271 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5272 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5273 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5274 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5275 | */ |
| 5276 | extern double3 __attribute__((const, overloadable))convert_double3(ushort3 v); |
| 5277 | #endif |
| 5278 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5279 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5280 | /** |
| 5281 | * Component wise conversion from ushort4 to double4. |
| 5282 | * |
| 5283 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5284 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5285 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5286 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5287 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5288 | */ |
| 5289 | extern double4 __attribute__((const, overloadable))convert_double4(ushort4 v); |
| 5290 | #endif |
| 5291 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5292 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5293 | /** |
| 5294 | * Component wise conversion from int2 to double2. |
| 5295 | * |
| 5296 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5297 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5298 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5299 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5300 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5301 | */ |
| 5302 | extern double2 __attribute__((const, overloadable))convert_double2(int2 v); |
| 5303 | #endif |
| 5304 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5305 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5306 | /** |
| 5307 | * Component wise conversion from int3 to double3. |
| 5308 | * |
| 5309 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5310 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5311 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5312 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5313 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5314 | */ |
| 5315 | extern double3 __attribute__((const, overloadable))convert_double3(int3 v); |
| 5316 | #endif |
| 5317 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5318 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5319 | /** |
| 5320 | * Component wise conversion from int4 to double4. |
| 5321 | * |
| 5322 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5323 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5324 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5325 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5326 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5327 | */ |
| 5328 | extern double4 __attribute__((const, overloadable))convert_double4(int4 v); |
| 5329 | #endif |
| 5330 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5331 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5332 | /** |
| 5333 | * Component wise conversion from uint2 to double2. |
| 5334 | * |
| 5335 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5336 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5337 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5338 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5339 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5340 | */ |
| 5341 | extern double2 __attribute__((const, overloadable))convert_double2(uint2 v); |
| 5342 | #endif |
| 5343 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5344 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5345 | /** |
| 5346 | * Component wise conversion from uint3 to double3. |
| 5347 | * |
| 5348 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5349 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5350 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5351 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5352 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5353 | */ |
| 5354 | extern double3 __attribute__((const, overloadable))convert_double3(uint3 v); |
| 5355 | #endif |
| 5356 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5357 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5358 | /** |
| 5359 | * Component wise conversion from uint4 to double4. |
| 5360 | * |
| 5361 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5362 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5363 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5364 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5365 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5366 | */ |
| 5367 | extern double4 __attribute__((const, overloadable))convert_double4(uint4 v); |
| 5368 | #endif |
| 5369 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5370 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5371 | /** |
| 5372 | * Component wise conversion from float2 to long2. |
| 5373 | * |
| 5374 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5375 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5376 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5377 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5378 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5379 | */ |
| 5380 | extern long2 __attribute__((const, overloadable))convert_long2(float2 v); |
| 5381 | #endif |
| 5382 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5383 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5384 | /** |
| 5385 | * Component wise conversion from float3 to long3. |
| 5386 | * |
| 5387 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5388 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5389 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5390 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5391 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5392 | */ |
| 5393 | extern long3 __attribute__((const, overloadable))convert_long3(float3 v); |
| 5394 | #endif |
| 5395 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5396 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5397 | /** |
| 5398 | * Component wise conversion from float4 to long4. |
| 5399 | * |
| 5400 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5401 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5402 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5403 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5404 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5405 | */ |
| 5406 | extern long4 __attribute__((const, overloadable))convert_long4(float4 v); |
| 5407 | #endif |
| 5408 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5409 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5410 | /** |
| 5411 | * Component wise conversion from char2 to long2. |
| 5412 | * |
| 5413 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5414 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5415 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5416 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5417 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5418 | */ |
| 5419 | extern long2 __attribute__((const, overloadable))convert_long2(char2 v); |
| 5420 | #endif |
| 5421 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5422 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5423 | /** |
| 5424 | * Component wise conversion from char3 to long3. |
| 5425 | * |
| 5426 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5427 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5428 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5429 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5430 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5431 | */ |
| 5432 | extern long3 __attribute__((const, overloadable))convert_long3(char3 v); |
| 5433 | #endif |
| 5434 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5435 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5436 | /** |
| 5437 | * Component wise conversion from char4 to long4. |
| 5438 | * |
| 5439 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5440 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5441 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5442 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5443 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5444 | */ |
| 5445 | extern long4 __attribute__((const, overloadable))convert_long4(char4 v); |
| 5446 | #endif |
| 5447 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5448 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5449 | /** |
| 5450 | * Component wise conversion from uchar2 to long2. |
| 5451 | * |
| 5452 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5453 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5454 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5455 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5456 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5457 | */ |
| 5458 | extern long2 __attribute__((const, overloadable))convert_long2(uchar2 v); |
| 5459 | #endif |
| 5460 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5461 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5462 | /** |
| 5463 | * Component wise conversion from uchar3 to long3. |
| 5464 | * |
| 5465 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5466 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5467 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5468 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5469 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5470 | */ |
| 5471 | extern long3 __attribute__((const, overloadable))convert_long3(uchar3 v); |
| 5472 | #endif |
| 5473 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5474 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5475 | /** |
| 5476 | * Component wise conversion from uchar4 to long4. |
| 5477 | * |
| 5478 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5479 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5480 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5481 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5482 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5483 | */ |
| 5484 | extern long4 __attribute__((const, overloadable))convert_long4(uchar4 v); |
| 5485 | #endif |
| 5486 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5487 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5488 | /** |
| 5489 | * Component wise conversion from short2 to long2. |
| 5490 | * |
| 5491 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5492 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5493 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5494 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5495 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5496 | */ |
| 5497 | extern long2 __attribute__((const, overloadable))convert_long2(short2 v); |
| 5498 | #endif |
| 5499 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5500 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5501 | /** |
| 5502 | * Component wise conversion from short3 to long3. |
| 5503 | * |
| 5504 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5505 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5506 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5507 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5508 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5509 | */ |
| 5510 | extern long3 __attribute__((const, overloadable))convert_long3(short3 v); |
| 5511 | #endif |
| 5512 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5513 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5514 | /** |
| 5515 | * Component wise conversion from short4 to long4. |
| 5516 | * |
| 5517 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5518 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5519 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5520 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5521 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5522 | */ |
| 5523 | extern long4 __attribute__((const, overloadable))convert_long4(short4 v); |
| 5524 | #endif |
| 5525 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5526 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5527 | /** |
| 5528 | * Component wise conversion from ushort2 to long2. |
| 5529 | * |
| 5530 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5531 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5532 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5533 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5534 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5535 | */ |
| 5536 | extern long2 __attribute__((const, overloadable))convert_long2(ushort2 v); |
| 5537 | #endif |
| 5538 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5539 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5540 | /** |
| 5541 | * Component wise conversion from ushort3 to long3. |
| 5542 | * |
| 5543 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5544 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5545 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5546 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5547 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5548 | */ |
| 5549 | extern long3 __attribute__((const, overloadable))convert_long3(ushort3 v); |
| 5550 | #endif |
| 5551 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5552 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5553 | /** |
| 5554 | * Component wise conversion from ushort4 to long4. |
| 5555 | * |
| 5556 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5557 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5558 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5559 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5560 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5561 | */ |
| 5562 | extern long4 __attribute__((const, overloadable))convert_long4(ushort4 v); |
| 5563 | #endif |
| 5564 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5565 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5566 | /** |
| 5567 | * Component wise conversion from int2 to long2. |
| 5568 | * |
| 5569 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5570 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5571 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5572 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5573 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5574 | */ |
| 5575 | extern long2 __attribute__((const, overloadable))convert_long2(int2 v); |
| 5576 | #endif |
| 5577 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5578 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5579 | /** |
| 5580 | * Component wise conversion from int3 to long3. |
| 5581 | * |
| 5582 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5583 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5584 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5585 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5586 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5587 | */ |
| 5588 | extern long3 __attribute__((const, overloadable))convert_long3(int3 v); |
| 5589 | #endif |
| 5590 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5591 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5592 | /** |
| 5593 | * Component wise conversion from int4 to long4. |
| 5594 | * |
| 5595 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5596 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5597 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5598 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5599 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5600 | */ |
| 5601 | extern long4 __attribute__((const, overloadable))convert_long4(int4 v); |
| 5602 | #endif |
| 5603 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5604 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5605 | /** |
| 5606 | * Component wise conversion from uint2 to long2. |
| 5607 | * |
| 5608 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5609 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5610 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5611 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5612 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5613 | */ |
| 5614 | extern long2 __attribute__((const, overloadable))convert_long2(uint2 v); |
| 5615 | #endif |
| 5616 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5617 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5618 | /** |
| 5619 | * Component wise conversion from uint3 to long3. |
| 5620 | * |
| 5621 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5622 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5623 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5624 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5625 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5626 | */ |
| 5627 | extern long3 __attribute__((const, overloadable))convert_long3(uint3 v); |
| 5628 | #endif |
| 5629 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5630 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5631 | /** |
| 5632 | * Component wise conversion from uint4 to long4. |
| 5633 | * |
| 5634 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5635 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5636 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5637 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5638 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5639 | */ |
| 5640 | extern long4 __attribute__((const, overloadable))convert_long4(uint4 v); |
| 5641 | #endif |
| 5642 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5643 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5644 | /** |
| 5645 | * Component wise conversion from float2 to ulong2. |
| 5646 | * |
| 5647 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5648 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5649 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5650 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5651 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5652 | */ |
| 5653 | extern ulong2 __attribute__((const, overloadable))convert_ulong2(float2 v); |
| 5654 | #endif |
| 5655 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5656 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5657 | /** |
| 5658 | * Component wise conversion from float3 to ulong3. |
| 5659 | * |
| 5660 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5661 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5662 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5663 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5664 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5665 | */ |
| 5666 | extern ulong3 __attribute__((const, overloadable))convert_ulong3(float3 v); |
| 5667 | #endif |
| 5668 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5669 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5670 | /** |
| 5671 | * Component wise conversion from float4 to ulong4. |
| 5672 | * |
| 5673 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5674 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5675 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5676 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5677 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5678 | */ |
| 5679 | extern ulong4 __attribute__((const, overloadable))convert_ulong4(float4 v); |
| 5680 | #endif |
| 5681 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5682 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5683 | /** |
| 5684 | * Component wise conversion from char2 to ulong2. |
| 5685 | * |
| 5686 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5687 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5688 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5689 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5690 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5691 | */ |
| 5692 | extern ulong2 __attribute__((const, overloadable))convert_ulong2(char2 v); |
| 5693 | #endif |
| 5694 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5695 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5696 | /** |
| 5697 | * Component wise conversion from char3 to ulong3. |
| 5698 | * |
| 5699 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5700 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5701 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5702 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5703 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5704 | */ |
| 5705 | extern ulong3 __attribute__((const, overloadable))convert_ulong3(char3 v); |
| 5706 | #endif |
| 5707 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5708 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5709 | /** |
| 5710 | * Component wise conversion from char4 to ulong4. |
| 5711 | * |
| 5712 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5713 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5714 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5715 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5716 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5717 | */ |
| 5718 | extern ulong4 __attribute__((const, overloadable))convert_ulong4(char4 v); |
| 5719 | #endif |
| 5720 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5721 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5722 | /** |
| 5723 | * Component wise conversion from uchar2 to ulong2. |
| 5724 | * |
| 5725 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5726 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5727 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5728 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5729 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5730 | */ |
| 5731 | extern ulong2 __attribute__((const, overloadable))convert_ulong2(uchar2 v); |
| 5732 | #endif |
| 5733 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5734 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5735 | /** |
| 5736 | * Component wise conversion from uchar3 to ulong3. |
| 5737 | * |
| 5738 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5739 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5740 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5741 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5742 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5743 | */ |
| 5744 | extern ulong3 __attribute__((const, overloadable))convert_ulong3(uchar3 v); |
| 5745 | #endif |
| 5746 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5747 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5748 | /** |
| 5749 | * Component wise conversion from uchar4 to ulong4. |
| 5750 | * |
| 5751 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5752 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5753 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5754 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5755 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5756 | */ |
| 5757 | extern ulong4 __attribute__((const, overloadable))convert_ulong4(uchar4 v); |
| 5758 | #endif |
| 5759 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5760 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5761 | /** |
| 5762 | * Component wise conversion from short2 to ulong2. |
| 5763 | * |
| 5764 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5765 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5766 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5767 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5768 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5769 | */ |
| 5770 | extern ulong2 __attribute__((const, overloadable))convert_ulong2(short2 v); |
| 5771 | #endif |
| 5772 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5773 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5774 | /** |
| 5775 | * Component wise conversion from short3 to ulong3. |
| 5776 | * |
| 5777 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5778 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5779 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5780 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5781 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5782 | */ |
| 5783 | extern ulong3 __attribute__((const, overloadable))convert_ulong3(short3 v); |
| 5784 | #endif |
| 5785 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5786 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5787 | /** |
| 5788 | * Component wise conversion from short4 to ulong4. |
| 5789 | * |
| 5790 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5791 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5792 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5793 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5794 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5795 | */ |
| 5796 | extern ulong4 __attribute__((const, overloadable))convert_ulong4(short4 v); |
| 5797 | #endif |
| 5798 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5799 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5800 | /** |
| 5801 | * Component wise conversion from ushort2 to ulong2. |
| 5802 | * |
| 5803 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5804 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5805 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5806 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5807 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5808 | */ |
| 5809 | extern ulong2 __attribute__((const, overloadable))convert_ulong2(ushort2 v); |
| 5810 | #endif |
| 5811 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5812 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5813 | /** |
| 5814 | * Component wise conversion from ushort3 to ulong3. |
| 5815 | * |
| 5816 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5817 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5818 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5819 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5820 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5821 | */ |
| 5822 | extern ulong3 __attribute__((const, overloadable))convert_ulong3(ushort3 v); |
| 5823 | #endif |
| 5824 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5825 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5826 | /** |
| 5827 | * Component wise conversion from ushort4 to ulong4. |
| 5828 | * |
| 5829 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5830 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5831 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5832 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5833 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5834 | */ |
| 5835 | extern ulong4 __attribute__((const, overloadable))convert_ulong4(ushort4 v); |
| 5836 | #endif |
| 5837 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5838 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5839 | /** |
| 5840 | * Component wise conversion from int2 to ulong2. |
| 5841 | * |
| 5842 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5843 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5844 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5845 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5846 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5847 | */ |
| 5848 | extern ulong2 __attribute__((const, overloadable))convert_ulong2(int2 v); |
| 5849 | #endif |
| 5850 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5851 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5852 | /** |
| 5853 | * Component wise conversion from int3 to ulong3. |
| 5854 | * |
| 5855 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5856 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5857 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5858 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5859 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5860 | */ |
| 5861 | extern ulong3 __attribute__((const, overloadable))convert_ulong3(int3 v); |
| 5862 | #endif |
| 5863 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5864 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5865 | /** |
| 5866 | * Component wise conversion from int4 to ulong4. |
| 5867 | * |
| 5868 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5869 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5870 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5871 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5872 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5873 | */ |
| 5874 | extern ulong4 __attribute__((const, overloadable))convert_ulong4(int4 v); |
| 5875 | #endif |
| 5876 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5877 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5878 | /** |
| 5879 | * Component wise conversion from uint2 to ulong2. |
| 5880 | * |
| 5881 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5882 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5883 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5884 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5885 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5886 | */ |
| 5887 | extern ulong2 __attribute__((const, overloadable))convert_ulong2(uint2 v); |
| 5888 | #endif |
| 5889 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5890 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5891 | /** |
| 5892 | * Component wise conversion from uint3 to ulong3. |
| 5893 | * |
| 5894 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5895 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5896 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5897 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5898 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5899 | */ |
| 5900 | extern ulong3 __attribute__((const, overloadable))convert_ulong3(uint3 v); |
| 5901 | #endif |
| 5902 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5903 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5904 | /** |
| 5905 | * Component wise conversion from uint4 to ulong4. |
| 5906 | * |
| 5907 | * For the convert_* functions, conversions of floating point values to integer will truncate. |
| 5908 | * Conversions of numbers too large to fit the destination type yield undefined results. |
| 5909 | * For example, converting a float that contains 1.0e18 to a short is undefined. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5910 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 5911 | * Supported by API versions 21 and newer. |
Jason Sams | 564a400 | 2014-04-29 16:30:41 -0700 | [diff] [blame] | 5912 | */ |
| 5913 | extern ulong4 __attribute__((const, overloadable))convert_ulong4(uint4 v); |
| 5914 | #endif |
| 5915 | |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5916 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5917 | /** |
| 5918 | * Copies the sign from y to x. |
| 5919 | * |
| 5920 | * The value returned is either x or -x. |
| 5921 | * |
| 5922 | * For example, copysign(4.0f, -2.7f) returns -4.0f and copysign(-4.0f, 2.7f) returns 4.0f. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5923 | * |
| 5924 | * Supported by API versions 9 and newer. |
| 5925 | */ |
| 5926 | extern float __attribute__((const, overloadable))copysign(float x, float y); |
| 5927 | #endif |
| 5928 | |
| 5929 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5930 | /** |
| 5931 | * Copies the sign from y to x. |
| 5932 | * |
| 5933 | * The value returned is either x or -x. |
| 5934 | * |
| 5935 | * For example, copysign(4.0f, -2.7f) returns -4.0f and copysign(-4.0f, 2.7f) returns 4.0f. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5936 | * |
| 5937 | * Supported by API versions 9 and newer. |
| 5938 | */ |
| 5939 | extern float2 __attribute__((const, overloadable))copysign(float2 x, float2 y); |
| 5940 | #endif |
| 5941 | |
| 5942 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5943 | /** |
| 5944 | * Copies the sign from y to x. |
| 5945 | * |
| 5946 | * The value returned is either x or -x. |
| 5947 | * |
| 5948 | * For example, copysign(4.0f, -2.7f) returns -4.0f and copysign(-4.0f, 2.7f) returns 4.0f. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5949 | * |
| 5950 | * Supported by API versions 9 and newer. |
| 5951 | */ |
| 5952 | extern float3 __attribute__((const, overloadable))copysign(float3 x, float3 y); |
| 5953 | #endif |
| 5954 | |
| 5955 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5956 | /** |
| 5957 | * Copies the sign from y to x. |
| 5958 | * |
| 5959 | * The value returned is either x or -x. |
| 5960 | * |
| 5961 | * For example, copysign(4.0f, -2.7f) returns -4.0f and copysign(-4.0f, 2.7f) returns 4.0f. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5962 | * |
| 5963 | * Supported by API versions 9 and newer. |
| 5964 | */ |
| 5965 | extern float4 __attribute__((const, overloadable))copysign(float4 x, float4 y); |
| 5966 | #endif |
| 5967 | |
| 5968 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5969 | /** |
| 5970 | * Returns the cosine of an angle measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5971 | * |
| 5972 | * Supported by API versions 9 and newer. |
| 5973 | */ |
| 5974 | extern float __attribute__((const, overloadable))cos(float); |
| 5975 | #endif |
| 5976 | |
| 5977 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5978 | /** |
| 5979 | * Returns the cosine of an angle measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5980 | * |
| 5981 | * Supported by API versions 9 and newer. |
| 5982 | */ |
| 5983 | extern float2 __attribute__((const, overloadable))cos(float2); |
| 5984 | #endif |
| 5985 | |
| 5986 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5987 | /** |
| 5988 | * Returns the cosine of an angle measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5989 | * |
| 5990 | * Supported by API versions 9 and newer. |
| 5991 | */ |
| 5992 | extern float3 __attribute__((const, overloadable))cos(float3); |
| 5993 | #endif |
| 5994 | |
| 5995 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 5996 | /** |
| 5997 | * Returns the cosine of an angle measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 5998 | * |
| 5999 | * Supported by API versions 9 and newer. |
| 6000 | */ |
| 6001 | extern float4 __attribute__((const, overloadable))cos(float4); |
| 6002 | #endif |
| 6003 | |
| 6004 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6005 | /** |
| 6006 | * Returns the hypebolic cosine of x, where x is measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6007 | * |
| 6008 | * Supported by API versions 9 and newer. |
| 6009 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6010 | extern float __attribute__((const, overloadable))cosh(float x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6011 | #endif |
| 6012 | |
| 6013 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6014 | /** |
| 6015 | * Returns the hypebolic cosine of x, where x is measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6016 | * |
| 6017 | * Supported by API versions 9 and newer. |
| 6018 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6019 | extern float2 __attribute__((const, overloadable))cosh(float2 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6020 | #endif |
| 6021 | |
| 6022 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6023 | /** |
| 6024 | * Returns the hypebolic cosine of x, where x is measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6025 | * |
| 6026 | * Supported by API versions 9 and newer. |
| 6027 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6028 | extern float3 __attribute__((const, overloadable))cosh(float3 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6029 | #endif |
| 6030 | |
| 6031 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6032 | /** |
| 6033 | * Returns the hypebolic cosine of x, where x is measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6034 | * |
| 6035 | * Supported by API versions 9 and newer. |
| 6036 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6037 | extern float4 __attribute__((const, overloadable))cosh(float4 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6038 | #endif |
| 6039 | |
| 6040 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6041 | /** |
| 6042 | * Returns the cosine of (x * pi), where (x * pi) is measured in radians. |
| 6043 | * |
| 6044 | * To get the cosine of a value measured in degrees, call cospi(a / 180.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6045 | * |
| 6046 | * Supported by API versions 9 and newer. |
| 6047 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6048 | extern float __attribute__((const, overloadable))cospi(float x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6049 | #endif |
| 6050 | |
| 6051 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6052 | /** |
| 6053 | * Returns the cosine of (x * pi), where (x * pi) is measured in radians. |
| 6054 | * |
| 6055 | * To get the cosine of a value measured in degrees, call cospi(a / 180.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6056 | * |
| 6057 | * Supported by API versions 9 and newer. |
| 6058 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6059 | extern float2 __attribute__((const, overloadable))cospi(float2 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6060 | #endif |
| 6061 | |
| 6062 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6063 | /** |
| 6064 | * Returns the cosine of (x * pi), where (x * pi) is measured in radians. |
| 6065 | * |
| 6066 | * To get the cosine of a value measured in degrees, call cospi(a / 180.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6067 | * |
| 6068 | * Supported by API versions 9 and newer. |
| 6069 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6070 | extern float3 __attribute__((const, overloadable))cospi(float3 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6071 | #endif |
| 6072 | |
| 6073 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6074 | /** |
| 6075 | * Returns the cosine of (x * pi), where (x * pi) is measured in radians. |
| 6076 | * |
| 6077 | * To get the cosine of a value measured in degrees, call cospi(a / 180.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6078 | * |
| 6079 | * Supported by API versions 9 and newer. |
| 6080 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6081 | extern float4 __attribute__((const, overloadable))cospi(float4 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6082 | #endif |
| 6083 | |
| 6084 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6085 | /** |
| 6086 | * Computes the cross product of two vectors. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6087 | * |
| 6088 | * Supported by API versions 9 and newer. |
| 6089 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6090 | extern float3 __attribute__((const, overloadable))cross(float3 lhs, float3 rhs); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6091 | #endif |
| 6092 | |
| 6093 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6094 | /** |
| 6095 | * Computes the cross product of two vectors. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6096 | * |
| 6097 | * Supported by API versions 9 and newer. |
| 6098 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6099 | extern float4 __attribute__((const, overloadable))cross(float4 lhs, float4 rhs); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6100 | #endif |
| 6101 | |
| 6102 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6103 | /** |
| 6104 | * Converts from radians to degrees. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6105 | * |
| 6106 | * Supported by API versions 9 and newer. |
| 6107 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6108 | extern float __attribute__((const, overloadable))degrees(float value); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6109 | #endif |
| 6110 | |
| 6111 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6112 | /** |
| 6113 | * Converts from radians to degrees. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6114 | * |
| 6115 | * Supported by API versions 9 and newer. |
| 6116 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6117 | extern float2 __attribute__((const, overloadable))degrees(float2 value); |
| 6118 | #endif |
| 6119 | |
| 6120 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6121 | /** |
| 6122 | * Converts from radians to degrees. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6123 | * |
| 6124 | * Supported by API versions 9 and newer. |
| 6125 | */ |
| 6126 | extern float3 __attribute__((const, overloadable))degrees(float3 value); |
| 6127 | #endif |
| 6128 | |
| 6129 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6130 | /** |
| 6131 | * Converts from radians to degrees. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6132 | * |
| 6133 | * Supported by API versions 9 and newer. |
| 6134 | */ |
| 6135 | extern float4 __attribute__((const, overloadable))degrees(float4 value); |
| 6136 | #endif |
| 6137 | |
| 6138 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6139 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6140 | * Compute the distance between two points. |
| 6141 | * |
| 6142 | * Supported by API versions 9 and newer. |
| 6143 | */ |
| 6144 | extern float __attribute__((const, overloadable))distance(float lhs, float rhs); |
| 6145 | #endif |
| 6146 | |
| 6147 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6148 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6149 | * Compute the distance between two points. |
| 6150 | * |
| 6151 | * Supported by API versions 9 and newer. |
| 6152 | */ |
| 6153 | extern float __attribute__((const, overloadable))distance(float2 lhs, float2 rhs); |
| 6154 | #endif |
| 6155 | |
| 6156 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6157 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6158 | * Compute the distance between two points. |
| 6159 | * |
| 6160 | * Supported by API versions 9 and newer. |
| 6161 | */ |
| 6162 | extern float __attribute__((const, overloadable))distance(float3 lhs, float3 rhs); |
| 6163 | #endif |
| 6164 | |
| 6165 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6166 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6167 | * Compute the distance between two points. |
| 6168 | * |
| 6169 | * Supported by API versions 9 and newer. |
| 6170 | */ |
| 6171 | extern float __attribute__((const, overloadable))distance(float4 lhs, float4 rhs); |
| 6172 | #endif |
| 6173 | |
| 6174 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6175 | /** |
| 6176 | * Computes the dot product of two vectors. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6177 | * |
| 6178 | * Supported by API versions 9 and newer. |
| 6179 | */ |
| 6180 | extern float __attribute__((const, overloadable))dot(float lhs, float rhs); |
| 6181 | #endif |
| 6182 | |
| 6183 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6184 | /** |
| 6185 | * Computes the dot product of two vectors. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6186 | * |
| 6187 | * Supported by API versions 9 and newer. |
| 6188 | */ |
| 6189 | extern float __attribute__((const, overloadable))dot(float2 lhs, float2 rhs); |
| 6190 | #endif |
| 6191 | |
| 6192 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6193 | /** |
| 6194 | * Computes the dot product of two vectors. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6195 | * |
| 6196 | * Supported by API versions 9 and newer. |
| 6197 | */ |
| 6198 | extern float __attribute__((const, overloadable))dot(float3 lhs, float3 rhs); |
| 6199 | #endif |
| 6200 | |
| 6201 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6202 | /** |
| 6203 | * Computes the dot product of two vectors. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6204 | * |
| 6205 | * Supported by API versions 9 and newer. |
| 6206 | */ |
| 6207 | extern float __attribute__((const, overloadable))dot(float4 lhs, float4 rhs); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6208 | #endif |
| 6209 | |
| 6210 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6211 | /** |
| 6212 | * Returns the error function. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6213 | * |
| 6214 | * Supported by API versions 9 and newer. |
| 6215 | */ |
| 6216 | extern float __attribute__((const, overloadable))erf(float); |
| 6217 | #endif |
| 6218 | |
| 6219 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6220 | /** |
| 6221 | * Returns the error function. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6222 | * |
| 6223 | * Supported by API versions 9 and newer. |
| 6224 | */ |
| 6225 | extern float2 __attribute__((const, overloadable))erf(float2); |
| 6226 | #endif |
| 6227 | |
| 6228 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6229 | /** |
| 6230 | * Returns the error function. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6231 | * |
| 6232 | * Supported by API versions 9 and newer. |
| 6233 | */ |
| 6234 | extern float3 __attribute__((const, overloadable))erf(float3); |
| 6235 | #endif |
| 6236 | |
| 6237 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6238 | /** |
| 6239 | * Returns the error function. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6240 | * |
| 6241 | * Supported by API versions 9 and newer. |
| 6242 | */ |
| 6243 | extern float4 __attribute__((const, overloadable))erf(float4); |
| 6244 | #endif |
| 6245 | |
| 6246 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6247 | /** |
| 6248 | * Returns the complementary error function. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6249 | * |
| 6250 | * Supported by API versions 9 and newer. |
| 6251 | */ |
| 6252 | extern float __attribute__((const, overloadable))erfc(float); |
| 6253 | #endif |
| 6254 | |
| 6255 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6256 | /** |
| 6257 | * Returns the complementary error function. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6258 | * |
| 6259 | * Supported by API versions 9 and newer. |
| 6260 | */ |
| 6261 | extern float2 __attribute__((const, overloadable))erfc(float2); |
| 6262 | #endif |
| 6263 | |
| 6264 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6265 | /** |
| 6266 | * Returns the complementary error function. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6267 | * |
| 6268 | * Supported by API versions 9 and newer. |
| 6269 | */ |
| 6270 | extern float3 __attribute__((const, overloadable))erfc(float3); |
| 6271 | #endif |
| 6272 | |
| 6273 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6274 | /** |
| 6275 | * Returns the complementary error function. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6276 | * |
| 6277 | * Supported by API versions 9 and newer. |
| 6278 | */ |
| 6279 | extern float4 __attribute__((const, overloadable))erfc(float4); |
| 6280 | #endif |
| 6281 | |
| 6282 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6283 | /** |
| 6284 | * Returns e raised to x, i.e. e ^ x. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6285 | * |
| 6286 | * Supported by API versions 9 and newer. |
| 6287 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6288 | extern float __attribute__((const, overloadable))exp(float x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6289 | #endif |
| 6290 | |
| 6291 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6292 | /** |
| 6293 | * Returns e raised to x, i.e. e ^ x. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6294 | * |
| 6295 | * Supported by API versions 9 and newer. |
| 6296 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6297 | extern float2 __attribute__((const, overloadable))exp(float2 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6298 | #endif |
| 6299 | |
| 6300 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6301 | /** |
| 6302 | * Returns e raised to x, i.e. e ^ x. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6303 | * |
| 6304 | * Supported by API versions 9 and newer. |
| 6305 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6306 | extern float3 __attribute__((const, overloadable))exp(float3 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6307 | #endif |
| 6308 | |
| 6309 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6310 | /** |
| 6311 | * Returns e raised to x, i.e. e ^ x. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6312 | * |
| 6313 | * Supported by API versions 9 and newer. |
| 6314 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6315 | extern float4 __attribute__((const, overloadable))exp(float4 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6316 | #endif |
| 6317 | |
| 6318 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6319 | /** |
| 6320 | * Returns 10 raised to x, i.e. 10.f ^ x. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6321 | * |
| 6322 | * Supported by API versions 9 and newer. |
| 6323 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6324 | extern float __attribute__((const, overloadable))exp10(float x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6325 | #endif |
| 6326 | |
| 6327 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6328 | /** |
| 6329 | * Returns 10 raised to x, i.e. 10.f ^ x. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6330 | * |
| 6331 | * Supported by API versions 9 and newer. |
| 6332 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6333 | extern float2 __attribute__((const, overloadable))exp10(float2 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6334 | #endif |
| 6335 | |
| 6336 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6337 | /** |
| 6338 | * Returns 10 raised to x, i.e. 10.f ^ x. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6339 | * |
| 6340 | * Supported by API versions 9 and newer. |
| 6341 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6342 | extern float3 __attribute__((const, overloadable))exp10(float3 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6343 | #endif |
| 6344 | |
| 6345 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6346 | /** |
| 6347 | * Returns 10 raised to x, i.e. 10.f ^ x. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6348 | * |
| 6349 | * Supported by API versions 9 and newer. |
| 6350 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6351 | extern float4 __attribute__((const, overloadable))exp10(float4 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6352 | #endif |
| 6353 | |
| 6354 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6355 | /** |
| 6356 | * Returns 2 raised to x, i.e. 2.f ^ x. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6357 | * |
| 6358 | * Supported by API versions 9 and newer. |
| 6359 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6360 | extern float __attribute__((const, overloadable))exp2(float x); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6361 | #endif |
| 6362 | |
| 6363 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6364 | /** |
| 6365 | * Returns 2 raised to x, i.e. 2.f ^ x. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6366 | * |
| 6367 | * Supported by API versions 9 and newer. |
| 6368 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6369 | extern float2 __attribute__((const, overloadable))exp2(float2 x); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6370 | #endif |
| 6371 | |
| 6372 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6373 | /** |
| 6374 | * Returns 2 raised to x, i.e. 2.f ^ x. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6375 | * |
| 6376 | * Supported by API versions 9 and newer. |
| 6377 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6378 | extern float3 __attribute__((const, overloadable))exp2(float3 x); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6379 | #endif |
| 6380 | |
| 6381 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6382 | /** |
| 6383 | * Returns 2 raised to x, i.e. 2.f ^ x. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6384 | * |
| 6385 | * Supported by API versions 9 and newer. |
| 6386 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6387 | extern float4 __attribute__((const, overloadable))exp2(float4 x); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6388 | #endif |
| 6389 | |
| 6390 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6391 | /** |
| 6392 | * Returns e raised to x minus 1, i.e. (e ^ x) - 1. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6393 | * |
| 6394 | * Supported by API versions 9 and newer. |
| 6395 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6396 | extern float __attribute__((const, overloadable))expm1(float x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6397 | #endif |
| 6398 | |
| 6399 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6400 | /** |
| 6401 | * Returns e raised to x minus 1, i.e. (e ^ x) - 1. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6402 | * |
| 6403 | * Supported by API versions 9 and newer. |
| 6404 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6405 | extern float2 __attribute__((const, overloadable))expm1(float2 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6406 | #endif |
| 6407 | |
| 6408 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6409 | /** |
| 6410 | * Returns e raised to x minus 1, i.e. (e ^ x) - 1. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6411 | * |
| 6412 | * Supported by API versions 9 and newer. |
| 6413 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6414 | extern float3 __attribute__((const, overloadable))expm1(float3 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6415 | #endif |
| 6416 | |
| 6417 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6418 | /** |
| 6419 | * Returns e raised to x minus 1, i.e. (e ^ x) - 1. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6420 | * |
| 6421 | * Supported by API versions 9 and newer. |
| 6422 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6423 | extern float4 __attribute__((const, overloadable))expm1(float4 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6424 | #endif |
| 6425 | |
| 6426 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6427 | /** |
| 6428 | * Returns the absolute value of the float x. |
| 6429 | * |
| 6430 | * For integers, use abs(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6431 | * |
| 6432 | * Supported by API versions 9 and newer. |
| 6433 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6434 | extern float __attribute__((const, overloadable))fabs(float x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6435 | #endif |
| 6436 | |
| 6437 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6438 | /** |
| 6439 | * Returns the absolute value of the float x. |
| 6440 | * |
| 6441 | * For integers, use abs(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6442 | * |
| 6443 | * Supported by API versions 9 and newer. |
| 6444 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6445 | extern float2 __attribute__((const, overloadable))fabs(float2 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6446 | #endif |
| 6447 | |
| 6448 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6449 | /** |
| 6450 | * Returns the absolute value of the float x. |
| 6451 | * |
| 6452 | * For integers, use abs(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6453 | * |
| 6454 | * Supported by API versions 9 and newer. |
| 6455 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6456 | extern float3 __attribute__((const, overloadable))fabs(float3 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6457 | #endif |
| 6458 | |
| 6459 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6460 | /** |
| 6461 | * Returns the absolute value of the float x. |
| 6462 | * |
| 6463 | * For integers, use abs(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6464 | * |
| 6465 | * Supported by API versions 9 and newer. |
| 6466 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6467 | extern float4 __attribute__((const, overloadable))fabs(float4 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6468 | #endif |
| 6469 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6470 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6471 | /** |
| 6472 | * Computes the approximate distance between two points. |
| 6473 | * |
| 6474 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6475 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6476 | * Supported by API versions 17 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6477 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6478 | extern float __attribute__((const, overloadable))fast_distance(float lhs, float rhs); |
| 6479 | #endif |
| 6480 | |
| 6481 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6482 | /** |
| 6483 | * Computes the approximate distance between two points. |
| 6484 | * |
| 6485 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6486 | * |
| 6487 | * Supported by API versions 17 and newer. |
| 6488 | */ |
| 6489 | extern float __attribute__((const, overloadable))fast_distance(float2 lhs, float2 rhs); |
| 6490 | #endif |
| 6491 | |
| 6492 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6493 | /** |
| 6494 | * Computes the approximate distance between two points. |
| 6495 | * |
| 6496 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6497 | * |
| 6498 | * Supported by API versions 17 and newer. |
| 6499 | */ |
| 6500 | extern float __attribute__((const, overloadable))fast_distance(float3 lhs, float3 rhs); |
| 6501 | #endif |
| 6502 | |
| 6503 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6504 | /** |
| 6505 | * Computes the approximate distance between two points. |
| 6506 | * |
| 6507 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6508 | * |
| 6509 | * Supported by API versions 17 and newer. |
| 6510 | */ |
| 6511 | extern float __attribute__((const, overloadable))fast_distance(float4 lhs, float4 rhs); |
| 6512 | #endif |
| 6513 | |
| 6514 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6515 | /** |
| 6516 | * Computes the approximate length of a vector. |
| 6517 | * |
| 6518 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6519 | * |
| 6520 | * Supported by API versions 17 and newer. |
| 6521 | */ |
| 6522 | extern float __attribute__((const, overloadable))fast_length(float v); |
| 6523 | #endif |
| 6524 | |
| 6525 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6526 | /** |
| 6527 | * Computes the approximate length of a vector. |
| 6528 | * |
| 6529 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6530 | * |
| 6531 | * Supported by API versions 17 and newer. |
| 6532 | */ |
| 6533 | extern float __attribute__((const, overloadable))fast_length(float2 v); |
| 6534 | #endif |
| 6535 | |
| 6536 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6537 | /** |
| 6538 | * Computes the approximate length of a vector. |
| 6539 | * |
| 6540 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6541 | * |
| 6542 | * Supported by API versions 17 and newer. |
| 6543 | */ |
| 6544 | extern float __attribute__((const, overloadable))fast_length(float3 v); |
| 6545 | #endif |
| 6546 | |
| 6547 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6548 | /** |
| 6549 | * Computes the approximate length of a vector. |
| 6550 | * |
| 6551 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6552 | * |
| 6553 | * Supported by API versions 17 and newer. |
| 6554 | */ |
| 6555 | extern float __attribute__((const, overloadable))fast_length(float4 v); |
| 6556 | #endif |
| 6557 | |
| 6558 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6559 | /** |
| 6560 | * Approximately normalizes a vector. |
| 6561 | * |
| 6562 | * For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for positive values. |
| 6563 | * |
| 6564 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6565 | * |
| 6566 | * Supported by API versions 17 and newer. |
| 6567 | */ |
| 6568 | extern float __attribute__((const, overloadable))fast_normalize(float v); |
| 6569 | #endif |
| 6570 | |
| 6571 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6572 | /** |
| 6573 | * Approximately normalizes a vector. |
| 6574 | * |
| 6575 | * For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for positive values. |
| 6576 | * |
| 6577 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6578 | * |
| 6579 | * Supported by API versions 17 and newer. |
| 6580 | */ |
| 6581 | extern float2 __attribute__((const, overloadable))fast_normalize(float2 v); |
| 6582 | #endif |
| 6583 | |
| 6584 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6585 | /** |
| 6586 | * Approximately normalizes a vector. |
| 6587 | * |
| 6588 | * For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for positive values. |
| 6589 | * |
| 6590 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6591 | * |
| 6592 | * Supported by API versions 17 and newer. |
| 6593 | */ |
| 6594 | extern float3 __attribute__((const, overloadable))fast_normalize(float3 v); |
| 6595 | #endif |
| 6596 | |
| 6597 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6598 | /** |
| 6599 | * Approximately normalizes a vector. |
| 6600 | * |
| 6601 | * For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for positive values. |
| 6602 | * |
| 6603 | * The precision is what would be expected from doing the computation using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6604 | * |
| 6605 | * Supported by API versions 17 and newer. |
| 6606 | */ |
| 6607 | extern float4 __attribute__((const, overloadable))fast_normalize(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6608 | #endif |
| 6609 | |
| 6610 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6611 | /** |
| 6612 | * Returns the positive difference between two values. |
| 6613 | * |
| 6614 | * If a > b, returns (a - b) otherwise returns 0f. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6615 | * |
| 6616 | * Supported by API versions 9 and newer. |
| 6617 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6618 | extern float __attribute__((const, overloadable))fdim(float a, float b); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6619 | #endif |
| 6620 | |
| 6621 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6622 | /** |
| 6623 | * Returns the positive difference between two values. |
| 6624 | * |
| 6625 | * If a > b, returns (a - b) otherwise returns 0f. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6626 | * |
| 6627 | * Supported by API versions 9 and newer. |
| 6628 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6629 | extern float2 __attribute__((const, overloadable))fdim(float2 a, float2 b); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6630 | #endif |
| 6631 | |
| 6632 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6633 | /** |
| 6634 | * Returns the positive difference between two values. |
| 6635 | * |
| 6636 | * If a > b, returns (a - b) otherwise returns 0f. |
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))fdim(float3 a, float3 b); |
| 6641 | #endif |
| 6642 | |
| 6643 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6644 | /** |
| 6645 | * Returns the positive difference between two values. |
| 6646 | * |
| 6647 | * If a > b, returns (a - b) otherwise returns 0f. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 6648 | * |
| 6649 | * Supported by API versions 9 and newer. |
| 6650 | */ |
| 6651 | extern float4 __attribute__((const, overloadable))fdim(float4 a, float4 b); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6652 | #endif |
| 6653 | |
| 6654 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6655 | /** |
| 6656 | * Returns the smallest integer not greater than a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6657 | * |
| 6658 | * Supported by API versions 9 and newer. |
| 6659 | */ |
| 6660 | extern float __attribute__((const, overloadable))floor(float); |
| 6661 | #endif |
| 6662 | |
| 6663 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6664 | /** |
| 6665 | * Returns the smallest integer not greater than a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6666 | * |
| 6667 | * Supported by API versions 9 and newer. |
| 6668 | */ |
| 6669 | extern float2 __attribute__((const, overloadable))floor(float2); |
| 6670 | #endif |
| 6671 | |
| 6672 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6673 | /** |
| 6674 | * Returns the smallest integer not greater than a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6675 | * |
| 6676 | * Supported by API versions 9 and newer. |
| 6677 | */ |
| 6678 | extern float3 __attribute__((const, overloadable))floor(float3); |
| 6679 | #endif |
| 6680 | |
| 6681 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6682 | /** |
| 6683 | * Returns the smallest integer not greater than a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6684 | * |
| 6685 | * Supported by API versions 9 and newer. |
| 6686 | */ |
| 6687 | extern float4 __attribute__((const, overloadable))floor(float4); |
| 6688 | #endif |
| 6689 | |
| 6690 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6691 | /** |
| 6692 | * Multiply and add. Returns (a * b) + c. |
| 6693 | * |
| 6694 | * This function is identical to mad(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6695 | * |
| 6696 | * Supported by API versions 9 and newer. |
| 6697 | */ |
| 6698 | extern float __attribute__((const, overloadable))fma(float a, float b, float c); |
| 6699 | #endif |
| 6700 | |
| 6701 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6702 | /** |
| 6703 | * Multiply and add. Returns (a * b) + c. |
| 6704 | * |
| 6705 | * This function is identical to mad(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6706 | * |
| 6707 | * Supported by API versions 9 and newer. |
| 6708 | */ |
| 6709 | extern float2 __attribute__((const, overloadable))fma(float2 a, float2 b, float2 c); |
| 6710 | #endif |
| 6711 | |
| 6712 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6713 | /** |
| 6714 | * Multiply and add. Returns (a * b) + c. |
| 6715 | * |
| 6716 | * This function is identical to mad(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6717 | * |
| 6718 | * Supported by API versions 9 and newer. |
| 6719 | */ |
| 6720 | extern float3 __attribute__((const, overloadable))fma(float3 a, float3 b, float3 c); |
| 6721 | #endif |
| 6722 | |
| 6723 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6724 | /** |
| 6725 | * Multiply and add. Returns (a * b) + c. |
| 6726 | * |
| 6727 | * This function is identical to mad(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6728 | * |
| 6729 | * Supported by API versions 9 and newer. |
| 6730 | */ |
| 6731 | extern float4 __attribute__((const, overloadable))fma(float4 a, float4 b, float4 c); |
| 6732 | #endif |
| 6733 | |
| 6734 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6735 | /** |
| 6736 | * Returns the maximum of x and y, i.e. (x < y ? y : x). |
| 6737 | * |
| 6738 | * The max() function returns identical results but can be applied to more data types. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6739 | * |
| 6740 | * Supported by API versions 9 and newer. |
| 6741 | */ |
| 6742 | extern float __attribute__((const, overloadable))fmax(float x, float y); |
| 6743 | #endif |
| 6744 | |
| 6745 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6746 | /** |
| 6747 | * Returns the maximum of x and y, i.e. (x < y ? y : x). |
| 6748 | * |
| 6749 | * The max() function returns identical results but can be applied to more data types. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6750 | * |
| 6751 | * Supported by API versions 9 and newer. |
| 6752 | */ |
| 6753 | extern float2 __attribute__((const, overloadable))fmax(float2 x, float2 y); |
| 6754 | #endif |
| 6755 | |
| 6756 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6757 | /** |
| 6758 | * Returns the maximum of x and y, i.e. (x < y ? y : x). |
| 6759 | * |
| 6760 | * The max() function returns identical results but can be applied to more data types. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6761 | * |
| 6762 | * Supported by API versions 9 and newer. |
| 6763 | */ |
| 6764 | extern float3 __attribute__((const, overloadable))fmax(float3 x, float3 y); |
| 6765 | #endif |
| 6766 | |
| 6767 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6768 | /** |
| 6769 | * Returns the maximum of x and y, i.e. (x < y ? y : x). |
| 6770 | * |
| 6771 | * The max() function returns identical results but can be applied to more data types. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6772 | * |
| 6773 | * Supported by API versions 9 and newer. |
| 6774 | */ |
| 6775 | extern float4 __attribute__((const, overloadable))fmax(float4 x, float4 y); |
| 6776 | #endif |
| 6777 | |
| 6778 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6779 | /** |
| 6780 | * Returns the maximum of x and y, i.e. (x < y ? y : x). |
| 6781 | * |
| 6782 | * Unlike the other variants of fmax() and max(), this function compare each element of x to the scalar y. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6783 | * |
| 6784 | * Supported by API versions 9 and newer. |
| 6785 | */ |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6786 | extern float2 __attribute__((const, overloadable))fmax(float2 x, float y); |
| 6787 | #endif |
| 6788 | |
| 6789 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6790 | /** |
| 6791 | * Returns the maximum of x and y, i.e. (x < y ? y : x). |
| 6792 | * |
| 6793 | * Unlike the other variants of fmax() and max(), this function compare each element of x to the scalar y. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6794 | * |
| 6795 | * Supported by API versions 9 and newer. |
| 6796 | */ |
| 6797 | extern float3 __attribute__((const, overloadable))fmax(float3 x, float y); |
| 6798 | #endif |
| 6799 | |
| 6800 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6801 | /** |
| 6802 | * Returns the maximum of x and y, i.e. (x < y ? y : x). |
| 6803 | * |
| 6804 | * Unlike the other variants of fmax() and max(), this function compare each element of x to the scalar y. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6805 | * |
| 6806 | * Supported by API versions 9 and newer. |
| 6807 | */ |
| 6808 | extern float4 __attribute__((const, overloadable))fmax(float4 x, float y); |
| 6809 | #endif |
| 6810 | |
| 6811 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6812 | /** |
| 6813 | * Returns the minimum of x and y, i.e. (x > y ? y : x). |
| 6814 | * |
| 6815 | * The min() function returns identical results but can be applied to more data types. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6816 | * |
| 6817 | * Supported by API versions 9 and newer. |
| 6818 | */ |
| 6819 | extern float __attribute__((const, overloadable))fmin(float x, float y); |
| 6820 | #endif |
| 6821 | |
| 6822 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6823 | /** |
| 6824 | * Returns the minimum of x and y, i.e. (x > y ? y : x). |
| 6825 | * |
| 6826 | * The min() function returns identical results but can be applied to more data types. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6827 | * |
| 6828 | * Supported by API versions 9 and newer. |
| 6829 | */ |
| 6830 | extern float2 __attribute__((const, overloadable))fmin(float2 x, float2 y); |
| 6831 | #endif |
| 6832 | |
| 6833 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6834 | /** |
| 6835 | * Returns the minimum of x and y, i.e. (x > y ? y : x). |
| 6836 | * |
| 6837 | * The min() function returns identical results but can be applied to more data types. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6838 | * |
| 6839 | * Supported by API versions 9 and newer. |
| 6840 | */ |
| 6841 | extern float3 __attribute__((const, overloadable))fmin(float3 x, float3 y); |
| 6842 | #endif |
| 6843 | |
| 6844 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6845 | /** |
| 6846 | * Returns the minimum of x and y, i.e. (x > y ? y : x). |
| 6847 | * |
| 6848 | * The min() function returns identical results but can be applied to more data types. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6849 | * |
| 6850 | * Supported by API versions 9 and newer. |
| 6851 | */ |
| 6852 | extern float4 __attribute__((const, overloadable))fmin(float4 x, float4 y); |
| 6853 | #endif |
| 6854 | |
| 6855 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6856 | /** |
| 6857 | * Returns the minimum of x and y, i.e. (x > y ? y : x) |
| 6858 | * |
| 6859 | * Unlike the other variants of fmin() and min(), this function compare each element of x to the scalar y. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6860 | * |
| 6861 | * Supported by API versions 9 and newer. |
| 6862 | */ |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6863 | extern float2 __attribute__((const, overloadable))fmin(float2 x, float y); |
| 6864 | #endif |
| 6865 | |
| 6866 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6867 | /** |
| 6868 | * Returns the minimum of x and y, i.e. (x > y ? y : x) |
| 6869 | * |
| 6870 | * Unlike the other variants of fmin() and min(), this function compare each element of x to the scalar y. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6871 | * |
| 6872 | * Supported by API versions 9 and newer. |
| 6873 | */ |
| 6874 | extern float3 __attribute__((const, overloadable))fmin(float3 x, float y); |
| 6875 | #endif |
| 6876 | |
| 6877 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6878 | /** |
| 6879 | * Returns the minimum of x and y, i.e. (x > y ? y : x) |
| 6880 | * |
| 6881 | * Unlike the other variants of fmin() and min(), this function compare each element of x to the scalar y. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6882 | * |
| 6883 | * Supported by API versions 9 and newer. |
| 6884 | */ |
| 6885 | extern float4 __attribute__((const, overloadable))fmin(float4 x, float y); |
| 6886 | #endif |
| 6887 | |
| 6888 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6889 | /** |
| 6890 | * Returns the remainder of x / y, where the quotient is rounded towards zero. |
| 6891 | * |
| 6892 | * The function remainder() is similar but rounds toward the closest interger. |
| 6893 | * For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) |
| 6894 | * while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6895 | * |
| 6896 | * Supported by API versions 9 and newer. |
| 6897 | */ |
| 6898 | extern float __attribute__((const, overloadable))fmod(float x, float y); |
| 6899 | #endif |
| 6900 | |
| 6901 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6902 | /** |
| 6903 | * Returns the remainder of x / y, where the quotient is rounded towards zero. |
| 6904 | * |
| 6905 | * The function remainder() is similar but rounds toward the closest interger. |
| 6906 | * For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) |
| 6907 | * while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6908 | * |
| 6909 | * Supported by API versions 9 and newer. |
| 6910 | */ |
| 6911 | extern float2 __attribute__((const, overloadable))fmod(float2 x, float2 y); |
| 6912 | #endif |
| 6913 | |
| 6914 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6915 | /** |
| 6916 | * Returns the remainder of x / y, where the quotient is rounded towards zero. |
| 6917 | * |
| 6918 | * The function remainder() is similar but rounds toward the closest interger. |
| 6919 | * For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) |
| 6920 | * while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6921 | * |
| 6922 | * Supported by API versions 9 and newer. |
| 6923 | */ |
| 6924 | extern float3 __attribute__((const, overloadable))fmod(float3 x, float3 y); |
| 6925 | #endif |
| 6926 | |
| 6927 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6928 | /** |
| 6929 | * Returns the remainder of x / y, where the quotient is rounded towards zero. |
| 6930 | * |
| 6931 | * The function remainder() is similar but rounds toward the closest interger. |
| 6932 | * For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) |
| 6933 | * while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6934 | * |
| 6935 | * Supported by API versions 9 and newer. |
| 6936 | */ |
| 6937 | extern float4 __attribute__((const, overloadable))fmod(float4 x, float4 y); |
| 6938 | #endif |
| 6939 | |
| 6940 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6941 | /** |
| 6942 | * Returns the positive fractional part of v, i.e. v - floor(v). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6943 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6944 | * For example, fract(1.3f, &val) returns 0.3f and sets val to 1.f. |
| 6945 | * fract(-1.3f, &val) returns 0.7f and sets val to -2.f. |
| 6946 | * |
| 6947 | * @param v Input value. |
| 6948 | * @param floor If floor is not null, each element of floor will be set to the floor of the corresponding element of v. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6949 | * |
| 6950 | * Supported by API versions 9 and newer. |
| 6951 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 6952 | extern float __attribute__((overloadable))fract(float v, float* floor); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6953 | #endif |
| 6954 | |
| 6955 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6956 | /** |
| 6957 | * Returns the positive fractional part of v, i.e. v - floor(v). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6958 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6959 | * For example, fract(1.3f, &val) returns 0.3f and sets val to 1.f. |
| 6960 | * fract(-1.3f, &val) returns 0.7f and sets val to -2.f. |
| 6961 | * |
| 6962 | * @param v Input value. |
| 6963 | * @param floor If floor is not null, each element of floor will be set to the floor of the corresponding element of v. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6964 | * |
| 6965 | * Supported by API versions 9 and newer. |
| 6966 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 6967 | extern float2 __attribute__((overloadable))fract(float2 v, float2* floor); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6968 | #endif |
| 6969 | |
| 6970 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6971 | /** |
| 6972 | * Returns the positive fractional part of v, i.e. v - floor(v). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6973 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6974 | * For example, fract(1.3f, &val) returns 0.3f and sets val to 1.f. |
| 6975 | * fract(-1.3f, &val) returns 0.7f and sets val to -2.f. |
| 6976 | * |
| 6977 | * @param v Input value. |
| 6978 | * @param floor If floor is not null, each element of floor will be set to the floor of the corresponding element of v. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6979 | * |
| 6980 | * Supported by API versions 9 and newer. |
| 6981 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 6982 | extern float3 __attribute__((overloadable))fract(float3 v, float3* floor); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6983 | #endif |
| 6984 | |
| 6985 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6986 | /** |
| 6987 | * Returns the positive fractional part of v, i.e. v - floor(v). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6988 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 6989 | * For example, fract(1.3f, &val) returns 0.3f and sets val to 1.f. |
| 6990 | * fract(-1.3f, &val) returns 0.7f and sets val to -2.f. |
| 6991 | * |
| 6992 | * @param v Input value. |
| 6993 | * @param floor If floor is not null, each element of floor will be set to the floor of the corresponding element of v. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6994 | * |
| 6995 | * Supported by API versions 9 and newer. |
| 6996 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 6997 | extern float4 __attribute__((overloadable))fract(float4 v, float4* floor); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 6998 | #endif |
| 6999 | |
| 7000 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7001 | /** |
| 7002 | * Returns the positive fractional part of v, i.e. v - floor(v). |
| 7003 | * |
| 7004 | * For example, fract(1.3f, &val) returns 0.3f and sets val to 1.f. |
| 7005 | * fract(-1.3f, &val) returns 0.7f and sets val to -2.f. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7006 | * |
| 7007 | * Supported by API versions 9 and newer. |
| 7008 | */ |
| 7009 | static float __attribute__((const, overloadable))fract(float v) { |
| 7010 | float unused; |
| 7011 | return fract(v, &unused); |
| 7012 | } |
| 7013 | #endif |
| 7014 | |
| 7015 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7016 | /** |
| 7017 | * Returns the positive fractional part of v, i.e. v - floor(v). |
| 7018 | * |
| 7019 | * For example, fract(1.3f, &val) returns 0.3f and sets val to 1.f. |
| 7020 | * fract(-1.3f, &val) returns 0.7f and sets val to -2.f. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7021 | * |
| 7022 | * Supported by API versions 9 and newer. |
| 7023 | */ |
| 7024 | static float2 __attribute__((const, overloadable))fract(float2 v) { |
| 7025 | float2 unused; |
| 7026 | return fract(v, &unused); |
| 7027 | } |
| 7028 | #endif |
| 7029 | |
| 7030 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7031 | /** |
| 7032 | * Returns the positive fractional part of v, i.e. v - floor(v). |
| 7033 | * |
| 7034 | * For example, fract(1.3f, &val) returns 0.3f and sets val to 1.f. |
| 7035 | * fract(-1.3f, &val) returns 0.7f and sets val to -2.f. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7036 | * |
| 7037 | * Supported by API versions 9 and newer. |
| 7038 | */ |
| 7039 | static float3 __attribute__((const, overloadable))fract(float3 v) { |
| 7040 | float3 unused; |
| 7041 | return fract(v, &unused); |
| 7042 | } |
| 7043 | #endif |
| 7044 | |
| 7045 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7046 | /** |
| 7047 | * Returns the positive fractional part of v, i.e. v - floor(v). |
| 7048 | * |
| 7049 | * For example, fract(1.3f, &val) returns 0.3f and sets val to 1.f. |
| 7050 | * fract(-1.3f, &val) returns 0.7f and sets val to -2.f. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7051 | * |
| 7052 | * Supported by API versions 9 and newer. |
| 7053 | */ |
| 7054 | static float4 __attribute__((const, overloadable))fract(float4 v) { |
| 7055 | float4 unused; |
| 7056 | return fract(v, &unused); |
| 7057 | } |
| 7058 | #endif |
| 7059 | |
| 7060 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7061 | /** |
| 7062 | * Returns the binary mantissa and exponent of v, e.g. v == mantissa * 2 ^ exponent. |
| 7063 | * |
| 7064 | * The mantissa is always between 0.5 (inclusive) and 1.0 (exclusive). |
| 7065 | * See ldexp() for the reverse operation. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7066 | * |
| 7067 | * @param v Supports float, float2, float3, float4. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7068 | * @param expo If expo is not null, each element of expo will be set to the exponent of the corresponding element of v. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7069 | * |
| 7070 | * Supported by API versions 9 and newer. |
| 7071 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7072 | extern float __attribute__((overloadable))frexp(float v, int* expo); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7073 | #endif |
| 7074 | |
| 7075 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7076 | /** |
| 7077 | * Returns the binary mantissa and exponent of v, e.g. v == mantissa * 2 ^ exponent. |
| 7078 | * |
| 7079 | * The mantissa is always between 0.5 (inclusive) and 1.0 (exclusive). |
| 7080 | * See ldexp() for the reverse operation. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7081 | * |
| 7082 | * @param v Supports float, float2, float3, float4. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7083 | * @param expo If expo is not null, each element of expo will be set to the exponent of the corresponding element of v. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7084 | * |
| 7085 | * Supported by API versions 9 and newer. |
| 7086 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7087 | extern float2 __attribute__((overloadable))frexp(float2 v, int2* expo); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7088 | #endif |
| 7089 | |
| 7090 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7091 | /** |
| 7092 | * Returns the binary mantissa and exponent of v, e.g. v == mantissa * 2 ^ exponent. |
| 7093 | * |
| 7094 | * The mantissa is always between 0.5 (inclusive) and 1.0 (exclusive). |
| 7095 | * See ldexp() for the reverse operation. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7096 | * |
| 7097 | * @param v Supports float, float2, float3, float4. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7098 | * @param expo If expo is not null, each element of expo will be set to the exponent of the corresponding element of v. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7099 | * |
| 7100 | * Supported by API versions 9 and newer. |
| 7101 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7102 | extern float3 __attribute__((overloadable))frexp(float3 v, int3* expo); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7103 | #endif |
| 7104 | |
| 7105 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7106 | /** |
| 7107 | * Returns the binary mantissa and exponent of v, e.g. v == mantissa * 2 ^ exponent. |
| 7108 | * |
| 7109 | * The mantissa is always between 0.5 (inclusive) and 1.0 (exclusive). |
| 7110 | * See ldexp() for the reverse operation. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7111 | * |
| 7112 | * @param v Supports float, float2, float3, float4. |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7113 | * @param expo If expo is not null, each element of expo will be set to the exponent of the corresponding element of v. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7114 | * |
| 7115 | * Supported by API versions 9 and newer. |
| 7116 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7117 | extern float4 __attribute__((overloadable))frexp(float4 v, int4* expo); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7118 | #endif |
| 7119 | |
| 7120 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7121 | /** |
| 7122 | * Returns the approximate reciprocal of a value. |
| 7123 | * |
| 7124 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7125 | * |
| 7126 | * Supported by API versions 17 and newer. |
| 7127 | */ |
| 7128 | extern float __attribute__((const, overloadable))half_recip(float v); |
| 7129 | #endif |
| 7130 | |
| 7131 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7132 | /** |
| 7133 | * Returns the approximate reciprocal of a value. |
| 7134 | * |
| 7135 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7136 | * |
| 7137 | * Supported by API versions 17 and newer. |
| 7138 | */ |
| 7139 | extern float2 __attribute__((const, overloadable))half_recip(float2 v); |
| 7140 | #endif |
| 7141 | |
| 7142 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7143 | /** |
| 7144 | * Returns the approximate reciprocal of a value. |
| 7145 | * |
| 7146 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7147 | * |
| 7148 | * Supported by API versions 17 and newer. |
| 7149 | */ |
| 7150 | extern float3 __attribute__((const, overloadable))half_recip(float3 v); |
| 7151 | #endif |
| 7152 | |
| 7153 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7154 | /** |
| 7155 | * Returns the approximate reciprocal of a value. |
| 7156 | * |
| 7157 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7158 | * |
| 7159 | * Supported by API versions 17 and newer. |
| 7160 | */ |
| 7161 | extern float4 __attribute__((const, overloadable))half_recip(float4 v); |
| 7162 | #endif |
| 7163 | |
| 7164 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7165 | /** |
| 7166 | * Returns the approximate value of (1.f / sqrt(value)). |
| 7167 | * |
| 7168 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7169 | * |
| 7170 | * Supported by API versions 17 and newer. |
| 7171 | */ |
| 7172 | extern float __attribute__((const, overloadable))half_rsqrt(float v); |
| 7173 | #endif |
| 7174 | |
| 7175 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7176 | /** |
| 7177 | * Returns the approximate value of (1.f / sqrt(value)). |
| 7178 | * |
| 7179 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7180 | * |
| 7181 | * Supported by API versions 17 and newer. |
| 7182 | */ |
| 7183 | extern float2 __attribute__((const, overloadable))half_rsqrt(float2 v); |
| 7184 | #endif |
| 7185 | |
| 7186 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7187 | /** |
| 7188 | * Returns the approximate value of (1.f / sqrt(value)). |
| 7189 | * |
| 7190 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7191 | * |
| 7192 | * Supported by API versions 17 and newer. |
| 7193 | */ |
| 7194 | extern float3 __attribute__((const, overloadable))half_rsqrt(float3 v); |
| 7195 | #endif |
| 7196 | |
| 7197 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7198 | /** |
| 7199 | * Returns the approximate value of (1.f / sqrt(value)). |
| 7200 | * |
| 7201 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7202 | * |
| 7203 | * Supported by API versions 17 and newer. |
| 7204 | */ |
| 7205 | extern float4 __attribute__((const, overloadable))half_rsqrt(float4 v); |
| 7206 | #endif |
| 7207 | |
| 7208 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7209 | /** |
| 7210 | * Returns the approximate square root of a value. |
| 7211 | * |
| 7212 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7213 | * |
| 7214 | * Supported by API versions 17 and newer. |
| 7215 | */ |
| 7216 | extern float __attribute__((const, overloadable))half_sqrt(float v); |
| 7217 | #endif |
| 7218 | |
| 7219 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7220 | /** |
| 7221 | * Returns the approximate square root of a value. |
| 7222 | * |
| 7223 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7224 | * |
| 7225 | * Supported by API versions 17 and newer. |
| 7226 | */ |
| 7227 | extern float2 __attribute__((const, overloadable))half_sqrt(float2 v); |
| 7228 | #endif |
| 7229 | |
| 7230 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7231 | /** |
| 7232 | * Returns the approximate square root of a value. |
| 7233 | * |
| 7234 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7235 | * |
| 7236 | * Supported by API versions 17 and newer. |
| 7237 | */ |
| 7238 | extern float3 __attribute__((const, overloadable))half_sqrt(float3 v); |
| 7239 | #endif |
| 7240 | |
| 7241 | #if (defined(RS_VERSION) && (RS_VERSION >= 17)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7242 | /** |
| 7243 | * Returns the approximate square root of a value. |
| 7244 | * |
| 7245 | * The precision is that of a 16 bit floating point value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7246 | * |
| 7247 | * Supported by API versions 17 and newer. |
| 7248 | */ |
| 7249 | extern float4 __attribute__((const, overloadable))half_sqrt(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7250 | #endif |
| 7251 | |
| 7252 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7253 | /** |
| 7254 | * Returns the hypotenuse, i.e. sqrt(x * x + y * y). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7255 | * |
| 7256 | * Supported by API versions 9 and newer. |
| 7257 | */ |
| 7258 | extern float __attribute__((const, overloadable))hypot(float x, float y); |
| 7259 | #endif |
| 7260 | |
| 7261 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7262 | /** |
| 7263 | * Returns the hypotenuse, i.e. sqrt(x * x + y * y). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7264 | * |
| 7265 | * Supported by API versions 9 and newer. |
| 7266 | */ |
| 7267 | extern float2 __attribute__((const, overloadable))hypot(float2 x, float2 y); |
| 7268 | #endif |
| 7269 | |
| 7270 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7271 | /** |
| 7272 | * Returns the hypotenuse, i.e. sqrt(x * x + y * y). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7273 | * |
| 7274 | * Supported by API versions 9 and newer. |
| 7275 | */ |
| 7276 | extern float3 __attribute__((const, overloadable))hypot(float3 x, float3 y); |
| 7277 | #endif |
| 7278 | |
| 7279 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7280 | /** |
| 7281 | * Returns the hypotenuse, i.e. sqrt(x * x + y * y). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7282 | * |
| 7283 | * Supported by API versions 9 and newer. |
| 7284 | */ |
| 7285 | extern float4 __attribute__((const, overloadable))hypot(float4 x, float4 y); |
| 7286 | #endif |
| 7287 | |
| 7288 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7289 | /** |
| 7290 | * Returns the base two exponent of a value, where the mantissa is between 1.f (inclusive) and 2.f (exclusive). |
| 7291 | * |
| 7292 | * For example, ilogb(8.5f) returns 3. Because of the difference in mantissa, this number is one less than |
| 7293 | * is returned by frexp(). |
| 7294 | * |
| 7295 | * logb() is similar but returns a float. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7296 | * |
| 7297 | * Supported by API versions 9 and newer. |
| 7298 | */ |
| 7299 | extern int __attribute__((const, overloadable))ilogb(float); |
| 7300 | #endif |
| 7301 | |
| 7302 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7303 | /** |
| 7304 | * Returns the base two exponent of a value, where the mantissa is between 1.f (inclusive) and 2.f (exclusive). |
| 7305 | * |
| 7306 | * For example, ilogb(8.5f) returns 3. Because of the difference in mantissa, this number is one less than |
| 7307 | * is returned by frexp(). |
| 7308 | * |
| 7309 | * logb() is similar but returns a float. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7310 | * |
| 7311 | * Supported by API versions 9 and newer. |
| 7312 | */ |
| 7313 | extern int2 __attribute__((const, overloadable))ilogb(float2); |
| 7314 | #endif |
| 7315 | |
| 7316 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7317 | /** |
| 7318 | * Returns the base two exponent of a value, where the mantissa is between 1.f (inclusive) and 2.f (exclusive). |
| 7319 | * |
| 7320 | * For example, ilogb(8.5f) returns 3. Because of the difference in mantissa, this number is one less than |
| 7321 | * is returned by frexp(). |
| 7322 | * |
| 7323 | * logb() is similar but returns a float. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7324 | * |
| 7325 | * Supported by API versions 9 and newer. |
| 7326 | */ |
| 7327 | extern int3 __attribute__((const, overloadable))ilogb(float3); |
| 7328 | #endif |
| 7329 | |
| 7330 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7331 | /** |
| 7332 | * Returns the base two exponent of a value, where the mantissa is between 1.f (inclusive) and 2.f (exclusive). |
| 7333 | * |
| 7334 | * For example, ilogb(8.5f) returns 3. Because of the difference in mantissa, this number is one less than |
| 7335 | * is returned by frexp(). |
| 7336 | * |
| 7337 | * logb() is similar but returns a float. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7338 | * |
| 7339 | * Supported by API versions 9 and newer. |
| 7340 | */ |
| 7341 | extern int4 __attribute__((const, overloadable))ilogb(float4); |
| 7342 | #endif |
| 7343 | |
| 7344 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7345 | /** |
| 7346 | * Returns the floating point created from the mantissa and exponent, i.e. (mantissa * 2 ^ exponent). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7347 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7348 | * See frexp() for the reverse operation. |
| 7349 | * |
| 7350 | * @param mantissa Supports float, float2, float3, and float4. |
| 7351 | * @param exponent Supports single component or matching vector. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7352 | * |
| 7353 | * Supported by API versions 9 and newer. |
| 7354 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7355 | extern float __attribute__((const, overloadable))ldexp(float mantissa, int exponent); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7356 | #endif |
| 7357 | |
| 7358 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7359 | /** |
| 7360 | * Returns the floating point created from the mantissa and exponent, i.e. (mantissa * 2 ^ exponent). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7361 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7362 | * See frexp() for the reverse operation. |
| 7363 | * |
| 7364 | * @param mantissa Supports float, float2, float3, and float4. |
| 7365 | * @param exponent Supports single component or matching vector. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7366 | * |
| 7367 | * Supported by API versions 9 and newer. |
| 7368 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7369 | extern float2 __attribute__((const, overloadable))ldexp(float2 mantissa, int2 exponent); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7370 | #endif |
| 7371 | |
| 7372 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7373 | /** |
| 7374 | * Returns the floating point created from the mantissa and exponent, i.e. (mantissa * 2 ^ exponent). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7375 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7376 | * See frexp() for the reverse operation. |
| 7377 | * |
| 7378 | * @param mantissa Supports float, float2, float3, and float4. |
| 7379 | * @param exponent Supports single component or matching vector. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7380 | * |
| 7381 | * Supported by API versions 9 and newer. |
| 7382 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7383 | extern float3 __attribute__((const, overloadable))ldexp(float3 mantissa, int3 exponent); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7384 | #endif |
| 7385 | |
| 7386 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7387 | /** |
| 7388 | * Returns the floating point created from the mantissa and exponent, i.e. (mantissa * 2 ^ exponent). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7389 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7390 | * See frexp() for the reverse operation. |
| 7391 | * |
| 7392 | * @param mantissa Supports float, float2, float3, and float4. |
| 7393 | * @param exponent Supports single component or matching vector. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7394 | * |
| 7395 | * Supported by API versions 9 and newer. |
| 7396 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7397 | extern float4 __attribute__((const, overloadable))ldexp(float4 mantissa, int4 exponent); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7398 | #endif |
| 7399 | |
| 7400 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7401 | /** |
| 7402 | * Returns the floating point created from the mantissa and exponent, i.e. (mantissa * 2 ^ exponent). |
| 7403 | * See frexp() for the reverse operation. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7404 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7405 | * @param mantissa Supports float, float2, float3, and float4. |
| 7406 | * @param exponent Supports single component or matching vector. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7407 | * |
| 7408 | * Supported by API versions 9 and newer. |
| 7409 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7410 | extern float2 __attribute__((const, overloadable))ldexp(float2 mantissa, int exponent); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7411 | #endif |
| 7412 | |
| 7413 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7414 | /** |
| 7415 | * Returns the floating point created from the mantissa and exponent, i.e. (mantissa * 2 ^ exponent). |
| 7416 | * See frexp() for the reverse operation. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7417 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7418 | * @param mantissa Supports float, float2, float3, and float4. |
| 7419 | * @param exponent Supports single component or matching vector. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7420 | * |
| 7421 | * Supported by API versions 9 and newer. |
| 7422 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7423 | extern float3 __attribute__((const, overloadable))ldexp(float3 mantissa, int exponent); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7424 | #endif |
| 7425 | |
| 7426 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7427 | /** |
| 7428 | * Returns the floating point created from the mantissa and exponent, i.e. (mantissa * 2 ^ exponent). |
| 7429 | * See frexp() for the reverse operation. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7430 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7431 | * @param mantissa Supports float, float2, float3, and float4. |
| 7432 | * @param exponent Supports single component or matching vector. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7433 | * |
| 7434 | * Supported by API versions 9 and newer. |
| 7435 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7436 | extern float4 __attribute__((const, overloadable))ldexp(float4 mantissa, int exponent); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7437 | #endif |
| 7438 | |
| 7439 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7440 | /** |
| 7441 | * Computes the length of a vector. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7442 | * |
| 7443 | * Supported by API versions 9 and newer. |
| 7444 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7445 | extern float __attribute__((const, overloadable))length(float v); |
| 7446 | #endif |
| 7447 | |
| 7448 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7449 | /** |
| 7450 | * Computes the length of a vector. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7451 | * |
| 7452 | * Supported by API versions 9 and newer. |
| 7453 | */ |
| 7454 | extern float __attribute__((const, overloadable))length(float2 v); |
| 7455 | #endif |
| 7456 | |
| 7457 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7458 | /** |
| 7459 | * Computes the length of a vector. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7460 | * |
| 7461 | * Supported by API versions 9 and newer. |
| 7462 | */ |
| 7463 | extern float __attribute__((const, overloadable))length(float3 v); |
| 7464 | #endif |
| 7465 | |
| 7466 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7467 | /** |
| 7468 | * Computes the length of a vector. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7469 | * |
| 7470 | * Supported by API versions 9 and newer. |
| 7471 | */ |
| 7472 | extern float __attribute__((const, overloadable))length(float4 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7473 | #endif |
| 7474 | |
| 7475 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7476 | /** |
| 7477 | * Returns the natural logarithm of the absolute value of the gamma function, i.e. log(fabs(gamma(value))). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7478 | * |
| 7479 | * Supported by API versions 9 and newer. |
| 7480 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7481 | extern float __attribute__((const, overloadable))lgamma(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7482 | #endif |
| 7483 | |
| 7484 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7485 | /** |
| 7486 | * Returns the natural logarithm of the absolute value of the gamma function, i.e. log(fabs(gamma(value))). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7487 | * |
| 7488 | * Supported by API versions 9 and newer. |
| 7489 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7490 | extern float2 __attribute__((const, overloadable))lgamma(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7491 | #endif |
| 7492 | |
| 7493 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7494 | /** |
| 7495 | * Returns the natural logarithm of the absolute value of the gamma function, i.e. log(fabs(gamma(value))). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7496 | * |
| 7497 | * Supported by API versions 9 and newer. |
| 7498 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7499 | extern float3 __attribute__((const, overloadable))lgamma(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7500 | #endif |
| 7501 | |
| 7502 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7503 | /** |
| 7504 | * Returns the natural logarithm of the absolute value of the gamma function, i.e. log(fabs(gamma(value))). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7505 | * |
| 7506 | * Supported by API versions 9 and newer. |
| 7507 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7508 | extern float4 __attribute__((const, overloadable))lgamma(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7509 | #endif |
| 7510 | |
| 7511 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7512 | /** |
| 7513 | * Returns the natural logarithm of the absolute value of the gamma function, i.e. log(fabs(gamma(x))). |
| 7514 | * |
| 7515 | * Can also return the sign of the gamma function. |
| 7516 | * |
| 7517 | * @param x Input value. |
| 7518 | * @param sign If sign is not null, each element of sign will be set to -1.f if the gamma of the corresponding element of x is negative, otherwise to 1.f. |
| 7519 | * |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7520 | * |
| 7521 | * Supported by API versions 9 and newer. |
| 7522 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7523 | extern float __attribute__((overloadable))lgamma(float x, int* sign); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7524 | #endif |
| 7525 | |
| 7526 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7527 | /** |
| 7528 | * Returns the natural logarithm of the absolute value of the gamma function, i.e. log(fabs(gamma(x))). |
| 7529 | * |
| 7530 | * Can also return the sign of the gamma function. |
| 7531 | * |
| 7532 | * @param x Input value. |
| 7533 | * @param sign If sign is not null, each element of sign will be set to -1.f if the gamma of the corresponding element of x is negative, otherwise to 1.f. |
| 7534 | * |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7535 | * |
| 7536 | * Supported by API versions 9 and newer. |
| 7537 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7538 | extern float2 __attribute__((overloadable))lgamma(float2 x, int2* sign); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7539 | #endif |
| 7540 | |
| 7541 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7542 | /** |
| 7543 | * Returns the natural logarithm of the absolute value of the gamma function, i.e. log(fabs(gamma(x))). |
| 7544 | * |
| 7545 | * Can also return the sign of the gamma function. |
| 7546 | * |
| 7547 | * @param x Input value. |
| 7548 | * @param sign If sign is not null, each element of sign will be set to -1.f if the gamma of the corresponding element of x is negative, otherwise to 1.f. |
| 7549 | * |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7550 | * |
| 7551 | * Supported by API versions 9 and newer. |
| 7552 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7553 | extern float3 __attribute__((overloadable))lgamma(float3 x, int3* sign); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7554 | #endif |
| 7555 | |
| 7556 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7557 | /** |
| 7558 | * Returns the natural logarithm of the absolute value of the gamma function, i.e. log(fabs(gamma(x))). |
| 7559 | * |
| 7560 | * Can also return the sign of the gamma function. |
| 7561 | * |
| 7562 | * @param x Input value. |
| 7563 | * @param sign If sign is not null, each element of sign will be set to -1.f if the gamma of the corresponding element of x is negative, otherwise to 1.f. |
| 7564 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7565 | * |
| 7566 | * Supported by API versions 9 and newer. |
| 7567 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7568 | extern float4 __attribute__((overloadable))lgamma(float4 x, int4* sign); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7569 | #endif |
| 7570 | |
| 7571 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7572 | /** |
| 7573 | * Returns the natural logarithm. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7574 | * |
| 7575 | * Supported by API versions 9 and newer. |
| 7576 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7577 | extern float __attribute__((const, overloadable))log(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7578 | #endif |
| 7579 | |
| 7580 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7581 | /** |
| 7582 | * Returns the natural logarithm. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7583 | * |
| 7584 | * Supported by API versions 9 and newer. |
| 7585 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7586 | extern float2 __attribute__((const, overloadable))log(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7587 | #endif |
| 7588 | |
| 7589 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7590 | /** |
| 7591 | * Returns the natural logarithm. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7592 | * |
| 7593 | * Supported by API versions 9 and newer. |
| 7594 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7595 | extern float3 __attribute__((const, overloadable))log(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7596 | #endif |
| 7597 | |
| 7598 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7599 | /** |
| 7600 | * Returns the natural logarithm. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7601 | * |
| 7602 | * Supported by API versions 9 and newer. |
| 7603 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7604 | extern float4 __attribute__((const, overloadable))log(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7605 | #endif |
| 7606 | |
| 7607 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7608 | /** |
| 7609 | * Returns the base 10 logarithm. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7610 | * |
| 7611 | * Supported by API versions 9 and newer. |
| 7612 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7613 | extern float __attribute__((const, overloadable))log10(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7614 | #endif |
| 7615 | |
| 7616 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7617 | /** |
| 7618 | * Returns the base 10 logarithm. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7619 | * |
| 7620 | * Supported by API versions 9 and newer. |
| 7621 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7622 | extern float2 __attribute__((const, overloadable))log10(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7623 | #endif |
| 7624 | |
| 7625 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7626 | /** |
| 7627 | * Returns the base 10 logarithm. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7628 | * |
| 7629 | * Supported by API versions 9 and newer. |
| 7630 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7631 | extern float3 __attribute__((const, overloadable))log10(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7632 | #endif |
| 7633 | |
| 7634 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7635 | /** |
| 7636 | * Returns the base 10 logarithm. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7637 | * |
| 7638 | * Supported by API versions 9 and newer. |
| 7639 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7640 | extern float4 __attribute__((const, overloadable))log10(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7641 | #endif |
| 7642 | |
| 7643 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7644 | /** |
| 7645 | * Returns the natural logarithm of (v + 1.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7646 | * |
| 7647 | * Supported by API versions 9 and newer. |
| 7648 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7649 | extern float __attribute__((const, overloadable))log1p(float v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7650 | #endif |
| 7651 | |
| 7652 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7653 | /** |
| 7654 | * Returns the natural logarithm of (v + 1.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7655 | * |
| 7656 | * Supported by API versions 9 and newer. |
| 7657 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7658 | extern float2 __attribute__((const, overloadable))log1p(float2 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7659 | #endif |
| 7660 | |
| 7661 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7662 | /** |
| 7663 | * Returns the natural logarithm of (v + 1.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7664 | * |
| 7665 | * Supported by API versions 9 and newer. |
| 7666 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7667 | extern float3 __attribute__((const, overloadable))log1p(float3 v); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7668 | #endif |
| 7669 | |
| 7670 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7671 | /** |
| 7672 | * Returns the natural logarithm of (v + 1.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7673 | * |
| 7674 | * Supported by API versions 9 and newer. |
| 7675 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7676 | extern float4 __attribute__((const, overloadable))log1p(float4 v); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7677 | #endif |
| 7678 | |
| 7679 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7680 | /** |
| 7681 | * Returns the base 2 logarithm. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7682 | * |
| 7683 | * Supported by API versions 9 and newer. |
| 7684 | */ |
| 7685 | extern float __attribute__((const, overloadable))log2(float); |
| 7686 | #endif |
| 7687 | |
| 7688 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7689 | /** |
| 7690 | * Returns the base 2 logarithm. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7691 | * |
| 7692 | * Supported by API versions 9 and newer. |
| 7693 | */ |
| 7694 | extern float2 __attribute__((const, overloadable))log2(float2); |
| 7695 | #endif |
| 7696 | |
| 7697 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7698 | /** |
| 7699 | * Returns the base 2 logarithm. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7700 | * |
| 7701 | * Supported by API versions 9 and newer. |
| 7702 | */ |
| 7703 | extern float3 __attribute__((const, overloadable))log2(float3); |
| 7704 | #endif |
| 7705 | |
| 7706 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7707 | /** |
| 7708 | * Returns the base 2 logarithm. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7709 | * |
| 7710 | * Supported by API versions 9 and newer. |
| 7711 | */ |
| 7712 | extern float4 __attribute__((const, overloadable))log2(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7713 | #endif |
| 7714 | |
| 7715 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7716 | /** |
| 7717 | * Returns the base two exponent of a value, where the mantissa is between 1.f (inclusive) and 2.f (exclusive). |
| 7718 | * |
| 7719 | * For example, ilogb(8.5f) returns 3.f. Because of the difference in mantissa, this number is one less than |
| 7720 | * is returned by frexp(). |
| 7721 | * |
| 7722 | * ilogb() is similar but returns an integer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7723 | * |
| 7724 | * Supported by API versions 9 and newer. |
| 7725 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7726 | extern float __attribute__((const, overloadable))logb(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7727 | #endif |
| 7728 | |
| 7729 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7730 | /** |
| 7731 | * Returns the base two exponent of a value, where the mantissa is between 1.f (inclusive) and 2.f (exclusive). |
| 7732 | * |
| 7733 | * For example, ilogb(8.5f) returns 3.f. Because of the difference in mantissa, this number is one less than |
| 7734 | * is returned by frexp(). |
| 7735 | * |
| 7736 | * ilogb() is similar but returns an integer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7737 | * |
| 7738 | * Supported by API versions 9 and newer. |
| 7739 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7740 | extern float2 __attribute__((const, overloadable))logb(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7741 | #endif |
| 7742 | |
| 7743 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7744 | /** |
| 7745 | * Returns the base two exponent of a value, where the mantissa is between 1.f (inclusive) and 2.f (exclusive). |
| 7746 | * |
| 7747 | * For example, ilogb(8.5f) returns 3.f. Because of the difference in mantissa, this number is one less than |
| 7748 | * is returned by frexp(). |
| 7749 | * |
| 7750 | * ilogb() is similar but returns an integer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7751 | * |
| 7752 | * Supported by API versions 9 and newer. |
| 7753 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7754 | extern float3 __attribute__((const, overloadable))logb(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7755 | #endif |
| 7756 | |
| 7757 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7758 | /** |
| 7759 | * Returns the base two exponent of a value, where the mantissa is between 1.f (inclusive) and 2.f (exclusive). |
| 7760 | * |
| 7761 | * For example, ilogb(8.5f) returns 3.f. Because of the difference in mantissa, this number is one less than |
| 7762 | * is returned by frexp(). |
| 7763 | * |
| 7764 | * ilogb() is similar but returns an integer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7765 | * |
| 7766 | * Supported by API versions 9 and newer. |
| 7767 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 7768 | extern float4 __attribute__((const, overloadable))logb(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7769 | #endif |
| 7770 | |
| 7771 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7772 | /** |
| 7773 | * Multiply and add. Returns (a * b) + c. |
| 7774 | * |
| 7775 | * This function is identical to fma(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7776 | * |
| 7777 | * Supported by API versions 9 and newer. |
| 7778 | */ |
| 7779 | extern float __attribute__((const, overloadable))mad(float a, float b, float c); |
| 7780 | #endif |
| 7781 | |
| 7782 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7783 | /** |
| 7784 | * Multiply and add. Returns (a * b) + c. |
| 7785 | * |
| 7786 | * This function is identical to fma(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7787 | * |
| 7788 | * Supported by API versions 9 and newer. |
| 7789 | */ |
| 7790 | extern float2 __attribute__((const, overloadable))mad(float2 a, float2 b, float2 c); |
| 7791 | #endif |
| 7792 | |
| 7793 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7794 | /** |
| 7795 | * Multiply and add. Returns (a * b) + c. |
| 7796 | * |
| 7797 | * This function is identical to fma(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7798 | * |
| 7799 | * Supported by API versions 9 and newer. |
| 7800 | */ |
| 7801 | extern float3 __attribute__((const, overloadable))mad(float3 a, float3 b, float3 c); |
| 7802 | #endif |
| 7803 | |
| 7804 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7805 | /** |
| 7806 | * Multiply and add. Returns (a * b) + c. |
| 7807 | * |
| 7808 | * This function is identical to fma(). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7809 | * |
| 7810 | * Supported by API versions 9 and newer. |
| 7811 | */ |
| 7812 | extern float4 __attribute__((const, overloadable))mad(float4 a, float4 b, float4 c); |
| 7813 | #endif |
| 7814 | |
| 7815 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7816 | /** |
| 7817 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7818 | * |
| 7819 | * Supported by API versions 9 and newer. |
| 7820 | */ |
| 7821 | extern float __attribute__((const, overloadable))max(float, float); |
| 7822 | #endif |
| 7823 | |
| 7824 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7825 | /** |
| 7826 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7827 | * |
| 7828 | * Supported by API versions 9 and newer. |
| 7829 | */ |
| 7830 | extern float2 __attribute__((const, overloadable))max(float2, float2); |
| 7831 | #endif |
| 7832 | |
| 7833 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7834 | /** |
| 7835 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7836 | * |
| 7837 | * Supported by API versions 9 and newer. |
| 7838 | */ |
| 7839 | extern float3 __attribute__((const, overloadable))max(float3, float3); |
| 7840 | #endif |
| 7841 | |
| 7842 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7843 | /** |
| 7844 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7845 | * |
| 7846 | * Supported by API versions 9 and newer. |
| 7847 | */ |
| 7848 | extern float4 __attribute__((const, overloadable))max(float4, float4); |
| 7849 | #endif |
| 7850 | |
| 7851 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7852 | /** |
| 7853 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7854 | * |
| 7855 | * Suppored by API versions 9 - 19 |
| 7856 | */ |
| 7857 | static char __attribute__((const, overloadable))max(char v1, char v2) { |
| 7858 | return (v1 > v2 ? v1 : v2); |
| 7859 | } |
| 7860 | #endif |
| 7861 | |
| 7862 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7863 | /** |
| 7864 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7865 | * |
| 7866 | * Suppored by API versions 9 - 19 |
| 7867 | */ |
| 7868 | static uchar __attribute__((const, overloadable))max(uchar v1, uchar v2) { |
| 7869 | return (v1 > v2 ? v1 : v2); |
| 7870 | } |
| 7871 | #endif |
| 7872 | |
| 7873 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7874 | /** |
| 7875 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7876 | * |
| 7877 | * Suppored by API versions 9 - 19 |
| 7878 | */ |
| 7879 | static short __attribute__((const, overloadable))max(short v1, short v2) { |
| 7880 | return (v1 > v2 ? v1 : v2); |
| 7881 | } |
| 7882 | #endif |
| 7883 | |
| 7884 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7885 | /** |
| 7886 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7887 | * |
| 7888 | * Suppored by API versions 9 - 19 |
| 7889 | */ |
| 7890 | static ushort __attribute__((const, overloadable))max(ushort v1, ushort v2) { |
| 7891 | return (v1 > v2 ? v1 : v2); |
| 7892 | } |
| 7893 | #endif |
| 7894 | |
| 7895 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7896 | /** |
| 7897 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7898 | * |
| 7899 | * Suppored by API versions 9 - 19 |
| 7900 | */ |
| 7901 | static int __attribute__((const, overloadable))max(int v1, int v2) { |
| 7902 | return (v1 > v2 ? v1 : v2); |
| 7903 | } |
| 7904 | #endif |
| 7905 | |
| 7906 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7907 | /** |
| 7908 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7909 | * |
| 7910 | * Suppored by API versions 9 - 19 |
| 7911 | */ |
| 7912 | static uint __attribute__((const, overloadable))max(uint v1, uint v2) { |
| 7913 | return (v1 > v2 ? v1 : v2); |
| 7914 | } |
| 7915 | #endif |
| 7916 | |
| 7917 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7918 | /** |
| 7919 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7920 | * |
| 7921 | * Suppored by API versions 9 - 19 |
| 7922 | */ |
| 7923 | static char2 __attribute__((const, overloadable))max(char2 v1, char2 v2) { |
| 7924 | char2 tmp; |
| 7925 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 7926 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 7927 | return tmp; |
| 7928 | } |
| 7929 | #endif |
| 7930 | |
| 7931 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7932 | /** |
| 7933 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7934 | * |
| 7935 | * Suppored by API versions 9 - 19 |
| 7936 | */ |
| 7937 | static uchar2 __attribute__((const, overloadable))max(uchar2 v1, uchar2 v2) { |
| 7938 | uchar2 tmp; |
| 7939 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 7940 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 7941 | return tmp; |
| 7942 | } |
| 7943 | #endif |
| 7944 | |
| 7945 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7946 | /** |
| 7947 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7948 | * |
| 7949 | * Suppored by API versions 9 - 19 |
| 7950 | */ |
| 7951 | static short2 __attribute__((const, overloadable))max(short2 v1, short2 v2) { |
| 7952 | short2 tmp; |
| 7953 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 7954 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 7955 | return tmp; |
| 7956 | } |
| 7957 | #endif |
| 7958 | |
| 7959 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7960 | /** |
| 7961 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7962 | * |
| 7963 | * Suppored by API versions 9 - 19 |
| 7964 | */ |
| 7965 | static ushort2 __attribute__((const, overloadable))max(ushort2 v1, ushort2 v2) { |
| 7966 | ushort2 tmp; |
| 7967 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 7968 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 7969 | return tmp; |
| 7970 | } |
| 7971 | #endif |
| 7972 | |
| 7973 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7974 | /** |
| 7975 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7976 | * |
| 7977 | * Suppored by API versions 9 - 19 |
| 7978 | */ |
| 7979 | static int2 __attribute__((const, overloadable))max(int2 v1, int2 v2) { |
| 7980 | int2 tmp; |
| 7981 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 7982 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 7983 | return tmp; |
| 7984 | } |
| 7985 | #endif |
| 7986 | |
| 7987 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 7988 | /** |
| 7989 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 7990 | * |
| 7991 | * Suppored by API versions 9 - 19 |
| 7992 | */ |
| 7993 | static uint2 __attribute__((const, overloadable))max(uint2 v1, uint2 v2) { |
| 7994 | uint2 tmp; |
| 7995 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 7996 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 7997 | return tmp; |
| 7998 | } |
| 7999 | #endif |
| 8000 | |
| 8001 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8002 | /** |
| 8003 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8004 | * |
| 8005 | * Suppored by API versions 9 - 19 |
| 8006 | */ |
| 8007 | static char3 __attribute__((const, overloadable))max(char3 v1, char3 v2) { |
| 8008 | char3 tmp; |
| 8009 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8010 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8011 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8012 | return tmp; |
| 8013 | } |
| 8014 | #endif |
| 8015 | |
| 8016 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8017 | /** |
| 8018 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8019 | * |
| 8020 | * Suppored by API versions 9 - 19 |
| 8021 | */ |
| 8022 | static uchar3 __attribute__((const, overloadable))max(uchar3 v1, uchar3 v2) { |
| 8023 | uchar3 tmp; |
| 8024 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8025 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8026 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8027 | return tmp; |
| 8028 | } |
| 8029 | #endif |
| 8030 | |
| 8031 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8032 | /** |
| 8033 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8034 | * |
| 8035 | * Suppored by API versions 9 - 19 |
| 8036 | */ |
| 8037 | static short3 __attribute__((const, overloadable))max(short3 v1, short3 v2) { |
| 8038 | short3 tmp; |
| 8039 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8040 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8041 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8042 | return tmp; |
| 8043 | } |
| 8044 | #endif |
| 8045 | |
| 8046 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8047 | /** |
| 8048 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8049 | * |
| 8050 | * Suppored by API versions 9 - 19 |
| 8051 | */ |
| 8052 | static ushort3 __attribute__((const, overloadable))max(ushort3 v1, ushort3 v2) { |
| 8053 | ushort3 tmp; |
| 8054 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8055 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8056 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8057 | return tmp; |
| 8058 | } |
| 8059 | #endif |
| 8060 | |
| 8061 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8062 | /** |
| 8063 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8064 | * |
| 8065 | * Suppored by API versions 9 - 19 |
| 8066 | */ |
| 8067 | static int3 __attribute__((const, overloadable))max(int3 v1, int3 v2) { |
| 8068 | int3 tmp; |
| 8069 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8070 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8071 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8072 | return tmp; |
| 8073 | } |
| 8074 | #endif |
| 8075 | |
| 8076 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8077 | /** |
| 8078 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8079 | * |
| 8080 | * Suppored by API versions 9 - 19 |
| 8081 | */ |
| 8082 | static uint3 __attribute__((const, overloadable))max(uint3 v1, uint3 v2) { |
| 8083 | uint3 tmp; |
| 8084 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8085 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8086 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8087 | return tmp; |
| 8088 | } |
| 8089 | #endif |
| 8090 | |
| 8091 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8092 | /** |
| 8093 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8094 | * |
| 8095 | * Suppored by API versions 9 - 19 |
| 8096 | */ |
| 8097 | static char4 __attribute__((const, overloadable))max(char4 v1, char4 v2) { |
| 8098 | char4 tmp; |
| 8099 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8100 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8101 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8102 | tmp.w = (v1.w > v2.w ? v1.w : v2.w); |
| 8103 | return tmp; |
| 8104 | } |
| 8105 | #endif |
| 8106 | |
| 8107 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8108 | /** |
| 8109 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8110 | * |
| 8111 | * Suppored by API versions 9 - 19 |
| 8112 | */ |
| 8113 | static uchar4 __attribute__((const, overloadable))max(uchar4 v1, uchar4 v2) { |
| 8114 | uchar4 tmp; |
| 8115 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8116 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8117 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8118 | tmp.w = (v1.w > v2.w ? v1.w : v2.w); |
| 8119 | return tmp; |
| 8120 | } |
| 8121 | #endif |
| 8122 | |
| 8123 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8124 | /** |
| 8125 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8126 | * |
| 8127 | * Suppored by API versions 9 - 19 |
| 8128 | */ |
| 8129 | static short4 __attribute__((const, overloadable))max(short4 v1, short4 v2) { |
| 8130 | short4 tmp; |
| 8131 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8132 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8133 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8134 | tmp.w = (v1.w > v2.w ? v1.w : v2.w); |
| 8135 | return tmp; |
| 8136 | } |
| 8137 | #endif |
| 8138 | |
| 8139 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8140 | /** |
| 8141 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8142 | * |
| 8143 | * Suppored by API versions 9 - 19 |
| 8144 | */ |
| 8145 | static ushort4 __attribute__((const, overloadable))max(ushort4 v1, ushort4 v2) { |
| 8146 | ushort4 tmp; |
| 8147 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8148 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8149 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8150 | tmp.w = (v1.w > v2.w ? v1.w : v2.w); |
| 8151 | return tmp; |
| 8152 | } |
| 8153 | #endif |
| 8154 | |
| 8155 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8156 | /** |
| 8157 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8158 | * |
| 8159 | * Suppored by API versions 9 - 19 |
| 8160 | */ |
| 8161 | static int4 __attribute__((const, overloadable))max(int4 v1, int4 v2) { |
| 8162 | int4 tmp; |
| 8163 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8164 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8165 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8166 | tmp.w = (v1.w > v2.w ? v1.w : v2.w); |
| 8167 | return tmp; |
| 8168 | } |
| 8169 | #endif |
| 8170 | |
| 8171 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8172 | /** |
| 8173 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8174 | * |
| 8175 | * Suppored by API versions 9 - 19 |
| 8176 | */ |
| 8177 | static uint4 __attribute__((const, overloadable))max(uint4 v1, uint4 v2) { |
| 8178 | uint4 tmp; |
| 8179 | tmp.x = (v1.x > v2.x ? v1.x : v2.x); |
| 8180 | tmp.y = (v1.y > v2.y ? v1.y : v2.y); |
| 8181 | tmp.z = (v1.z > v2.z ? v1.z : v2.z); |
| 8182 | tmp.w = (v1.w > v2.w ? v1.w : v2.w); |
| 8183 | return tmp; |
| 8184 | } |
| 8185 | #endif |
| 8186 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8187 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8188 | /** |
| 8189 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8190 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8191 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8192 | */ |
| 8193 | extern char __attribute__((const, overloadable))max(char v1, char v2); |
| 8194 | #endif |
| 8195 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8196 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8197 | /** |
| 8198 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8199 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8200 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8201 | */ |
| 8202 | extern char2 __attribute__((const, overloadable))max(char2 v1, char2 v2); |
| 8203 | #endif |
| 8204 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8205 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8206 | /** |
| 8207 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8208 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8209 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8210 | */ |
| 8211 | extern char3 __attribute__((const, overloadable))max(char3 v1, char3 v2); |
| 8212 | #endif |
| 8213 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8214 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8215 | /** |
| 8216 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8217 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8218 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8219 | */ |
| 8220 | extern char4 __attribute__((const, overloadable))max(char4 v1, char4 v2); |
| 8221 | #endif |
| 8222 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8223 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8224 | /** |
| 8225 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8226 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8227 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8228 | */ |
| 8229 | extern uchar __attribute__((const, overloadable))max(uchar v1, uchar v2); |
| 8230 | #endif |
| 8231 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8232 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8233 | /** |
| 8234 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8235 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8236 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8237 | */ |
| 8238 | extern uchar2 __attribute__((const, overloadable))max(uchar2 v1, uchar2 v2); |
| 8239 | #endif |
| 8240 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8241 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8242 | /** |
| 8243 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8244 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8245 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8246 | */ |
| 8247 | extern uchar3 __attribute__((const, overloadable))max(uchar3 v1, uchar3 v2); |
| 8248 | #endif |
| 8249 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8250 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8251 | /** |
| 8252 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8253 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8254 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8255 | */ |
| 8256 | extern uchar4 __attribute__((const, overloadable))max(uchar4 v1, uchar4 v2); |
| 8257 | #endif |
| 8258 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8259 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8260 | /** |
| 8261 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8262 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8263 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8264 | */ |
| 8265 | extern short __attribute__((const, overloadable))max(short v1, short v2); |
| 8266 | #endif |
| 8267 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8268 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8269 | /** |
| 8270 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8271 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8272 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8273 | */ |
| 8274 | extern short2 __attribute__((const, overloadable))max(short2 v1, short2 v2); |
| 8275 | #endif |
| 8276 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8277 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8278 | /** |
| 8279 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8280 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8281 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8282 | */ |
| 8283 | extern short3 __attribute__((const, overloadable))max(short3 v1, short3 v2); |
| 8284 | #endif |
| 8285 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8286 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8287 | /** |
| 8288 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8289 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8290 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8291 | */ |
| 8292 | extern short4 __attribute__((const, overloadable))max(short4 v1, short4 v2); |
| 8293 | #endif |
| 8294 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8295 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8296 | /** |
| 8297 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8298 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8299 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8300 | */ |
| 8301 | extern ushort __attribute__((const, overloadable))max(ushort v1, ushort v2); |
| 8302 | #endif |
| 8303 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8304 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8305 | /** |
| 8306 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8307 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8308 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8309 | */ |
| 8310 | extern ushort2 __attribute__((const, overloadable))max(ushort2 v1, ushort2 v2); |
| 8311 | #endif |
| 8312 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8313 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8314 | /** |
| 8315 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8316 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8317 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8318 | */ |
| 8319 | extern ushort3 __attribute__((const, overloadable))max(ushort3 v1, ushort3 v2); |
| 8320 | #endif |
| 8321 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8322 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8323 | /** |
| 8324 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8325 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8326 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8327 | */ |
| 8328 | extern ushort4 __attribute__((const, overloadable))max(ushort4 v1, ushort4 v2); |
| 8329 | #endif |
| 8330 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8331 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8332 | /** |
| 8333 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8334 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8335 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8336 | */ |
| 8337 | extern int __attribute__((const, overloadable))max(int v1, int v2); |
| 8338 | #endif |
| 8339 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8340 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8341 | /** |
| 8342 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8343 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8344 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8345 | */ |
| 8346 | extern int2 __attribute__((const, overloadable))max(int2 v1, int2 v2); |
| 8347 | #endif |
| 8348 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8349 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8350 | /** |
| 8351 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8352 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8353 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8354 | */ |
| 8355 | extern int3 __attribute__((const, overloadable))max(int3 v1, int3 v2); |
| 8356 | #endif |
| 8357 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8358 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8359 | /** |
| 8360 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8361 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8362 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8363 | */ |
| 8364 | extern int4 __attribute__((const, overloadable))max(int4 v1, int4 v2); |
| 8365 | #endif |
| 8366 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8367 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8368 | /** |
| 8369 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8370 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8371 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8372 | */ |
| 8373 | extern uint __attribute__((const, overloadable))max(uint v1, uint v2); |
| 8374 | #endif |
| 8375 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8376 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8377 | /** |
| 8378 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8379 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8380 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8381 | */ |
| 8382 | extern uint2 __attribute__((const, overloadable))max(uint2 v1, uint2 v2); |
| 8383 | #endif |
| 8384 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8385 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8386 | /** |
| 8387 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8388 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8389 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8390 | */ |
| 8391 | extern uint3 __attribute__((const, overloadable))max(uint3 v1, uint3 v2); |
| 8392 | #endif |
| 8393 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8394 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8395 | /** |
| 8396 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8397 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8398 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8399 | */ |
| 8400 | extern uint4 __attribute__((const, overloadable))max(uint4 v1, uint4 v2); |
| 8401 | #endif |
| 8402 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8403 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8404 | /** |
| 8405 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8406 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8407 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8408 | */ |
| 8409 | extern long __attribute__((const, overloadable))max(long v1, long v2); |
| 8410 | #endif |
| 8411 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8412 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8413 | /** |
| 8414 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8415 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8416 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8417 | */ |
| 8418 | extern long2 __attribute__((const, overloadable))max(long2 v1, long2 v2); |
| 8419 | #endif |
| 8420 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8421 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8422 | /** |
| 8423 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8424 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8425 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8426 | */ |
| 8427 | extern long3 __attribute__((const, overloadable))max(long3 v1, long3 v2); |
| 8428 | #endif |
| 8429 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8430 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8431 | /** |
| 8432 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8433 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8434 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8435 | */ |
| 8436 | extern long4 __attribute__((const, overloadable))max(long4 v1, long4 v2); |
| 8437 | #endif |
| 8438 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8439 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8440 | /** |
| 8441 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8442 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8443 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8444 | */ |
| 8445 | extern ulong __attribute__((const, overloadable))max(ulong v1, ulong v2); |
| 8446 | #endif |
| 8447 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8448 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8449 | /** |
| 8450 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8451 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8452 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8453 | */ |
| 8454 | extern ulong2 __attribute__((const, overloadable))max(ulong2 v1, ulong2 v2); |
| 8455 | #endif |
| 8456 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8457 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8458 | /** |
| 8459 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8460 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8461 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8462 | */ |
| 8463 | extern ulong3 __attribute__((const, overloadable))max(ulong3 v1, ulong3 v2); |
| 8464 | #endif |
| 8465 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8466 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8467 | /** |
| 8468 | * Returns the maximum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8469 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8470 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8471 | */ |
| 8472 | extern ulong4 __attribute__((const, overloadable))max(ulong4 v1, ulong4 v2); |
| 8473 | #endif |
| 8474 | |
| 8475 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8476 | /** |
| 8477 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8478 | * |
| 8479 | * Supported by API versions 9 and newer. |
| 8480 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8481 | extern float __attribute__((const, overloadable))min(float, float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8482 | #endif |
| 8483 | |
| 8484 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8485 | /** |
| 8486 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8487 | * |
| 8488 | * Supported by API versions 9 and newer. |
| 8489 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8490 | extern float2 __attribute__((const, overloadable))min(float2, float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8491 | #endif |
| 8492 | |
| 8493 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8494 | /** |
| 8495 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8496 | * |
| 8497 | * Supported by API versions 9 and newer. |
| 8498 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8499 | extern float3 __attribute__((const, overloadable))min(float3, float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8500 | #endif |
| 8501 | |
| 8502 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8503 | /** |
| 8504 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8505 | * |
| 8506 | * Supported by API versions 9 and newer. |
| 8507 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8508 | extern float4 __attribute__((const, overloadable))min(float4, float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8509 | #endif |
| 8510 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8511 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8512 | /** |
| 8513 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8514 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8515 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8516 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8517 | static char __attribute__((const, overloadable))min(char v1, char v2) { |
| 8518 | return (v1 < v2 ? v1 : v2); |
| 8519 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8520 | #endif |
| 8521 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8522 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8523 | /** |
| 8524 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8525 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8526 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8527 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8528 | static uchar __attribute__((const, overloadable))min(uchar v1, uchar v2) { |
| 8529 | return (v1 < v2 ? v1 : v2); |
| 8530 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8531 | #endif |
| 8532 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8533 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8534 | /** |
| 8535 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8536 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8537 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8538 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8539 | static short __attribute__((const, overloadable))min(short v1, short v2) { |
| 8540 | return (v1 < v2 ? v1 : v2); |
| 8541 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8542 | #endif |
| 8543 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8544 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8545 | /** |
| 8546 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8547 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8548 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8549 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8550 | static ushort __attribute__((const, overloadable))min(ushort v1, ushort v2) { |
| 8551 | return (v1 < v2 ? v1 : v2); |
| 8552 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8553 | #endif |
| 8554 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8555 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8556 | /** |
| 8557 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8558 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8559 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8560 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8561 | static int __attribute__((const, overloadable))min(int v1, int v2) { |
| 8562 | return (v1 < v2 ? v1 : v2); |
| 8563 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8564 | #endif |
| 8565 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8566 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8567 | /** |
| 8568 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8569 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8570 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8571 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8572 | static uint __attribute__((const, overloadable))min(uint v1, uint v2) { |
| 8573 | return (v1 < v2 ? v1 : v2); |
| 8574 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8575 | #endif |
| 8576 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8577 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8578 | /** |
| 8579 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8580 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8581 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8582 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8583 | static char2 __attribute__((const, overloadable))min(char2 v1, char2 v2) { |
| 8584 | char2 tmp; |
| 8585 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8586 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8587 | return tmp; |
| 8588 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8589 | #endif |
| 8590 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8591 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8592 | /** |
| 8593 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8594 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8595 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8596 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8597 | static uchar2 __attribute__((const, overloadable))min(uchar2 v1, uchar2 v2) { |
| 8598 | uchar2 tmp; |
| 8599 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8600 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8601 | return tmp; |
| 8602 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8603 | #endif |
| 8604 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8605 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8606 | /** |
| 8607 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8608 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8609 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8610 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8611 | static short2 __attribute__((const, overloadable))min(short2 v1, short2 v2) { |
| 8612 | short2 tmp; |
| 8613 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8614 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8615 | return tmp; |
| 8616 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8617 | #endif |
| 8618 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8619 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8620 | /** |
| 8621 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8622 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8623 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8624 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8625 | static ushort2 __attribute__((const, overloadable))min(ushort2 v1, ushort2 v2) { |
| 8626 | ushort2 tmp; |
| 8627 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8628 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8629 | return tmp; |
| 8630 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8631 | #endif |
| 8632 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8633 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8634 | /** |
| 8635 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8636 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8637 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8638 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8639 | static int2 __attribute__((const, overloadable))min(int2 v1, int2 v2) { |
| 8640 | int2 tmp; |
| 8641 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8642 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8643 | return tmp; |
| 8644 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8645 | #endif |
| 8646 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8647 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8648 | /** |
| 8649 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8650 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8651 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8652 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8653 | static uint2 __attribute__((const, overloadable))min(uint2 v1, uint2 v2) { |
| 8654 | uint2 tmp; |
| 8655 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8656 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8657 | return tmp; |
| 8658 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8659 | #endif |
| 8660 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8661 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8662 | /** |
| 8663 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8664 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8665 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8666 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8667 | static char3 __attribute__((const, overloadable))min(char3 v1, char3 v2) { |
| 8668 | char3 tmp; |
| 8669 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8670 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8671 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8672 | return tmp; |
| 8673 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8674 | #endif |
| 8675 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8676 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8677 | /** |
| 8678 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8679 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8680 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8681 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8682 | static uchar3 __attribute__((const, overloadable))min(uchar3 v1, uchar3 v2) { |
| 8683 | uchar3 tmp; |
| 8684 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8685 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8686 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8687 | return tmp; |
| 8688 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8689 | #endif |
| 8690 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8691 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8692 | /** |
| 8693 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8694 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8695 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8696 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8697 | static short3 __attribute__((const, overloadable))min(short3 v1, short3 v2) { |
| 8698 | short3 tmp; |
| 8699 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8700 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8701 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8702 | return tmp; |
| 8703 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8704 | #endif |
| 8705 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8706 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8707 | /** |
| 8708 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8709 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8710 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8711 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8712 | static ushort3 __attribute__((const, overloadable))min(ushort3 v1, ushort3 v2) { |
| 8713 | ushort3 tmp; |
| 8714 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8715 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8716 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8717 | return tmp; |
| 8718 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8719 | #endif |
| 8720 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8721 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8722 | /** |
| 8723 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8724 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8725 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8726 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8727 | static int3 __attribute__((const, overloadable))min(int3 v1, int3 v2) { |
| 8728 | int3 tmp; |
| 8729 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8730 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8731 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8732 | return tmp; |
| 8733 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8734 | #endif |
| 8735 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8736 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8737 | /** |
| 8738 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8739 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8740 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8741 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8742 | static uint3 __attribute__((const, overloadable))min(uint3 v1, uint3 v2) { |
| 8743 | uint3 tmp; |
| 8744 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8745 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8746 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8747 | return tmp; |
| 8748 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8749 | #endif |
| 8750 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8751 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8752 | /** |
| 8753 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8754 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8755 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8756 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8757 | static char4 __attribute__((const, overloadable))min(char4 v1, char4 v2) { |
| 8758 | char4 tmp; |
| 8759 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8760 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8761 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8762 | tmp.w = (v1.w < v2.w ? v1.w : v2.w); |
| 8763 | return tmp; |
| 8764 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8765 | #endif |
| 8766 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8767 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8768 | /** |
| 8769 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8770 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8771 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8772 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8773 | static uchar4 __attribute__((const, overloadable))min(uchar4 v1, uchar4 v2) { |
| 8774 | uchar4 tmp; |
| 8775 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8776 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8777 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8778 | tmp.w = (v1.w < v2.w ? v1.w : v2.w); |
| 8779 | return tmp; |
| 8780 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8781 | #endif |
| 8782 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8783 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8784 | /** |
| 8785 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8786 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8787 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8788 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8789 | static short4 __attribute__((const, overloadable))min(short4 v1, short4 v2) { |
| 8790 | short4 tmp; |
| 8791 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8792 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8793 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8794 | tmp.w = (v1.w < v2.w ? v1.w : v2.w); |
| 8795 | return tmp; |
| 8796 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8797 | #endif |
| 8798 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8799 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8800 | /** |
| 8801 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8802 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8803 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8804 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8805 | static ushort4 __attribute__((const, overloadable))min(ushort4 v1, ushort4 v2) { |
| 8806 | ushort4 tmp; |
| 8807 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8808 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8809 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8810 | tmp.w = (v1.w < v2.w ? v1.w : v2.w); |
| 8811 | return tmp; |
| 8812 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8813 | #endif |
| 8814 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8815 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8816 | /** |
| 8817 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8818 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8819 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8820 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8821 | static int4 __attribute__((const, overloadable))min(int4 v1, int4 v2) { |
| 8822 | int4 tmp; |
| 8823 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8824 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8825 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8826 | tmp.w = (v1.w < v2.w ? v1.w : v2.w); |
| 8827 | return tmp; |
| 8828 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8829 | #endif |
| 8830 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8831 | #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8832 | /** |
| 8833 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8834 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8835 | * Suppored by API versions 9 - 19 |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8836 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8837 | static uint4 __attribute__((const, overloadable))min(uint4 v1, uint4 v2) { |
| 8838 | uint4 tmp; |
| 8839 | tmp.x = (v1.x < v2.x ? v1.x : v2.x); |
| 8840 | tmp.y = (v1.y < v2.y ? v1.y : v2.y); |
| 8841 | tmp.z = (v1.z < v2.z ? v1.z : v2.z); |
| 8842 | tmp.w = (v1.w < v2.w ? v1.w : v2.w); |
| 8843 | return tmp; |
| 8844 | } |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8845 | #endif |
| 8846 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8847 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8848 | /** |
| 8849 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8850 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8851 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8852 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8853 | extern char __attribute__((const, overloadable))min(char v1, char v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8854 | #endif |
| 8855 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8856 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8857 | /** |
| 8858 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8859 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8860 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8861 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8862 | extern char2 __attribute__((const, overloadable))min(char2 v1, char2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8863 | #endif |
| 8864 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8865 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8866 | /** |
| 8867 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8868 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8869 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8870 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8871 | extern char3 __attribute__((const, overloadable))min(char3 v1, char3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8872 | #endif |
| 8873 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8874 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8875 | /** |
| 8876 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8877 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8878 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8879 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8880 | extern char4 __attribute__((const, overloadable))min(char4 v1, char4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8881 | #endif |
| 8882 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8883 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8884 | /** |
| 8885 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8886 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8887 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8888 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8889 | extern uchar __attribute__((const, overloadable))min(uchar v1, uchar v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8890 | #endif |
| 8891 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8892 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8893 | /** |
| 8894 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8895 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8896 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8897 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8898 | extern uchar2 __attribute__((const, overloadable))min(uchar2 v1, uchar2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8899 | #endif |
| 8900 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8901 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8902 | /** |
| 8903 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8904 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8905 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8906 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8907 | extern uchar3 __attribute__((const, overloadable))min(uchar3 v1, uchar3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8908 | #endif |
| 8909 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8910 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8911 | /** |
| 8912 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8913 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8914 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8915 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8916 | extern uchar4 __attribute__((const, overloadable))min(uchar4 v1, uchar4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8917 | #endif |
| 8918 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8919 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8920 | /** |
| 8921 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8922 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8923 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8924 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8925 | extern short __attribute__((const, overloadable))min(short v1, short v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8926 | #endif |
| 8927 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8928 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8929 | /** |
| 8930 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8931 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8932 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8933 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8934 | extern short2 __attribute__((const, overloadable))min(short2 v1, short2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8935 | #endif |
| 8936 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8937 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8938 | /** |
| 8939 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8940 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8941 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8942 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8943 | extern short3 __attribute__((const, overloadable))min(short3 v1, short3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8944 | #endif |
| 8945 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8946 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8947 | /** |
| 8948 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8949 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8950 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8951 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8952 | extern short4 __attribute__((const, overloadable))min(short4 v1, short4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8953 | #endif |
| 8954 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8955 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8956 | /** |
| 8957 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8958 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8959 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8960 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8961 | extern ushort __attribute__((const, overloadable))min(ushort v1, ushort v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8962 | #endif |
| 8963 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8964 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8965 | /** |
| 8966 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8967 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8968 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8969 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8970 | extern ushort2 __attribute__((const, overloadable))min(ushort2 v1, ushort2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8971 | #endif |
| 8972 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8973 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8974 | /** |
| 8975 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8976 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8977 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8978 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8979 | extern ushort3 __attribute__((const, overloadable))min(ushort3 v1, ushort3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8980 | #endif |
| 8981 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8982 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8983 | /** |
| 8984 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8985 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8986 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8987 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8988 | extern ushort4 __attribute__((const, overloadable))min(ushort4 v1, ushort4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8989 | #endif |
| 8990 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8991 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 8992 | /** |
| 8993 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8994 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 8995 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8996 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 8997 | extern int __attribute__((const, overloadable))min(int v1, int v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 8998 | #endif |
| 8999 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9000 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9001 | /** |
| 9002 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9003 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9004 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9005 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9006 | extern int2 __attribute__((const, overloadable))min(int2 v1, int2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9007 | #endif |
| 9008 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9009 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9010 | /** |
| 9011 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9012 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9013 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9014 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9015 | extern int3 __attribute__((const, overloadable))min(int3 v1, int3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9016 | #endif |
| 9017 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9018 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9019 | /** |
| 9020 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9021 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9022 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9023 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9024 | extern int4 __attribute__((const, overloadable))min(int4 v1, int4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9025 | #endif |
| 9026 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9027 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9028 | /** |
| 9029 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9030 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9031 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9032 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9033 | extern uint __attribute__((const, overloadable))min(uint v1, uint v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9034 | #endif |
| 9035 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9036 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9037 | /** |
| 9038 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9039 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9040 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9041 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9042 | extern uint2 __attribute__((const, overloadable))min(uint2 v1, uint2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9043 | #endif |
| 9044 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9045 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9046 | /** |
| 9047 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9048 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9049 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9050 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9051 | extern uint3 __attribute__((const, overloadable))min(uint3 v1, uint3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9052 | #endif |
| 9053 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9054 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9055 | /** |
| 9056 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9057 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9058 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9059 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9060 | extern uint4 __attribute__((const, overloadable))min(uint4 v1, uint4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9061 | #endif |
| 9062 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9063 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9064 | /** |
| 9065 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9066 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9067 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9068 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9069 | extern long __attribute__((const, overloadable))min(long v1, long v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9070 | #endif |
| 9071 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9072 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9073 | /** |
| 9074 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9075 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9076 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9077 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9078 | extern long2 __attribute__((const, overloadable))min(long2 v1, long2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9079 | #endif |
| 9080 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9081 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9082 | /** |
| 9083 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9084 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9085 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9086 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9087 | extern long3 __attribute__((const, overloadable))min(long3 v1, long3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9088 | #endif |
| 9089 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9090 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9091 | /** |
| 9092 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9093 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9094 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9095 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9096 | extern long4 __attribute__((const, overloadable))min(long4 v1, long4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9097 | #endif |
| 9098 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9099 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9100 | /** |
| 9101 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9102 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9103 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9104 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9105 | extern ulong __attribute__((const, overloadable))min(ulong v1, ulong v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9106 | #endif |
| 9107 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9108 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9109 | /** |
| 9110 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9111 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9112 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9113 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9114 | extern ulong2 __attribute__((const, overloadable))min(ulong2 v1, ulong2 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9115 | #endif |
| 9116 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9117 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9118 | /** |
| 9119 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9120 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9121 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9122 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9123 | extern ulong3 __attribute__((const, overloadable))min(ulong3 v1, ulong3 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9124 | #endif |
| 9125 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9126 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9127 | /** |
| 9128 | * Returns the minimum value from two arguments |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9129 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 9130 | * Supported by API versions 21 and newer. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9131 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9132 | extern ulong4 __attribute__((const, overloadable))min(ulong4 v1, ulong4 v2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9133 | #endif |
| 9134 | |
| 9135 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9136 | /** |
| 9137 | * Returns start + ((stop - start) * amount). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9138 | * |
| 9139 | * Supported by API versions 9 and newer. |
| 9140 | */ |
| 9141 | extern float __attribute__((const, overloadable))mix(float start, float stop, float amount); |
| 9142 | #endif |
| 9143 | |
| 9144 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9145 | /** |
| 9146 | * Returns start + ((stop - start) * amount). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9147 | * |
| 9148 | * Supported by API versions 9 and newer. |
| 9149 | */ |
| 9150 | extern float2 __attribute__((const, overloadable))mix(float2 start, float2 stop, float2 amount); |
| 9151 | #endif |
| 9152 | |
| 9153 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9154 | /** |
| 9155 | * Returns start + ((stop - start) * amount). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9156 | * |
| 9157 | * Supported by API versions 9 and newer. |
| 9158 | */ |
| 9159 | extern float3 __attribute__((const, overloadable))mix(float3 start, float3 stop, float3 amount); |
| 9160 | #endif |
| 9161 | |
| 9162 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9163 | /** |
| 9164 | * Returns start + ((stop - start) * amount). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9165 | * |
| 9166 | * Supported by API versions 9 and newer. |
| 9167 | */ |
| 9168 | extern float4 __attribute__((const, overloadable))mix(float4 start, float4 stop, float4 amount); |
| 9169 | #endif |
| 9170 | |
| 9171 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9172 | /** |
| 9173 | * Returns start + ((stop - start) * amount). |
| 9174 | * |
| 9175 | * This can be useful for mixing two values. For example, to create a new color that is 40% color1 and 60% color2, use mix(color1, color2, 0.6f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9176 | * |
| 9177 | * Supported by API versions 9 and newer. |
| 9178 | */ |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9179 | extern float2 __attribute__((const, overloadable))mix(float2 start, float2 stop, float amount); |
| 9180 | #endif |
| 9181 | |
| 9182 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9183 | /** |
| 9184 | * Returns start + ((stop - start) * amount). |
| 9185 | * |
| 9186 | * This can be useful for mixing two values. For example, to create a new color that is 40% color1 and 60% color2, use mix(color1, color2, 0.6f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9187 | * |
| 9188 | * Supported by API versions 9 and newer. |
| 9189 | */ |
| 9190 | extern float3 __attribute__((const, overloadable))mix(float3 start, float3 stop, float amount); |
| 9191 | #endif |
| 9192 | |
| 9193 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9194 | /** |
| 9195 | * Returns start + ((stop - start) * amount). |
| 9196 | * |
| 9197 | * This can be useful for mixing two values. For example, to create a new color that is 40% color1 and 60% color2, use mix(color1, color2, 0.6f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 9198 | * |
| 9199 | * Supported by API versions 9 and newer. |
| 9200 | */ |
| 9201 | extern float4 __attribute__((const, overloadable))mix(float4 start, float4 stop, float amount); |
| 9202 | #endif |
| 9203 | |
| 9204 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9205 | /** |
| 9206 | * Returns the integral and fractional components of a number. |
| 9207 | * |
| 9208 | * Both components will have the same sign as x. For example, for an input of -3.72f, iret will be set to -3.f and .72f will be returned. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9209 | * |
| 9210 | * @param x Source value |
| 9211 | * @param iret iret[0] will be set to the integral portion of the number. |
| 9212 | * @return The floating point portion of the value. |
| 9213 | * |
| 9214 | * Supported by API versions 9 and newer. |
| 9215 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9216 | extern float __attribute__((overloadable))modf(float x, float* iret); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9217 | #endif |
| 9218 | |
| 9219 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9220 | /** |
| 9221 | * Returns the integral and fractional components of a number. |
| 9222 | * |
| 9223 | * Both components will have the same sign as x. For example, for an input of -3.72f, iret will be set to -3.f and .72f will be returned. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9224 | * |
| 9225 | * @param x Source value |
| 9226 | * @param iret iret[0] will be set to the integral portion of the number. |
| 9227 | * @return The floating point portion of the value. |
| 9228 | * |
| 9229 | * Supported by API versions 9 and newer. |
| 9230 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9231 | extern float2 __attribute__((overloadable))modf(float2 x, float2* iret); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9232 | #endif |
| 9233 | |
| 9234 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9235 | /** |
| 9236 | * Returns the integral and fractional components of a number. |
| 9237 | * |
| 9238 | * Both components will have the same sign as x. For example, for an input of -3.72f, iret will be set to -3.f and .72f will be returned. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9239 | * |
| 9240 | * @param x Source value |
| 9241 | * @param iret iret[0] will be set to the integral portion of the number. |
| 9242 | * @return The floating point portion of the value. |
| 9243 | * |
| 9244 | * Supported by API versions 9 and newer. |
| 9245 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9246 | extern float3 __attribute__((overloadable))modf(float3 x, float3* iret); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9247 | #endif |
| 9248 | |
| 9249 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9250 | /** |
| 9251 | * Returns the integral and fractional components of a number. |
| 9252 | * |
| 9253 | * Both components will have the same sign as x. For example, for an input of -3.72f, iret will be set to -3.f and .72f will be returned. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9254 | * |
| 9255 | * @param x Source value |
| 9256 | * @param iret iret[0] will be set to the integral portion of the number. |
| 9257 | * @return The floating point portion of the value. |
| 9258 | * |
| 9259 | * Supported by API versions 9 and newer. |
| 9260 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 9261 | extern float4 __attribute__((overloadable))modf(float4 x, float4* iret); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9262 | #endif |
| 9263 | |
| 9264 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9265 | /** |
| 9266 | * Returns a NaN value (Not a Number). |
| 9267 | * |
| 9268 | * The argument is embedded into the return value and can be used to distinguish various NaNs. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9269 | * |
| 9270 | * Supported by API versions 9 and newer. |
| 9271 | */ |
| 9272 | extern float __attribute__((const, overloadable))nan(uint); |
| 9273 | #endif |
| 9274 | |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9275 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9276 | /** |
| 9277 | * Returns the approximate inverse cosine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9278 | * |
| 9279 | * Supported by API versions 21 and newer. |
| 9280 | */ |
| 9281 | extern float __attribute__((const, overloadable))native_acos(float v); |
| 9282 | #endif |
| 9283 | |
| 9284 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9285 | /** |
| 9286 | * Returns the approximate inverse cosine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9287 | * |
| 9288 | * Supported by API versions 21 and newer. |
| 9289 | */ |
| 9290 | extern float2 __attribute__((const, overloadable))native_acos(float2 v); |
| 9291 | #endif |
| 9292 | |
| 9293 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9294 | /** |
| 9295 | * Returns the approximate inverse cosine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9296 | * |
| 9297 | * Supported by API versions 21 and newer. |
| 9298 | */ |
| 9299 | extern float3 __attribute__((const, overloadable))native_acos(float3 v); |
| 9300 | #endif |
| 9301 | |
| 9302 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9303 | /** |
| 9304 | * Returns the approximate inverse cosine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9305 | * |
| 9306 | * Supported by API versions 21 and newer. |
| 9307 | */ |
| 9308 | extern float4 __attribute__((const, overloadable))native_acos(float4 v); |
| 9309 | #endif |
| 9310 | |
| 9311 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9312 | /** |
| 9313 | * Returns the approximate inverse hyperbolic cosine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9314 | * |
| 9315 | * Supported by API versions 21 and newer. |
| 9316 | */ |
| 9317 | extern float __attribute__((const, overloadable))native_acosh(float); |
| 9318 | #endif |
| 9319 | |
| 9320 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9321 | /** |
| 9322 | * Returns the approximate inverse hyperbolic cosine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9323 | * |
| 9324 | * Supported by API versions 21 and newer. |
| 9325 | */ |
| 9326 | extern float2 __attribute__((const, overloadable))native_acosh(float2); |
| 9327 | #endif |
| 9328 | |
| 9329 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9330 | /** |
| 9331 | * Returns the approximate inverse hyperbolic cosine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9332 | * |
| 9333 | * Supported by API versions 21 and newer. |
| 9334 | */ |
| 9335 | extern float3 __attribute__((const, overloadable))native_acosh(float3); |
| 9336 | #endif |
| 9337 | |
| 9338 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9339 | /** |
| 9340 | * Returns the approximate inverse hyperbolic cosine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9341 | * |
| 9342 | * Supported by API versions 21 and newer. |
| 9343 | */ |
| 9344 | extern float4 __attribute__((const, overloadable))native_acosh(float4); |
| 9345 | #endif |
| 9346 | |
| 9347 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9348 | /** |
| 9349 | * Returns the approximate inverse cosine in radians, divided by pi. |
| 9350 | * |
| 9351 | * To get an inverse cosine measured in degrees, use acospi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9352 | * |
| 9353 | * Supported by API versions 21 and newer. |
| 9354 | */ |
| 9355 | extern float __attribute__((const, overloadable))native_acospi(float v); |
| 9356 | #endif |
| 9357 | |
| 9358 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9359 | /** |
| 9360 | * Returns the approximate inverse cosine in radians, divided by pi. |
| 9361 | * |
| 9362 | * To get an inverse cosine measured in degrees, use acospi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9363 | * |
| 9364 | * Supported by API versions 21 and newer. |
| 9365 | */ |
| 9366 | extern float2 __attribute__((const, overloadable))native_acospi(float2 v); |
| 9367 | #endif |
| 9368 | |
| 9369 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9370 | /** |
| 9371 | * Returns the approximate inverse cosine in radians, divided by pi. |
| 9372 | * |
| 9373 | * To get an inverse cosine measured in degrees, use acospi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9374 | * |
| 9375 | * Supported by API versions 21 and newer. |
| 9376 | */ |
| 9377 | extern float3 __attribute__((const, overloadable))native_acospi(float3 v); |
| 9378 | #endif |
| 9379 | |
| 9380 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9381 | /** |
| 9382 | * Returns the approximate inverse cosine in radians, divided by pi. |
| 9383 | * |
| 9384 | * To get an inverse cosine measured in degrees, use acospi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9385 | * |
| 9386 | * Supported by API versions 21 and newer. |
| 9387 | */ |
| 9388 | extern float4 __attribute__((const, overloadable))native_acospi(float4 v); |
| 9389 | #endif |
| 9390 | |
| 9391 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9392 | /** |
| 9393 | * Returns the approximate inverse sine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9394 | * |
| 9395 | * Supported by API versions 21 and newer. |
| 9396 | */ |
| 9397 | extern float __attribute__((const, overloadable))native_asin(float v); |
| 9398 | #endif |
| 9399 | |
| 9400 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9401 | /** |
| 9402 | * Returns the approximate inverse sine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9403 | * |
| 9404 | * Supported by API versions 21 and newer. |
| 9405 | */ |
| 9406 | extern float2 __attribute__((const, overloadable))native_asin(float2 v); |
| 9407 | #endif |
| 9408 | |
| 9409 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9410 | /** |
| 9411 | * Returns the approximate inverse sine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9412 | * |
| 9413 | * Supported by API versions 21 and newer. |
| 9414 | */ |
| 9415 | extern float3 __attribute__((const, overloadable))native_asin(float3 v); |
| 9416 | #endif |
| 9417 | |
| 9418 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9419 | /** |
| 9420 | * Returns the approximate inverse sine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9421 | * |
| 9422 | * Supported by API versions 21 and newer. |
| 9423 | */ |
| 9424 | extern float4 __attribute__((const, overloadable))native_asin(float4 v); |
| 9425 | #endif |
| 9426 | |
| 9427 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9428 | /** |
| 9429 | * Returns the approximate inverse hyperbolic sine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9430 | * |
| 9431 | * Supported by API versions 21 and newer. |
| 9432 | */ |
| 9433 | extern float __attribute__((const, overloadable))native_asinh(float); |
| 9434 | #endif |
| 9435 | |
| 9436 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9437 | /** |
| 9438 | * Returns the approximate inverse hyperbolic sine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9439 | * |
| 9440 | * Supported by API versions 21 and newer. |
| 9441 | */ |
| 9442 | extern float2 __attribute__((const, overloadable))native_asinh(float2); |
| 9443 | #endif |
| 9444 | |
| 9445 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9446 | /** |
| 9447 | * Returns the approximate inverse hyperbolic sine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9448 | * |
| 9449 | * Supported by API versions 21 and newer. |
| 9450 | */ |
| 9451 | extern float3 __attribute__((const, overloadable))native_asinh(float3); |
| 9452 | #endif |
| 9453 | |
| 9454 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9455 | /** |
| 9456 | * Returns the approximate inverse hyperbolic sine, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9457 | * |
| 9458 | * Supported by API versions 21 and newer. |
| 9459 | */ |
| 9460 | extern float4 __attribute__((const, overloadable))native_asinh(float4); |
| 9461 | #endif |
| 9462 | |
| 9463 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9464 | /** |
| 9465 | * Returns the approximate inverse sine in radians, divided by pi. |
| 9466 | * |
| 9467 | * To get an inverse sine measured in degrees, use asinpi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9468 | * |
| 9469 | * Supported by API versions 21 and newer. |
| 9470 | */ |
| 9471 | extern float __attribute__((const, overloadable))native_asinpi(float v); |
| 9472 | #endif |
| 9473 | |
| 9474 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9475 | /** |
| 9476 | * Returns the approximate inverse sine in radians, divided by pi. |
| 9477 | * |
| 9478 | * To get an inverse sine measured in degrees, use asinpi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9479 | * |
| 9480 | * Supported by API versions 21 and newer. |
| 9481 | */ |
| 9482 | extern float2 __attribute__((const, overloadable))native_asinpi(float2 v); |
| 9483 | #endif |
| 9484 | |
| 9485 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9486 | /** |
| 9487 | * Returns the approximate inverse sine in radians, divided by pi. |
| 9488 | * |
| 9489 | * To get an inverse sine measured in degrees, use asinpi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9490 | * |
| 9491 | * Supported by API versions 21 and newer. |
| 9492 | */ |
| 9493 | extern float3 __attribute__((const, overloadable))native_asinpi(float3 v); |
| 9494 | #endif |
| 9495 | |
| 9496 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9497 | /** |
| 9498 | * Returns the approximate inverse sine in radians, divided by pi. |
| 9499 | * |
| 9500 | * To get an inverse sine measured in degrees, use asinpi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9501 | * |
| 9502 | * Supported by API versions 21 and newer. |
| 9503 | */ |
| 9504 | extern float4 __attribute__((const, overloadable))native_asinpi(float4 v); |
| 9505 | #endif |
| 9506 | |
| 9507 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9508 | /** |
| 9509 | * Returns the approximate inverse tangent, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9510 | * |
| 9511 | * Supported by API versions 21 and newer. |
| 9512 | */ |
| 9513 | extern float __attribute__((const, overloadable))native_atan(float v); |
| 9514 | #endif |
| 9515 | |
| 9516 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9517 | /** |
| 9518 | * Returns the approximate inverse tangent, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9519 | * |
| 9520 | * Supported by API versions 21 and newer. |
| 9521 | */ |
| 9522 | extern float2 __attribute__((const, overloadable))native_atan(float2 v); |
| 9523 | #endif |
| 9524 | |
| 9525 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9526 | /** |
| 9527 | * Returns the approximate inverse tangent, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9528 | * |
| 9529 | * Supported by API versions 21 and newer. |
| 9530 | */ |
| 9531 | extern float3 __attribute__((const, overloadable))native_atan(float3 v); |
| 9532 | #endif |
| 9533 | |
| 9534 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9535 | /** |
| 9536 | * Returns the approximate inverse tangent, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9537 | * |
| 9538 | * Supported by API versions 21 and newer. |
| 9539 | */ |
| 9540 | extern float4 __attribute__((const, overloadable))native_atan(float4 v); |
| 9541 | #endif |
| 9542 | |
| 9543 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9544 | /** |
| 9545 | * Returns the approximate inverse tangent of y / x, in radians. |
| 9546 | * |
| 9547 | * x can be 0. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9548 | * |
| 9549 | * Supported by API versions 21 and newer. |
| 9550 | */ |
| 9551 | extern float __attribute__((const, overloadable))native_atan2(float y, float x); |
| 9552 | #endif |
| 9553 | |
| 9554 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9555 | /** |
| 9556 | * Returns the approximate inverse tangent of y / x, in radians. |
| 9557 | * |
| 9558 | * x can be 0. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9559 | * |
| 9560 | * Supported by API versions 21 and newer. |
| 9561 | */ |
| 9562 | extern float2 __attribute__((const, overloadable))native_atan2(float2 y, float2 x); |
| 9563 | #endif |
| 9564 | |
| 9565 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9566 | /** |
| 9567 | * Returns the approximate inverse tangent of y / x, in radians. |
| 9568 | * |
| 9569 | * x can be 0. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9570 | * |
| 9571 | * Supported by API versions 21 and newer. |
| 9572 | */ |
| 9573 | extern float3 __attribute__((const, overloadable))native_atan2(float3 y, float3 x); |
| 9574 | #endif |
| 9575 | |
| 9576 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9577 | /** |
| 9578 | * Returns the approximate inverse tangent of y / x, in radians. |
| 9579 | * |
| 9580 | * x can be 0. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9581 | * |
| 9582 | * Supported by API versions 21 and newer. |
| 9583 | */ |
| 9584 | extern float4 __attribute__((const, overloadable))native_atan2(float4 y, float4 x); |
| 9585 | #endif |
| 9586 | |
| 9587 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9588 | /** |
| 9589 | * Returns the approximate inverse tangent of y / x, in radians, divided by pi. |
| 9590 | * |
| 9591 | * To get an inverse tangent measured in degrees, use atan2pi(x, y) * 180.f. |
| 9592 | * |
| 9593 | * x can be 0. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9594 | * |
| 9595 | * Supported by API versions 21 and newer. |
| 9596 | */ |
| 9597 | extern float __attribute__((const, overloadable))native_atan2pi(float y, float x); |
| 9598 | #endif |
| 9599 | |
| 9600 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9601 | /** |
| 9602 | * Returns the approximate inverse tangent of y / x, in radians, divided by pi. |
| 9603 | * |
| 9604 | * To get an inverse tangent measured in degrees, use atan2pi(x, y) * 180.f. |
| 9605 | * |
| 9606 | * x can be 0. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9607 | * |
| 9608 | * Supported by API versions 21 and newer. |
| 9609 | */ |
| 9610 | extern float2 __attribute__((const, overloadable))native_atan2pi(float2 y, float2 x); |
| 9611 | #endif |
| 9612 | |
| 9613 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9614 | /** |
| 9615 | * Returns the approximate inverse tangent of y / x, in radians, divided by pi. |
| 9616 | * |
| 9617 | * To get an inverse tangent measured in degrees, use atan2pi(x, y) * 180.f. |
| 9618 | * |
| 9619 | * x can be 0. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9620 | * |
| 9621 | * Supported by API versions 21 and newer. |
| 9622 | */ |
| 9623 | extern float3 __attribute__((const, overloadable))native_atan2pi(float3 y, float3 x); |
| 9624 | #endif |
| 9625 | |
| 9626 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9627 | /** |
| 9628 | * Returns the approximate inverse tangent of y / x, in radians, divided by pi. |
| 9629 | * |
| 9630 | * To get an inverse tangent measured in degrees, use atan2pi(x, y) * 180.f. |
| 9631 | * |
| 9632 | * x can be 0. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9633 | * |
| 9634 | * Supported by API versions 21 and newer. |
| 9635 | */ |
| 9636 | extern float4 __attribute__((const, overloadable))native_atan2pi(float4 y, float4 x); |
| 9637 | #endif |
| 9638 | |
| 9639 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9640 | /** |
| 9641 | * Returns the approximate inverse hyperbolic tangent, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9642 | * |
| 9643 | * Supported by API versions 21 and newer. |
| 9644 | */ |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 9645 | extern float __attribute__((const, overloadable))native_atanh(float in); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9646 | #endif |
| 9647 | |
| 9648 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9649 | /** |
| 9650 | * Returns the approximate inverse hyperbolic tangent, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9651 | * |
| 9652 | * Supported by API versions 21 and newer. |
| 9653 | */ |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 9654 | extern float2 __attribute__((const, overloadable))native_atanh(float2 in); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9655 | #endif |
| 9656 | |
| 9657 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9658 | /** |
| 9659 | * Returns the approximate inverse hyperbolic tangent, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9660 | * |
| 9661 | * Supported by API versions 21 and newer. |
| 9662 | */ |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 9663 | extern float3 __attribute__((const, overloadable))native_atanh(float3 in); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9664 | #endif |
| 9665 | |
| 9666 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9667 | /** |
| 9668 | * Returns the approximate inverse hyperbolic tangent, in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9669 | * |
| 9670 | * Supported by API versions 21 and newer. |
| 9671 | */ |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 9672 | extern float4 __attribute__((const, overloadable))native_atanh(float4 in); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9673 | #endif |
| 9674 | |
| 9675 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9676 | /** |
| 9677 | * Returns the approximate inverse tangent in radians, divided by pi. |
| 9678 | * |
| 9679 | * To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9680 | * |
| 9681 | * Supported by API versions 21 and newer. |
| 9682 | */ |
| 9683 | extern float __attribute__((const, overloadable))native_atanpi(float v); |
| 9684 | #endif |
| 9685 | |
| 9686 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9687 | /** |
| 9688 | * Returns the approximate inverse tangent in radians, divided by pi. |
| 9689 | * |
| 9690 | * To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9691 | * |
| 9692 | * Supported by API versions 21 and newer. |
| 9693 | */ |
| 9694 | extern float2 __attribute__((const, overloadable))native_atanpi(float2 v); |
| 9695 | #endif |
| 9696 | |
| 9697 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9698 | /** |
| 9699 | * Returns the approximate inverse tangent in radians, divided by pi. |
| 9700 | * |
| 9701 | * To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9702 | * |
| 9703 | * Supported by API versions 21 and newer. |
| 9704 | */ |
| 9705 | extern float3 __attribute__((const, overloadable))native_atanpi(float3 v); |
| 9706 | #endif |
| 9707 | |
| 9708 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9709 | /** |
| 9710 | * Returns the approximate inverse tangent in radians, divided by pi. |
| 9711 | * |
| 9712 | * To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9713 | * |
| 9714 | * Supported by API versions 21 and newer. |
| 9715 | */ |
| 9716 | extern float4 __attribute__((const, overloadable))native_atanpi(float4 v); |
| 9717 | #endif |
| 9718 | |
| 9719 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9720 | /** |
| 9721 | * Returns the approximate cubic root. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9722 | * |
| 9723 | * Supported by API versions 21 and newer. |
| 9724 | */ |
| 9725 | extern float __attribute__((const, overloadable))native_cbrt(float); |
| 9726 | #endif |
| 9727 | |
| 9728 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9729 | /** |
| 9730 | * Returns the approximate cubic root. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9731 | * |
| 9732 | * Supported by API versions 21 and newer. |
| 9733 | */ |
| 9734 | extern float2 __attribute__((const, overloadable))native_cbrt(float2); |
| 9735 | #endif |
| 9736 | |
| 9737 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9738 | /** |
| 9739 | * Returns the approximate cubic root. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9740 | * |
| 9741 | * Supported by API versions 21 and newer. |
| 9742 | */ |
| 9743 | extern float3 __attribute__((const, overloadable))native_cbrt(float3); |
| 9744 | #endif |
| 9745 | |
| 9746 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9747 | /** |
| 9748 | * Returns the approximate cubic root. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9749 | * |
| 9750 | * Supported by API versions 21 and newer. |
| 9751 | */ |
| 9752 | extern float4 __attribute__((const, overloadable))native_cbrt(float4); |
| 9753 | #endif |
| 9754 | |
| 9755 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9756 | /** |
| 9757 | * Returns the approximate cosine of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9758 | * |
| 9759 | * Supported by API versions 21 and newer. |
| 9760 | */ |
| 9761 | extern float __attribute__((const, overloadable))native_cos(float); |
| 9762 | #endif |
| 9763 | |
| 9764 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9765 | /** |
| 9766 | * Returns the approximate cosine of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9767 | * |
| 9768 | * Supported by API versions 21 and newer. |
| 9769 | */ |
| 9770 | extern float2 __attribute__((const, overloadable))native_cos(float2); |
| 9771 | #endif |
| 9772 | |
| 9773 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9774 | /** |
| 9775 | * Returns the approximate cosine of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9776 | * |
| 9777 | * Supported by API versions 21 and newer. |
| 9778 | */ |
| 9779 | extern float3 __attribute__((const, overloadable))native_cos(float3); |
| 9780 | #endif |
| 9781 | |
| 9782 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9783 | /** |
| 9784 | * Returns the approximate cosine of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9785 | * |
| 9786 | * Supported by API versions 21 and newer. |
| 9787 | */ |
| 9788 | extern float4 __attribute__((const, overloadable))native_cos(float4); |
| 9789 | #endif |
| 9790 | |
| 9791 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9792 | /** |
| 9793 | * Returns the approximate hypebolic cosine. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9794 | * |
| 9795 | * Supported by API versions 21 and newer. |
| 9796 | */ |
| 9797 | extern float __attribute__((const, overloadable))native_cosh(float); |
| 9798 | #endif |
| 9799 | |
| 9800 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9801 | /** |
| 9802 | * Returns the approximate hypebolic cosine. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9803 | * |
| 9804 | * Supported by API versions 21 and newer. |
| 9805 | */ |
| 9806 | extern float2 __attribute__((const, overloadable))native_cosh(float2); |
| 9807 | #endif |
| 9808 | |
| 9809 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9810 | /** |
| 9811 | * Returns the approximate hypebolic cosine. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9812 | * |
| 9813 | * Supported by API versions 21 and newer. |
| 9814 | */ |
| 9815 | extern float3 __attribute__((const, overloadable))native_cosh(float3); |
| 9816 | #endif |
| 9817 | |
| 9818 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9819 | /** |
| 9820 | * Returns the approximate hypebolic cosine. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9821 | * |
| 9822 | * Supported by API versions 21 and newer. |
| 9823 | */ |
| 9824 | extern float4 __attribute__((const, overloadable))native_cosh(float4); |
| 9825 | #endif |
| 9826 | |
| 9827 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9828 | /** |
| 9829 | * Returns the approximate cosine of (x * pi), where (x * pi) is measured in radians. |
| 9830 | * |
| 9831 | * To get the cosine of a value measured in degrees, call cospi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9832 | * |
| 9833 | * Supported by API versions 21 and newer. |
| 9834 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9835 | extern float __attribute__((const, overloadable))native_cospi(float x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9836 | #endif |
| 9837 | |
| 9838 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9839 | /** |
| 9840 | * Returns the approximate cosine of (x * pi), where (x * pi) is measured in radians. |
| 9841 | * |
| 9842 | * To get the cosine of a value measured in degrees, call cospi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9843 | * |
| 9844 | * Supported by API versions 21 and newer. |
| 9845 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9846 | extern float2 __attribute__((const, overloadable))native_cospi(float2 x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9847 | #endif |
| 9848 | |
| 9849 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9850 | /** |
| 9851 | * Returns the approximate cosine of (x * pi), where (x * pi) is measured in radians. |
| 9852 | * |
| 9853 | * To get the cosine of a value measured in degrees, call cospi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9854 | * |
| 9855 | * Supported by API versions 21 and newer. |
| 9856 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9857 | extern float3 __attribute__((const, overloadable))native_cospi(float3 x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9858 | #endif |
| 9859 | |
| 9860 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9861 | /** |
| 9862 | * Returns the approximate cosine of (x * pi), where (x * pi) is measured in radians. |
| 9863 | * |
| 9864 | * To get the cosine of a value measured in degrees, call cospi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9865 | * |
| 9866 | * Supported by API versions 21 and newer. |
| 9867 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9868 | extern float4 __attribute__((const, overloadable))native_cospi(float4 x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9869 | #endif |
| 9870 | |
| 9871 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9872 | /** |
| 9873 | * Computes the approximate distance between two points. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9874 | * |
| 9875 | * Supported by API versions 21 and newer. |
| 9876 | */ |
| 9877 | extern float __attribute__((const, overloadable))native_distance(float lhs, float rhs); |
| 9878 | #endif |
| 9879 | |
| 9880 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9881 | /** |
| 9882 | * Computes the approximate distance between two points. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9883 | * |
| 9884 | * Supported by API versions 21 and newer. |
| 9885 | */ |
| 9886 | extern float __attribute__((const, overloadable))native_distance(float2 lhs, float2 rhs); |
| 9887 | #endif |
| 9888 | |
| 9889 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9890 | /** |
| 9891 | * Computes the approximate distance between two points. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9892 | * |
| 9893 | * Supported by API versions 21 and newer. |
| 9894 | */ |
| 9895 | extern float __attribute__((const, overloadable))native_distance(float3 lhs, float3 rhs); |
| 9896 | #endif |
| 9897 | |
| 9898 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9899 | /** |
| 9900 | * Computes the approximate distance between two points. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9901 | * |
| 9902 | * Supported by API versions 21 and newer. |
| 9903 | */ |
| 9904 | extern float __attribute__((const, overloadable))native_distance(float4 lhs, float4 rhs); |
| 9905 | #endif |
| 9906 | |
| 9907 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9908 | /** |
| 9909 | * Computes the approximate division result of two values. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9910 | * |
| 9911 | * Supported by API versions 21 and newer. |
| 9912 | */ |
| 9913 | extern float __attribute__((const, overloadable))native_divide(float lhs, float rhs); |
| 9914 | #endif |
| 9915 | |
| 9916 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9917 | /** |
| 9918 | * Computes the approximate division result of two values. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9919 | * |
| 9920 | * Supported by API versions 21 and newer. |
| 9921 | */ |
| 9922 | extern float2 __attribute__((const, overloadable))native_divide(float2 lhs, float2 rhs); |
| 9923 | #endif |
| 9924 | |
| 9925 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9926 | /** |
| 9927 | * Computes the approximate division result of two values. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9928 | * |
| 9929 | * Supported by API versions 21 and newer. |
| 9930 | */ |
| 9931 | extern float3 __attribute__((const, overloadable))native_divide(float3 lhs, float3 rhs); |
| 9932 | #endif |
| 9933 | |
| 9934 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9935 | /** |
| 9936 | * Computes the approximate division result of two values. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 9937 | * |
| 9938 | * Supported by API versions 21 and newer. |
| 9939 | */ |
| 9940 | extern float4 __attribute__((const, overloadable))native_divide(float4 lhs, float4 rhs); |
| 9941 | #endif |
| 9942 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9943 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9944 | /** |
| 9945 | * Fast approximate exp. |
| 9946 | * |
| 9947 | * It is valid for inputs from -86.f to 86.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9948 | * |
| 9949 | * Supported by API versions 18 and newer. |
| 9950 | */ |
| 9951 | extern float __attribute__((const, overloadable))native_exp(float v); |
| 9952 | #endif |
| 9953 | |
| 9954 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9955 | /** |
| 9956 | * Fast approximate exp. |
| 9957 | * |
| 9958 | * It is valid for inputs from -86.f to 86.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9959 | * |
| 9960 | * Supported by API versions 18 and newer. |
| 9961 | */ |
| 9962 | extern float2 __attribute__((const, overloadable))native_exp(float2 v); |
| 9963 | #endif |
| 9964 | |
| 9965 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9966 | /** |
| 9967 | * Fast approximate exp. |
| 9968 | * |
| 9969 | * It is valid for inputs from -86.f to 86.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9970 | * |
| 9971 | * Supported by API versions 18 and newer. |
| 9972 | */ |
| 9973 | extern float3 __attribute__((const, overloadable))native_exp(float3 v); |
| 9974 | #endif |
| 9975 | |
| 9976 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9977 | /** |
| 9978 | * Fast approximate exp. |
| 9979 | * |
| 9980 | * It is valid for inputs from -86.f to 86.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9981 | * |
| 9982 | * Supported by API versions 18 and newer. |
| 9983 | */ |
| 9984 | extern float4 __attribute__((const, overloadable))native_exp(float4 v); |
| 9985 | #endif |
| 9986 | |
| 9987 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9988 | /** |
| 9989 | * Fast approximate exp10. |
| 9990 | * |
| 9991 | * It is valid for inputs from -37.f to 37.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 9992 | * |
| 9993 | * Supported by API versions 18 and newer. |
| 9994 | */ |
| 9995 | extern float __attribute__((const, overloadable))native_exp10(float v); |
| 9996 | #endif |
| 9997 | |
| 9998 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 9999 | /** |
| 10000 | * Fast approximate exp10. |
| 10001 | * |
| 10002 | * It is valid for inputs from -37.f to 37.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10003 | * |
| 10004 | * Supported by API versions 18 and newer. |
| 10005 | */ |
| 10006 | extern float2 __attribute__((const, overloadable))native_exp10(float2 v); |
| 10007 | #endif |
| 10008 | |
| 10009 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10010 | /** |
| 10011 | * Fast approximate exp10. |
| 10012 | * |
| 10013 | * It is valid for inputs from -37.f to 37.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10014 | * |
| 10015 | * Supported by API versions 18 and newer. |
| 10016 | */ |
| 10017 | extern float3 __attribute__((const, overloadable))native_exp10(float3 v); |
| 10018 | #endif |
| 10019 | |
| 10020 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10021 | /** |
| 10022 | * Fast approximate exp10. |
| 10023 | * |
| 10024 | * It is valid for inputs from -37.f to 37.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10025 | * |
| 10026 | * Supported by API versions 18 and newer. |
| 10027 | */ |
| 10028 | extern float4 __attribute__((const, overloadable))native_exp10(float4 v); |
| 10029 | #endif |
| 10030 | |
| 10031 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10032 | /** |
| 10033 | * Fast approximate exp2. |
| 10034 | * |
| 10035 | * It is valid for inputs from -125.f to 125.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10036 | * |
| 10037 | * Supported by API versions 18 and newer. |
| 10038 | */ |
| 10039 | extern float __attribute__((const, overloadable))native_exp2(float v); |
| 10040 | #endif |
| 10041 | |
| 10042 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10043 | /** |
| 10044 | * Fast approximate exp2. |
| 10045 | * |
| 10046 | * It is valid for inputs from -125.f to 125.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10047 | * |
| 10048 | * Supported by API versions 18 and newer. |
| 10049 | */ |
| 10050 | extern float2 __attribute__((const, overloadable))native_exp2(float2 v); |
| 10051 | #endif |
| 10052 | |
| 10053 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10054 | /** |
| 10055 | * Fast approximate exp2. |
| 10056 | * |
| 10057 | * It is valid for inputs from -125.f to 125.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10058 | * |
| 10059 | * Supported by API versions 18 and newer. |
| 10060 | */ |
| 10061 | extern float3 __attribute__((const, overloadable))native_exp2(float3 v); |
| 10062 | #endif |
| 10063 | |
| 10064 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10065 | /** |
| 10066 | * Fast approximate exp2. |
| 10067 | * |
| 10068 | * It is valid for inputs from -125.f to 125.f. The precision is no worse than what would be expected from using 16 bit floating point values. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10069 | * |
| 10070 | * Supported by API versions 18 and newer. |
| 10071 | */ |
| 10072 | extern float4 __attribute__((const, overloadable))native_exp2(float4 v); |
| 10073 | #endif |
| 10074 | |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10075 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10076 | /** |
| 10077 | * Returns the approximate (e ^ value) - 1. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10078 | * |
| 10079 | * Supported by API versions 21 and newer. |
| 10080 | */ |
| 10081 | extern float __attribute__((const, overloadable))native_expm1(float); |
| 10082 | #endif |
| 10083 | |
| 10084 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10085 | /** |
| 10086 | * Returns the approximate (e ^ value) - 1. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10087 | * |
| 10088 | * Supported by API versions 21 and newer. |
| 10089 | */ |
| 10090 | extern float2 __attribute__((const, overloadable))native_expm1(float2); |
| 10091 | #endif |
| 10092 | |
| 10093 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10094 | /** |
| 10095 | * Returns the approximate (e ^ value) - 1. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10096 | * |
| 10097 | * Supported by API versions 21 and newer. |
| 10098 | */ |
| 10099 | extern float3 __attribute__((const, overloadable))native_expm1(float3); |
| 10100 | #endif |
| 10101 | |
| 10102 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10103 | /** |
| 10104 | * Returns the approximate (e ^ value) - 1. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10105 | * |
| 10106 | * Supported by API versions 21 and newer. |
| 10107 | */ |
| 10108 | extern float4 __attribute__((const, overloadable))native_expm1(float4); |
| 10109 | #endif |
| 10110 | |
| 10111 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10112 | /** |
| 10113 | * Returns the approximate native_sqrt(x*x + y*y) |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10114 | * |
| 10115 | * Supported by API versions 21 and newer. |
| 10116 | */ |
| 10117 | extern float __attribute__((const, overloadable))native_hypot(float x, float y); |
| 10118 | #endif |
| 10119 | |
| 10120 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10121 | /** |
| 10122 | * Returns the approximate native_sqrt(x*x + y*y) |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10123 | * |
| 10124 | * Supported by API versions 21 and newer. |
| 10125 | */ |
| 10126 | extern float2 __attribute__((const, overloadable))native_hypot(float2 x, float2 y); |
| 10127 | #endif |
| 10128 | |
| 10129 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10130 | /** |
| 10131 | * Returns the approximate native_sqrt(x*x + y*y) |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10132 | * |
| 10133 | * Supported by API versions 21 and newer. |
| 10134 | */ |
| 10135 | extern float3 __attribute__((const, overloadable))native_hypot(float3 x, float3 y); |
| 10136 | #endif |
| 10137 | |
| 10138 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10139 | /** |
| 10140 | * Returns the approximate native_sqrt(x*x + y*y) |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10141 | * |
| 10142 | * Supported by API versions 21 and newer. |
| 10143 | */ |
| 10144 | extern float4 __attribute__((const, overloadable))native_hypot(float4 x, float4 y); |
| 10145 | #endif |
| 10146 | |
| 10147 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10148 | /** |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10149 | * Compute the approximate length of a vector. |
| 10150 | * |
| 10151 | * Supported by API versions 21 and newer. |
| 10152 | */ |
| 10153 | extern float __attribute__((const, overloadable))native_length(float v); |
| 10154 | #endif |
| 10155 | |
| 10156 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10157 | /** |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10158 | * Compute the approximate length of a vector. |
| 10159 | * |
| 10160 | * Supported by API versions 21 and newer. |
| 10161 | */ |
| 10162 | extern float __attribute__((const, overloadable))native_length(float2 v); |
| 10163 | #endif |
| 10164 | |
| 10165 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10166 | /** |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10167 | * Compute the approximate length of a vector. |
| 10168 | * |
| 10169 | * Supported by API versions 21 and newer. |
| 10170 | */ |
| 10171 | extern float __attribute__((const, overloadable))native_length(float3 v); |
| 10172 | #endif |
| 10173 | |
| 10174 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10175 | /** |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10176 | * Compute the approximate length of a vector. |
| 10177 | * |
| 10178 | * Supported by API versions 21 and newer. |
| 10179 | */ |
| 10180 | extern float __attribute__((const, overloadable))native_length(float4 v); |
| 10181 | #endif |
| 10182 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10183 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10184 | /** |
| 10185 | * Fast approximate log. |
| 10186 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10187 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10188 | * |
| 10189 | * Supported by API versions 18 and newer. |
| 10190 | */ |
| 10191 | extern float __attribute__((const, overloadable))native_log(float v); |
| 10192 | #endif |
| 10193 | |
| 10194 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10195 | /** |
| 10196 | * Fast approximate log. |
| 10197 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10198 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10199 | * |
| 10200 | * Supported by API versions 18 and newer. |
| 10201 | */ |
| 10202 | extern float2 __attribute__((const, overloadable))native_log(float2 v); |
| 10203 | #endif |
| 10204 | |
| 10205 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10206 | /** |
| 10207 | * Fast approximate log. |
| 10208 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10209 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10210 | * |
| 10211 | * Supported by API versions 18 and newer. |
| 10212 | */ |
| 10213 | extern float3 __attribute__((const, overloadable))native_log(float3 v); |
| 10214 | #endif |
| 10215 | |
| 10216 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10217 | /** |
| 10218 | * Fast approximate log. |
| 10219 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10220 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10221 | * |
| 10222 | * Supported by API versions 18 and newer. |
| 10223 | */ |
| 10224 | extern float4 __attribute__((const, overloadable))native_log(float4 v); |
| 10225 | #endif |
| 10226 | |
| 10227 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10228 | /** |
| 10229 | * Fast approximate log10. |
| 10230 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10231 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10232 | * |
| 10233 | * Supported by API versions 18 and newer. |
| 10234 | */ |
| 10235 | extern float __attribute__((const, overloadable))native_log10(float v); |
| 10236 | #endif |
| 10237 | |
| 10238 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10239 | /** |
| 10240 | * Fast approximate log10. |
| 10241 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10242 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10243 | * |
| 10244 | * Supported by API versions 18 and newer. |
| 10245 | */ |
| 10246 | extern float2 __attribute__((const, overloadable))native_log10(float2 v); |
| 10247 | #endif |
| 10248 | |
| 10249 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10250 | /** |
| 10251 | * Fast approximate log10. |
| 10252 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10253 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10254 | * |
| 10255 | * Supported by API versions 18 and newer. |
| 10256 | */ |
| 10257 | extern float3 __attribute__((const, overloadable))native_log10(float3 v); |
| 10258 | #endif |
| 10259 | |
| 10260 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10261 | /** |
| 10262 | * Fast approximate log10. |
| 10263 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10264 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10265 | * |
| 10266 | * Supported by API versions 18 and newer. |
| 10267 | */ |
| 10268 | extern float4 __attribute__((const, overloadable))native_log10(float4 v); |
| 10269 | #endif |
| 10270 | |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10271 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10272 | /** |
| 10273 | * Returns the approximate natural logarithm of (v + 1.0f) |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10274 | * |
| 10275 | * Supported by API versions 21 and newer. |
| 10276 | */ |
| 10277 | extern float __attribute__((const, overloadable))native_log1p(float); |
| 10278 | #endif |
| 10279 | |
| 10280 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10281 | /** |
| 10282 | * Returns the approximate natural logarithm of (v + 1.0f) |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10283 | * |
| 10284 | * Supported by API versions 21 and newer. |
| 10285 | */ |
| 10286 | extern float2 __attribute__((const, overloadable))native_log1p(float2); |
| 10287 | #endif |
| 10288 | |
| 10289 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10290 | /** |
| 10291 | * Returns the approximate natural logarithm of (v + 1.0f) |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10292 | * |
| 10293 | * Supported by API versions 21 and newer. |
| 10294 | */ |
| 10295 | extern float3 __attribute__((const, overloadable))native_log1p(float3); |
| 10296 | #endif |
| 10297 | |
| 10298 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10299 | /** |
| 10300 | * Returns the approximate natural logarithm of (v + 1.0f) |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10301 | * |
| 10302 | * Supported by API versions 21 and newer. |
| 10303 | */ |
| 10304 | extern float4 __attribute__((const, overloadable))native_log1p(float4); |
| 10305 | #endif |
| 10306 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10307 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10308 | /** |
| 10309 | * Fast approximate log2. |
| 10310 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10311 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10312 | * |
| 10313 | * Supported by API versions 18 and newer. |
| 10314 | */ |
| 10315 | extern float __attribute__((const, overloadable))native_log2(float v); |
| 10316 | #endif |
| 10317 | |
| 10318 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10319 | /** |
| 10320 | * Fast approximate log2. |
| 10321 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10322 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10323 | * |
| 10324 | * Supported by API versions 18 and newer. |
| 10325 | */ |
| 10326 | extern float2 __attribute__((const, overloadable))native_log2(float2 v); |
| 10327 | #endif |
| 10328 | |
| 10329 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10330 | /** |
| 10331 | * Fast approximate log2. |
| 10332 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10333 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10334 | * |
| 10335 | * Supported by API versions 18 and newer. |
| 10336 | */ |
| 10337 | extern float3 __attribute__((const, overloadable))native_log2(float3 v); |
| 10338 | #endif |
| 10339 | |
| 10340 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10341 | /** |
| 10342 | * Fast approximate log2. |
| 10343 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10344 | * It is not accurate for values very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10345 | * |
| 10346 | * Supported by API versions 18 and newer. |
| 10347 | */ |
| 10348 | extern float4 __attribute__((const, overloadable))native_log2(float4 v); |
| 10349 | #endif |
| 10350 | |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10351 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10352 | /** |
| 10353 | * Approximately normalizes a vector. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10354 | * |
| 10355 | * Supported by API versions 21 and newer. |
| 10356 | */ |
| 10357 | extern float __attribute__((const, overloadable))native_normalize(float v); |
| 10358 | #endif |
| 10359 | |
| 10360 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10361 | /** |
| 10362 | * Approximately normalizes a vector. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10363 | * |
| 10364 | * Supported by API versions 21 and newer. |
| 10365 | */ |
| 10366 | extern float2 __attribute__((const, overloadable))native_normalize(float2 v); |
| 10367 | #endif |
| 10368 | |
| 10369 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10370 | /** |
| 10371 | * Approximately normalizes a vector. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10372 | * |
| 10373 | * Supported by API versions 21 and newer. |
| 10374 | */ |
| 10375 | extern float3 __attribute__((const, overloadable))native_normalize(float3 v); |
| 10376 | #endif |
| 10377 | |
| 10378 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10379 | /** |
| 10380 | * Approximately normalizes a vector. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10381 | * |
| 10382 | * Supported by API versions 21 and newer. |
| 10383 | */ |
| 10384 | extern float4 __attribute__((const, overloadable))native_normalize(float4 v); |
| 10385 | #endif |
| 10386 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10387 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10388 | /** |
| 10389 | * Fast approximate v ^ y. |
| 10390 | * |
| 10391 | * v must be between 0.f and 256.f. |
| 10392 | * y must be between -15.f and 15.f. |
| 10393 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10394 | * It is not accurate for values of v very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10395 | * |
| 10396 | * Supported by API versions 18 and newer. |
| 10397 | */ |
| 10398 | extern float __attribute__((const, overloadable))native_powr(float v, float y); |
| 10399 | #endif |
| 10400 | |
| 10401 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10402 | /** |
| 10403 | * Fast approximate v ^ y. |
| 10404 | * |
| 10405 | * v must be between 0.f and 256.f. |
| 10406 | * y must be between -15.f and 15.f. |
| 10407 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10408 | * It is not accurate for values of v very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10409 | * |
| 10410 | * Supported by API versions 18 and newer. |
| 10411 | */ |
| 10412 | extern float2 __attribute__((const, overloadable))native_powr(float2 v, float2 y); |
| 10413 | #endif |
| 10414 | |
| 10415 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10416 | /** |
| 10417 | * Fast approximate v ^ y. |
| 10418 | * |
| 10419 | * v must be between 0.f and 256.f. |
| 10420 | * y must be between -15.f and 15.f. |
| 10421 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10422 | * It is not accurate for values of v very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10423 | * |
| 10424 | * Supported by API versions 18 and newer. |
| 10425 | */ |
| 10426 | extern float3 __attribute__((const, overloadable))native_powr(float3 v, float3 y); |
| 10427 | #endif |
| 10428 | |
| 10429 | #if (defined(RS_VERSION) && (RS_VERSION >= 18)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10430 | /** |
| 10431 | * Fast approximate v ^ y. |
| 10432 | * |
| 10433 | * v must be between 0.f and 256.f. |
| 10434 | * y must be between -15.f and 15.f. |
| 10435 | * |
Jean-Luc Brouillet | 32c1818 | 2014-07-29 13:52:45 -0700 | [diff] [blame] | 10436 | * It is not accurate for values of v very close to zero. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10437 | * |
| 10438 | * Supported by API versions 18 and newer. |
| 10439 | */ |
| 10440 | extern float4 __attribute__((const, overloadable))native_powr(float4 v, float4 y); |
| 10441 | #endif |
| 10442 | |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10443 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10444 | /** |
| 10445 | * Returns the approximate approximate reciprocal of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10446 | * |
| 10447 | * Supported by API versions 21 and newer. |
| 10448 | */ |
| 10449 | extern float __attribute__((const, overloadable))native_recip(float v); |
| 10450 | #endif |
| 10451 | |
| 10452 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10453 | /** |
| 10454 | * Returns the approximate approximate reciprocal of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10455 | * |
| 10456 | * Supported by API versions 21 and newer. |
| 10457 | */ |
| 10458 | extern float2 __attribute__((const, overloadable))native_recip(float2 v); |
| 10459 | #endif |
| 10460 | |
| 10461 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10462 | /** |
| 10463 | * Returns the approximate approximate reciprocal of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10464 | * |
| 10465 | * Supported by API versions 21 and newer. |
| 10466 | */ |
| 10467 | extern float3 __attribute__((const, overloadable))native_recip(float3 v); |
| 10468 | #endif |
| 10469 | |
| 10470 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10471 | /** |
| 10472 | * Returns the approximate approximate reciprocal of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10473 | * |
| 10474 | * Supported by API versions 21 and newer. |
| 10475 | */ |
| 10476 | extern float4 __attribute__((const, overloadable))native_recip(float4 v); |
| 10477 | #endif |
| 10478 | |
| 10479 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10480 | /** |
| 10481 | * Compute the approximate Nth root of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10482 | * |
| 10483 | * Supported by API versions 21 and newer. |
| 10484 | */ |
| 10485 | extern float __attribute__((const, overloadable))native_rootn(float v, int n); |
| 10486 | #endif |
| 10487 | |
| 10488 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10489 | /** |
| 10490 | * Compute the approximate Nth root of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10491 | * |
| 10492 | * Supported by API versions 21 and newer. |
| 10493 | */ |
| 10494 | extern float2 __attribute__((const, overloadable))native_rootn(float2 v, int2 n); |
| 10495 | #endif |
| 10496 | |
| 10497 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10498 | /** |
| 10499 | * Compute the approximate Nth root of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10500 | * |
| 10501 | * Supported by API versions 21 and newer. |
| 10502 | */ |
| 10503 | extern float3 __attribute__((const, overloadable))native_rootn(float3 v, int3 n); |
| 10504 | #endif |
| 10505 | |
| 10506 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10507 | /** |
| 10508 | * Compute the approximate Nth root of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10509 | * |
| 10510 | * Supported by API versions 21 and newer. |
| 10511 | */ |
| 10512 | extern float4 __attribute__((const, overloadable))native_rootn(float4 v, int4 n); |
| 10513 | #endif |
| 10514 | |
| 10515 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10516 | /** |
| 10517 | * Returns approximate (1 / sqrt(value)). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10518 | * |
| 10519 | * Supported by API versions 21 and newer. |
| 10520 | */ |
| 10521 | extern float __attribute__((const, overloadable))native_rsqrt(float); |
| 10522 | #endif |
| 10523 | |
| 10524 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10525 | /** |
| 10526 | * Returns approximate (1 / sqrt(value)). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10527 | * |
| 10528 | * Supported by API versions 21 and newer. |
| 10529 | */ |
| 10530 | extern float2 __attribute__((const, overloadable))native_rsqrt(float2); |
| 10531 | #endif |
| 10532 | |
| 10533 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10534 | /** |
| 10535 | * Returns approximate (1 / sqrt(value)). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10536 | * |
| 10537 | * Supported by API versions 21 and newer. |
| 10538 | */ |
| 10539 | extern float3 __attribute__((const, overloadable))native_rsqrt(float3); |
| 10540 | #endif |
| 10541 | |
| 10542 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10543 | /** |
| 10544 | * Returns approximate (1 / sqrt(value)). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10545 | * |
| 10546 | * Supported by API versions 21 and newer. |
| 10547 | */ |
| 10548 | extern float4 __attribute__((const, overloadable))native_rsqrt(float4); |
| 10549 | #endif |
| 10550 | |
| 10551 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10552 | /** |
| 10553 | * Returns the approximate sine of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10554 | * |
| 10555 | * Supported by API versions 21 and newer. |
| 10556 | */ |
| 10557 | extern float __attribute__((const, overloadable))native_sin(float); |
| 10558 | #endif |
| 10559 | |
| 10560 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10561 | /** |
| 10562 | * Returns the approximate sine of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10563 | * |
| 10564 | * Supported by API versions 21 and newer. |
| 10565 | */ |
| 10566 | extern float2 __attribute__((const, overloadable))native_sin(float2); |
| 10567 | #endif |
| 10568 | |
| 10569 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10570 | /** |
| 10571 | * Returns the approximate sine of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10572 | * |
| 10573 | * Supported by API versions 21 and newer. |
| 10574 | */ |
| 10575 | extern float3 __attribute__((const, overloadable))native_sin(float3); |
| 10576 | #endif |
| 10577 | |
| 10578 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10579 | /** |
| 10580 | * Returns the approximate sine of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10581 | * |
| 10582 | * Supported by API versions 21 and newer. |
| 10583 | */ |
| 10584 | extern float4 __attribute__((const, overloadable))native_sin(float4); |
| 10585 | #endif |
| 10586 | |
| 10587 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10588 | /** |
| 10589 | * Returns the approximate sine and cosine of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10590 | * |
| 10591 | * @return sine |
| 10592 | * @param v The incoming value in radians |
| 10593 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 10594 | * |
| 10595 | * Supported by API versions 21 and newer. |
| 10596 | */ |
| 10597 | extern float __attribute__((overloadable))native_sincos(float v, float* cosptr); |
| 10598 | #endif |
| 10599 | |
| 10600 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10601 | /** |
| 10602 | * Returns the approximate sine and cosine of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10603 | * |
| 10604 | * @return sine |
| 10605 | * @param v The incoming value in radians |
| 10606 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 10607 | * |
| 10608 | * Supported by API versions 21 and newer. |
| 10609 | */ |
| 10610 | extern float2 __attribute__((overloadable))native_sincos(float2 v, float2* cosptr); |
| 10611 | #endif |
| 10612 | |
| 10613 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10614 | /** |
| 10615 | * Returns the approximate sine and cosine of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10616 | * |
| 10617 | * @return sine |
| 10618 | * @param v The incoming value in radians |
| 10619 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 10620 | * |
| 10621 | * Supported by API versions 21 and newer. |
| 10622 | */ |
| 10623 | extern float3 __attribute__((overloadable))native_sincos(float3 v, float3* cosptr); |
| 10624 | #endif |
| 10625 | |
| 10626 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10627 | /** |
| 10628 | * Returns the approximate sine and cosine of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10629 | * |
| 10630 | * @return sine |
| 10631 | * @param v The incoming value in radians |
| 10632 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 10633 | * |
| 10634 | * Supported by API versions 21 and newer. |
| 10635 | */ |
| 10636 | extern float4 __attribute__((overloadable))native_sincos(float4 v, float4* cosptr); |
| 10637 | #endif |
| 10638 | |
| 10639 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10640 | /** |
| 10641 | * Returns the approximate hyperbolic sine of a value specified in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10642 | * |
| 10643 | * Supported by API versions 21 and newer. |
| 10644 | */ |
| 10645 | extern float __attribute__((const, overloadable))native_sinh(float); |
| 10646 | #endif |
| 10647 | |
| 10648 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10649 | /** |
| 10650 | * Returns the approximate hyperbolic sine of a value specified in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10651 | * |
| 10652 | * Supported by API versions 21 and newer. |
| 10653 | */ |
| 10654 | extern float2 __attribute__((const, overloadable))native_sinh(float2); |
| 10655 | #endif |
| 10656 | |
| 10657 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10658 | /** |
| 10659 | * Returns the approximate hyperbolic sine of a value specified in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10660 | * |
| 10661 | * Supported by API versions 21 and newer. |
| 10662 | */ |
| 10663 | extern float3 __attribute__((const, overloadable))native_sinh(float3); |
| 10664 | #endif |
| 10665 | |
| 10666 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10667 | /** |
| 10668 | * Returns the approximate hyperbolic sine of a value specified in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10669 | * |
| 10670 | * Supported by API versions 21 and newer. |
| 10671 | */ |
| 10672 | extern float4 __attribute__((const, overloadable))native_sinh(float4); |
| 10673 | #endif |
| 10674 | |
| 10675 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10676 | /** |
| 10677 | * Returns the approximate sine of (x * pi), where (x * pi) is measured in radians. |
| 10678 | * |
| 10679 | * To get the sine of a value measured in degrees, call sinpi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10680 | * |
| 10681 | * Supported by API versions 21 and newer. |
| 10682 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10683 | extern float __attribute__((const, overloadable))native_sinpi(float x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10684 | #endif |
| 10685 | |
| 10686 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10687 | /** |
| 10688 | * Returns the approximate sine of (x * pi), where (x * pi) is measured in radians. |
| 10689 | * |
| 10690 | * To get the sine of a value measured in degrees, call sinpi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10691 | * |
| 10692 | * Supported by API versions 21 and newer. |
| 10693 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10694 | extern float2 __attribute__((const, overloadable))native_sinpi(float2 x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10695 | #endif |
| 10696 | |
| 10697 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10698 | /** |
| 10699 | * Returns the approximate sine of (x * pi), where (x * pi) is measured in radians. |
| 10700 | * |
| 10701 | * To get the sine of a value measured in degrees, call sinpi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10702 | * |
| 10703 | * Supported by API versions 21 and newer. |
| 10704 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10705 | extern float3 __attribute__((const, overloadable))native_sinpi(float3 x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10706 | #endif |
| 10707 | |
| 10708 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10709 | /** |
| 10710 | * Returns the approximate sine of (x * pi), where (x * pi) is measured in radians. |
| 10711 | * |
| 10712 | * To get the sine of a value measured in degrees, call sinpi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10713 | * |
| 10714 | * Supported by API versions 21 and newer. |
| 10715 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10716 | extern float4 __attribute__((const, overloadable))native_sinpi(float4 x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10717 | #endif |
| 10718 | |
| 10719 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10720 | /** |
| 10721 | * Returns the approximate sqrt(v). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10722 | * |
| 10723 | * Supported by API versions 21 and newer. |
| 10724 | */ |
| 10725 | extern float __attribute__((const, overloadable))native_sqrt(float); |
| 10726 | #endif |
| 10727 | |
| 10728 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10729 | /** |
| 10730 | * Returns the approximate sqrt(v). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10731 | * |
| 10732 | * Supported by API versions 21 and newer. |
| 10733 | */ |
| 10734 | extern float2 __attribute__((const, overloadable))native_sqrt(float2); |
| 10735 | #endif |
| 10736 | |
| 10737 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10738 | /** |
| 10739 | * Returns the approximate sqrt(v). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10740 | * |
| 10741 | * Supported by API versions 21 and newer. |
| 10742 | */ |
| 10743 | extern float3 __attribute__((const, overloadable))native_sqrt(float3); |
| 10744 | #endif |
| 10745 | |
| 10746 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10747 | /** |
| 10748 | * Returns the approximate sqrt(v). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10749 | * |
| 10750 | * Supported by API versions 21 and newer. |
| 10751 | */ |
| 10752 | extern float4 __attribute__((const, overloadable))native_sqrt(float4); |
| 10753 | #endif |
| 10754 | |
| 10755 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10756 | /** |
| 10757 | * Returns the approximate tangent of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10758 | * |
| 10759 | * Supported by API versions 21 and newer. |
| 10760 | */ |
| 10761 | extern float __attribute__((const, overloadable))native_tan(float); |
| 10762 | #endif |
| 10763 | |
| 10764 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10765 | /** |
| 10766 | * Returns the approximate tangent of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10767 | * |
| 10768 | * Supported by API versions 21 and newer. |
| 10769 | */ |
| 10770 | extern float2 __attribute__((const, overloadable))native_tan(float2); |
| 10771 | #endif |
| 10772 | |
| 10773 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10774 | /** |
| 10775 | * Returns the approximate tangent of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10776 | * |
| 10777 | * Supported by API versions 21 and newer. |
| 10778 | */ |
| 10779 | extern float3 __attribute__((const, overloadable))native_tan(float3); |
| 10780 | #endif |
| 10781 | |
| 10782 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10783 | /** |
| 10784 | * Returns the approximate tangent of an angle measured in radians. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10785 | * |
| 10786 | * Supported by API versions 21 and newer. |
| 10787 | */ |
| 10788 | extern float4 __attribute__((const, overloadable))native_tan(float4); |
| 10789 | #endif |
| 10790 | |
| 10791 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10792 | /** |
| 10793 | * Returns the approximate hyperbolic tangent of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10794 | * |
| 10795 | * Supported by API versions 21 and newer. |
| 10796 | */ |
| 10797 | extern float __attribute__((const, overloadable))native_tanh(float); |
| 10798 | #endif |
| 10799 | |
| 10800 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10801 | /** |
| 10802 | * Returns the approximate hyperbolic tangent of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10803 | * |
| 10804 | * Supported by API versions 21 and newer. |
| 10805 | */ |
| 10806 | extern float2 __attribute__((const, overloadable))native_tanh(float2); |
| 10807 | #endif |
| 10808 | |
| 10809 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10810 | /** |
| 10811 | * Returns the approximate hyperbolic tangent of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10812 | * |
| 10813 | * Supported by API versions 21 and newer. |
| 10814 | */ |
| 10815 | extern float3 __attribute__((const, overloadable))native_tanh(float3); |
| 10816 | #endif |
| 10817 | |
| 10818 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10819 | /** |
| 10820 | * Returns the approximate hyperbolic tangent of a value. |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10821 | * |
| 10822 | * Supported by API versions 21 and newer. |
| 10823 | */ |
| 10824 | extern float4 __attribute__((const, overloadable))native_tanh(float4); |
| 10825 | #endif |
| 10826 | |
| 10827 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10828 | /** |
| 10829 | * Returns the approximate tangent of (x * pi), where (x * pi) is measured in radians. |
| 10830 | * |
| 10831 | * To get the tangent of a value measured in degrees, call tanpi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10832 | * |
| 10833 | * Supported by API versions 21 and newer. |
| 10834 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10835 | extern float __attribute__((const, overloadable))native_tanpi(float x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10836 | #endif |
| 10837 | |
| 10838 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10839 | /** |
| 10840 | * Returns the approximate tangent of (x * pi), where (x * pi) is measured in radians. |
| 10841 | * |
| 10842 | * To get the tangent of a value measured in degrees, call tanpi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10843 | * |
| 10844 | * Supported by API versions 21 and newer. |
| 10845 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10846 | extern float2 __attribute__((const, overloadable))native_tanpi(float2 x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10847 | #endif |
| 10848 | |
| 10849 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10850 | /** |
| 10851 | * Returns the approximate tangent of (x * pi), where (x * pi) is measured in radians. |
| 10852 | * |
| 10853 | * To get the tangent of a value measured in degrees, call tanpi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10854 | * |
| 10855 | * Supported by API versions 21 and newer. |
| 10856 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10857 | extern float3 __attribute__((const, overloadable))native_tanpi(float3 x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10858 | #endif |
| 10859 | |
| 10860 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10861 | /** |
| 10862 | * Returns the approximate tangent of (x * pi), where (x * pi) is measured in radians. |
| 10863 | * |
| 10864 | * To get the tangent of a value measured in degrees, call tanpi(a / 180.f). |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10865 | * |
| 10866 | * Supported by API versions 21 and newer. |
| 10867 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10868 | extern float4 __attribute__((const, overloadable))native_tanpi(float4 x); |
Jason Sams | d2d7c18 | 2014-07-17 18:41:25 -0700 | [diff] [blame] | 10869 | #endif |
| 10870 | |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10871 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10872 | /** |
| 10873 | * Returns the next floating point number from x towards y. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10874 | * |
| 10875 | * Supported by API versions 9 and newer. |
| 10876 | */ |
| 10877 | extern float __attribute__((const, overloadable))nextafter(float x, float y); |
| 10878 | #endif |
| 10879 | |
| 10880 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10881 | /** |
| 10882 | * Returns the next floating point number from x towards y. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10883 | * |
| 10884 | * Supported by API versions 9 and newer. |
| 10885 | */ |
| 10886 | extern float2 __attribute__((const, overloadable))nextafter(float2 x, float2 y); |
| 10887 | #endif |
| 10888 | |
| 10889 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10890 | /** |
| 10891 | * Returns the next floating point number from x towards y. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10892 | * |
| 10893 | * Supported by API versions 9 and newer. |
| 10894 | */ |
| 10895 | extern float3 __attribute__((const, overloadable))nextafter(float3 x, float3 y); |
| 10896 | #endif |
| 10897 | |
| 10898 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10899 | /** |
| 10900 | * Returns the next floating point number from x towards y. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10901 | * |
| 10902 | * Supported by API versions 9 and newer. |
| 10903 | */ |
| 10904 | extern float4 __attribute__((const, overloadable))nextafter(float4 x, float4 y); |
| 10905 | #endif |
| 10906 | |
| 10907 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10908 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10909 | * Normalize a vector. |
| 10910 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10911 | * For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for positive values. |
| 10912 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10913 | * Supported by API versions 9 and newer. |
| 10914 | */ |
| 10915 | extern float __attribute__((const, overloadable))normalize(float v); |
| 10916 | #endif |
| 10917 | |
| 10918 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10919 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10920 | * Normalize a vector. |
| 10921 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10922 | * For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for positive values. |
| 10923 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10924 | * Supported by API versions 9 and newer. |
| 10925 | */ |
| 10926 | extern float2 __attribute__((const, overloadable))normalize(float2 v); |
| 10927 | #endif |
| 10928 | |
| 10929 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10930 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10931 | * Normalize a vector. |
| 10932 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10933 | * For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for positive values. |
| 10934 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10935 | * Supported by API versions 9 and newer. |
| 10936 | */ |
| 10937 | extern float3 __attribute__((const, overloadable))normalize(float3 v); |
| 10938 | #endif |
| 10939 | |
| 10940 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10941 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10942 | * Normalize a vector. |
| 10943 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10944 | * For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for positive values. |
| 10945 | * |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10946 | * Supported by API versions 9 and newer. |
| 10947 | */ |
| 10948 | extern float4 __attribute__((const, overloadable))normalize(float4 v); |
| 10949 | #endif |
| 10950 | |
| 10951 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10952 | /** |
| 10953 | * Returns x raised to the power y, i.e. x ^ y. |
| 10954 | * |
| 10955 | * pown() and powr() are similar. pown() takes an integer exponent. powr() assumes the base to be non-negative. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10956 | * |
| 10957 | * Supported by API versions 9 and newer. |
| 10958 | */ |
| 10959 | extern float __attribute__((const, overloadable))pow(float x, float y); |
| 10960 | #endif |
| 10961 | |
| 10962 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10963 | /** |
| 10964 | * Returns x raised to the power y, i.e. x ^ y. |
| 10965 | * |
| 10966 | * pown() and powr() are similar. pown() takes an integer exponent. powr() assumes the base to be non-negative. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10967 | * |
| 10968 | * Supported by API versions 9 and newer. |
| 10969 | */ |
| 10970 | extern float2 __attribute__((const, overloadable))pow(float2 x, float2 y); |
| 10971 | #endif |
| 10972 | |
| 10973 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10974 | /** |
| 10975 | * Returns x raised to the power y, i.e. x ^ y. |
| 10976 | * |
| 10977 | * pown() and powr() are similar. pown() takes an integer exponent. powr() assumes the base to be non-negative. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10978 | * |
| 10979 | * Supported by API versions 9 and newer. |
| 10980 | */ |
| 10981 | extern float3 __attribute__((const, overloadable))pow(float3 x, float3 y); |
| 10982 | #endif |
| 10983 | |
| 10984 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10985 | /** |
| 10986 | * Returns x raised to the power y, i.e. x ^ y. |
| 10987 | * |
| 10988 | * pown() and powr() are similar. pown() takes an integer exponent. powr() assumes the base to be non-negative. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 10989 | * |
| 10990 | * Supported by API versions 9 and newer. |
| 10991 | */ |
| 10992 | extern float4 __attribute__((const, overloadable))pow(float4 x, float4 y); |
| 10993 | #endif |
| 10994 | |
| 10995 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 10996 | /** |
| 10997 | * Returns x raised to the power y, i.e. x ^ y. |
| 10998 | * |
| 10999 | * pow() and powr() are similar. The both take a float exponent. powr() also assumes the base to be non-negative. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11000 | * |
| 11001 | * Supported by API versions 9 and newer. |
| 11002 | */ |
| 11003 | extern float __attribute__((const, overloadable))pown(float x, int y); |
| 11004 | #endif |
| 11005 | |
| 11006 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11007 | /** |
| 11008 | * Returns x raised to the power y, i.e. x ^ y. |
| 11009 | * |
| 11010 | * pow() and powr() are similar. The both take a float exponent. powr() also assumes the base to be non-negative. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11011 | * |
| 11012 | * Supported by API versions 9 and newer. |
| 11013 | */ |
| 11014 | extern float2 __attribute__((const, overloadable))pown(float2 x, int2 y); |
| 11015 | #endif |
| 11016 | |
| 11017 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11018 | /** |
| 11019 | * Returns x raised to the power y, i.e. x ^ y. |
| 11020 | * |
| 11021 | * pow() and powr() are similar. The both take a float exponent. powr() also assumes the base to be non-negative. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11022 | * |
| 11023 | * Supported by API versions 9 and newer. |
| 11024 | */ |
| 11025 | extern float3 __attribute__((const, overloadable))pown(float3 x, int3 y); |
| 11026 | #endif |
| 11027 | |
| 11028 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11029 | /** |
| 11030 | * Returns x raised to the power y, i.e. x ^ y. |
| 11031 | * |
| 11032 | * pow() and powr() are similar. The both take a float exponent. powr() also assumes the base to be non-negative. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11033 | * |
| 11034 | * Supported by API versions 9 and newer. |
| 11035 | */ |
| 11036 | extern float4 __attribute__((const, overloadable))pown(float4 x, int4 y); |
| 11037 | #endif |
| 11038 | |
| 11039 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11040 | /** |
| 11041 | * Returns x raised to the power y, i.e. x ^ y. x must be >= 0. |
| 11042 | * |
| 11043 | * pow() and pown() are similar. They both make no assumptions about the base. pow() takes a float exponent while pown() take an integer. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11044 | * |
| 11045 | * Supported by API versions 9 and newer. |
| 11046 | */ |
| 11047 | extern float __attribute__((const, overloadable))powr(float x, float y); |
| 11048 | #endif |
| 11049 | |
| 11050 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11051 | /** |
| 11052 | * Returns x raised to the power y, i.e. x ^ y. x must be >= 0. |
| 11053 | * |
| 11054 | * pow() and pown() are similar. They both make no assumptions about the base. pow() takes a float exponent while pown() take an integer. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11055 | * |
| 11056 | * Supported by API versions 9 and newer. |
| 11057 | */ |
| 11058 | extern float2 __attribute__((const, overloadable))powr(float2 x, float2 y); |
| 11059 | #endif |
| 11060 | |
| 11061 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11062 | /** |
| 11063 | * Returns x raised to the power y, i.e. x ^ y. x must be >= 0. |
| 11064 | * |
| 11065 | * pow() and pown() are similar. They both make no assumptions about the base. pow() takes a float exponent while pown() take an integer. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11066 | * |
| 11067 | * Supported by API versions 9 and newer. |
| 11068 | */ |
| 11069 | extern float3 __attribute__((const, overloadable))powr(float3 x, float3 y); |
| 11070 | #endif |
| 11071 | |
| 11072 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11073 | /** |
| 11074 | * Returns x raised to the power y, i.e. x ^ y. x must be >= 0. |
| 11075 | * |
| 11076 | * pow() and pown() are similar. They both make no assumptions about the base. pow() takes a float exponent while pown() take an integer. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11077 | * |
| 11078 | * Supported by API versions 9 and newer. |
| 11079 | */ |
| 11080 | extern float4 __attribute__((const, overloadable))powr(float4 x, float4 y); |
| 11081 | #endif |
| 11082 | |
| 11083 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11084 | /** |
| 11085 | * Converts from degrees to radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11086 | * |
| 11087 | * Supported by API versions 9 and newer. |
| 11088 | */ |
| 11089 | extern float __attribute__((const, overloadable))radians(float value); |
| 11090 | #endif |
| 11091 | |
| 11092 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11093 | /** |
| 11094 | * Converts from degrees to radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11095 | * |
| 11096 | * Supported by API versions 9 and newer. |
| 11097 | */ |
| 11098 | extern float2 __attribute__((const, overloadable))radians(float2 value); |
| 11099 | #endif |
| 11100 | |
| 11101 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11102 | /** |
| 11103 | * Converts from degrees to radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11104 | * |
| 11105 | * Supported by API versions 9 and newer. |
| 11106 | */ |
| 11107 | extern float3 __attribute__((const, overloadable))radians(float3 value); |
| 11108 | #endif |
| 11109 | |
| 11110 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11111 | /** |
| 11112 | * Converts from degrees to radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11113 | * |
| 11114 | * Supported by API versions 9 and newer. |
| 11115 | */ |
| 11116 | extern float4 __attribute__((const, overloadable))radians(float4 value); |
| 11117 | #endif |
| 11118 | |
| 11119 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11120 | /** |
| 11121 | * Returns the remainder of x / y, where the quotient is rounded towards the nearest integer. |
| 11122 | * |
| 11123 | * The function fmod() is similar but rounds toward the closest interger. |
| 11124 | * For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) |
| 11125 | * while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11126 | * |
| 11127 | * Supported by API versions 9 and newer. |
| 11128 | */ |
| 11129 | extern float __attribute__((const, overloadable))remainder(float x, float y); |
| 11130 | #endif |
| 11131 | |
| 11132 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11133 | /** |
| 11134 | * Returns the remainder of x / y, where the quotient is rounded towards the nearest integer. |
| 11135 | * |
| 11136 | * The function fmod() is similar but rounds toward the closest interger. |
| 11137 | * For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) |
| 11138 | * while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11139 | * |
| 11140 | * Supported by API versions 9 and newer. |
| 11141 | */ |
| 11142 | extern float2 __attribute__((const, overloadable))remainder(float2 x, float2 y); |
| 11143 | #endif |
| 11144 | |
| 11145 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11146 | /** |
| 11147 | * Returns the remainder of x / y, where the quotient is rounded towards the nearest integer. |
| 11148 | * |
| 11149 | * The function fmod() is similar but rounds toward the closest interger. |
| 11150 | * For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) |
| 11151 | * while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11152 | * |
| 11153 | * Supported by API versions 9 and newer. |
| 11154 | */ |
| 11155 | extern float3 __attribute__((const, overloadable))remainder(float3 x, float3 y); |
| 11156 | #endif |
| 11157 | |
| 11158 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11159 | /** |
| 11160 | * Returns the remainder of x / y, where the quotient is rounded towards the nearest integer. |
| 11161 | * |
| 11162 | * The function fmod() is similar but rounds toward the closest interger. |
| 11163 | * For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) |
| 11164 | * while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11165 | * |
| 11166 | * Supported by API versions 9 and newer. |
| 11167 | */ |
| 11168 | extern float4 __attribute__((const, overloadable))remainder(float4 x, float4 y); |
| 11169 | #endif |
| 11170 | |
| 11171 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11172 | /** |
| 11173 | * Returns the quotient and the remainder of b / c. |
| 11174 | * |
| 11175 | * Only the sign and lowest three bits of the quotient are guaranteed to be accurate. |
| 11176 | * |
| 11177 | * This function is useful for implementing periodic functions. The low three bits of the quotient gives the quadrant and the remainder the distance within the quadrant. For example, an implementation of sin(x) could call remquo(x, PI / 2.f, &quadrant) to reduce very large value of x to something within a limited range. |
| 11178 | * |
| 11179 | * Example: remquo(-23.5f, 8.f, ") sets the lowest three bits of quot to 3 and the sign negative. It returns 0.5f. |
| 11180 | * |
| 11181 | * @param b The numerator. |
| 11182 | * @param c The denominator. |
| 11183 | * @param *d d[0] will be set to the integer quotient. |
| 11184 | * @return The remainder, precise only for the low three bits. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11185 | * |
| 11186 | * Supported by API versions 9 and newer. |
| 11187 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 11188 | extern float __attribute__((overloadable))remquo(float b, float c, int* d); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11189 | #endif |
| 11190 | |
| 11191 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11192 | /** |
| 11193 | * Returns the quotient and the remainder of b / c. |
| 11194 | * |
| 11195 | * Only the sign and lowest three bits of the quotient are guaranteed to be accurate. |
| 11196 | * |
| 11197 | * This function is useful for implementing periodic functions. The low three bits of the quotient gives the quadrant and the remainder the distance within the quadrant. For example, an implementation of sin(x) could call remquo(x, PI / 2.f, &quadrant) to reduce very large value of x to something within a limited range. |
| 11198 | * |
| 11199 | * Example: remquo(-23.5f, 8.f, ") sets the lowest three bits of quot to 3 and the sign negative. It returns 0.5f. |
| 11200 | * |
| 11201 | * @param b The numerator. |
| 11202 | * @param c The denominator. |
| 11203 | * @param *d d[0] will be set to the integer quotient. |
| 11204 | * @return The remainder, precise only for the low three bits. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11205 | * |
| 11206 | * Supported by API versions 9 and newer. |
| 11207 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 11208 | extern float2 __attribute__((overloadable))remquo(float2 b, float2 c, int2* d); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11209 | #endif |
| 11210 | |
| 11211 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11212 | /** |
| 11213 | * Returns the quotient and the remainder of b / c. |
| 11214 | * |
| 11215 | * Only the sign and lowest three bits of the quotient are guaranteed to be accurate. |
| 11216 | * |
| 11217 | * This function is useful for implementing periodic functions. The low three bits of the quotient gives the quadrant and the remainder the distance within the quadrant. For example, an implementation of sin(x) could call remquo(x, PI / 2.f, &quadrant) to reduce very large value of x to something within a limited range. |
| 11218 | * |
| 11219 | * Example: remquo(-23.5f, 8.f, ") sets the lowest three bits of quot to 3 and the sign negative. It returns 0.5f. |
| 11220 | * |
| 11221 | * @param b The numerator. |
| 11222 | * @param c The denominator. |
| 11223 | * @param *d d[0] will be set to the integer quotient. |
| 11224 | * @return The remainder, precise only for the low three bits. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11225 | * |
| 11226 | * Supported by API versions 9 and newer. |
| 11227 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 11228 | extern float3 __attribute__((overloadable))remquo(float3 b, float3 c, int3* d); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11229 | #endif |
| 11230 | |
| 11231 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11232 | /** |
| 11233 | * Returns the quotient and the remainder of b / c. |
| 11234 | * |
| 11235 | * Only the sign and lowest three bits of the quotient are guaranteed to be accurate. |
| 11236 | * |
| 11237 | * This function is useful for implementing periodic functions. The low three bits of the quotient gives the quadrant and the remainder the distance within the quadrant. For example, an implementation of sin(x) could call remquo(x, PI / 2.f, &quadrant) to reduce very large value of x to something within a limited range. |
| 11238 | * |
| 11239 | * Example: remquo(-23.5f, 8.f, ") sets the lowest three bits of quot to 3 and the sign negative. It returns 0.5f. |
| 11240 | * |
| 11241 | * @param b The numerator. |
| 11242 | * @param c The denominator. |
| 11243 | * @param *d d[0] will be set to the integer quotient. |
| 11244 | * @return The remainder, precise only for the low three bits. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11245 | * |
| 11246 | * Supported by API versions 9 and newer. |
| 11247 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 11248 | extern float4 __attribute__((overloadable))remquo(float4 b, float4 c, int4* d); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11249 | #endif |
| 11250 | |
| 11251 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11252 | /** |
| 11253 | * Rounds to the nearest integral value. |
| 11254 | * |
| 11255 | * rint() rounds half values to even. For example, rint(0.5f) returns 0.f and rint(1.5f) returns 2.f. Similarly, rint(-0.5f) returns -0.f and rint(-1.5f) returns -2.f. |
| 11256 | * |
| 11257 | * round() is similar but rounds away from zero. trunc() truncates the decimal fraction. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11258 | * |
| 11259 | * Supported by API versions 9 and newer. |
| 11260 | */ |
| 11261 | extern float __attribute__((const, overloadable))rint(float); |
| 11262 | #endif |
| 11263 | |
| 11264 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11265 | /** |
| 11266 | * Rounds to the nearest integral value. |
| 11267 | * |
| 11268 | * rint() rounds half values to even. For example, rint(0.5f) returns 0.f and rint(1.5f) returns 2.f. Similarly, rint(-0.5f) returns -0.f and rint(-1.5f) returns -2.f. |
| 11269 | * |
| 11270 | * round() is similar but rounds away from zero. trunc() truncates the decimal fraction. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11271 | * |
| 11272 | * Supported by API versions 9 and newer. |
| 11273 | */ |
| 11274 | extern float2 __attribute__((const, overloadable))rint(float2); |
| 11275 | #endif |
| 11276 | |
| 11277 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11278 | /** |
| 11279 | * Rounds to the nearest integral value. |
| 11280 | * |
| 11281 | * rint() rounds half values to even. For example, rint(0.5f) returns 0.f and rint(1.5f) returns 2.f. Similarly, rint(-0.5f) returns -0.f and rint(-1.5f) returns -2.f. |
| 11282 | * |
| 11283 | * round() is similar but rounds away from zero. trunc() truncates the decimal fraction. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11284 | * |
| 11285 | * Supported by API versions 9 and newer. |
| 11286 | */ |
| 11287 | extern float3 __attribute__((const, overloadable))rint(float3); |
| 11288 | #endif |
| 11289 | |
| 11290 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11291 | /** |
| 11292 | * Rounds to the nearest integral value. |
| 11293 | * |
| 11294 | * rint() rounds half values to even. For example, rint(0.5f) returns 0.f and rint(1.5f) returns 2.f. Similarly, rint(-0.5f) returns -0.f and rint(-1.5f) returns -2.f. |
| 11295 | * |
| 11296 | * round() is similar but rounds away from zero. trunc() truncates the decimal fraction. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11297 | * |
| 11298 | * Supported by API versions 9 and newer. |
| 11299 | */ |
| 11300 | extern float4 __attribute__((const, overloadable))rint(float4); |
| 11301 | #endif |
| 11302 | |
| 11303 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11304 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11305 | * Compute the Nth root of a value. |
| 11306 | * |
| 11307 | * Supported by API versions 9 and newer. |
| 11308 | */ |
| 11309 | extern float __attribute__((const, overloadable))rootn(float v, int n); |
| 11310 | #endif |
| 11311 | |
| 11312 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11313 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11314 | * Compute the Nth root of a value. |
| 11315 | * |
| 11316 | * Supported by API versions 9 and newer. |
| 11317 | */ |
| 11318 | extern float2 __attribute__((const, overloadable))rootn(float2 v, int2 n); |
| 11319 | #endif |
| 11320 | |
| 11321 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11322 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11323 | * Compute the Nth root of a value. |
| 11324 | * |
| 11325 | * Supported by API versions 9 and newer. |
| 11326 | */ |
| 11327 | extern float3 __attribute__((const, overloadable))rootn(float3 v, int3 n); |
| 11328 | #endif |
| 11329 | |
| 11330 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11331 | /** |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11332 | * Compute the Nth root of a value. |
| 11333 | * |
| 11334 | * Supported by API versions 9 and newer. |
| 11335 | */ |
| 11336 | extern float4 __attribute__((const, overloadable))rootn(float4 v, int4 n); |
| 11337 | #endif |
| 11338 | |
| 11339 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11340 | /** |
| 11341 | * Round to the nearest integral value. |
| 11342 | * |
| 11343 | * round() rounds half values away from zero. For example, round(0.5f) returns 1.f and round(1.5f) returns 2.f. Similarly, round(-0.5f) returns -1.f and round(-1.5f) returns -2.f. |
| 11344 | * |
| 11345 | * rint() is similar but rounds half values toward even. trunc() truncates the decimal fraction. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11346 | * |
| 11347 | * Supported by API versions 9 and newer. |
| 11348 | */ |
| 11349 | extern float __attribute__((const, overloadable))round(float); |
| 11350 | #endif |
| 11351 | |
| 11352 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11353 | /** |
| 11354 | * Round to the nearest integral value. |
| 11355 | * |
| 11356 | * round() rounds half values away from zero. For example, round(0.5f) returns 1.f and round(1.5f) returns 2.f. Similarly, round(-0.5f) returns -1.f and round(-1.5f) returns -2.f. |
| 11357 | * |
| 11358 | * rint() is similar but rounds half values toward even. trunc() truncates the decimal fraction. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11359 | * |
| 11360 | * Supported by API versions 9 and newer. |
| 11361 | */ |
| 11362 | extern float2 __attribute__((const, overloadable))round(float2); |
| 11363 | #endif |
| 11364 | |
| 11365 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11366 | /** |
| 11367 | * Round to the nearest integral value. |
| 11368 | * |
| 11369 | * round() rounds half values away from zero. For example, round(0.5f) returns 1.f and round(1.5f) returns 2.f. Similarly, round(-0.5f) returns -1.f and round(-1.5f) returns -2.f. |
| 11370 | * |
| 11371 | * rint() is similar but rounds half values toward even. trunc() truncates the decimal fraction. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11372 | * |
| 11373 | * Supported by API versions 9 and newer. |
| 11374 | */ |
| 11375 | extern float3 __attribute__((const, overloadable))round(float3); |
| 11376 | #endif |
| 11377 | |
| 11378 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11379 | /** |
| 11380 | * Round to the nearest integral value. |
| 11381 | * |
| 11382 | * round() rounds half values away from zero. For example, round(0.5f) returns 1.f and round(1.5f) returns 2.f. Similarly, round(-0.5f) returns -1.f and round(-1.5f) returns -2.f. |
| 11383 | * |
| 11384 | * rint() is similar but rounds half values toward even. trunc() truncates the decimal fraction. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11385 | * |
| 11386 | * Supported by API versions 9 and newer. |
| 11387 | */ |
| 11388 | extern float4 __attribute__((const, overloadable))round(float4); |
| 11389 | #endif |
| 11390 | |
| 11391 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11392 | /** |
| 11393 | * Returns (1 / sqrt(value)). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11394 | * |
| 11395 | * Supported by API versions 9 and newer. |
| 11396 | */ |
| 11397 | extern float __attribute__((const, overloadable))rsqrt(float); |
| 11398 | #endif |
| 11399 | |
| 11400 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11401 | /** |
| 11402 | * Returns (1 / sqrt(value)). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11403 | * |
| 11404 | * Supported by API versions 9 and newer. |
| 11405 | */ |
| 11406 | extern float2 __attribute__((const, overloadable))rsqrt(float2); |
| 11407 | #endif |
| 11408 | |
| 11409 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11410 | /** |
| 11411 | * Returns (1 / sqrt(value)). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11412 | * |
| 11413 | * Supported by API versions 9 and newer. |
| 11414 | */ |
| 11415 | extern float3 __attribute__((const, overloadable))rsqrt(float3); |
| 11416 | #endif |
| 11417 | |
| 11418 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11419 | /** |
| 11420 | * Returns (1 / sqrt(value)). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11421 | * |
| 11422 | * Supported by API versions 9 and newer. |
| 11423 | */ |
| 11424 | extern float4 __attribute__((const, overloadable))rsqrt(float4); |
| 11425 | #endif |
| 11426 | |
| 11427 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11428 | /** |
| 11429 | * Returns the sign of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11430 | * |
| 11431 | * if (v < 0) return -1.f; |
| 11432 | * else if (v > 0) return 1.f; |
| 11433 | * else return 0.f; |
| 11434 | * |
| 11435 | * Supported by API versions 9 and newer. |
| 11436 | */ |
| 11437 | extern float __attribute__((const, overloadable))sign(float v); |
| 11438 | #endif |
| 11439 | |
| 11440 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11441 | /** |
| 11442 | * Returns the sign of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11443 | * |
| 11444 | * if (v < 0) return -1.f; |
| 11445 | * else if (v > 0) return 1.f; |
| 11446 | * else return 0.f; |
| 11447 | * |
| 11448 | * Supported by API versions 9 and newer. |
| 11449 | */ |
| 11450 | extern float2 __attribute__((const, overloadable))sign(float2 v); |
| 11451 | #endif |
| 11452 | |
| 11453 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11454 | /** |
| 11455 | * Returns the sign of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11456 | * |
| 11457 | * if (v < 0) return -1.f; |
| 11458 | * else if (v > 0) return 1.f; |
| 11459 | * else return 0.f; |
| 11460 | * |
| 11461 | * Supported by API versions 9 and newer. |
| 11462 | */ |
| 11463 | extern float3 __attribute__((const, overloadable))sign(float3 v); |
| 11464 | #endif |
| 11465 | |
| 11466 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11467 | /** |
| 11468 | * Returns the sign of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11469 | * |
| 11470 | * if (v < 0) return -1.f; |
| 11471 | * else if (v > 0) return 1.f; |
| 11472 | * else return 0.f; |
| 11473 | * |
| 11474 | * Supported by API versions 9 and newer. |
| 11475 | */ |
| 11476 | extern float4 __attribute__((const, overloadable))sign(float4 v); |
| 11477 | #endif |
| 11478 | |
| 11479 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11480 | /** |
| 11481 | * Returns the sine of an angle measured in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11482 | * |
| 11483 | * Supported by API versions 9 and newer. |
| 11484 | */ |
| 11485 | extern float __attribute__((const, overloadable))sin(float); |
| 11486 | #endif |
| 11487 | |
| 11488 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11489 | /** |
| 11490 | * Returns the sine of an angle measured in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11491 | * |
| 11492 | * Supported by API versions 9 and newer. |
| 11493 | */ |
| 11494 | extern float2 __attribute__((const, overloadable))sin(float2); |
| 11495 | #endif |
| 11496 | |
| 11497 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11498 | /** |
| 11499 | * Returns the sine of an angle measured in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11500 | * |
| 11501 | * Supported by API versions 9 and newer. |
| 11502 | */ |
| 11503 | extern float3 __attribute__((const, overloadable))sin(float3); |
| 11504 | #endif |
| 11505 | |
| 11506 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11507 | /** |
| 11508 | * Returns the sine of an angle measured in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11509 | * |
| 11510 | * Supported by API versions 9 and newer. |
| 11511 | */ |
| 11512 | extern float4 __attribute__((const, overloadable))sin(float4); |
| 11513 | #endif |
| 11514 | |
| 11515 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11516 | /** |
| 11517 | * Returns the sine and cosine of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11518 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11519 | * @return sine of v |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11520 | * @param v The incoming value in radians |
| 11521 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 11522 | * |
| 11523 | * Supported by API versions 9 and newer. |
| 11524 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 11525 | extern float __attribute__((overloadable))sincos(float v, float* cosptr); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11526 | #endif |
| 11527 | |
| 11528 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11529 | /** |
| 11530 | * Returns the sine and cosine of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11531 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11532 | * @return sine of v |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11533 | * @param v The incoming value in radians |
| 11534 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 11535 | * |
| 11536 | * Supported by API versions 9 and newer. |
| 11537 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 11538 | extern float2 __attribute__((overloadable))sincos(float2 v, float2* cosptr); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11539 | #endif |
| 11540 | |
| 11541 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11542 | /** |
| 11543 | * Returns the sine and cosine of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11544 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11545 | * @return sine of v |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11546 | * @param v The incoming value in radians |
| 11547 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 11548 | * |
| 11549 | * Supported by API versions 9 and newer. |
| 11550 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 11551 | extern float3 __attribute__((overloadable))sincos(float3 v, float3* cosptr); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11552 | #endif |
| 11553 | |
| 11554 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11555 | /** |
| 11556 | * Returns the sine and cosine of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11557 | * |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11558 | * @return sine of v |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11559 | * @param v The incoming value in radians |
| 11560 | * @param *cosptr cosptr[0] will be set to the cosine value. |
| 11561 | * |
| 11562 | * Supported by API versions 9 and newer. |
| 11563 | */ |
Jean-Luc Brouillet | 4634143 | 2014-02-21 22:49:22 -0800 | [diff] [blame] | 11564 | extern float4 __attribute__((overloadable))sincos(float4 v, float4* cosptr); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11565 | #endif |
| 11566 | |
| 11567 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11568 | /** |
| 11569 | * Returns the hyperbolic sine of x, where x is measured in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11570 | * |
| 11571 | * Supported by API versions 9 and newer. |
| 11572 | */ |
| 11573 | extern float __attribute__((const, overloadable))sinh(float); |
| 11574 | #endif |
| 11575 | |
| 11576 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11577 | /** |
| 11578 | * Returns the hyperbolic sine of x, where x is measured in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11579 | * |
| 11580 | * Supported by API versions 9 and newer. |
| 11581 | */ |
| 11582 | extern float2 __attribute__((const, overloadable))sinh(float2); |
| 11583 | #endif |
| 11584 | |
| 11585 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11586 | /** |
| 11587 | * Returns the hyperbolic sine of x, where x is measured in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11588 | * |
| 11589 | * Supported by API versions 9 and newer. |
| 11590 | */ |
| 11591 | extern float3 __attribute__((const, overloadable))sinh(float3); |
| 11592 | #endif |
| 11593 | |
| 11594 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11595 | /** |
| 11596 | * Returns the hyperbolic sine of x, where x is measured in radians. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11597 | * |
| 11598 | * Supported by API versions 9 and newer. |
| 11599 | */ |
| 11600 | extern float4 __attribute__((const, overloadable))sinh(float4); |
| 11601 | #endif |
| 11602 | |
| 11603 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11604 | /** |
| 11605 | * Returns the sine of (x * pi), where (x * pi) is measured in radians. |
| 11606 | * |
| 11607 | * To get the sine of a value measured in degrees, call sinpi(a / 180.f). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11608 | * |
| 11609 | * Supported by API versions 9 and newer. |
| 11610 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11611 | extern float __attribute__((const, overloadable))sinpi(float x); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11612 | #endif |
| 11613 | |
| 11614 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11615 | /** |
| 11616 | * Returns the sine of (x * pi), where (x * pi) is measured in radians. |
| 11617 | * |
| 11618 | * To get the sine of a value measured in degrees, call sinpi(a / 180.f). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11619 | * |
| 11620 | * Supported by API versions 9 and newer. |
| 11621 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11622 | extern float2 __attribute__((const, overloadable))sinpi(float2 x); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11623 | #endif |
| 11624 | |
| 11625 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11626 | /** |
| 11627 | * Returns the sine of (x * pi), where (x * pi) is measured in radians. |
| 11628 | * |
| 11629 | * To get the sine of a value measured in degrees, call sinpi(a / 180.f). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11630 | * |
| 11631 | * Supported by API versions 9 and newer. |
| 11632 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11633 | extern float3 __attribute__((const, overloadable))sinpi(float3 x); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11634 | #endif |
| 11635 | |
| 11636 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11637 | /** |
| 11638 | * Returns the sine of (x * pi), where (x * pi) is measured in radians. |
| 11639 | * |
| 11640 | * To get the sine of a value measured in degrees, call sinpi(a / 180.f). |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11641 | * |
| 11642 | * Supported by API versions 9 and newer. |
| 11643 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11644 | extern float4 __attribute__((const, overloadable))sinpi(float4 x); |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11645 | #endif |
| 11646 | |
| 11647 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11648 | /** |
| 11649 | * Returns the square root of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11650 | * |
| 11651 | * Supported by API versions 9 and newer. |
| 11652 | */ |
| 11653 | extern float __attribute__((const, overloadable))sqrt(float); |
| 11654 | #endif |
| 11655 | |
| 11656 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11657 | /** |
| 11658 | * Returns the square root of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11659 | * |
| 11660 | * Supported by API versions 9 and newer. |
| 11661 | */ |
| 11662 | extern float2 __attribute__((const, overloadable))sqrt(float2); |
| 11663 | #endif |
| 11664 | |
| 11665 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11666 | /** |
| 11667 | * Returns the square root of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11668 | * |
| 11669 | * Supported by API versions 9 and newer. |
| 11670 | */ |
| 11671 | extern float3 __attribute__((const, overloadable))sqrt(float3); |
| 11672 | #endif |
| 11673 | |
| 11674 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11675 | /** |
| 11676 | * Returns the square root of a value. |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11677 | * |
| 11678 | * Supported by API versions 9 and newer. |
| 11679 | */ |
| 11680 | extern float4 __attribute__((const, overloadable))sqrt(float4); |
| 11681 | #endif |
| 11682 | |
| 11683 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11684 | /** |
| 11685 | * Returns 0.f if v < edge, 1.f otherwise. |
| 11686 | * |
| 11687 | * This can be useful to create conditional computations without using loops and branching instructions. For example, instead of computing (a[i] < b[i]) ? 0.f : atan2(a[i], b[i]) for the corresponding elements of a vector, you could instead use step(a, b) * atan2(a, b). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11688 | * |
| 11689 | * Supported by API versions 9 and newer. |
| 11690 | */ |
| 11691 | extern float __attribute__((const, overloadable))step(float edge, float v); |
| 11692 | #endif |
| 11693 | |
| 11694 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11695 | /** |
| 11696 | * Returns 0.f if v < edge, 1.f otherwise. |
| 11697 | * |
| 11698 | * This can be useful to create conditional computations without using loops and branching instructions. For example, instead of computing (a[i] < b[i]) ? 0.f : atan2(a[i], b[i]) for the corresponding elements of a vector, you could instead use step(a, b) * atan2(a, b). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11699 | * |
| 11700 | * Supported by API versions 9 and newer. |
| 11701 | */ |
| 11702 | extern float2 __attribute__((const, overloadable))step(float2 edge, float2 v); |
| 11703 | #endif |
| 11704 | |
| 11705 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11706 | /** |
| 11707 | * Returns 0.f if v < edge, 1.f otherwise. |
| 11708 | * |
| 11709 | * This can be useful to create conditional computations without using loops and branching instructions. For example, instead of computing (a[i] < b[i]) ? 0.f : atan2(a[i], b[i]) for the corresponding elements of a vector, you could instead use step(a, b) * atan2(a, b). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11710 | * |
| 11711 | * Supported by API versions 9 and newer. |
| 11712 | */ |
| 11713 | extern float3 __attribute__((const, overloadable))step(float3 edge, float3 v); |
| 11714 | #endif |
| 11715 | |
| 11716 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11717 | /** |
| 11718 | * Returns 0.f if v < edge, 1.f otherwise. |
| 11719 | * |
| 11720 | * This can be useful to create conditional computations without using loops and branching instructions. For example, instead of computing (a[i] < b[i]) ? 0.f : atan2(a[i], b[i]) for the corresponding elements of a vector, you could instead use step(a, b) * atan2(a, b). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11721 | * |
| 11722 | * Supported by API versions 9 and newer. |
| 11723 | */ |
| 11724 | extern float4 __attribute__((const, overloadable))step(float4 edge, float4 v); |
| 11725 | #endif |
| 11726 | |
| 11727 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11728 | /** |
| 11729 | * Returns 0.f if v < edge, 1.f otherwise. |
| 11730 | * |
| 11731 | * This can be useful to create conditional computations without using loops and branching instructions. For example, instead of computing (a[i] < b) ? 0.f : atan2(a[i], b) for each element of a vector, you could instead use step(a, b) * atan2(a, b). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11732 | * |
| 11733 | * Supported by API versions 9 and newer. |
| 11734 | */ |
| 11735 | extern float2 __attribute__((const, overloadable))step(float2 edge, float v); |
| 11736 | #endif |
| 11737 | |
| 11738 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11739 | /** |
| 11740 | * Returns 0.f if v < edge, 1.f otherwise. |
| 11741 | * |
| 11742 | * This can be useful to create conditional computations without using loops and branching instructions. For example, instead of computing (a[i] < b) ? 0.f : atan2(a[i], b) for each element of a vector, you could instead use step(a, b) * atan2(a, b). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11743 | * |
| 11744 | * Supported by API versions 9 and newer. |
| 11745 | */ |
| 11746 | extern float3 __attribute__((const, overloadable))step(float3 edge, float v); |
| 11747 | #endif |
| 11748 | |
| 11749 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11750 | /** |
| 11751 | * Returns 0.f if v < edge, 1.f otherwise. |
| 11752 | * |
| 11753 | * This can be useful to create conditional computations without using loops and branching instructions. For example, instead of computing (a[i] < b) ? 0.f : atan2(a[i], b) for each element of a vector, you could instead use step(a, b) * atan2(a, b). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11754 | * |
| 11755 | * Supported by API versions 9 and newer. |
| 11756 | */ |
| 11757 | extern float4 __attribute__((const, overloadable))step(float4 edge, float v); |
| 11758 | #endif |
| 11759 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 11760 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11761 | /** |
| 11762 | * Returns 0.f if v < edge, 1.f otherwise. |
| 11763 | * |
| 11764 | * This can be useful to create conditional computations without using loops and branching instructions. For example, instead of computing (a < b[i]) ? 0.f : atan2(a, b[i]) for each element of a vector, you could instead use step(a, b) * atan2(a, b). |
Jean-Luc Brouillet | 0ec1635 | 2014-01-22 15:23:30 -0800 | [diff] [blame] | 11765 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 11766 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 0ec1635 | 2014-01-22 15:23:30 -0800 | [diff] [blame] | 11767 | */ |
| 11768 | extern float2 __attribute__((const, overloadable))step(float edge, float2 v); |
| 11769 | #endif |
| 11770 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 11771 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11772 | /** |
| 11773 | * Returns 0.f if v < edge, 1.f otherwise. |
| 11774 | * |
| 11775 | * This can be useful to create conditional computations without using loops and branching instructions. For example, instead of computing (a < b[i]) ? 0.f : atan2(a, b[i]) for each element of a vector, you could instead use step(a, b) * atan2(a, b). |
Jean-Luc Brouillet | 0ec1635 | 2014-01-22 15:23:30 -0800 | [diff] [blame] | 11776 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 11777 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 0ec1635 | 2014-01-22 15:23:30 -0800 | [diff] [blame] | 11778 | */ |
| 11779 | extern float3 __attribute__((const, overloadable))step(float edge, float3 v); |
| 11780 | #endif |
| 11781 | |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 11782 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11783 | /** |
| 11784 | * Returns 0.f if v < edge, 1.f otherwise. |
| 11785 | * |
| 11786 | * This can be useful to create conditional computations without using loops and branching instructions. For example, instead of computing (a < b[i]) ? 0.f : atan2(a, b[i]) for each element of a vector, you could instead use step(a, b) * atan2(a, b). |
Jean-Luc Brouillet | 0ec1635 | 2014-01-22 15:23:30 -0800 | [diff] [blame] | 11787 | * |
Jason Sams | aa45693 | 2014-08-18 16:20:51 -0700 | [diff] [blame] | 11788 | * Supported by API versions 21 and newer. |
Jean-Luc Brouillet | 0ec1635 | 2014-01-22 15:23:30 -0800 | [diff] [blame] | 11789 | */ |
| 11790 | extern float4 __attribute__((const, overloadable))step(float edge, float4 v); |
| 11791 | #endif |
| 11792 | |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11793 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11794 | /** |
| 11795 | * Returns the tangent of an angle measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11796 | * |
| 11797 | * Supported by API versions 9 and newer. |
| 11798 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11799 | extern float __attribute__((const, overloadable))tan(float x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11800 | #endif |
| 11801 | |
| 11802 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11803 | /** |
| 11804 | * Returns the tangent of an angle measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11805 | * |
| 11806 | * Supported by API versions 9 and newer. |
| 11807 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11808 | extern float2 __attribute__((const, overloadable))tan(float2 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11809 | #endif |
| 11810 | |
| 11811 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11812 | /** |
| 11813 | * Returns the tangent of an angle measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11814 | * |
| 11815 | * Supported by API versions 9 and newer. |
| 11816 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11817 | extern float3 __attribute__((const, overloadable))tan(float3 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11818 | #endif |
| 11819 | |
| 11820 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11821 | /** |
| 11822 | * Returns the tangent of an angle measured in radians. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11823 | * |
| 11824 | * Supported by API versions 9 and newer. |
| 11825 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11826 | extern float4 __attribute__((const, overloadable))tan(float4 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11827 | #endif |
| 11828 | |
| 11829 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11830 | /** |
| 11831 | * Returns the hyperbolic tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11832 | * |
| 11833 | * Supported by API versions 9 and newer. |
| 11834 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11835 | extern float __attribute__((const, overloadable))tanh(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11836 | #endif |
| 11837 | |
| 11838 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11839 | /** |
| 11840 | * Returns the hyperbolic tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11841 | * |
| 11842 | * Supported by API versions 9 and newer. |
| 11843 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11844 | extern float2 __attribute__((const, overloadable))tanh(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11845 | #endif |
| 11846 | |
| 11847 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11848 | /** |
| 11849 | * Returns the hyperbolic tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11850 | * |
| 11851 | * Supported by API versions 9 and newer. |
| 11852 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11853 | extern float3 __attribute__((const, overloadable))tanh(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11854 | #endif |
| 11855 | |
| 11856 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11857 | /** |
| 11858 | * Returns the hyperbolic tangent of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11859 | * |
| 11860 | * Supported by API versions 9 and newer. |
| 11861 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11862 | extern float4 __attribute__((const, overloadable))tanh(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11863 | #endif |
| 11864 | |
| 11865 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11866 | /** |
| 11867 | * Returns the tangent of (x * pi), where (x * pi) is measured in radians. |
| 11868 | * |
| 11869 | * To get the tangent of a value measured in degrees, call tanpi(a / 180.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11870 | * |
| 11871 | * Supported by API versions 9 and newer. |
| 11872 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11873 | extern float __attribute__((const, overloadable))tanpi(float x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11874 | #endif |
| 11875 | |
| 11876 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11877 | /** |
| 11878 | * Returns the tangent of (x * pi), where (x * pi) is measured in radians. |
| 11879 | * |
| 11880 | * To get the tangent of a value measured in degrees, call tanpi(a / 180.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11881 | * |
| 11882 | * Supported by API versions 9 and newer. |
| 11883 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11884 | extern float2 __attribute__((const, overloadable))tanpi(float2 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11885 | #endif |
| 11886 | |
| 11887 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11888 | /** |
| 11889 | * Returns the tangent of (x * pi), where (x * pi) is measured in radians. |
| 11890 | * |
| 11891 | * To get the tangent of a value measured in degrees, call tanpi(a / 180.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11892 | * |
| 11893 | * Supported by API versions 9 and newer. |
| 11894 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11895 | extern float3 __attribute__((const, overloadable))tanpi(float3 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11896 | #endif |
| 11897 | |
| 11898 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11899 | /** |
| 11900 | * Returns the tangent of (x * pi), where (x * pi) is measured in radians. |
| 11901 | * |
| 11902 | * To get the tangent of a value measured in degrees, call tanpi(a / 180.f). |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11903 | * |
| 11904 | * Supported by API versions 9 and newer. |
| 11905 | */ |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11906 | extern float4 __attribute__((const, overloadable))tanpi(float4 x); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11907 | #endif |
| 11908 | |
| 11909 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11910 | /** |
| 11911 | * Returns the gamma function of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11912 | * |
| 11913 | * Supported by API versions 9 and newer. |
| 11914 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11915 | extern float __attribute__((const, overloadable))tgamma(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11916 | #endif |
| 11917 | |
| 11918 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11919 | /** |
| 11920 | * Returns the gamma function of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11921 | * |
| 11922 | * Supported by API versions 9 and newer. |
| 11923 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11924 | extern float2 __attribute__((const, overloadable))tgamma(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11925 | #endif |
| 11926 | |
| 11927 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11928 | /** |
| 11929 | * Returns the gamma function of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11930 | * |
| 11931 | * Supported by API versions 9 and newer. |
| 11932 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11933 | extern float3 __attribute__((const, overloadable))tgamma(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11934 | #endif |
| 11935 | |
| 11936 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11937 | /** |
| 11938 | * Returns the gamma function of a value. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11939 | * |
| 11940 | * Supported by API versions 9 and newer. |
| 11941 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11942 | extern float4 __attribute__((const, overloadable))tgamma(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11943 | #endif |
| 11944 | |
| 11945 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11946 | /** |
| 11947 | * Rounds to integral using truncation. |
| 11948 | * |
| 11949 | * For example, trunc(1.7f) returns 1.f and trunc(-1.7f) returns -1.f. |
| 11950 | * |
| 11951 | * See rint() and round() for other rounding options. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11952 | * |
| 11953 | * Supported by API versions 9 and newer. |
| 11954 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11955 | extern float __attribute__((const, overloadable))trunc(float); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11956 | #endif |
| 11957 | |
| 11958 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11959 | /** |
| 11960 | * Rounds to integral using truncation. |
| 11961 | * |
| 11962 | * For example, trunc(1.7f) returns 1.f and trunc(-1.7f) returns -1.f. |
| 11963 | * |
| 11964 | * See rint() and round() for other rounding options. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11965 | * |
| 11966 | * Supported by API versions 9 and newer. |
| 11967 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11968 | extern float2 __attribute__((const, overloadable))trunc(float2); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11969 | #endif |
| 11970 | |
| 11971 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11972 | /** |
| 11973 | * Rounds to integral using truncation. |
| 11974 | * |
| 11975 | * For example, trunc(1.7f) returns 1.f and trunc(-1.7f) returns -1.f. |
| 11976 | * |
| 11977 | * See rint() and round() for other rounding options. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11978 | * |
| 11979 | * Supported by API versions 9 and newer. |
| 11980 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11981 | extern float3 __attribute__((const, overloadable))trunc(float3); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11982 | #endif |
| 11983 | |
| 11984 | #if (defined(RS_VERSION) && (RS_VERSION >= 9)) |
Jean-Luc Brouillet | 462e62c | 2014-12-12 13:42:24 -0800 | [diff] [blame^] | 11985 | /** |
| 11986 | * Rounds to integral using truncation. |
| 11987 | * |
| 11988 | * For example, trunc(1.7f) returns 1.f and trunc(-1.7f) returns -1.f. |
| 11989 | * |
| 11990 | * See rint() and round() for other rounding options. |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11991 | * |
| 11992 | * Supported by API versions 9 and newer. |
| 11993 | */ |
Jean-Luc Brouillet | 963c367 | 2014-02-12 20:58:47 -0800 | [diff] [blame] | 11994 | extern float4 __attribute__((const, overloadable))trunc(float4); |
Jason Sams | 29087fa | 2014-01-09 17:06:17 -0800 | [diff] [blame] | 11995 | #endif |
| 11996 | |
| 11997 | #endif // __rs_core_math_rsh__ |