1*344a7f5eSAndroid Build Coastguard Worker/* 2*344a7f5eSAndroid Build Coastguard Worker * Copyright (C) 2016 The Android Open Source Project 3*344a7f5eSAndroid Build Coastguard Worker * 4*344a7f5eSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*344a7f5eSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*344a7f5eSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*344a7f5eSAndroid Build Coastguard Worker * 8*344a7f5eSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*344a7f5eSAndroid Build Coastguard Worker * 10*344a7f5eSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*344a7f5eSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*344a7f5eSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*344a7f5eSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*344a7f5eSAndroid Build Coastguard Worker * limitations under the License. 15*344a7f5eSAndroid Build Coastguard Worker */ 16*344a7f5eSAndroid Build Coastguard Worker 17*344a7f5eSAndroid Build Coastguard Worker// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. 18*344a7f5eSAndroid Build Coastguard Worker 19*344a7f5eSAndroid Build Coastguard Worker/* 20*344a7f5eSAndroid Build Coastguard Worker * rs_math.rsh: Mathematical Constants and Functions 21*344a7f5eSAndroid Build Coastguard Worker * 22*344a7f5eSAndroid Build Coastguard Worker * The mathematical functions below can be applied to scalars and vectors. When applied 23*344a7f5eSAndroid Build Coastguard Worker * to vectors, the returned value is a vector of the function applied to each entry of the input. 24*344a7f5eSAndroid Build Coastguard Worker * 25*344a7f5eSAndroid Build Coastguard Worker * For example: 26*344a7f5eSAndroid Build Coastguard Worker * float3 a, b; 27*344a7f5eSAndroid Build Coastguard Worker * // The following call sets 28*344a7f5eSAndroid Build Coastguard Worker * // a.x to sin(b.x), 29*344a7f5eSAndroid Build Coastguard Worker * // a.y to sin(b.y), and 30*344a7f5eSAndroid Build Coastguard Worker * // a.z to sin(b.z). 31*344a7f5eSAndroid Build Coastguard Worker * a = sin(b); 32*344a7f5eSAndroid Build Coastguard Worker * 33*344a7f5eSAndroid Build Coastguard Worker * 34*344a7f5eSAndroid Build Coastguard Worker * See Vector Math Functions for functions like distance() and length() that interpret 35*344a7f5eSAndroid Build Coastguard Worker * instead the input as a single vector in n-dimensional space. 36*344a7f5eSAndroid Build Coastguard Worker * 37*344a7f5eSAndroid Build Coastguard Worker * The precision of the mathematical operations on 32 bit floats is affected by the pragmas 38*344a7f5eSAndroid Build Coastguard Worker * rs_fp_relaxed and rs_fp_full. Under rs_fp_relaxed, subnormal values may be flushed to zero and 39*344a7f5eSAndroid Build Coastguard Worker * rounding may be done towards zero. In comparison, rs_fp_full requires correct handling of 40*344a7f5eSAndroid Build Coastguard Worker * subnormal values, i.e. smaller than 1.17549435e-38f. rs_fp_rull also requires round to nearest 41*344a7f5eSAndroid Build Coastguard Worker * with ties to even. 42*344a7f5eSAndroid Build Coastguard Worker * 43*344a7f5eSAndroid Build Coastguard Worker * Different precision/speed tradeoffs can be achieved by using variants of the common math 44*344a7f5eSAndroid Build Coastguard Worker * functions. Functions with a name starting with 45*344a7f5eSAndroid Build Coastguard Worker * - native_: May have custom hardware implementations with weaker precision. Additionally, 46*344a7f5eSAndroid Build Coastguard Worker * subnormal values may be flushed to zero, rounding towards zero may be used, and NaN and 47*344a7f5eSAndroid Build Coastguard Worker * infinity input may not be handled correctly. 48*344a7f5eSAndroid Build Coastguard Worker * - half_: May perform internal computations using 16 bit floats. Additionally, subnormal 49*344a7f5eSAndroid Build Coastguard Worker * values may be flushed to zero, and rounding towards zero may be used. 50*344a7f5eSAndroid Build Coastguard Worker * 51*344a7f5eSAndroid Build Coastguard Worker */ 52*344a7f5eSAndroid Build Coastguard Worker 53*344a7f5eSAndroid Build Coastguard Worker#ifndef RENDERSCRIPT_RS_MATH_RSH 54*344a7f5eSAndroid Build Coastguard Worker#define RENDERSCRIPT_RS_MATH_RSH 55*344a7f5eSAndroid Build Coastguard Worker 56*344a7f5eSAndroid Build Coastguard Worker/* 57*344a7f5eSAndroid Build Coastguard Worker * M_1_PI: 1 / pi, as a 32 bit float 58*344a7f5eSAndroid Build Coastguard Worker * 59*344a7f5eSAndroid Build Coastguard Worker * The inverse of pi, as a 32 bit float. 60*344a7f5eSAndroid Build Coastguard Worker */ 61*344a7f5eSAndroid Build Coastguard Workerstatic const float M_1_PI = 0.318309886183790671537767526745028724f; 62*344a7f5eSAndroid Build Coastguard Worker 63*344a7f5eSAndroid Build Coastguard Worker/* 64*344a7f5eSAndroid Build Coastguard Worker * M_2_PI: 2 / pi, as a 32 bit float 65*344a7f5eSAndroid Build Coastguard Worker * 66*344a7f5eSAndroid Build Coastguard Worker * 2 divided by pi, as a 32 bit float. 67*344a7f5eSAndroid Build Coastguard Worker */ 68*344a7f5eSAndroid Build Coastguard Workerstatic const float M_2_PI = 0.636619772367581343075535053490057448f; 69*344a7f5eSAndroid Build Coastguard Worker 70*344a7f5eSAndroid Build Coastguard Worker/* 71*344a7f5eSAndroid Build Coastguard Worker * M_2_PIl: 2 / pi, as a 32 bit float 72*344a7f5eSAndroid Build Coastguard Worker * 73*344a7f5eSAndroid Build Coastguard Worker * DEPRECATED. Do not use. 74*344a7f5eSAndroid Build Coastguard Worker * 75*344a7f5eSAndroid Build Coastguard Worker * 2 divided by pi, as a 32 bit float. 76*344a7f5eSAndroid Build Coastguard Worker */ 77*344a7f5eSAndroid Build Coastguard Workerstatic const float M_2_PIl = 0.636619772367581343075535053490057448f; 78*344a7f5eSAndroid Build Coastguard Worker 79*344a7f5eSAndroid Build Coastguard Worker/* 80*344a7f5eSAndroid Build Coastguard Worker * M_2_SQRTPI: 2 / sqrt(pi), as a 32 bit float 81*344a7f5eSAndroid Build Coastguard Worker * 82*344a7f5eSAndroid Build Coastguard Worker * 2 divided by the square root of pi, as a 32 bit float. 83*344a7f5eSAndroid Build Coastguard Worker */ 84*344a7f5eSAndroid Build Coastguard Workerstatic const float M_2_SQRTPI = 1.128379167095512573896158903121545172f; 85*344a7f5eSAndroid Build Coastguard Worker 86*344a7f5eSAndroid Build Coastguard Worker/* 87*344a7f5eSAndroid Build Coastguard Worker * M_E: e, as a 32 bit float 88*344a7f5eSAndroid Build Coastguard Worker * 89*344a7f5eSAndroid Build Coastguard Worker * The number e, the base of the natural logarithm, as a 32 bit float. 90*344a7f5eSAndroid Build Coastguard Worker */ 91*344a7f5eSAndroid Build Coastguard Workerstatic const float M_E = 2.718281828459045235360287471352662498f; 92*344a7f5eSAndroid Build Coastguard Worker 93*344a7f5eSAndroid Build Coastguard Worker/* 94*344a7f5eSAndroid Build Coastguard Worker * M_LN10: log_e(10), as a 32 bit float 95*344a7f5eSAndroid Build Coastguard Worker * 96*344a7f5eSAndroid Build Coastguard Worker * The natural logarithm of 10, as a 32 bit float. 97*344a7f5eSAndroid Build Coastguard Worker */ 98*344a7f5eSAndroid Build Coastguard Workerstatic const float M_LN10 = 2.302585092994045684017991454684364208f; 99*344a7f5eSAndroid Build Coastguard Worker 100*344a7f5eSAndroid Build Coastguard Worker/* 101*344a7f5eSAndroid Build Coastguard Worker * M_LN2: log_e(2), as a 32 bit float 102*344a7f5eSAndroid Build Coastguard Worker * 103*344a7f5eSAndroid Build Coastguard Worker * The natural logarithm of 2, as a 32 bit float. 104*344a7f5eSAndroid Build Coastguard Worker */ 105*344a7f5eSAndroid Build Coastguard Workerstatic const float M_LN2 = 0.693147180559945309417232121458176568f; 106*344a7f5eSAndroid Build Coastguard Worker 107*344a7f5eSAndroid Build Coastguard Worker/* 108*344a7f5eSAndroid Build Coastguard Worker * M_LOG10E: log_10(e), as a 32 bit float 109*344a7f5eSAndroid Build Coastguard Worker * 110*344a7f5eSAndroid Build Coastguard Worker * The logarithm base 10 of e, as a 32 bit float. 111*344a7f5eSAndroid Build Coastguard Worker */ 112*344a7f5eSAndroid Build Coastguard Workerstatic const float M_LOG10E = 0.434294481903251827651128918916605082f; 113*344a7f5eSAndroid Build Coastguard Worker 114*344a7f5eSAndroid Build Coastguard Worker/* 115*344a7f5eSAndroid Build Coastguard Worker * M_LOG2E: log_2(e), as a 32 bit float 116*344a7f5eSAndroid Build Coastguard Worker * 117*344a7f5eSAndroid Build Coastguard Worker * The logarithm base 2 of e, as a 32 bit float. 118*344a7f5eSAndroid Build Coastguard Worker */ 119*344a7f5eSAndroid Build Coastguard Workerstatic const float M_LOG2E = 1.442695040888963407359924681001892137f; 120*344a7f5eSAndroid Build Coastguard Worker 121*344a7f5eSAndroid Build Coastguard Worker/* 122*344a7f5eSAndroid Build Coastguard Worker * M_PI: pi, as a 32 bit float 123*344a7f5eSAndroid Build Coastguard Worker * 124*344a7f5eSAndroid Build Coastguard Worker * The constant pi, as a 32 bit float. 125*344a7f5eSAndroid Build Coastguard Worker */ 126*344a7f5eSAndroid Build Coastguard Workerstatic const float M_PI = 3.141592653589793238462643383279502884f; 127*344a7f5eSAndroid Build Coastguard Worker 128*344a7f5eSAndroid Build Coastguard Worker/* 129*344a7f5eSAndroid Build Coastguard Worker * M_PI_2: pi / 2, as a 32 bit float 130*344a7f5eSAndroid Build Coastguard Worker * 131*344a7f5eSAndroid Build Coastguard Worker * Pi divided by 2, as a 32 bit float. 132*344a7f5eSAndroid Build Coastguard Worker */ 133*344a7f5eSAndroid Build Coastguard Workerstatic const float M_PI_2 = 1.570796326794896619231321691639751442f; 134*344a7f5eSAndroid Build Coastguard Worker 135*344a7f5eSAndroid Build Coastguard Worker/* 136*344a7f5eSAndroid Build Coastguard Worker * M_PI_4: pi / 4, as a 32 bit float 137*344a7f5eSAndroid Build Coastguard Worker * 138*344a7f5eSAndroid Build Coastguard Worker * Pi divided by 4, as a 32 bit float. 139*344a7f5eSAndroid Build Coastguard Worker */ 140*344a7f5eSAndroid Build Coastguard Workerstatic const float M_PI_4 = 0.785398163397448309615660845819875721f; 141*344a7f5eSAndroid Build Coastguard Worker 142*344a7f5eSAndroid Build Coastguard Worker/* 143*344a7f5eSAndroid Build Coastguard Worker * M_SQRT1_2: 1 / sqrt(2), as a 32 bit float 144*344a7f5eSAndroid Build Coastguard Worker * 145*344a7f5eSAndroid Build Coastguard Worker * The inverse of the square root of 2, as a 32 bit float. 146*344a7f5eSAndroid Build Coastguard Worker */ 147*344a7f5eSAndroid Build Coastguard Workerstatic const float M_SQRT1_2 = 0.707106781186547524400844362104849039f; 148*344a7f5eSAndroid Build Coastguard Worker 149*344a7f5eSAndroid Build Coastguard Worker/* 150*344a7f5eSAndroid Build Coastguard Worker * M_SQRT2: sqrt(2), as a 32 bit float 151*344a7f5eSAndroid Build Coastguard Worker * 152*344a7f5eSAndroid Build Coastguard Worker * The square root of 2, as a 32 bit float. 153*344a7f5eSAndroid Build Coastguard Worker */ 154*344a7f5eSAndroid Build Coastguard Workerstatic const float M_SQRT2 = 1.414213562373095048801688724209698079f; 155*344a7f5eSAndroid Build Coastguard Worker 156*344a7f5eSAndroid Build Coastguard Worker/* 157*344a7f5eSAndroid Build Coastguard Worker * abs: Absolute value of an integer 158*344a7f5eSAndroid Build Coastguard Worker * 159*344a7f5eSAndroid Build Coastguard Worker * Returns the absolute value of an integer. 160*344a7f5eSAndroid Build Coastguard Worker * 161*344a7f5eSAndroid Build Coastguard Worker * For floats, use fabs(). 162*344a7f5eSAndroid Build Coastguard Worker */ 163*344a7f5eSAndroid Build Coastguard Workerextern uchar __attribute__((const, overloadable)) 164*344a7f5eSAndroid Build Coastguard Worker abs(char v); 165*344a7f5eSAndroid Build Coastguard Worker 166*344a7f5eSAndroid Build Coastguard Workerextern uchar2 __attribute__((const, overloadable)) 167*344a7f5eSAndroid Build Coastguard Worker abs(char2 v); 168*344a7f5eSAndroid Build Coastguard Worker 169*344a7f5eSAndroid Build Coastguard Workerextern uchar3 __attribute__((const, overloadable)) 170*344a7f5eSAndroid Build Coastguard Worker abs(char3 v); 171*344a7f5eSAndroid Build Coastguard Worker 172*344a7f5eSAndroid Build Coastguard Workerextern uchar4 __attribute__((const, overloadable)) 173*344a7f5eSAndroid Build Coastguard Worker abs(char4 v); 174*344a7f5eSAndroid Build Coastguard Worker 175*344a7f5eSAndroid Build Coastguard Workerextern ushort __attribute__((const, overloadable)) 176*344a7f5eSAndroid Build Coastguard Worker abs(short v); 177*344a7f5eSAndroid Build Coastguard Worker 178*344a7f5eSAndroid Build Coastguard Workerextern ushort2 __attribute__((const, overloadable)) 179*344a7f5eSAndroid Build Coastguard Worker abs(short2 v); 180*344a7f5eSAndroid Build Coastguard Worker 181*344a7f5eSAndroid Build Coastguard Workerextern ushort3 __attribute__((const, overloadable)) 182*344a7f5eSAndroid Build Coastguard Worker abs(short3 v); 183*344a7f5eSAndroid Build Coastguard Worker 184*344a7f5eSAndroid Build Coastguard Workerextern ushort4 __attribute__((const, overloadable)) 185*344a7f5eSAndroid Build Coastguard Worker abs(short4 v); 186*344a7f5eSAndroid Build Coastguard Worker 187*344a7f5eSAndroid Build Coastguard Workerextern uint __attribute__((const, overloadable)) 188*344a7f5eSAndroid Build Coastguard Worker abs(int v); 189*344a7f5eSAndroid Build Coastguard Worker 190*344a7f5eSAndroid Build Coastguard Workerextern uint2 __attribute__((const, overloadable)) 191*344a7f5eSAndroid Build Coastguard Worker abs(int2 v); 192*344a7f5eSAndroid Build Coastguard Worker 193*344a7f5eSAndroid Build Coastguard Workerextern uint3 __attribute__((const, overloadable)) 194*344a7f5eSAndroid Build Coastguard Worker abs(int3 v); 195*344a7f5eSAndroid Build Coastguard Worker 196*344a7f5eSAndroid Build Coastguard Workerextern uint4 __attribute__((const, overloadable)) 197*344a7f5eSAndroid Build Coastguard Worker abs(int4 v); 198*344a7f5eSAndroid Build Coastguard Worker 199*344a7f5eSAndroid Build Coastguard Worker/* 200*344a7f5eSAndroid Build Coastguard Worker * acos: Inverse cosine 201*344a7f5eSAndroid Build Coastguard Worker * 202*344a7f5eSAndroid Build Coastguard Worker * Returns the inverse cosine, in radians. 203*344a7f5eSAndroid Build Coastguard Worker * 204*344a7f5eSAndroid Build Coastguard Worker * See also native_acos(). 205*344a7f5eSAndroid Build Coastguard Worker */ 206*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 207*344a7f5eSAndroid Build Coastguard Worker acos(float v); 208*344a7f5eSAndroid Build Coastguard Worker 209*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 210*344a7f5eSAndroid Build Coastguard Worker acos(float2 v); 211*344a7f5eSAndroid Build Coastguard Worker 212*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 213*344a7f5eSAndroid Build Coastguard Worker acos(float3 v); 214*344a7f5eSAndroid Build Coastguard Worker 215*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 216*344a7f5eSAndroid Build Coastguard Worker acos(float4 v); 217*344a7f5eSAndroid Build Coastguard Worker 218*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 219*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 220*344a7f5eSAndroid Build Coastguard Worker acos(half v); 221*344a7f5eSAndroid Build Coastguard Worker#endif 222*344a7f5eSAndroid Build Coastguard Worker 223*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 224*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 225*344a7f5eSAndroid Build Coastguard Worker acos(half2 v); 226*344a7f5eSAndroid Build Coastguard Worker#endif 227*344a7f5eSAndroid Build Coastguard Worker 228*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 229*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 230*344a7f5eSAndroid Build Coastguard Worker acos(half3 v); 231*344a7f5eSAndroid Build Coastguard Worker#endif 232*344a7f5eSAndroid Build Coastguard Worker 233*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 234*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 235*344a7f5eSAndroid Build Coastguard Worker acos(half4 v); 236*344a7f5eSAndroid Build Coastguard Worker#endif 237*344a7f5eSAndroid Build Coastguard Worker 238*344a7f5eSAndroid Build Coastguard Worker/* 239*344a7f5eSAndroid Build Coastguard Worker * acosh: Inverse hyperbolic cosine 240*344a7f5eSAndroid Build Coastguard Worker * 241*344a7f5eSAndroid Build Coastguard Worker * Returns the inverse hyperbolic cosine, in radians. 242*344a7f5eSAndroid Build Coastguard Worker * 243*344a7f5eSAndroid Build Coastguard Worker * See also native_acosh(). 244*344a7f5eSAndroid Build Coastguard Worker */ 245*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 246*344a7f5eSAndroid Build Coastguard Worker acosh(float v); 247*344a7f5eSAndroid Build Coastguard Worker 248*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 249*344a7f5eSAndroid Build Coastguard Worker acosh(float2 v); 250*344a7f5eSAndroid Build Coastguard Worker 251*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 252*344a7f5eSAndroid Build Coastguard Worker acosh(float3 v); 253*344a7f5eSAndroid Build Coastguard Worker 254*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 255*344a7f5eSAndroid Build Coastguard Worker acosh(float4 v); 256*344a7f5eSAndroid Build Coastguard Worker 257*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 258*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 259*344a7f5eSAndroid Build Coastguard Worker acosh(half v); 260*344a7f5eSAndroid Build Coastguard Worker#endif 261*344a7f5eSAndroid Build Coastguard Worker 262*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 263*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 264*344a7f5eSAndroid Build Coastguard Worker acosh(half2 v); 265*344a7f5eSAndroid Build Coastguard Worker#endif 266*344a7f5eSAndroid Build Coastguard Worker 267*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 268*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 269*344a7f5eSAndroid Build Coastguard Worker acosh(half3 v); 270*344a7f5eSAndroid Build Coastguard Worker#endif 271*344a7f5eSAndroid Build Coastguard Worker 272*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 273*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 274*344a7f5eSAndroid Build Coastguard Worker acosh(half4 v); 275*344a7f5eSAndroid Build Coastguard Worker#endif 276*344a7f5eSAndroid Build Coastguard Worker 277*344a7f5eSAndroid Build Coastguard Worker/* 278*344a7f5eSAndroid Build Coastguard Worker * acospi: Inverse cosine divided by pi 279*344a7f5eSAndroid Build Coastguard Worker * 280*344a7f5eSAndroid Build Coastguard Worker * Returns the inverse cosine in radians, divided by pi. 281*344a7f5eSAndroid Build Coastguard Worker * 282*344a7f5eSAndroid Build Coastguard Worker * To get an inverse cosine measured in degrees, use acospi(a) * 180.f. 283*344a7f5eSAndroid Build Coastguard Worker * 284*344a7f5eSAndroid Build Coastguard Worker * See also native_acospi(). 285*344a7f5eSAndroid Build Coastguard Worker */ 286*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 287*344a7f5eSAndroid Build Coastguard Worker acospi(float v); 288*344a7f5eSAndroid Build Coastguard Worker 289*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 290*344a7f5eSAndroid Build Coastguard Worker acospi(float2 v); 291*344a7f5eSAndroid Build Coastguard Worker 292*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 293*344a7f5eSAndroid Build Coastguard Worker acospi(float3 v); 294*344a7f5eSAndroid Build Coastguard Worker 295*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 296*344a7f5eSAndroid Build Coastguard Worker acospi(float4 v); 297*344a7f5eSAndroid Build Coastguard Worker 298*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 299*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 300*344a7f5eSAndroid Build Coastguard Worker acospi(half v); 301*344a7f5eSAndroid Build Coastguard Worker#endif 302*344a7f5eSAndroid Build Coastguard Worker 303*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 304*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 305*344a7f5eSAndroid Build Coastguard Worker acospi(half2 v); 306*344a7f5eSAndroid Build Coastguard Worker#endif 307*344a7f5eSAndroid Build Coastguard Worker 308*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 309*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 310*344a7f5eSAndroid Build Coastguard Worker acospi(half3 v); 311*344a7f5eSAndroid Build Coastguard Worker#endif 312*344a7f5eSAndroid Build Coastguard Worker 313*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 314*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 315*344a7f5eSAndroid Build Coastguard Worker acospi(half4 v); 316*344a7f5eSAndroid Build Coastguard Worker#endif 317*344a7f5eSAndroid Build Coastguard Worker 318*344a7f5eSAndroid Build Coastguard Worker/* 319*344a7f5eSAndroid Build Coastguard Worker * asin: Inverse sine 320*344a7f5eSAndroid Build Coastguard Worker * 321*344a7f5eSAndroid Build Coastguard Worker * Returns the inverse sine, in radians. 322*344a7f5eSAndroid Build Coastguard Worker * 323*344a7f5eSAndroid Build Coastguard Worker * See also native_asin(). 324*344a7f5eSAndroid Build Coastguard Worker */ 325*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 326*344a7f5eSAndroid Build Coastguard Worker asin(float v); 327*344a7f5eSAndroid Build Coastguard Worker 328*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 329*344a7f5eSAndroid Build Coastguard Worker asin(float2 v); 330*344a7f5eSAndroid Build Coastguard Worker 331*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 332*344a7f5eSAndroid Build Coastguard Worker asin(float3 v); 333*344a7f5eSAndroid Build Coastguard Worker 334*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 335*344a7f5eSAndroid Build Coastguard Worker asin(float4 v); 336*344a7f5eSAndroid Build Coastguard Worker 337*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 338*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 339*344a7f5eSAndroid Build Coastguard Worker asin(half v); 340*344a7f5eSAndroid Build Coastguard Worker#endif 341*344a7f5eSAndroid Build Coastguard Worker 342*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 343*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 344*344a7f5eSAndroid Build Coastguard Worker asin(half2 v); 345*344a7f5eSAndroid Build Coastguard Worker#endif 346*344a7f5eSAndroid Build Coastguard Worker 347*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 348*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 349*344a7f5eSAndroid Build Coastguard Worker asin(half3 v); 350*344a7f5eSAndroid Build Coastguard Worker#endif 351*344a7f5eSAndroid Build Coastguard Worker 352*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 353*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 354*344a7f5eSAndroid Build Coastguard Worker asin(half4 v); 355*344a7f5eSAndroid Build Coastguard Worker#endif 356*344a7f5eSAndroid Build Coastguard Worker 357*344a7f5eSAndroid Build Coastguard Worker/* 358*344a7f5eSAndroid Build Coastguard Worker * asinh: Inverse hyperbolic sine 359*344a7f5eSAndroid Build Coastguard Worker * 360*344a7f5eSAndroid Build Coastguard Worker * Returns the inverse hyperbolic sine, in radians. 361*344a7f5eSAndroid Build Coastguard Worker * 362*344a7f5eSAndroid Build Coastguard Worker * See also native_asinh(). 363*344a7f5eSAndroid Build Coastguard Worker */ 364*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 365*344a7f5eSAndroid Build Coastguard Worker asinh(float v); 366*344a7f5eSAndroid Build Coastguard Worker 367*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 368*344a7f5eSAndroid Build Coastguard Worker asinh(float2 v); 369*344a7f5eSAndroid Build Coastguard Worker 370*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 371*344a7f5eSAndroid Build Coastguard Worker asinh(float3 v); 372*344a7f5eSAndroid Build Coastguard Worker 373*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 374*344a7f5eSAndroid Build Coastguard Worker asinh(float4 v); 375*344a7f5eSAndroid Build Coastguard Worker 376*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 377*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 378*344a7f5eSAndroid Build Coastguard Worker asinh(half v); 379*344a7f5eSAndroid Build Coastguard Worker#endif 380*344a7f5eSAndroid Build Coastguard Worker 381*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 382*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 383*344a7f5eSAndroid Build Coastguard Worker asinh(half2 v); 384*344a7f5eSAndroid Build Coastguard Worker#endif 385*344a7f5eSAndroid Build Coastguard Worker 386*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 387*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 388*344a7f5eSAndroid Build Coastguard Worker asinh(half3 v); 389*344a7f5eSAndroid Build Coastguard Worker#endif 390*344a7f5eSAndroid Build Coastguard Worker 391*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 392*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 393*344a7f5eSAndroid Build Coastguard Worker asinh(half4 v); 394*344a7f5eSAndroid Build Coastguard Worker#endif 395*344a7f5eSAndroid Build Coastguard Worker 396*344a7f5eSAndroid Build Coastguard Worker/* 397*344a7f5eSAndroid Build Coastguard Worker * asinpi: Inverse sine divided by pi 398*344a7f5eSAndroid Build Coastguard Worker * 399*344a7f5eSAndroid Build Coastguard Worker * Returns the inverse sine in radians, divided by pi. 400*344a7f5eSAndroid Build Coastguard Worker * 401*344a7f5eSAndroid Build Coastguard Worker * To get an inverse sine measured in degrees, use asinpi(a) * 180.f. 402*344a7f5eSAndroid Build Coastguard Worker * 403*344a7f5eSAndroid Build Coastguard Worker * See also native_asinpi(). 404*344a7f5eSAndroid Build Coastguard Worker */ 405*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 406*344a7f5eSAndroid Build Coastguard Worker asinpi(float v); 407*344a7f5eSAndroid Build Coastguard Worker 408*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 409*344a7f5eSAndroid Build Coastguard Worker asinpi(float2 v); 410*344a7f5eSAndroid Build Coastguard Worker 411*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 412*344a7f5eSAndroid Build Coastguard Worker asinpi(float3 v); 413*344a7f5eSAndroid Build Coastguard Worker 414*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 415*344a7f5eSAndroid Build Coastguard Worker asinpi(float4 v); 416*344a7f5eSAndroid Build Coastguard Worker 417*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 418*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 419*344a7f5eSAndroid Build Coastguard Worker asinpi(half v); 420*344a7f5eSAndroid Build Coastguard Worker#endif 421*344a7f5eSAndroid Build Coastguard Worker 422*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 423*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 424*344a7f5eSAndroid Build Coastguard Worker asinpi(half2 v); 425*344a7f5eSAndroid Build Coastguard Worker#endif 426*344a7f5eSAndroid Build Coastguard Worker 427*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 428*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 429*344a7f5eSAndroid Build Coastguard Worker asinpi(half3 v); 430*344a7f5eSAndroid Build Coastguard Worker#endif 431*344a7f5eSAndroid Build Coastguard Worker 432*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 433*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 434*344a7f5eSAndroid Build Coastguard Worker asinpi(half4 v); 435*344a7f5eSAndroid Build Coastguard Worker#endif 436*344a7f5eSAndroid Build Coastguard Worker 437*344a7f5eSAndroid Build Coastguard Worker/* 438*344a7f5eSAndroid Build Coastguard Worker * atan: Inverse tangent 439*344a7f5eSAndroid Build Coastguard Worker * 440*344a7f5eSAndroid Build Coastguard Worker * Returns the inverse tangent, in radians. 441*344a7f5eSAndroid Build Coastguard Worker * 442*344a7f5eSAndroid Build Coastguard Worker * See also native_atan(). 443*344a7f5eSAndroid Build Coastguard Worker */ 444*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 445*344a7f5eSAndroid Build Coastguard Worker atan(float v); 446*344a7f5eSAndroid Build Coastguard Worker 447*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 448*344a7f5eSAndroid Build Coastguard Worker atan(float2 v); 449*344a7f5eSAndroid Build Coastguard Worker 450*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 451*344a7f5eSAndroid Build Coastguard Worker atan(float3 v); 452*344a7f5eSAndroid Build Coastguard Worker 453*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 454*344a7f5eSAndroid Build Coastguard Worker atan(float4 v); 455*344a7f5eSAndroid Build Coastguard Worker 456*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 457*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 458*344a7f5eSAndroid Build Coastguard Worker atan(half v); 459*344a7f5eSAndroid Build Coastguard Worker#endif 460*344a7f5eSAndroid Build Coastguard Worker 461*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 462*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 463*344a7f5eSAndroid Build Coastguard Worker atan(half2 v); 464*344a7f5eSAndroid Build Coastguard Worker#endif 465*344a7f5eSAndroid Build Coastguard Worker 466*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 467*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 468*344a7f5eSAndroid Build Coastguard Worker atan(half3 v); 469*344a7f5eSAndroid Build Coastguard Worker#endif 470*344a7f5eSAndroid Build Coastguard Worker 471*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 472*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 473*344a7f5eSAndroid Build Coastguard Worker atan(half4 v); 474*344a7f5eSAndroid Build Coastguard Worker#endif 475*344a7f5eSAndroid Build Coastguard Worker 476*344a7f5eSAndroid Build Coastguard Worker/* 477*344a7f5eSAndroid Build Coastguard Worker * atan2: Inverse tangent of a ratio 478*344a7f5eSAndroid Build Coastguard Worker * 479*344a7f5eSAndroid Build Coastguard Worker * Returns the inverse tangent of (numerator / denominator), in radians. 480*344a7f5eSAndroid Build Coastguard Worker * 481*344a7f5eSAndroid Build Coastguard Worker * See also native_atan2(). 482*344a7f5eSAndroid Build Coastguard Worker * 483*344a7f5eSAndroid Build Coastguard Worker * Parameters: 484*344a7f5eSAndroid Build Coastguard Worker * numerator: Numerator. 485*344a7f5eSAndroid Build Coastguard Worker * denominator: Denominator. Can be 0. 486*344a7f5eSAndroid Build Coastguard Worker */ 487*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 488*344a7f5eSAndroid Build Coastguard Worker atan2(float numerator, float denominator); 489*344a7f5eSAndroid Build Coastguard Worker 490*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 491*344a7f5eSAndroid Build Coastguard Worker atan2(float2 numerator, float2 denominator); 492*344a7f5eSAndroid Build Coastguard Worker 493*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 494*344a7f5eSAndroid Build Coastguard Worker atan2(float3 numerator, float3 denominator); 495*344a7f5eSAndroid Build Coastguard Worker 496*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 497*344a7f5eSAndroid Build Coastguard Worker atan2(float4 numerator, float4 denominator); 498*344a7f5eSAndroid Build Coastguard Worker 499*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 500*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 501*344a7f5eSAndroid Build Coastguard Worker atan2(half numerator, half denominator); 502*344a7f5eSAndroid Build Coastguard Worker#endif 503*344a7f5eSAndroid Build Coastguard Worker 504*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 505*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 506*344a7f5eSAndroid Build Coastguard Worker atan2(half2 numerator, half2 denominator); 507*344a7f5eSAndroid Build Coastguard Worker#endif 508*344a7f5eSAndroid Build Coastguard Worker 509*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 510*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 511*344a7f5eSAndroid Build Coastguard Worker atan2(half3 numerator, half3 denominator); 512*344a7f5eSAndroid Build Coastguard Worker#endif 513*344a7f5eSAndroid Build Coastguard Worker 514*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 515*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 516*344a7f5eSAndroid Build Coastguard Worker atan2(half4 numerator, half4 denominator); 517*344a7f5eSAndroid Build Coastguard Worker#endif 518*344a7f5eSAndroid Build Coastguard Worker 519*344a7f5eSAndroid Build Coastguard Worker/* 520*344a7f5eSAndroid Build Coastguard Worker * atan2pi: Inverse tangent of a ratio, divided by pi 521*344a7f5eSAndroid Build Coastguard Worker * 522*344a7f5eSAndroid Build Coastguard Worker * Returns the inverse tangent of (numerator / denominator), in radians, divided by pi. 523*344a7f5eSAndroid Build Coastguard Worker * 524*344a7f5eSAndroid Build Coastguard Worker * To get an inverse tangent measured in degrees, use atan2pi(n, d) * 180.f. 525*344a7f5eSAndroid Build Coastguard Worker * 526*344a7f5eSAndroid Build Coastguard Worker * See also native_atan2pi(). 527*344a7f5eSAndroid Build Coastguard Worker * 528*344a7f5eSAndroid Build Coastguard Worker * Parameters: 529*344a7f5eSAndroid Build Coastguard Worker * numerator: Numerator. 530*344a7f5eSAndroid Build Coastguard Worker * denominator: Denominator. Can be 0. 531*344a7f5eSAndroid Build Coastguard Worker */ 532*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 533*344a7f5eSAndroid Build Coastguard Worker atan2pi(float numerator, float denominator); 534*344a7f5eSAndroid Build Coastguard Worker 535*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 536*344a7f5eSAndroid Build Coastguard Worker atan2pi(float2 numerator, float2 denominator); 537*344a7f5eSAndroid Build Coastguard Worker 538*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 539*344a7f5eSAndroid Build Coastguard Worker atan2pi(float3 numerator, float3 denominator); 540*344a7f5eSAndroid Build Coastguard Worker 541*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 542*344a7f5eSAndroid Build Coastguard Worker atan2pi(float4 numerator, float4 denominator); 543*344a7f5eSAndroid Build Coastguard Worker 544*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 545*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 546*344a7f5eSAndroid Build Coastguard Worker atan2pi(half numerator, half denominator); 547*344a7f5eSAndroid Build Coastguard Worker#endif 548*344a7f5eSAndroid Build Coastguard Worker 549*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 550*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 551*344a7f5eSAndroid Build Coastguard Worker atan2pi(half2 numerator, half2 denominator); 552*344a7f5eSAndroid Build Coastguard Worker#endif 553*344a7f5eSAndroid Build Coastguard Worker 554*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 555*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 556*344a7f5eSAndroid Build Coastguard Worker atan2pi(half3 numerator, half3 denominator); 557*344a7f5eSAndroid Build Coastguard Worker#endif 558*344a7f5eSAndroid Build Coastguard Worker 559*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 560*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 561*344a7f5eSAndroid Build Coastguard Worker atan2pi(half4 numerator, half4 denominator); 562*344a7f5eSAndroid Build Coastguard Worker#endif 563*344a7f5eSAndroid Build Coastguard Worker 564*344a7f5eSAndroid Build Coastguard Worker/* 565*344a7f5eSAndroid Build Coastguard Worker * atanh: Inverse hyperbolic tangent 566*344a7f5eSAndroid Build Coastguard Worker * 567*344a7f5eSAndroid Build Coastguard Worker * Returns the inverse hyperbolic tangent, in radians. 568*344a7f5eSAndroid Build Coastguard Worker * 569*344a7f5eSAndroid Build Coastguard Worker * See also native_atanh(). 570*344a7f5eSAndroid Build Coastguard Worker */ 571*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 572*344a7f5eSAndroid Build Coastguard Worker atanh(float v); 573*344a7f5eSAndroid Build Coastguard Worker 574*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 575*344a7f5eSAndroid Build Coastguard Worker atanh(float2 v); 576*344a7f5eSAndroid Build Coastguard Worker 577*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 578*344a7f5eSAndroid Build Coastguard Worker atanh(float3 v); 579*344a7f5eSAndroid Build Coastguard Worker 580*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 581*344a7f5eSAndroid Build Coastguard Worker atanh(float4 v); 582*344a7f5eSAndroid Build Coastguard Worker 583*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 584*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 585*344a7f5eSAndroid Build Coastguard Worker atanh(half v); 586*344a7f5eSAndroid Build Coastguard Worker#endif 587*344a7f5eSAndroid Build Coastguard Worker 588*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 589*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 590*344a7f5eSAndroid Build Coastguard Worker atanh(half2 v); 591*344a7f5eSAndroid Build Coastguard Worker#endif 592*344a7f5eSAndroid Build Coastguard Worker 593*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 594*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 595*344a7f5eSAndroid Build Coastguard Worker atanh(half3 v); 596*344a7f5eSAndroid Build Coastguard Worker#endif 597*344a7f5eSAndroid Build Coastguard Worker 598*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 599*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 600*344a7f5eSAndroid Build Coastguard Worker atanh(half4 v); 601*344a7f5eSAndroid Build Coastguard Worker#endif 602*344a7f5eSAndroid Build Coastguard Worker 603*344a7f5eSAndroid Build Coastguard Worker/* 604*344a7f5eSAndroid Build Coastguard Worker * atanpi: Inverse tangent divided by pi 605*344a7f5eSAndroid Build Coastguard Worker * 606*344a7f5eSAndroid Build Coastguard Worker * Returns the inverse tangent in radians, divided by pi. 607*344a7f5eSAndroid Build Coastguard Worker * 608*344a7f5eSAndroid Build Coastguard Worker * To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. 609*344a7f5eSAndroid Build Coastguard Worker * 610*344a7f5eSAndroid Build Coastguard Worker * See also native_atanpi(). 611*344a7f5eSAndroid Build Coastguard Worker */ 612*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 613*344a7f5eSAndroid Build Coastguard Worker atanpi(float v); 614*344a7f5eSAndroid Build Coastguard Worker 615*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 616*344a7f5eSAndroid Build Coastguard Worker atanpi(float2 v); 617*344a7f5eSAndroid Build Coastguard Worker 618*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 619*344a7f5eSAndroid Build Coastguard Worker atanpi(float3 v); 620*344a7f5eSAndroid Build Coastguard Worker 621*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 622*344a7f5eSAndroid Build Coastguard Worker atanpi(float4 v); 623*344a7f5eSAndroid Build Coastguard Worker 624*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 625*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 626*344a7f5eSAndroid Build Coastguard Worker atanpi(half v); 627*344a7f5eSAndroid Build Coastguard Worker#endif 628*344a7f5eSAndroid Build Coastguard Worker 629*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 630*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 631*344a7f5eSAndroid Build Coastguard Worker atanpi(half2 v); 632*344a7f5eSAndroid Build Coastguard Worker#endif 633*344a7f5eSAndroid Build Coastguard Worker 634*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 635*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 636*344a7f5eSAndroid Build Coastguard Worker atanpi(half3 v); 637*344a7f5eSAndroid Build Coastguard Worker#endif 638*344a7f5eSAndroid Build Coastguard Worker 639*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 640*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 641*344a7f5eSAndroid Build Coastguard Worker atanpi(half4 v); 642*344a7f5eSAndroid Build Coastguard Worker#endif 643*344a7f5eSAndroid Build Coastguard Worker 644*344a7f5eSAndroid Build Coastguard Worker/* 645*344a7f5eSAndroid Build Coastguard Worker * cbrt: Cube root 646*344a7f5eSAndroid Build Coastguard Worker * 647*344a7f5eSAndroid Build Coastguard Worker * Returns the cube root. 648*344a7f5eSAndroid Build Coastguard Worker * 649*344a7f5eSAndroid Build Coastguard Worker * See also native_cbrt(). 650*344a7f5eSAndroid Build Coastguard Worker */ 651*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 652*344a7f5eSAndroid Build Coastguard Worker cbrt(float v); 653*344a7f5eSAndroid Build Coastguard Worker 654*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 655*344a7f5eSAndroid Build Coastguard Worker cbrt(float2 v); 656*344a7f5eSAndroid Build Coastguard Worker 657*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 658*344a7f5eSAndroid Build Coastguard Worker cbrt(float3 v); 659*344a7f5eSAndroid Build Coastguard Worker 660*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 661*344a7f5eSAndroid Build Coastguard Worker cbrt(float4 v); 662*344a7f5eSAndroid Build Coastguard Worker 663*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 664*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 665*344a7f5eSAndroid Build Coastguard Worker cbrt(half v); 666*344a7f5eSAndroid Build Coastguard Worker#endif 667*344a7f5eSAndroid Build Coastguard Worker 668*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 669*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 670*344a7f5eSAndroid Build Coastguard Worker cbrt(half2 v); 671*344a7f5eSAndroid Build Coastguard Worker#endif 672*344a7f5eSAndroid Build Coastguard Worker 673*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 674*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 675*344a7f5eSAndroid Build Coastguard Worker cbrt(half3 v); 676*344a7f5eSAndroid Build Coastguard Worker#endif 677*344a7f5eSAndroid Build Coastguard Worker 678*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 679*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 680*344a7f5eSAndroid Build Coastguard Worker cbrt(half4 v); 681*344a7f5eSAndroid Build Coastguard Worker#endif 682*344a7f5eSAndroid Build Coastguard Worker 683*344a7f5eSAndroid Build Coastguard Worker/* 684*344a7f5eSAndroid Build Coastguard Worker * ceil: Smallest integer not less than a value 685*344a7f5eSAndroid Build Coastguard Worker * 686*344a7f5eSAndroid Build Coastguard Worker * Returns the smallest integer not less than a value. 687*344a7f5eSAndroid Build Coastguard Worker * 688*344a7f5eSAndroid Build Coastguard Worker * For example, ceil(1.2f) returns 2.f, and ceil(-1.2f) returns -1.f. 689*344a7f5eSAndroid Build Coastguard Worker * 690*344a7f5eSAndroid Build Coastguard Worker * See also floor(). 691*344a7f5eSAndroid Build Coastguard Worker */ 692*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 693*344a7f5eSAndroid Build Coastguard Worker ceil(float v); 694*344a7f5eSAndroid Build Coastguard Worker 695*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 696*344a7f5eSAndroid Build Coastguard Worker ceil(float2 v); 697*344a7f5eSAndroid Build Coastguard Worker 698*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 699*344a7f5eSAndroid Build Coastguard Worker ceil(float3 v); 700*344a7f5eSAndroid Build Coastguard Worker 701*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 702*344a7f5eSAndroid Build Coastguard Worker ceil(float4 v); 703*344a7f5eSAndroid Build Coastguard Worker 704*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 705*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 706*344a7f5eSAndroid Build Coastguard Worker ceil(half v); 707*344a7f5eSAndroid Build Coastguard Worker#endif 708*344a7f5eSAndroid Build Coastguard Worker 709*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 710*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 711*344a7f5eSAndroid Build Coastguard Worker ceil(half2 v); 712*344a7f5eSAndroid Build Coastguard Worker#endif 713*344a7f5eSAndroid Build Coastguard Worker 714*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 715*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 716*344a7f5eSAndroid Build Coastguard Worker ceil(half3 v); 717*344a7f5eSAndroid Build Coastguard Worker#endif 718*344a7f5eSAndroid Build Coastguard Worker 719*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 720*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 721*344a7f5eSAndroid Build Coastguard Worker ceil(half4 v); 722*344a7f5eSAndroid Build Coastguard Worker#endif 723*344a7f5eSAndroid Build Coastguard Worker 724*344a7f5eSAndroid Build Coastguard Worker/* 725*344a7f5eSAndroid Build Coastguard Worker * clamp: Restrain a value to a range 726*344a7f5eSAndroid Build Coastguard Worker * 727*344a7f5eSAndroid Build Coastguard Worker * Clamps a value to a specified high and low bound. clamp() returns min_value 728*344a7f5eSAndroid Build Coastguard Worker * if value < min_value, max_value if value > max_value, otherwise value. 729*344a7f5eSAndroid Build Coastguard Worker * 730*344a7f5eSAndroid Build Coastguard Worker * There are two variants of clamp: one where the min and max are scalars applied 731*344a7f5eSAndroid Build Coastguard Worker * to all entries of the value, the other where the min and max are also vectors. 732*344a7f5eSAndroid Build Coastguard Worker * 733*344a7f5eSAndroid Build Coastguard Worker * If min_value is greater than max_value, the results are undefined. 734*344a7f5eSAndroid Build Coastguard Worker * 735*344a7f5eSAndroid Build Coastguard Worker * Parameters: 736*344a7f5eSAndroid Build Coastguard Worker * value: Value to be clamped. 737*344a7f5eSAndroid Build Coastguard Worker * min_value: Lower bound, a scalar or matching vector. 738*344a7f5eSAndroid Build Coastguard Worker * max_value: High bound, must match the type of low. 739*344a7f5eSAndroid Build Coastguard Worker */ 740*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 741*344a7f5eSAndroid Build Coastguard Worker clamp(float value, float min_value, float max_value); 742*344a7f5eSAndroid Build Coastguard Worker 743*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 744*344a7f5eSAndroid Build Coastguard Worker clamp(float2 value, float2 min_value, float2 max_value); 745*344a7f5eSAndroid Build Coastguard Worker 746*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 747*344a7f5eSAndroid Build Coastguard Worker clamp(float3 value, float3 min_value, float3 max_value); 748*344a7f5eSAndroid Build Coastguard Worker 749*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 750*344a7f5eSAndroid Build Coastguard Worker clamp(float4 value, float4 min_value, float4 max_value); 751*344a7f5eSAndroid Build Coastguard Worker 752*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 753*344a7f5eSAndroid Build Coastguard Worker clamp(float2 value, float min_value, float max_value); 754*344a7f5eSAndroid Build Coastguard Worker 755*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 756*344a7f5eSAndroid Build Coastguard Worker clamp(float3 value, float min_value, float max_value); 757*344a7f5eSAndroid Build Coastguard Worker 758*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 759*344a7f5eSAndroid Build Coastguard Worker clamp(float4 value, float min_value, float max_value); 760*344a7f5eSAndroid Build Coastguard Worker 761*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 762*344a7f5eSAndroid Build Coastguard Workerextern char __attribute__((const, overloadable)) 763*344a7f5eSAndroid Build Coastguard Worker clamp(char value, char min_value, char max_value); 764*344a7f5eSAndroid Build Coastguard Worker#endif 765*344a7f5eSAndroid Build Coastguard Worker 766*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 767*344a7f5eSAndroid Build Coastguard Workerextern char2 __attribute__((const, overloadable)) 768*344a7f5eSAndroid Build Coastguard Worker clamp(char2 value, char2 min_value, char2 max_value); 769*344a7f5eSAndroid Build Coastguard Worker#endif 770*344a7f5eSAndroid Build Coastguard Worker 771*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 772*344a7f5eSAndroid Build Coastguard Workerextern char3 __attribute__((const, overloadable)) 773*344a7f5eSAndroid Build Coastguard Worker clamp(char3 value, char3 min_value, char3 max_value); 774*344a7f5eSAndroid Build Coastguard Worker#endif 775*344a7f5eSAndroid Build Coastguard Worker 776*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 777*344a7f5eSAndroid Build Coastguard Workerextern char4 __attribute__((const, overloadable)) 778*344a7f5eSAndroid Build Coastguard Worker clamp(char4 value, char4 min_value, char4 max_value); 779*344a7f5eSAndroid Build Coastguard Worker#endif 780*344a7f5eSAndroid Build Coastguard Worker 781*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 782*344a7f5eSAndroid Build Coastguard Workerextern uchar __attribute__((const, overloadable)) 783*344a7f5eSAndroid Build Coastguard Worker clamp(uchar value, uchar min_value, uchar max_value); 784*344a7f5eSAndroid Build Coastguard Worker#endif 785*344a7f5eSAndroid Build Coastguard Worker 786*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 787*344a7f5eSAndroid Build Coastguard Workerextern uchar2 __attribute__((const, overloadable)) 788*344a7f5eSAndroid Build Coastguard Worker clamp(uchar2 value, uchar2 min_value, uchar2 max_value); 789*344a7f5eSAndroid Build Coastguard Worker#endif 790*344a7f5eSAndroid Build Coastguard Worker 791*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 792*344a7f5eSAndroid Build Coastguard Workerextern uchar3 __attribute__((const, overloadable)) 793*344a7f5eSAndroid Build Coastguard Worker clamp(uchar3 value, uchar3 min_value, uchar3 max_value); 794*344a7f5eSAndroid Build Coastguard Worker#endif 795*344a7f5eSAndroid Build Coastguard Worker 796*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 797*344a7f5eSAndroid Build Coastguard Workerextern uchar4 __attribute__((const, overloadable)) 798*344a7f5eSAndroid Build Coastguard Worker clamp(uchar4 value, uchar4 min_value, uchar4 max_value); 799*344a7f5eSAndroid Build Coastguard Worker#endif 800*344a7f5eSAndroid Build Coastguard Worker 801*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 802*344a7f5eSAndroid Build Coastguard Workerextern short __attribute__((const, overloadable)) 803*344a7f5eSAndroid Build Coastguard Worker clamp(short value, short min_value, short max_value); 804*344a7f5eSAndroid Build Coastguard Worker#endif 805*344a7f5eSAndroid Build Coastguard Worker 806*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 807*344a7f5eSAndroid Build Coastguard Workerextern short2 __attribute__((const, overloadable)) 808*344a7f5eSAndroid Build Coastguard Worker clamp(short2 value, short2 min_value, short2 max_value); 809*344a7f5eSAndroid Build Coastguard Worker#endif 810*344a7f5eSAndroid Build Coastguard Worker 811*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 812*344a7f5eSAndroid Build Coastguard Workerextern short3 __attribute__((const, overloadable)) 813*344a7f5eSAndroid Build Coastguard Worker clamp(short3 value, short3 min_value, short3 max_value); 814*344a7f5eSAndroid Build Coastguard Worker#endif 815*344a7f5eSAndroid Build Coastguard Worker 816*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 817*344a7f5eSAndroid Build Coastguard Workerextern short4 __attribute__((const, overloadable)) 818*344a7f5eSAndroid Build Coastguard Worker clamp(short4 value, short4 min_value, short4 max_value); 819*344a7f5eSAndroid Build Coastguard Worker#endif 820*344a7f5eSAndroid Build Coastguard Worker 821*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 822*344a7f5eSAndroid Build Coastguard Workerextern ushort __attribute__((const, overloadable)) 823*344a7f5eSAndroid Build Coastguard Worker clamp(ushort value, ushort min_value, ushort max_value); 824*344a7f5eSAndroid Build Coastguard Worker#endif 825*344a7f5eSAndroid Build Coastguard Worker 826*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 827*344a7f5eSAndroid Build Coastguard Workerextern ushort2 __attribute__((const, overloadable)) 828*344a7f5eSAndroid Build Coastguard Worker clamp(ushort2 value, ushort2 min_value, ushort2 max_value); 829*344a7f5eSAndroid Build Coastguard Worker#endif 830*344a7f5eSAndroid Build Coastguard Worker 831*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 832*344a7f5eSAndroid Build Coastguard Workerextern ushort3 __attribute__((const, overloadable)) 833*344a7f5eSAndroid Build Coastguard Worker clamp(ushort3 value, ushort3 min_value, ushort3 max_value); 834*344a7f5eSAndroid Build Coastguard Worker#endif 835*344a7f5eSAndroid Build Coastguard Worker 836*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 837*344a7f5eSAndroid Build Coastguard Workerextern ushort4 __attribute__((const, overloadable)) 838*344a7f5eSAndroid Build Coastguard Worker clamp(ushort4 value, ushort4 min_value, ushort4 max_value); 839*344a7f5eSAndroid Build Coastguard Worker#endif 840*344a7f5eSAndroid Build Coastguard Worker 841*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 842*344a7f5eSAndroid Build Coastguard Workerextern int __attribute__((const, overloadable)) 843*344a7f5eSAndroid Build Coastguard Worker clamp(int value, int min_value, int max_value); 844*344a7f5eSAndroid Build Coastguard Worker#endif 845*344a7f5eSAndroid Build Coastguard Worker 846*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 847*344a7f5eSAndroid Build Coastguard Workerextern int2 __attribute__((const, overloadable)) 848*344a7f5eSAndroid Build Coastguard Worker clamp(int2 value, int2 min_value, int2 max_value); 849*344a7f5eSAndroid Build Coastguard Worker#endif 850*344a7f5eSAndroid Build Coastguard Worker 851*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 852*344a7f5eSAndroid Build Coastguard Workerextern int3 __attribute__((const, overloadable)) 853*344a7f5eSAndroid Build Coastguard Worker clamp(int3 value, int3 min_value, int3 max_value); 854*344a7f5eSAndroid Build Coastguard Worker#endif 855*344a7f5eSAndroid Build Coastguard Worker 856*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 857*344a7f5eSAndroid Build Coastguard Workerextern int4 __attribute__((const, overloadable)) 858*344a7f5eSAndroid Build Coastguard Worker clamp(int4 value, int4 min_value, int4 max_value); 859*344a7f5eSAndroid Build Coastguard Worker#endif 860*344a7f5eSAndroid Build Coastguard Worker 861*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 862*344a7f5eSAndroid Build Coastguard Workerextern uint __attribute__((const, overloadable)) 863*344a7f5eSAndroid Build Coastguard Worker clamp(uint value, uint min_value, uint max_value); 864*344a7f5eSAndroid Build Coastguard Worker#endif 865*344a7f5eSAndroid Build Coastguard Worker 866*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 867*344a7f5eSAndroid Build Coastguard Workerextern uint2 __attribute__((const, overloadable)) 868*344a7f5eSAndroid Build Coastguard Worker clamp(uint2 value, uint2 min_value, uint2 max_value); 869*344a7f5eSAndroid Build Coastguard Worker#endif 870*344a7f5eSAndroid Build Coastguard Worker 871*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 872*344a7f5eSAndroid Build Coastguard Workerextern uint3 __attribute__((const, overloadable)) 873*344a7f5eSAndroid Build Coastguard Worker clamp(uint3 value, uint3 min_value, uint3 max_value); 874*344a7f5eSAndroid Build Coastguard Worker#endif 875*344a7f5eSAndroid Build Coastguard Worker 876*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 877*344a7f5eSAndroid Build Coastguard Workerextern uint4 __attribute__((const, overloadable)) 878*344a7f5eSAndroid Build Coastguard Worker clamp(uint4 value, uint4 min_value, uint4 max_value); 879*344a7f5eSAndroid Build Coastguard Worker#endif 880*344a7f5eSAndroid Build Coastguard Worker 881*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 882*344a7f5eSAndroid Build Coastguard Workerextern long __attribute__((const, overloadable)) 883*344a7f5eSAndroid Build Coastguard Worker clamp(long value, long min_value, long max_value); 884*344a7f5eSAndroid Build Coastguard Worker#endif 885*344a7f5eSAndroid Build Coastguard Worker 886*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 887*344a7f5eSAndroid Build Coastguard Workerextern long2 __attribute__((const, overloadable)) 888*344a7f5eSAndroid Build Coastguard Worker clamp(long2 value, long2 min_value, long2 max_value); 889*344a7f5eSAndroid Build Coastguard Worker#endif 890*344a7f5eSAndroid Build Coastguard Worker 891*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 892*344a7f5eSAndroid Build Coastguard Workerextern long3 __attribute__((const, overloadable)) 893*344a7f5eSAndroid Build Coastguard Worker clamp(long3 value, long3 min_value, long3 max_value); 894*344a7f5eSAndroid Build Coastguard Worker#endif 895*344a7f5eSAndroid Build Coastguard Worker 896*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 897*344a7f5eSAndroid Build Coastguard Workerextern long4 __attribute__((const, overloadable)) 898*344a7f5eSAndroid Build Coastguard Worker clamp(long4 value, long4 min_value, long4 max_value); 899*344a7f5eSAndroid Build Coastguard Worker#endif 900*344a7f5eSAndroid Build Coastguard Worker 901*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 902*344a7f5eSAndroid Build Coastguard Workerextern ulong __attribute__((const, overloadable)) 903*344a7f5eSAndroid Build Coastguard Worker clamp(ulong value, ulong min_value, ulong max_value); 904*344a7f5eSAndroid Build Coastguard Worker#endif 905*344a7f5eSAndroid Build Coastguard Worker 906*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 907*344a7f5eSAndroid Build Coastguard Workerextern ulong2 __attribute__((const, overloadable)) 908*344a7f5eSAndroid Build Coastguard Worker clamp(ulong2 value, ulong2 min_value, ulong2 max_value); 909*344a7f5eSAndroid Build Coastguard Worker#endif 910*344a7f5eSAndroid Build Coastguard Worker 911*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 912*344a7f5eSAndroid Build Coastguard Workerextern ulong3 __attribute__((const, overloadable)) 913*344a7f5eSAndroid Build Coastguard Worker clamp(ulong3 value, ulong3 min_value, ulong3 max_value); 914*344a7f5eSAndroid Build Coastguard Worker#endif 915*344a7f5eSAndroid Build Coastguard Worker 916*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 917*344a7f5eSAndroid Build Coastguard Workerextern ulong4 __attribute__((const, overloadable)) 918*344a7f5eSAndroid Build Coastguard Worker clamp(ulong4 value, ulong4 min_value, ulong4 max_value); 919*344a7f5eSAndroid Build Coastguard Worker#endif 920*344a7f5eSAndroid Build Coastguard Worker 921*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 922*344a7f5eSAndroid Build Coastguard Workerextern char2 __attribute__((const, overloadable)) 923*344a7f5eSAndroid Build Coastguard Worker clamp(char2 value, char min_value, char max_value); 924*344a7f5eSAndroid Build Coastguard Worker#endif 925*344a7f5eSAndroid Build Coastguard Worker 926*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 927*344a7f5eSAndroid Build Coastguard Workerextern char3 __attribute__((const, overloadable)) 928*344a7f5eSAndroid Build Coastguard Worker clamp(char3 value, char min_value, char max_value); 929*344a7f5eSAndroid Build Coastguard Worker#endif 930*344a7f5eSAndroid Build Coastguard Worker 931*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 932*344a7f5eSAndroid Build Coastguard Workerextern char4 __attribute__((const, overloadable)) 933*344a7f5eSAndroid Build Coastguard Worker clamp(char4 value, char min_value, char max_value); 934*344a7f5eSAndroid Build Coastguard Worker#endif 935*344a7f5eSAndroid Build Coastguard Worker 936*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 937*344a7f5eSAndroid Build Coastguard Workerextern uchar2 __attribute__((const, overloadable)) 938*344a7f5eSAndroid Build Coastguard Worker clamp(uchar2 value, uchar min_value, uchar max_value); 939*344a7f5eSAndroid Build Coastguard Worker#endif 940*344a7f5eSAndroid Build Coastguard Worker 941*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 942*344a7f5eSAndroid Build Coastguard Workerextern uchar3 __attribute__((const, overloadable)) 943*344a7f5eSAndroid Build Coastguard Worker clamp(uchar3 value, uchar min_value, uchar max_value); 944*344a7f5eSAndroid Build Coastguard Worker#endif 945*344a7f5eSAndroid Build Coastguard Worker 946*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 947*344a7f5eSAndroid Build Coastguard Workerextern uchar4 __attribute__((const, overloadable)) 948*344a7f5eSAndroid Build Coastguard Worker clamp(uchar4 value, uchar min_value, uchar max_value); 949*344a7f5eSAndroid Build Coastguard Worker#endif 950*344a7f5eSAndroid Build Coastguard Worker 951*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 952*344a7f5eSAndroid Build Coastguard Workerextern short2 __attribute__((const, overloadable)) 953*344a7f5eSAndroid Build Coastguard Worker clamp(short2 value, short min_value, short max_value); 954*344a7f5eSAndroid Build Coastguard Worker#endif 955*344a7f5eSAndroid Build Coastguard Worker 956*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 957*344a7f5eSAndroid Build Coastguard Workerextern short3 __attribute__((const, overloadable)) 958*344a7f5eSAndroid Build Coastguard Worker clamp(short3 value, short min_value, short max_value); 959*344a7f5eSAndroid Build Coastguard Worker#endif 960*344a7f5eSAndroid Build Coastguard Worker 961*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 962*344a7f5eSAndroid Build Coastguard Workerextern short4 __attribute__((const, overloadable)) 963*344a7f5eSAndroid Build Coastguard Worker clamp(short4 value, short min_value, short max_value); 964*344a7f5eSAndroid Build Coastguard Worker#endif 965*344a7f5eSAndroid Build Coastguard Worker 966*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 967*344a7f5eSAndroid Build Coastguard Workerextern ushort2 __attribute__((const, overloadable)) 968*344a7f5eSAndroid Build Coastguard Worker clamp(ushort2 value, ushort min_value, ushort max_value); 969*344a7f5eSAndroid Build Coastguard Worker#endif 970*344a7f5eSAndroid Build Coastguard Worker 971*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 972*344a7f5eSAndroid Build Coastguard Workerextern ushort3 __attribute__((const, overloadable)) 973*344a7f5eSAndroid Build Coastguard Worker clamp(ushort3 value, ushort min_value, ushort max_value); 974*344a7f5eSAndroid Build Coastguard Worker#endif 975*344a7f5eSAndroid Build Coastguard Worker 976*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 977*344a7f5eSAndroid Build Coastguard Workerextern ushort4 __attribute__((const, overloadable)) 978*344a7f5eSAndroid Build Coastguard Worker clamp(ushort4 value, ushort min_value, ushort max_value); 979*344a7f5eSAndroid Build Coastguard Worker#endif 980*344a7f5eSAndroid Build Coastguard Worker 981*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 982*344a7f5eSAndroid Build Coastguard Workerextern int2 __attribute__((const, overloadable)) 983*344a7f5eSAndroid Build Coastguard Worker clamp(int2 value, int min_value, int max_value); 984*344a7f5eSAndroid Build Coastguard Worker#endif 985*344a7f5eSAndroid Build Coastguard Worker 986*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 987*344a7f5eSAndroid Build Coastguard Workerextern int3 __attribute__((const, overloadable)) 988*344a7f5eSAndroid Build Coastguard Worker clamp(int3 value, int min_value, int max_value); 989*344a7f5eSAndroid Build Coastguard Worker#endif 990*344a7f5eSAndroid Build Coastguard Worker 991*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 992*344a7f5eSAndroid Build Coastguard Workerextern int4 __attribute__((const, overloadable)) 993*344a7f5eSAndroid Build Coastguard Worker clamp(int4 value, int min_value, int max_value); 994*344a7f5eSAndroid Build Coastguard Worker#endif 995*344a7f5eSAndroid Build Coastguard Worker 996*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 997*344a7f5eSAndroid Build Coastguard Workerextern uint2 __attribute__((const, overloadable)) 998*344a7f5eSAndroid Build Coastguard Worker clamp(uint2 value, uint min_value, uint max_value); 999*344a7f5eSAndroid Build Coastguard Worker#endif 1000*344a7f5eSAndroid Build Coastguard Worker 1001*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 1002*344a7f5eSAndroid Build Coastguard Workerextern uint3 __attribute__((const, overloadable)) 1003*344a7f5eSAndroid Build Coastguard Worker clamp(uint3 value, uint min_value, uint max_value); 1004*344a7f5eSAndroid Build Coastguard Worker#endif 1005*344a7f5eSAndroid Build Coastguard Worker 1006*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 1007*344a7f5eSAndroid Build Coastguard Workerextern uint4 __attribute__((const, overloadable)) 1008*344a7f5eSAndroid Build Coastguard Worker clamp(uint4 value, uint min_value, uint max_value); 1009*344a7f5eSAndroid Build Coastguard Worker#endif 1010*344a7f5eSAndroid Build Coastguard Worker 1011*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 1012*344a7f5eSAndroid Build Coastguard Workerextern long2 __attribute__((const, overloadable)) 1013*344a7f5eSAndroid Build Coastguard Worker clamp(long2 value, long min_value, long max_value); 1014*344a7f5eSAndroid Build Coastguard Worker#endif 1015*344a7f5eSAndroid Build Coastguard Worker 1016*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 1017*344a7f5eSAndroid Build Coastguard Workerextern long3 __attribute__((const, overloadable)) 1018*344a7f5eSAndroid Build Coastguard Worker clamp(long3 value, long min_value, long max_value); 1019*344a7f5eSAndroid Build Coastguard Worker#endif 1020*344a7f5eSAndroid Build Coastguard Worker 1021*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 1022*344a7f5eSAndroid Build Coastguard Workerextern long4 __attribute__((const, overloadable)) 1023*344a7f5eSAndroid Build Coastguard Worker clamp(long4 value, long min_value, long max_value); 1024*344a7f5eSAndroid Build Coastguard Worker#endif 1025*344a7f5eSAndroid Build Coastguard Worker 1026*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 1027*344a7f5eSAndroid Build Coastguard Workerextern ulong2 __attribute__((const, overloadable)) 1028*344a7f5eSAndroid Build Coastguard Worker clamp(ulong2 value, ulong min_value, ulong max_value); 1029*344a7f5eSAndroid Build Coastguard Worker#endif 1030*344a7f5eSAndroid Build Coastguard Worker 1031*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 1032*344a7f5eSAndroid Build Coastguard Workerextern ulong3 __attribute__((const, overloadable)) 1033*344a7f5eSAndroid Build Coastguard Worker clamp(ulong3 value, ulong min_value, ulong max_value); 1034*344a7f5eSAndroid Build Coastguard Worker#endif 1035*344a7f5eSAndroid Build Coastguard Worker 1036*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 19)) 1037*344a7f5eSAndroid Build Coastguard Workerextern ulong4 __attribute__((const, overloadable)) 1038*344a7f5eSAndroid Build Coastguard Worker clamp(ulong4 value, ulong min_value, ulong max_value); 1039*344a7f5eSAndroid Build Coastguard Worker#endif 1040*344a7f5eSAndroid Build Coastguard Worker 1041*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1042*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1043*344a7f5eSAndroid Build Coastguard Worker clamp(half value, half min_value, half max_value); 1044*344a7f5eSAndroid Build Coastguard Worker#endif 1045*344a7f5eSAndroid Build Coastguard Worker 1046*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1047*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1048*344a7f5eSAndroid Build Coastguard Worker clamp(half2 value, half2 min_value, half2 max_value); 1049*344a7f5eSAndroid Build Coastguard Worker#endif 1050*344a7f5eSAndroid Build Coastguard Worker 1051*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1052*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1053*344a7f5eSAndroid Build Coastguard Worker clamp(half3 value, half3 min_value, half3 max_value); 1054*344a7f5eSAndroid Build Coastguard Worker#endif 1055*344a7f5eSAndroid Build Coastguard Worker 1056*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1057*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1058*344a7f5eSAndroid Build Coastguard Worker clamp(half4 value, half4 min_value, half4 max_value); 1059*344a7f5eSAndroid Build Coastguard Worker#endif 1060*344a7f5eSAndroid Build Coastguard Worker 1061*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1062*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1063*344a7f5eSAndroid Build Coastguard Worker clamp(half2 value, half min_value, half max_value); 1064*344a7f5eSAndroid Build Coastguard Worker#endif 1065*344a7f5eSAndroid Build Coastguard Worker 1066*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1067*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1068*344a7f5eSAndroid Build Coastguard Worker clamp(half3 value, half min_value, half max_value); 1069*344a7f5eSAndroid Build Coastguard Worker#endif 1070*344a7f5eSAndroid Build Coastguard Worker 1071*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1072*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1073*344a7f5eSAndroid Build Coastguard Worker clamp(half4 value, half min_value, half max_value); 1074*344a7f5eSAndroid Build Coastguard Worker#endif 1075*344a7f5eSAndroid Build Coastguard Worker 1076*344a7f5eSAndroid Build Coastguard Worker/* 1077*344a7f5eSAndroid Build Coastguard Worker * clz: Number of leading 0 bits 1078*344a7f5eSAndroid Build Coastguard Worker * 1079*344a7f5eSAndroid Build Coastguard Worker * Returns the number of leading 0-bits in a value. 1080*344a7f5eSAndroid Build Coastguard Worker * 1081*344a7f5eSAndroid Build Coastguard Worker * For example, clz((char)0x03) returns 6. 1082*344a7f5eSAndroid Build Coastguard Worker */ 1083*344a7f5eSAndroid Build Coastguard Workerextern char __attribute__((const, overloadable)) 1084*344a7f5eSAndroid Build Coastguard Worker clz(char value); 1085*344a7f5eSAndroid Build Coastguard Worker 1086*344a7f5eSAndroid Build Coastguard Workerextern char2 __attribute__((const, overloadable)) 1087*344a7f5eSAndroid Build Coastguard Worker clz(char2 value); 1088*344a7f5eSAndroid Build Coastguard Worker 1089*344a7f5eSAndroid Build Coastguard Workerextern char3 __attribute__((const, overloadable)) 1090*344a7f5eSAndroid Build Coastguard Worker clz(char3 value); 1091*344a7f5eSAndroid Build Coastguard Worker 1092*344a7f5eSAndroid Build Coastguard Workerextern char4 __attribute__((const, overloadable)) 1093*344a7f5eSAndroid Build Coastguard Worker clz(char4 value); 1094*344a7f5eSAndroid Build Coastguard Worker 1095*344a7f5eSAndroid Build Coastguard Workerextern uchar __attribute__((const, overloadable)) 1096*344a7f5eSAndroid Build Coastguard Worker clz(uchar value); 1097*344a7f5eSAndroid Build Coastguard Worker 1098*344a7f5eSAndroid Build Coastguard Workerextern uchar2 __attribute__((const, overloadable)) 1099*344a7f5eSAndroid Build Coastguard Worker clz(uchar2 value); 1100*344a7f5eSAndroid Build Coastguard Worker 1101*344a7f5eSAndroid Build Coastguard Workerextern uchar3 __attribute__((const, overloadable)) 1102*344a7f5eSAndroid Build Coastguard Worker clz(uchar3 value); 1103*344a7f5eSAndroid Build Coastguard Worker 1104*344a7f5eSAndroid Build Coastguard Workerextern uchar4 __attribute__((const, overloadable)) 1105*344a7f5eSAndroid Build Coastguard Worker clz(uchar4 value); 1106*344a7f5eSAndroid Build Coastguard Worker 1107*344a7f5eSAndroid Build Coastguard Workerextern short __attribute__((const, overloadable)) 1108*344a7f5eSAndroid Build Coastguard Worker clz(short value); 1109*344a7f5eSAndroid Build Coastguard Worker 1110*344a7f5eSAndroid Build Coastguard Workerextern short2 __attribute__((const, overloadable)) 1111*344a7f5eSAndroid Build Coastguard Worker clz(short2 value); 1112*344a7f5eSAndroid Build Coastguard Worker 1113*344a7f5eSAndroid Build Coastguard Workerextern short3 __attribute__((const, overloadable)) 1114*344a7f5eSAndroid Build Coastguard Worker clz(short3 value); 1115*344a7f5eSAndroid Build Coastguard Worker 1116*344a7f5eSAndroid Build Coastguard Workerextern short4 __attribute__((const, overloadable)) 1117*344a7f5eSAndroid Build Coastguard Worker clz(short4 value); 1118*344a7f5eSAndroid Build Coastguard Worker 1119*344a7f5eSAndroid Build Coastguard Workerextern ushort __attribute__((const, overloadable)) 1120*344a7f5eSAndroid Build Coastguard Worker clz(ushort value); 1121*344a7f5eSAndroid Build Coastguard Worker 1122*344a7f5eSAndroid Build Coastguard Workerextern ushort2 __attribute__((const, overloadable)) 1123*344a7f5eSAndroid Build Coastguard Worker clz(ushort2 value); 1124*344a7f5eSAndroid Build Coastguard Worker 1125*344a7f5eSAndroid Build Coastguard Workerextern ushort3 __attribute__((const, overloadable)) 1126*344a7f5eSAndroid Build Coastguard Worker clz(ushort3 value); 1127*344a7f5eSAndroid Build Coastguard Worker 1128*344a7f5eSAndroid Build Coastguard Workerextern ushort4 __attribute__((const, overloadable)) 1129*344a7f5eSAndroid Build Coastguard Worker clz(ushort4 value); 1130*344a7f5eSAndroid Build Coastguard Worker 1131*344a7f5eSAndroid Build Coastguard Workerextern int __attribute__((const, overloadable)) 1132*344a7f5eSAndroid Build Coastguard Worker clz(int value); 1133*344a7f5eSAndroid Build Coastguard Worker 1134*344a7f5eSAndroid Build Coastguard Workerextern int2 __attribute__((const, overloadable)) 1135*344a7f5eSAndroid Build Coastguard Worker clz(int2 value); 1136*344a7f5eSAndroid Build Coastguard Worker 1137*344a7f5eSAndroid Build Coastguard Workerextern int3 __attribute__((const, overloadable)) 1138*344a7f5eSAndroid Build Coastguard Worker clz(int3 value); 1139*344a7f5eSAndroid Build Coastguard Worker 1140*344a7f5eSAndroid Build Coastguard Workerextern int4 __attribute__((const, overloadable)) 1141*344a7f5eSAndroid Build Coastguard Worker clz(int4 value); 1142*344a7f5eSAndroid Build Coastguard Worker 1143*344a7f5eSAndroid Build Coastguard Workerextern uint __attribute__((const, overloadable)) 1144*344a7f5eSAndroid Build Coastguard Worker clz(uint value); 1145*344a7f5eSAndroid Build Coastguard Worker 1146*344a7f5eSAndroid Build Coastguard Workerextern uint2 __attribute__((const, overloadable)) 1147*344a7f5eSAndroid Build Coastguard Worker clz(uint2 value); 1148*344a7f5eSAndroid Build Coastguard Worker 1149*344a7f5eSAndroid Build Coastguard Workerextern uint3 __attribute__((const, overloadable)) 1150*344a7f5eSAndroid Build Coastguard Worker clz(uint3 value); 1151*344a7f5eSAndroid Build Coastguard Worker 1152*344a7f5eSAndroid Build Coastguard Workerextern uint4 __attribute__((const, overloadable)) 1153*344a7f5eSAndroid Build Coastguard Worker clz(uint4 value); 1154*344a7f5eSAndroid Build Coastguard Worker 1155*344a7f5eSAndroid Build Coastguard Worker/* 1156*344a7f5eSAndroid Build Coastguard Worker * copysign: Copies the sign of a number to another 1157*344a7f5eSAndroid Build Coastguard Worker * 1158*344a7f5eSAndroid Build Coastguard Worker * Copies the sign from sign_value to magnitude_value. 1159*344a7f5eSAndroid Build Coastguard Worker * 1160*344a7f5eSAndroid Build Coastguard Worker * The value returned is either magnitude_value or -magnitude_value. 1161*344a7f5eSAndroid Build Coastguard Worker * 1162*344a7f5eSAndroid Build Coastguard Worker * For example, copysign(4.0f, -2.7f) returns -4.0f and copysign(-4.0f, 2.7f) returns 4.0f. 1163*344a7f5eSAndroid Build Coastguard Worker */ 1164*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1165*344a7f5eSAndroid Build Coastguard Worker copysign(float magnitude_value, float sign_value); 1166*344a7f5eSAndroid Build Coastguard Worker 1167*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1168*344a7f5eSAndroid Build Coastguard Worker copysign(float2 magnitude_value, float2 sign_value); 1169*344a7f5eSAndroid Build Coastguard Worker 1170*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1171*344a7f5eSAndroid Build Coastguard Worker copysign(float3 magnitude_value, float3 sign_value); 1172*344a7f5eSAndroid Build Coastguard Worker 1173*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1174*344a7f5eSAndroid Build Coastguard Worker copysign(float4 magnitude_value, float4 sign_value); 1175*344a7f5eSAndroid Build Coastguard Worker 1176*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1177*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1178*344a7f5eSAndroid Build Coastguard Worker copysign(half magnitude_value, half sign_value); 1179*344a7f5eSAndroid Build Coastguard Worker#endif 1180*344a7f5eSAndroid Build Coastguard Worker 1181*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1182*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1183*344a7f5eSAndroid Build Coastguard Worker copysign(half2 magnitude_value, half2 sign_value); 1184*344a7f5eSAndroid Build Coastguard Worker#endif 1185*344a7f5eSAndroid Build Coastguard Worker 1186*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1187*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1188*344a7f5eSAndroid Build Coastguard Worker copysign(half3 magnitude_value, half3 sign_value); 1189*344a7f5eSAndroid Build Coastguard Worker#endif 1190*344a7f5eSAndroid Build Coastguard Worker 1191*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1192*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1193*344a7f5eSAndroid Build Coastguard Worker copysign(half4 magnitude_value, half4 sign_value); 1194*344a7f5eSAndroid Build Coastguard Worker#endif 1195*344a7f5eSAndroid Build Coastguard Worker 1196*344a7f5eSAndroid Build Coastguard Worker/* 1197*344a7f5eSAndroid Build Coastguard Worker * cos: Cosine 1198*344a7f5eSAndroid Build Coastguard Worker * 1199*344a7f5eSAndroid Build Coastguard Worker * Returns the cosine of an angle measured in radians. 1200*344a7f5eSAndroid Build Coastguard Worker * 1201*344a7f5eSAndroid Build Coastguard Worker * See also native_cos(). 1202*344a7f5eSAndroid Build Coastguard Worker */ 1203*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1204*344a7f5eSAndroid Build Coastguard Worker cos(float v); 1205*344a7f5eSAndroid Build Coastguard Worker 1206*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1207*344a7f5eSAndroid Build Coastguard Worker cos(float2 v); 1208*344a7f5eSAndroid Build Coastguard Worker 1209*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1210*344a7f5eSAndroid Build Coastguard Worker cos(float3 v); 1211*344a7f5eSAndroid Build Coastguard Worker 1212*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1213*344a7f5eSAndroid Build Coastguard Worker cos(float4 v); 1214*344a7f5eSAndroid Build Coastguard Worker 1215*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1216*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1217*344a7f5eSAndroid Build Coastguard Worker cos(half v); 1218*344a7f5eSAndroid Build Coastguard Worker#endif 1219*344a7f5eSAndroid Build Coastguard Worker 1220*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1221*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1222*344a7f5eSAndroid Build Coastguard Worker cos(half2 v); 1223*344a7f5eSAndroid Build Coastguard Worker#endif 1224*344a7f5eSAndroid Build Coastguard Worker 1225*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1226*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1227*344a7f5eSAndroid Build Coastguard Worker cos(half3 v); 1228*344a7f5eSAndroid Build Coastguard Worker#endif 1229*344a7f5eSAndroid Build Coastguard Worker 1230*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1231*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1232*344a7f5eSAndroid Build Coastguard Worker cos(half4 v); 1233*344a7f5eSAndroid Build Coastguard Worker#endif 1234*344a7f5eSAndroid Build Coastguard Worker 1235*344a7f5eSAndroid Build Coastguard Worker/* 1236*344a7f5eSAndroid Build Coastguard Worker * cosh: Hypebolic cosine 1237*344a7f5eSAndroid Build Coastguard Worker * 1238*344a7f5eSAndroid Build Coastguard Worker * Returns the hypebolic cosine of v, where v is measured in radians. 1239*344a7f5eSAndroid Build Coastguard Worker * 1240*344a7f5eSAndroid Build Coastguard Worker * See also native_cosh(). 1241*344a7f5eSAndroid Build Coastguard Worker */ 1242*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1243*344a7f5eSAndroid Build Coastguard Worker cosh(float v); 1244*344a7f5eSAndroid Build Coastguard Worker 1245*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1246*344a7f5eSAndroid Build Coastguard Worker cosh(float2 v); 1247*344a7f5eSAndroid Build Coastguard Worker 1248*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1249*344a7f5eSAndroid Build Coastguard Worker cosh(float3 v); 1250*344a7f5eSAndroid Build Coastguard Worker 1251*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1252*344a7f5eSAndroid Build Coastguard Worker cosh(float4 v); 1253*344a7f5eSAndroid Build Coastguard Worker 1254*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1255*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1256*344a7f5eSAndroid Build Coastguard Worker cosh(half v); 1257*344a7f5eSAndroid Build Coastguard Worker#endif 1258*344a7f5eSAndroid Build Coastguard Worker 1259*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1260*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1261*344a7f5eSAndroid Build Coastguard Worker cosh(half2 v); 1262*344a7f5eSAndroid Build Coastguard Worker#endif 1263*344a7f5eSAndroid Build Coastguard Worker 1264*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1265*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1266*344a7f5eSAndroid Build Coastguard Worker cosh(half3 v); 1267*344a7f5eSAndroid Build Coastguard Worker#endif 1268*344a7f5eSAndroid Build Coastguard Worker 1269*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1270*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1271*344a7f5eSAndroid Build Coastguard Worker cosh(half4 v); 1272*344a7f5eSAndroid Build Coastguard Worker#endif 1273*344a7f5eSAndroid Build Coastguard Worker 1274*344a7f5eSAndroid Build Coastguard Worker/* 1275*344a7f5eSAndroid Build Coastguard Worker * cospi: Cosine of a number multiplied by pi 1276*344a7f5eSAndroid Build Coastguard Worker * 1277*344a7f5eSAndroid Build Coastguard Worker * Returns the cosine of (v * pi), where (v * pi) is measured in radians. 1278*344a7f5eSAndroid Build Coastguard Worker * 1279*344a7f5eSAndroid Build Coastguard Worker * To get the cosine of a value measured in degrees, call cospi(v / 180.f). 1280*344a7f5eSAndroid Build Coastguard Worker * 1281*344a7f5eSAndroid Build Coastguard Worker * See also native_cospi(). 1282*344a7f5eSAndroid Build Coastguard Worker */ 1283*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1284*344a7f5eSAndroid Build Coastguard Worker cospi(float v); 1285*344a7f5eSAndroid Build Coastguard Worker 1286*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1287*344a7f5eSAndroid Build Coastguard Worker cospi(float2 v); 1288*344a7f5eSAndroid Build Coastguard Worker 1289*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1290*344a7f5eSAndroid Build Coastguard Worker cospi(float3 v); 1291*344a7f5eSAndroid Build Coastguard Worker 1292*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1293*344a7f5eSAndroid Build Coastguard Worker cospi(float4 v); 1294*344a7f5eSAndroid Build Coastguard Worker 1295*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1296*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1297*344a7f5eSAndroid Build Coastguard Worker cospi(half v); 1298*344a7f5eSAndroid Build Coastguard Worker#endif 1299*344a7f5eSAndroid Build Coastguard Worker 1300*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1301*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1302*344a7f5eSAndroid Build Coastguard Worker cospi(half2 v); 1303*344a7f5eSAndroid Build Coastguard Worker#endif 1304*344a7f5eSAndroid Build Coastguard Worker 1305*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1306*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1307*344a7f5eSAndroid Build Coastguard Worker cospi(half3 v); 1308*344a7f5eSAndroid Build Coastguard Worker#endif 1309*344a7f5eSAndroid Build Coastguard Worker 1310*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1311*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1312*344a7f5eSAndroid Build Coastguard Worker cospi(half4 v); 1313*344a7f5eSAndroid Build Coastguard Worker#endif 1314*344a7f5eSAndroid Build Coastguard Worker 1315*344a7f5eSAndroid Build Coastguard Worker/* 1316*344a7f5eSAndroid Build Coastguard Worker * degrees: Converts radians into degrees 1317*344a7f5eSAndroid Build Coastguard Worker * 1318*344a7f5eSAndroid Build Coastguard Worker * Converts from radians to degrees. 1319*344a7f5eSAndroid Build Coastguard Worker */ 1320*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1321*344a7f5eSAndroid Build Coastguard Worker degrees(float v); 1322*344a7f5eSAndroid Build Coastguard Worker 1323*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1324*344a7f5eSAndroid Build Coastguard Worker degrees(float2 v); 1325*344a7f5eSAndroid Build Coastguard Worker 1326*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1327*344a7f5eSAndroid Build Coastguard Worker degrees(float3 v); 1328*344a7f5eSAndroid Build Coastguard Worker 1329*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1330*344a7f5eSAndroid Build Coastguard Worker degrees(float4 v); 1331*344a7f5eSAndroid Build Coastguard Worker 1332*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1333*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1334*344a7f5eSAndroid Build Coastguard Worker degrees(half v); 1335*344a7f5eSAndroid Build Coastguard Worker#endif 1336*344a7f5eSAndroid Build Coastguard Worker 1337*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1338*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1339*344a7f5eSAndroid Build Coastguard Worker degrees(half2 v); 1340*344a7f5eSAndroid Build Coastguard Worker#endif 1341*344a7f5eSAndroid Build Coastguard Worker 1342*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1343*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1344*344a7f5eSAndroid Build Coastguard Worker degrees(half3 v); 1345*344a7f5eSAndroid Build Coastguard Worker#endif 1346*344a7f5eSAndroid Build Coastguard Worker 1347*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1348*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1349*344a7f5eSAndroid Build Coastguard Worker degrees(half4 v); 1350*344a7f5eSAndroid Build Coastguard Worker#endif 1351*344a7f5eSAndroid Build Coastguard Worker 1352*344a7f5eSAndroid Build Coastguard Worker/* 1353*344a7f5eSAndroid Build Coastguard Worker * erf: Mathematical error function 1354*344a7f5eSAndroid Build Coastguard Worker * 1355*344a7f5eSAndroid Build Coastguard Worker * Returns the error function. 1356*344a7f5eSAndroid Build Coastguard Worker */ 1357*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1358*344a7f5eSAndroid Build Coastguard Worker erf(float v); 1359*344a7f5eSAndroid Build Coastguard Worker 1360*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1361*344a7f5eSAndroid Build Coastguard Worker erf(float2 v); 1362*344a7f5eSAndroid Build Coastguard Worker 1363*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1364*344a7f5eSAndroid Build Coastguard Worker erf(float3 v); 1365*344a7f5eSAndroid Build Coastguard Worker 1366*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1367*344a7f5eSAndroid Build Coastguard Worker erf(float4 v); 1368*344a7f5eSAndroid Build Coastguard Worker 1369*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1370*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1371*344a7f5eSAndroid Build Coastguard Worker erf(half v); 1372*344a7f5eSAndroid Build Coastguard Worker#endif 1373*344a7f5eSAndroid Build Coastguard Worker 1374*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1375*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1376*344a7f5eSAndroid Build Coastguard Worker erf(half2 v); 1377*344a7f5eSAndroid Build Coastguard Worker#endif 1378*344a7f5eSAndroid Build Coastguard Worker 1379*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1380*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1381*344a7f5eSAndroid Build Coastguard Worker erf(half3 v); 1382*344a7f5eSAndroid Build Coastguard Worker#endif 1383*344a7f5eSAndroid Build Coastguard Worker 1384*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1385*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1386*344a7f5eSAndroid Build Coastguard Worker erf(half4 v); 1387*344a7f5eSAndroid Build Coastguard Worker#endif 1388*344a7f5eSAndroid Build Coastguard Worker 1389*344a7f5eSAndroid Build Coastguard Worker/* 1390*344a7f5eSAndroid Build Coastguard Worker * erfc: Mathematical complementary error function 1391*344a7f5eSAndroid Build Coastguard Worker * 1392*344a7f5eSAndroid Build Coastguard Worker * Returns the complementary error function. 1393*344a7f5eSAndroid Build Coastguard Worker */ 1394*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1395*344a7f5eSAndroid Build Coastguard Worker erfc(float v); 1396*344a7f5eSAndroid Build Coastguard Worker 1397*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1398*344a7f5eSAndroid Build Coastguard Worker erfc(float2 v); 1399*344a7f5eSAndroid Build Coastguard Worker 1400*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1401*344a7f5eSAndroid Build Coastguard Worker erfc(float3 v); 1402*344a7f5eSAndroid Build Coastguard Worker 1403*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1404*344a7f5eSAndroid Build Coastguard Worker erfc(float4 v); 1405*344a7f5eSAndroid Build Coastguard Worker 1406*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1407*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1408*344a7f5eSAndroid Build Coastguard Worker erfc(half v); 1409*344a7f5eSAndroid Build Coastguard Worker#endif 1410*344a7f5eSAndroid Build Coastguard Worker 1411*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1412*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1413*344a7f5eSAndroid Build Coastguard Worker erfc(half2 v); 1414*344a7f5eSAndroid Build Coastguard Worker#endif 1415*344a7f5eSAndroid Build Coastguard Worker 1416*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1417*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1418*344a7f5eSAndroid Build Coastguard Worker erfc(half3 v); 1419*344a7f5eSAndroid Build Coastguard Worker#endif 1420*344a7f5eSAndroid Build Coastguard Worker 1421*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1422*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1423*344a7f5eSAndroid Build Coastguard Worker erfc(half4 v); 1424*344a7f5eSAndroid Build Coastguard Worker#endif 1425*344a7f5eSAndroid Build Coastguard Worker 1426*344a7f5eSAndroid Build Coastguard Worker/* 1427*344a7f5eSAndroid Build Coastguard Worker * exp: e raised to a number 1428*344a7f5eSAndroid Build Coastguard Worker * 1429*344a7f5eSAndroid Build Coastguard Worker * Returns e raised to v, i.e. e ^ v. 1430*344a7f5eSAndroid Build Coastguard Worker * 1431*344a7f5eSAndroid Build Coastguard Worker * See also native_exp(). 1432*344a7f5eSAndroid Build Coastguard Worker */ 1433*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1434*344a7f5eSAndroid Build Coastguard Worker exp(float v); 1435*344a7f5eSAndroid Build Coastguard Worker 1436*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1437*344a7f5eSAndroid Build Coastguard Worker exp(float2 v); 1438*344a7f5eSAndroid Build Coastguard Worker 1439*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1440*344a7f5eSAndroid Build Coastguard Worker exp(float3 v); 1441*344a7f5eSAndroid Build Coastguard Worker 1442*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1443*344a7f5eSAndroid Build Coastguard Worker exp(float4 v); 1444*344a7f5eSAndroid Build Coastguard Worker 1445*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1446*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1447*344a7f5eSAndroid Build Coastguard Worker exp(half v); 1448*344a7f5eSAndroid Build Coastguard Worker#endif 1449*344a7f5eSAndroid Build Coastguard Worker 1450*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1451*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1452*344a7f5eSAndroid Build Coastguard Worker exp(half2 v); 1453*344a7f5eSAndroid Build Coastguard Worker#endif 1454*344a7f5eSAndroid Build Coastguard Worker 1455*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1456*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1457*344a7f5eSAndroid Build Coastguard Worker exp(half3 v); 1458*344a7f5eSAndroid Build Coastguard Worker#endif 1459*344a7f5eSAndroid Build Coastguard Worker 1460*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1461*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1462*344a7f5eSAndroid Build Coastguard Worker exp(half4 v); 1463*344a7f5eSAndroid Build Coastguard Worker#endif 1464*344a7f5eSAndroid Build Coastguard Worker 1465*344a7f5eSAndroid Build Coastguard Worker/* 1466*344a7f5eSAndroid Build Coastguard Worker * exp10: 10 raised to a number 1467*344a7f5eSAndroid Build Coastguard Worker * 1468*344a7f5eSAndroid Build Coastguard Worker * Returns 10 raised to v, i.e. 10.f ^ v. 1469*344a7f5eSAndroid Build Coastguard Worker * 1470*344a7f5eSAndroid Build Coastguard Worker * See also native_exp10(). 1471*344a7f5eSAndroid Build Coastguard Worker */ 1472*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1473*344a7f5eSAndroid Build Coastguard Worker exp10(float v); 1474*344a7f5eSAndroid Build Coastguard Worker 1475*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1476*344a7f5eSAndroid Build Coastguard Worker exp10(float2 v); 1477*344a7f5eSAndroid Build Coastguard Worker 1478*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1479*344a7f5eSAndroid Build Coastguard Worker exp10(float3 v); 1480*344a7f5eSAndroid Build Coastguard Worker 1481*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1482*344a7f5eSAndroid Build Coastguard Worker exp10(float4 v); 1483*344a7f5eSAndroid Build Coastguard Worker 1484*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1485*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1486*344a7f5eSAndroid Build Coastguard Worker exp10(half v); 1487*344a7f5eSAndroid Build Coastguard Worker#endif 1488*344a7f5eSAndroid Build Coastguard Worker 1489*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1490*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1491*344a7f5eSAndroid Build Coastguard Worker exp10(half2 v); 1492*344a7f5eSAndroid Build Coastguard Worker#endif 1493*344a7f5eSAndroid Build Coastguard Worker 1494*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1495*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1496*344a7f5eSAndroid Build Coastguard Worker exp10(half3 v); 1497*344a7f5eSAndroid Build Coastguard Worker#endif 1498*344a7f5eSAndroid Build Coastguard Worker 1499*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1500*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1501*344a7f5eSAndroid Build Coastguard Worker exp10(half4 v); 1502*344a7f5eSAndroid Build Coastguard Worker#endif 1503*344a7f5eSAndroid Build Coastguard Worker 1504*344a7f5eSAndroid Build Coastguard Worker/* 1505*344a7f5eSAndroid Build Coastguard Worker * exp2: 2 raised to a number 1506*344a7f5eSAndroid Build Coastguard Worker * 1507*344a7f5eSAndroid Build Coastguard Worker * Returns 2 raised to v, i.e. 2.f ^ v. 1508*344a7f5eSAndroid Build Coastguard Worker * 1509*344a7f5eSAndroid Build Coastguard Worker * See also native_exp2(). 1510*344a7f5eSAndroid Build Coastguard Worker */ 1511*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1512*344a7f5eSAndroid Build Coastguard Worker exp2(float v); 1513*344a7f5eSAndroid Build Coastguard Worker 1514*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1515*344a7f5eSAndroid Build Coastguard Worker exp2(float2 v); 1516*344a7f5eSAndroid Build Coastguard Worker 1517*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1518*344a7f5eSAndroid Build Coastguard Worker exp2(float3 v); 1519*344a7f5eSAndroid Build Coastguard Worker 1520*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1521*344a7f5eSAndroid Build Coastguard Worker exp2(float4 v); 1522*344a7f5eSAndroid Build Coastguard Worker 1523*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1524*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1525*344a7f5eSAndroid Build Coastguard Worker exp2(half v); 1526*344a7f5eSAndroid Build Coastguard Worker#endif 1527*344a7f5eSAndroid Build Coastguard Worker 1528*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1529*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1530*344a7f5eSAndroid Build Coastguard Worker exp2(half2 v); 1531*344a7f5eSAndroid Build Coastguard Worker#endif 1532*344a7f5eSAndroid Build Coastguard Worker 1533*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1534*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1535*344a7f5eSAndroid Build Coastguard Worker exp2(half3 v); 1536*344a7f5eSAndroid Build Coastguard Worker#endif 1537*344a7f5eSAndroid Build Coastguard Worker 1538*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1539*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1540*344a7f5eSAndroid Build Coastguard Worker exp2(half4 v); 1541*344a7f5eSAndroid Build Coastguard Worker#endif 1542*344a7f5eSAndroid Build Coastguard Worker 1543*344a7f5eSAndroid Build Coastguard Worker/* 1544*344a7f5eSAndroid Build Coastguard Worker * expm1: e raised to a number minus one 1545*344a7f5eSAndroid Build Coastguard Worker * 1546*344a7f5eSAndroid Build Coastguard Worker * Returns e raised to v minus 1, i.e. (e ^ v) - 1. 1547*344a7f5eSAndroid Build Coastguard Worker * 1548*344a7f5eSAndroid Build Coastguard Worker * See also native_expm1(). 1549*344a7f5eSAndroid Build Coastguard Worker */ 1550*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1551*344a7f5eSAndroid Build Coastguard Worker expm1(float v); 1552*344a7f5eSAndroid Build Coastguard Worker 1553*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1554*344a7f5eSAndroid Build Coastguard Worker expm1(float2 v); 1555*344a7f5eSAndroid Build Coastguard Worker 1556*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1557*344a7f5eSAndroid Build Coastguard Worker expm1(float3 v); 1558*344a7f5eSAndroid Build Coastguard Worker 1559*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1560*344a7f5eSAndroid Build Coastguard Worker expm1(float4 v); 1561*344a7f5eSAndroid Build Coastguard Worker 1562*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1563*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1564*344a7f5eSAndroid Build Coastguard Worker expm1(half v); 1565*344a7f5eSAndroid Build Coastguard Worker#endif 1566*344a7f5eSAndroid Build Coastguard Worker 1567*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1568*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1569*344a7f5eSAndroid Build Coastguard Worker expm1(half2 v); 1570*344a7f5eSAndroid Build Coastguard Worker#endif 1571*344a7f5eSAndroid Build Coastguard Worker 1572*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1573*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1574*344a7f5eSAndroid Build Coastguard Worker expm1(half3 v); 1575*344a7f5eSAndroid Build Coastguard Worker#endif 1576*344a7f5eSAndroid Build Coastguard Worker 1577*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1578*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1579*344a7f5eSAndroid Build Coastguard Worker expm1(half4 v); 1580*344a7f5eSAndroid Build Coastguard Worker#endif 1581*344a7f5eSAndroid Build Coastguard Worker 1582*344a7f5eSAndroid Build Coastguard Worker/* 1583*344a7f5eSAndroid Build Coastguard Worker * fabs: Absolute value of a float 1584*344a7f5eSAndroid Build Coastguard Worker * 1585*344a7f5eSAndroid Build Coastguard Worker * Returns the absolute value of the float v. 1586*344a7f5eSAndroid Build Coastguard Worker * 1587*344a7f5eSAndroid Build Coastguard Worker * For integers, use abs(). 1588*344a7f5eSAndroid Build Coastguard Worker */ 1589*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1590*344a7f5eSAndroid Build Coastguard Worker fabs(float v); 1591*344a7f5eSAndroid Build Coastguard Worker 1592*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1593*344a7f5eSAndroid Build Coastguard Worker fabs(float2 v); 1594*344a7f5eSAndroid Build Coastguard Worker 1595*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1596*344a7f5eSAndroid Build Coastguard Worker fabs(float3 v); 1597*344a7f5eSAndroid Build Coastguard Worker 1598*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1599*344a7f5eSAndroid Build Coastguard Worker fabs(float4 v); 1600*344a7f5eSAndroid Build Coastguard Worker 1601*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1602*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1603*344a7f5eSAndroid Build Coastguard Worker fabs(half v); 1604*344a7f5eSAndroid Build Coastguard Worker#endif 1605*344a7f5eSAndroid Build Coastguard Worker 1606*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1607*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1608*344a7f5eSAndroid Build Coastguard Worker fabs(half2 v); 1609*344a7f5eSAndroid Build Coastguard Worker#endif 1610*344a7f5eSAndroid Build Coastguard Worker 1611*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1612*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1613*344a7f5eSAndroid Build Coastguard Worker fabs(half3 v); 1614*344a7f5eSAndroid Build Coastguard Worker#endif 1615*344a7f5eSAndroid Build Coastguard Worker 1616*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1617*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1618*344a7f5eSAndroid Build Coastguard Worker fabs(half4 v); 1619*344a7f5eSAndroid Build Coastguard Worker#endif 1620*344a7f5eSAndroid Build Coastguard Worker 1621*344a7f5eSAndroid Build Coastguard Worker/* 1622*344a7f5eSAndroid Build Coastguard Worker * fdim: Positive difference between two values 1623*344a7f5eSAndroid Build Coastguard Worker * 1624*344a7f5eSAndroid Build Coastguard Worker * Returns the positive difference between two values. 1625*344a7f5eSAndroid Build Coastguard Worker * 1626*344a7f5eSAndroid Build Coastguard Worker * If a > b, returns (a - b) otherwise returns 0f. 1627*344a7f5eSAndroid Build Coastguard Worker */ 1628*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1629*344a7f5eSAndroid Build Coastguard Worker fdim(float a, float b); 1630*344a7f5eSAndroid Build Coastguard Worker 1631*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1632*344a7f5eSAndroid Build Coastguard Worker fdim(float2 a, float2 b); 1633*344a7f5eSAndroid Build Coastguard Worker 1634*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1635*344a7f5eSAndroid Build Coastguard Worker fdim(float3 a, float3 b); 1636*344a7f5eSAndroid Build Coastguard Worker 1637*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1638*344a7f5eSAndroid Build Coastguard Worker fdim(float4 a, float4 b); 1639*344a7f5eSAndroid Build Coastguard Worker 1640*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1641*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1642*344a7f5eSAndroid Build Coastguard Worker fdim(half a, half b); 1643*344a7f5eSAndroid Build Coastguard Worker#endif 1644*344a7f5eSAndroid Build Coastguard Worker 1645*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1646*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1647*344a7f5eSAndroid Build Coastguard Worker fdim(half2 a, half2 b); 1648*344a7f5eSAndroid Build Coastguard Worker#endif 1649*344a7f5eSAndroid Build Coastguard Worker 1650*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1651*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1652*344a7f5eSAndroid Build Coastguard Worker fdim(half3 a, half3 b); 1653*344a7f5eSAndroid Build Coastguard Worker#endif 1654*344a7f5eSAndroid Build Coastguard Worker 1655*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1656*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1657*344a7f5eSAndroid Build Coastguard Worker fdim(half4 a, half4 b); 1658*344a7f5eSAndroid Build Coastguard Worker#endif 1659*344a7f5eSAndroid Build Coastguard Worker 1660*344a7f5eSAndroid Build Coastguard Worker/* 1661*344a7f5eSAndroid Build Coastguard Worker * floor: Smallest integer not greater than a value 1662*344a7f5eSAndroid Build Coastguard Worker * 1663*344a7f5eSAndroid Build Coastguard Worker * Returns the smallest integer not greater than a value. 1664*344a7f5eSAndroid Build Coastguard Worker * 1665*344a7f5eSAndroid Build Coastguard Worker * For example, floor(1.2f) returns 1.f, and floor(-1.2f) returns -2.f. 1666*344a7f5eSAndroid Build Coastguard Worker * 1667*344a7f5eSAndroid Build Coastguard Worker * See also ceil(). 1668*344a7f5eSAndroid Build Coastguard Worker */ 1669*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1670*344a7f5eSAndroid Build Coastguard Worker floor(float v); 1671*344a7f5eSAndroid Build Coastguard Worker 1672*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1673*344a7f5eSAndroid Build Coastguard Worker floor(float2 v); 1674*344a7f5eSAndroid Build Coastguard Worker 1675*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1676*344a7f5eSAndroid Build Coastguard Worker floor(float3 v); 1677*344a7f5eSAndroid Build Coastguard Worker 1678*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1679*344a7f5eSAndroid Build Coastguard Worker floor(float4 v); 1680*344a7f5eSAndroid Build Coastguard Worker 1681*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1682*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1683*344a7f5eSAndroid Build Coastguard Worker floor(half v); 1684*344a7f5eSAndroid Build Coastguard Worker#endif 1685*344a7f5eSAndroid Build Coastguard Worker 1686*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1687*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1688*344a7f5eSAndroid Build Coastguard Worker floor(half2 v); 1689*344a7f5eSAndroid Build Coastguard Worker#endif 1690*344a7f5eSAndroid Build Coastguard Worker 1691*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1692*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1693*344a7f5eSAndroid Build Coastguard Worker floor(half3 v); 1694*344a7f5eSAndroid Build Coastguard Worker#endif 1695*344a7f5eSAndroid Build Coastguard Worker 1696*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1697*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1698*344a7f5eSAndroid Build Coastguard Worker floor(half4 v); 1699*344a7f5eSAndroid Build Coastguard Worker#endif 1700*344a7f5eSAndroid Build Coastguard Worker 1701*344a7f5eSAndroid Build Coastguard Worker/* 1702*344a7f5eSAndroid Build Coastguard Worker * fma: Multiply and add 1703*344a7f5eSAndroid Build Coastguard Worker * 1704*344a7f5eSAndroid Build Coastguard Worker * Multiply and add. Returns (multiplicand1 * multiplicand2) + offset. 1705*344a7f5eSAndroid Build Coastguard Worker * 1706*344a7f5eSAndroid Build Coastguard Worker * This function is similar to mad(). fma() retains full precision of the multiplied result 1707*344a7f5eSAndroid Build Coastguard Worker * and rounds only after the addition. mad() rounds after the multiplication and the addition. 1708*344a7f5eSAndroid Build Coastguard Worker * This extra precision is not guaranteed in rs_fp_relaxed mode. 1709*344a7f5eSAndroid Build Coastguard Worker */ 1710*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1711*344a7f5eSAndroid Build Coastguard Worker fma(float multiplicand1, float multiplicand2, float offset); 1712*344a7f5eSAndroid Build Coastguard Worker 1713*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1714*344a7f5eSAndroid Build Coastguard Worker fma(float2 multiplicand1, float2 multiplicand2, float2 offset); 1715*344a7f5eSAndroid Build Coastguard Worker 1716*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1717*344a7f5eSAndroid Build Coastguard Worker fma(float3 multiplicand1, float3 multiplicand2, float3 offset); 1718*344a7f5eSAndroid Build Coastguard Worker 1719*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1720*344a7f5eSAndroid Build Coastguard Worker fma(float4 multiplicand1, float4 multiplicand2, float4 offset); 1721*344a7f5eSAndroid Build Coastguard Worker 1722*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1723*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1724*344a7f5eSAndroid Build Coastguard Worker fma(half multiplicand1, half multiplicand2, half offset); 1725*344a7f5eSAndroid Build Coastguard Worker#endif 1726*344a7f5eSAndroid Build Coastguard Worker 1727*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1728*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1729*344a7f5eSAndroid Build Coastguard Worker fma(half2 multiplicand1, half2 multiplicand2, half2 offset); 1730*344a7f5eSAndroid Build Coastguard Worker#endif 1731*344a7f5eSAndroid Build Coastguard Worker 1732*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1733*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1734*344a7f5eSAndroid Build Coastguard Worker fma(half3 multiplicand1, half3 multiplicand2, half3 offset); 1735*344a7f5eSAndroid Build Coastguard Worker#endif 1736*344a7f5eSAndroid Build Coastguard Worker 1737*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1738*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1739*344a7f5eSAndroid Build Coastguard Worker fma(half4 multiplicand1, half4 multiplicand2, half4 offset); 1740*344a7f5eSAndroid Build Coastguard Worker#endif 1741*344a7f5eSAndroid Build Coastguard Worker 1742*344a7f5eSAndroid Build Coastguard Worker/* 1743*344a7f5eSAndroid Build Coastguard Worker * fmax: Maximum of two floats 1744*344a7f5eSAndroid Build Coastguard Worker * 1745*344a7f5eSAndroid Build Coastguard Worker * Returns the maximum of a and b, i.e. (a < b ? b : a). 1746*344a7f5eSAndroid Build Coastguard Worker * 1747*344a7f5eSAndroid Build Coastguard Worker * The max() function returns identical results but can be applied to more data types. 1748*344a7f5eSAndroid Build Coastguard Worker */ 1749*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1750*344a7f5eSAndroid Build Coastguard Worker fmax(float a, float b); 1751*344a7f5eSAndroid Build Coastguard Worker 1752*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1753*344a7f5eSAndroid Build Coastguard Worker fmax(float2 a, float2 b); 1754*344a7f5eSAndroid Build Coastguard Worker 1755*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1756*344a7f5eSAndroid Build Coastguard Worker fmax(float3 a, float3 b); 1757*344a7f5eSAndroid Build Coastguard Worker 1758*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1759*344a7f5eSAndroid Build Coastguard Worker fmax(float4 a, float4 b); 1760*344a7f5eSAndroid Build Coastguard Worker 1761*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1762*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1763*344a7f5eSAndroid Build Coastguard Worker fmax(half a, half b); 1764*344a7f5eSAndroid Build Coastguard Worker#endif 1765*344a7f5eSAndroid Build Coastguard Worker 1766*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1767*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1768*344a7f5eSAndroid Build Coastguard Worker fmax(half2 a, half2 b); 1769*344a7f5eSAndroid Build Coastguard Worker#endif 1770*344a7f5eSAndroid Build Coastguard Worker 1771*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1772*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1773*344a7f5eSAndroid Build Coastguard Worker fmax(half3 a, half3 b); 1774*344a7f5eSAndroid Build Coastguard Worker#endif 1775*344a7f5eSAndroid Build Coastguard Worker 1776*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1777*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1778*344a7f5eSAndroid Build Coastguard Worker fmax(half4 a, half4 b); 1779*344a7f5eSAndroid Build Coastguard Worker#endif 1780*344a7f5eSAndroid Build Coastguard Worker 1781*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1782*344a7f5eSAndroid Build Coastguard Worker fmax(float2 a, float b); 1783*344a7f5eSAndroid Build Coastguard Worker 1784*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1785*344a7f5eSAndroid Build Coastguard Worker fmax(float3 a, float b); 1786*344a7f5eSAndroid Build Coastguard Worker 1787*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1788*344a7f5eSAndroid Build Coastguard Worker fmax(float4 a, float b); 1789*344a7f5eSAndroid Build Coastguard Worker 1790*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1791*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1792*344a7f5eSAndroid Build Coastguard Worker fmax(half2 a, half b); 1793*344a7f5eSAndroid Build Coastguard Worker#endif 1794*344a7f5eSAndroid Build Coastguard Worker 1795*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1796*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1797*344a7f5eSAndroid Build Coastguard Worker fmax(half3 a, half b); 1798*344a7f5eSAndroid Build Coastguard Worker#endif 1799*344a7f5eSAndroid Build Coastguard Worker 1800*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1801*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1802*344a7f5eSAndroid Build Coastguard Worker fmax(half4 a, half b); 1803*344a7f5eSAndroid Build Coastguard Worker#endif 1804*344a7f5eSAndroid Build Coastguard Worker 1805*344a7f5eSAndroid Build Coastguard Worker/* 1806*344a7f5eSAndroid Build Coastguard Worker * fmin: Minimum of two floats 1807*344a7f5eSAndroid Build Coastguard Worker * 1808*344a7f5eSAndroid Build Coastguard Worker * Returns the minimum of a and b, i.e. (a > b ? b : a). 1809*344a7f5eSAndroid Build Coastguard Worker * 1810*344a7f5eSAndroid Build Coastguard Worker * The min() function returns identical results but can be applied to more data types. 1811*344a7f5eSAndroid Build Coastguard Worker */ 1812*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1813*344a7f5eSAndroid Build Coastguard Worker fmin(float a, float b); 1814*344a7f5eSAndroid Build Coastguard Worker 1815*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1816*344a7f5eSAndroid Build Coastguard Worker fmin(float2 a, float2 b); 1817*344a7f5eSAndroid Build Coastguard Worker 1818*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1819*344a7f5eSAndroid Build Coastguard Worker fmin(float3 a, float3 b); 1820*344a7f5eSAndroid Build Coastguard Worker 1821*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1822*344a7f5eSAndroid Build Coastguard Worker fmin(float4 a, float4 b); 1823*344a7f5eSAndroid Build Coastguard Worker 1824*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1825*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1826*344a7f5eSAndroid Build Coastguard Worker fmin(half a, half b); 1827*344a7f5eSAndroid Build Coastguard Worker#endif 1828*344a7f5eSAndroid Build Coastguard Worker 1829*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1830*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1831*344a7f5eSAndroid Build Coastguard Worker fmin(half2 a, half2 b); 1832*344a7f5eSAndroid Build Coastguard Worker#endif 1833*344a7f5eSAndroid Build Coastguard Worker 1834*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1835*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1836*344a7f5eSAndroid Build Coastguard Worker fmin(half3 a, half3 b); 1837*344a7f5eSAndroid Build Coastguard Worker#endif 1838*344a7f5eSAndroid Build Coastguard Worker 1839*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1840*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1841*344a7f5eSAndroid Build Coastguard Worker fmin(half4 a, half4 b); 1842*344a7f5eSAndroid Build Coastguard Worker#endif 1843*344a7f5eSAndroid Build Coastguard Worker 1844*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1845*344a7f5eSAndroid Build Coastguard Worker fmin(float2 a, float b); 1846*344a7f5eSAndroid Build Coastguard Worker 1847*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1848*344a7f5eSAndroid Build Coastguard Worker fmin(float3 a, float b); 1849*344a7f5eSAndroid Build Coastguard Worker 1850*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1851*344a7f5eSAndroid Build Coastguard Worker fmin(float4 a, float b); 1852*344a7f5eSAndroid Build Coastguard Worker 1853*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1854*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1855*344a7f5eSAndroid Build Coastguard Worker fmin(half2 a, half b); 1856*344a7f5eSAndroid Build Coastguard Worker#endif 1857*344a7f5eSAndroid Build Coastguard Worker 1858*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1859*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1860*344a7f5eSAndroid Build Coastguard Worker fmin(half3 a, half b); 1861*344a7f5eSAndroid Build Coastguard Worker#endif 1862*344a7f5eSAndroid Build Coastguard Worker 1863*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1864*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1865*344a7f5eSAndroid Build Coastguard Worker fmin(half4 a, half b); 1866*344a7f5eSAndroid Build Coastguard Worker#endif 1867*344a7f5eSAndroid Build Coastguard Worker 1868*344a7f5eSAndroid Build Coastguard Worker/* 1869*344a7f5eSAndroid Build Coastguard Worker * fmod: Modulo 1870*344a7f5eSAndroid Build Coastguard Worker * 1871*344a7f5eSAndroid Build Coastguard Worker * Returns the remainder of (numerator / denominator), where the quotient is rounded towards zero. 1872*344a7f5eSAndroid Build Coastguard Worker * 1873*344a7f5eSAndroid Build Coastguard Worker * The function remainder() is similar but rounds toward the closest interger. 1874*344a7f5eSAndroid Build Coastguard Worker * For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) 1875*344a7f5eSAndroid Build Coastguard Worker * while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). 1876*344a7f5eSAndroid Build Coastguard Worker */ 1877*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 1878*344a7f5eSAndroid Build Coastguard Worker fmod(float numerator, float denominator); 1879*344a7f5eSAndroid Build Coastguard Worker 1880*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 1881*344a7f5eSAndroid Build Coastguard Worker fmod(float2 numerator, float2 denominator); 1882*344a7f5eSAndroid Build Coastguard Worker 1883*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 1884*344a7f5eSAndroid Build Coastguard Worker fmod(float3 numerator, float3 denominator); 1885*344a7f5eSAndroid Build Coastguard Worker 1886*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 1887*344a7f5eSAndroid Build Coastguard Worker fmod(float4 numerator, float4 denominator); 1888*344a7f5eSAndroid Build Coastguard Worker 1889*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1890*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 1891*344a7f5eSAndroid Build Coastguard Worker fmod(half numerator, half denominator); 1892*344a7f5eSAndroid Build Coastguard Worker#endif 1893*344a7f5eSAndroid Build Coastguard Worker 1894*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1895*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 1896*344a7f5eSAndroid Build Coastguard Worker fmod(half2 numerator, half2 denominator); 1897*344a7f5eSAndroid Build Coastguard Worker#endif 1898*344a7f5eSAndroid Build Coastguard Worker 1899*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1900*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 1901*344a7f5eSAndroid Build Coastguard Worker fmod(half3 numerator, half3 denominator); 1902*344a7f5eSAndroid Build Coastguard Worker#endif 1903*344a7f5eSAndroid Build Coastguard Worker 1904*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1905*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 1906*344a7f5eSAndroid Build Coastguard Worker fmod(half4 numerator, half4 denominator); 1907*344a7f5eSAndroid Build Coastguard Worker#endif 1908*344a7f5eSAndroid Build Coastguard Worker 1909*344a7f5eSAndroid Build Coastguard Worker/* 1910*344a7f5eSAndroid Build Coastguard Worker * fract: Positive fractional part 1911*344a7f5eSAndroid Build Coastguard Worker * 1912*344a7f5eSAndroid Build Coastguard Worker * Returns the positive fractional part of v, i.e. v - floor(v). 1913*344a7f5eSAndroid Build Coastguard Worker * 1914*344a7f5eSAndroid Build Coastguard Worker * For example, fract(1.3f, &val) returns 0.3f and sets val to 1.f. 1915*344a7f5eSAndroid Build Coastguard Worker * fract(-1.3f, &val) returns 0.7f and sets val to -2.f. 1916*344a7f5eSAndroid Build Coastguard Worker * 1917*344a7f5eSAndroid Build Coastguard Worker * Parameters: 1918*344a7f5eSAndroid Build Coastguard Worker * v: Input value. 1919*344a7f5eSAndroid Build Coastguard Worker * floor: If floor is not null, *floor will be set to the floor of v. 1920*344a7f5eSAndroid Build Coastguard Worker */ 1921*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((overloadable)) 1922*344a7f5eSAndroid Build Coastguard Worker fract(float v, float* floor); 1923*344a7f5eSAndroid Build Coastguard Worker 1924*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((overloadable)) 1925*344a7f5eSAndroid Build Coastguard Worker fract(float2 v, float2* floor); 1926*344a7f5eSAndroid Build Coastguard Worker 1927*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((overloadable)) 1928*344a7f5eSAndroid Build Coastguard Worker fract(float3 v, float3* floor); 1929*344a7f5eSAndroid Build Coastguard Worker 1930*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((overloadable)) 1931*344a7f5eSAndroid Build Coastguard Worker fract(float4 v, float4* floor); 1932*344a7f5eSAndroid Build Coastguard Worker 1933*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 23) 1934*344a7f5eSAndroid Build Coastguard Workerstatic inline float __attribute__((const, overloadable)) 1935*344a7f5eSAndroid Build Coastguard Worker fract(float v) { 1936*344a7f5eSAndroid Build Coastguard Worker float unused; 1937*344a7f5eSAndroid Build Coastguard Worker return fract(v, &unused); 1938*344a7f5eSAndroid Build Coastguard Worker} 1939*344a7f5eSAndroid Build Coastguard Worker#endif 1940*344a7f5eSAndroid Build Coastguard Worker 1941*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 23) 1942*344a7f5eSAndroid Build Coastguard Workerstatic inline float2 __attribute__((const, overloadable)) 1943*344a7f5eSAndroid Build Coastguard Worker fract(float2 v) { 1944*344a7f5eSAndroid Build Coastguard Worker float2 unused; 1945*344a7f5eSAndroid Build Coastguard Worker return fract(v, &unused); 1946*344a7f5eSAndroid Build Coastguard Worker} 1947*344a7f5eSAndroid Build Coastguard Worker#endif 1948*344a7f5eSAndroid Build Coastguard Worker 1949*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 23) 1950*344a7f5eSAndroid Build Coastguard Workerstatic inline float3 __attribute__((const, overloadable)) 1951*344a7f5eSAndroid Build Coastguard Worker fract(float3 v) { 1952*344a7f5eSAndroid Build Coastguard Worker float3 unused; 1953*344a7f5eSAndroid Build Coastguard Worker return fract(v, &unused); 1954*344a7f5eSAndroid Build Coastguard Worker} 1955*344a7f5eSAndroid Build Coastguard Worker#endif 1956*344a7f5eSAndroid Build Coastguard Worker 1957*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 23) 1958*344a7f5eSAndroid Build Coastguard Workerstatic inline float4 __attribute__((const, overloadable)) 1959*344a7f5eSAndroid Build Coastguard Worker fract(float4 v) { 1960*344a7f5eSAndroid Build Coastguard Worker float4 unused; 1961*344a7f5eSAndroid Build Coastguard Worker return fract(v, &unused); 1962*344a7f5eSAndroid Build Coastguard Worker} 1963*344a7f5eSAndroid Build Coastguard Worker#endif 1964*344a7f5eSAndroid Build Coastguard Worker 1965*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1966*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((overloadable)) 1967*344a7f5eSAndroid Build Coastguard Worker fract(float v); 1968*344a7f5eSAndroid Build Coastguard Worker#endif 1969*344a7f5eSAndroid Build Coastguard Worker 1970*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1971*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((overloadable)) 1972*344a7f5eSAndroid Build Coastguard Worker fract(float2 v); 1973*344a7f5eSAndroid Build Coastguard Worker#endif 1974*344a7f5eSAndroid Build Coastguard Worker 1975*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1976*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((overloadable)) 1977*344a7f5eSAndroid Build Coastguard Worker fract(float3 v); 1978*344a7f5eSAndroid Build Coastguard Worker#endif 1979*344a7f5eSAndroid Build Coastguard Worker 1980*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1981*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((overloadable)) 1982*344a7f5eSAndroid Build Coastguard Worker fract(float4 v); 1983*344a7f5eSAndroid Build Coastguard Worker#endif 1984*344a7f5eSAndroid Build Coastguard Worker 1985*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1986*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((overloadable)) 1987*344a7f5eSAndroid Build Coastguard Worker fract(half v, half* floor); 1988*344a7f5eSAndroid Build Coastguard Worker#endif 1989*344a7f5eSAndroid Build Coastguard Worker 1990*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1991*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((overloadable)) 1992*344a7f5eSAndroid Build Coastguard Worker fract(half2 v, half2* floor); 1993*344a7f5eSAndroid Build Coastguard Worker#endif 1994*344a7f5eSAndroid Build Coastguard Worker 1995*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1996*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((overloadable)) 1997*344a7f5eSAndroid Build Coastguard Worker fract(half3 v, half3* floor); 1998*344a7f5eSAndroid Build Coastguard Worker#endif 1999*344a7f5eSAndroid Build Coastguard Worker 2000*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2001*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((overloadable)) 2002*344a7f5eSAndroid Build Coastguard Worker fract(half4 v, half4* floor); 2003*344a7f5eSAndroid Build Coastguard Worker#endif 2004*344a7f5eSAndroid Build Coastguard Worker 2005*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2006*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((overloadable)) 2007*344a7f5eSAndroid Build Coastguard Worker fract(half v); 2008*344a7f5eSAndroid Build Coastguard Worker#endif 2009*344a7f5eSAndroid Build Coastguard Worker 2010*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2011*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((overloadable)) 2012*344a7f5eSAndroid Build Coastguard Worker fract(half2 v); 2013*344a7f5eSAndroid Build Coastguard Worker#endif 2014*344a7f5eSAndroid Build Coastguard Worker 2015*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2016*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((overloadable)) 2017*344a7f5eSAndroid Build Coastguard Worker fract(half3 v); 2018*344a7f5eSAndroid Build Coastguard Worker#endif 2019*344a7f5eSAndroid Build Coastguard Worker 2020*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2021*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((overloadable)) 2022*344a7f5eSAndroid Build Coastguard Worker fract(half4 v); 2023*344a7f5eSAndroid Build Coastguard Worker#endif 2024*344a7f5eSAndroid Build Coastguard Worker 2025*344a7f5eSAndroid Build Coastguard Worker/* 2026*344a7f5eSAndroid Build Coastguard Worker * frexp: Binary mantissa and exponent 2027*344a7f5eSAndroid Build Coastguard Worker * 2028*344a7f5eSAndroid Build Coastguard Worker * Returns the binary mantissa and exponent of v, i.e. v == mantissa * 2 ^ exponent. 2029*344a7f5eSAndroid Build Coastguard Worker * 2030*344a7f5eSAndroid Build Coastguard Worker * The mantissa is always between 0.5 (inclusive) and 1.0 (exclusive). 2031*344a7f5eSAndroid Build Coastguard Worker * 2032*344a7f5eSAndroid Build Coastguard Worker * See ldexp() for the reverse operation. See also logb() and ilogb(). 2033*344a7f5eSAndroid Build Coastguard Worker * 2034*344a7f5eSAndroid Build Coastguard Worker * Parameters: 2035*344a7f5eSAndroid Build Coastguard Worker * v: Input value. 2036*344a7f5eSAndroid Build Coastguard Worker * exponent: If exponent is not null, *exponent will be set to the exponent of v. 2037*344a7f5eSAndroid Build Coastguard Worker */ 2038*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((overloadable)) 2039*344a7f5eSAndroid Build Coastguard Worker frexp(float v, int* exponent); 2040*344a7f5eSAndroid Build Coastguard Worker 2041*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((overloadable)) 2042*344a7f5eSAndroid Build Coastguard Worker frexp(float2 v, int2* exponent); 2043*344a7f5eSAndroid Build Coastguard Worker 2044*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((overloadable)) 2045*344a7f5eSAndroid Build Coastguard Worker frexp(float3 v, int3* exponent); 2046*344a7f5eSAndroid Build Coastguard Worker 2047*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((overloadable)) 2048*344a7f5eSAndroid Build Coastguard Worker frexp(float4 v, int4* exponent); 2049*344a7f5eSAndroid Build Coastguard Worker 2050*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2051*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((overloadable)) 2052*344a7f5eSAndroid Build Coastguard Worker frexp(half v, int* exponent); 2053*344a7f5eSAndroid Build Coastguard Worker#endif 2054*344a7f5eSAndroid Build Coastguard Worker 2055*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2056*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((overloadable)) 2057*344a7f5eSAndroid Build Coastguard Worker frexp(half2 v, int2* exponent); 2058*344a7f5eSAndroid Build Coastguard Worker#endif 2059*344a7f5eSAndroid Build Coastguard Worker 2060*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2061*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((overloadable)) 2062*344a7f5eSAndroid Build Coastguard Worker frexp(half3 v, int3* exponent); 2063*344a7f5eSAndroid Build Coastguard Worker#endif 2064*344a7f5eSAndroid Build Coastguard Worker 2065*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2066*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((overloadable)) 2067*344a7f5eSAndroid Build Coastguard Worker frexp(half4 v, int4* exponent); 2068*344a7f5eSAndroid Build Coastguard Worker#endif 2069*344a7f5eSAndroid Build Coastguard Worker 2070*344a7f5eSAndroid Build Coastguard Worker/* 2071*344a7f5eSAndroid Build Coastguard Worker * half_recip: Reciprocal computed to 16 bit precision 2072*344a7f5eSAndroid Build Coastguard Worker * 2073*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate reciprocal of a value. 2074*344a7f5eSAndroid Build Coastguard Worker * 2075*344a7f5eSAndroid Build Coastguard Worker * The precision is that of a 16 bit floating point value. 2076*344a7f5eSAndroid Build Coastguard Worker * 2077*344a7f5eSAndroid Build Coastguard Worker * See also native_recip(). 2078*344a7f5eSAndroid Build Coastguard Worker */ 2079*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2080*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2081*344a7f5eSAndroid Build Coastguard Worker half_recip(float v); 2082*344a7f5eSAndroid Build Coastguard Worker#endif 2083*344a7f5eSAndroid Build Coastguard Worker 2084*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2085*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2086*344a7f5eSAndroid Build Coastguard Worker half_recip(float2 v); 2087*344a7f5eSAndroid Build Coastguard Worker#endif 2088*344a7f5eSAndroid Build Coastguard Worker 2089*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2090*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2091*344a7f5eSAndroid Build Coastguard Worker half_recip(float3 v); 2092*344a7f5eSAndroid Build Coastguard Worker#endif 2093*344a7f5eSAndroid Build Coastguard Worker 2094*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2095*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2096*344a7f5eSAndroid Build Coastguard Worker half_recip(float4 v); 2097*344a7f5eSAndroid Build Coastguard Worker#endif 2098*344a7f5eSAndroid Build Coastguard Worker 2099*344a7f5eSAndroid Build Coastguard Worker/* 2100*344a7f5eSAndroid Build Coastguard Worker * half_rsqrt: Reciprocal of a square root computed to 16 bit precision 2101*344a7f5eSAndroid Build Coastguard Worker * 2102*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate value of (1.f / sqrt(value)). 2103*344a7f5eSAndroid Build Coastguard Worker * 2104*344a7f5eSAndroid Build Coastguard Worker * The precision is that of a 16 bit floating point value. 2105*344a7f5eSAndroid Build Coastguard Worker * 2106*344a7f5eSAndroid Build Coastguard Worker * See also rsqrt(), native_rsqrt(). 2107*344a7f5eSAndroid Build Coastguard Worker */ 2108*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2109*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2110*344a7f5eSAndroid Build Coastguard Worker half_rsqrt(float v); 2111*344a7f5eSAndroid Build Coastguard Worker#endif 2112*344a7f5eSAndroid Build Coastguard Worker 2113*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2114*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2115*344a7f5eSAndroid Build Coastguard Worker half_rsqrt(float2 v); 2116*344a7f5eSAndroid Build Coastguard Worker#endif 2117*344a7f5eSAndroid Build Coastguard Worker 2118*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2119*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2120*344a7f5eSAndroid Build Coastguard Worker half_rsqrt(float3 v); 2121*344a7f5eSAndroid Build Coastguard Worker#endif 2122*344a7f5eSAndroid Build Coastguard Worker 2123*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2124*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2125*344a7f5eSAndroid Build Coastguard Worker half_rsqrt(float4 v); 2126*344a7f5eSAndroid Build Coastguard Worker#endif 2127*344a7f5eSAndroid Build Coastguard Worker 2128*344a7f5eSAndroid Build Coastguard Worker/* 2129*344a7f5eSAndroid Build Coastguard Worker * half_sqrt: Square root computed to 16 bit precision 2130*344a7f5eSAndroid Build Coastguard Worker * 2131*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate square root of a value. 2132*344a7f5eSAndroid Build Coastguard Worker * 2133*344a7f5eSAndroid Build Coastguard Worker * The precision is that of a 16 bit floating point value. 2134*344a7f5eSAndroid Build Coastguard Worker * 2135*344a7f5eSAndroid Build Coastguard Worker * See also sqrt(), native_sqrt(). 2136*344a7f5eSAndroid Build Coastguard Worker */ 2137*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2138*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2139*344a7f5eSAndroid Build Coastguard Worker half_sqrt(float v); 2140*344a7f5eSAndroid Build Coastguard Worker#endif 2141*344a7f5eSAndroid Build Coastguard Worker 2142*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2143*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2144*344a7f5eSAndroid Build Coastguard Worker half_sqrt(float2 v); 2145*344a7f5eSAndroid Build Coastguard Worker#endif 2146*344a7f5eSAndroid Build Coastguard Worker 2147*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2148*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2149*344a7f5eSAndroid Build Coastguard Worker half_sqrt(float3 v); 2150*344a7f5eSAndroid Build Coastguard Worker#endif 2151*344a7f5eSAndroid Build Coastguard Worker 2152*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 17)) 2153*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2154*344a7f5eSAndroid Build Coastguard Worker half_sqrt(float4 v); 2155*344a7f5eSAndroid Build Coastguard Worker#endif 2156*344a7f5eSAndroid Build Coastguard Worker 2157*344a7f5eSAndroid Build Coastguard Worker/* 2158*344a7f5eSAndroid Build Coastguard Worker * hypot: Hypotenuse 2159*344a7f5eSAndroid Build Coastguard Worker * 2160*344a7f5eSAndroid Build Coastguard Worker * Returns the hypotenuse, i.e. sqrt(a * a + b * b). 2161*344a7f5eSAndroid Build Coastguard Worker * 2162*344a7f5eSAndroid Build Coastguard Worker * See also native_hypot(). 2163*344a7f5eSAndroid Build Coastguard Worker */ 2164*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2165*344a7f5eSAndroid Build Coastguard Worker hypot(float a, float b); 2166*344a7f5eSAndroid Build Coastguard Worker 2167*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2168*344a7f5eSAndroid Build Coastguard Worker hypot(float2 a, float2 b); 2169*344a7f5eSAndroid Build Coastguard Worker 2170*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2171*344a7f5eSAndroid Build Coastguard Worker hypot(float3 a, float3 b); 2172*344a7f5eSAndroid Build Coastguard Worker 2173*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2174*344a7f5eSAndroid Build Coastguard Worker hypot(float4 a, float4 b); 2175*344a7f5eSAndroid Build Coastguard Worker 2176*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2177*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 2178*344a7f5eSAndroid Build Coastguard Worker hypot(half a, half b); 2179*344a7f5eSAndroid Build Coastguard Worker#endif 2180*344a7f5eSAndroid Build Coastguard Worker 2181*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2182*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2183*344a7f5eSAndroid Build Coastguard Worker hypot(half2 a, half2 b); 2184*344a7f5eSAndroid Build Coastguard Worker#endif 2185*344a7f5eSAndroid Build Coastguard Worker 2186*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2187*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2188*344a7f5eSAndroid Build Coastguard Worker hypot(half3 a, half3 b); 2189*344a7f5eSAndroid Build Coastguard Worker#endif 2190*344a7f5eSAndroid Build Coastguard Worker 2191*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2192*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2193*344a7f5eSAndroid Build Coastguard Worker hypot(half4 a, half4 b); 2194*344a7f5eSAndroid Build Coastguard Worker#endif 2195*344a7f5eSAndroid Build Coastguard Worker 2196*344a7f5eSAndroid Build Coastguard Worker/* 2197*344a7f5eSAndroid Build Coastguard Worker * ilogb: Base two exponent 2198*344a7f5eSAndroid Build Coastguard Worker * 2199*344a7f5eSAndroid Build Coastguard Worker * Returns the base two exponent of a value, where the mantissa is between 2200*344a7f5eSAndroid Build Coastguard Worker * 1.f (inclusive) and 2.f (exclusive). 2201*344a7f5eSAndroid Build Coastguard Worker * 2202*344a7f5eSAndroid Build Coastguard Worker * For example, ilogb(8.5f) returns 3. 2203*344a7f5eSAndroid Build Coastguard Worker * 2204*344a7f5eSAndroid Build Coastguard Worker * Because of the difference in mantissa, this number is one less than is returned by frexp(). 2205*344a7f5eSAndroid Build Coastguard Worker * 2206*344a7f5eSAndroid Build Coastguard Worker * logb() is similar but returns a float. 2207*344a7f5eSAndroid Build Coastguard Worker */ 2208*344a7f5eSAndroid Build Coastguard Workerextern int __attribute__((const, overloadable)) 2209*344a7f5eSAndroid Build Coastguard Worker ilogb(float v); 2210*344a7f5eSAndroid Build Coastguard Worker 2211*344a7f5eSAndroid Build Coastguard Workerextern int2 __attribute__((const, overloadable)) 2212*344a7f5eSAndroid Build Coastguard Worker ilogb(float2 v); 2213*344a7f5eSAndroid Build Coastguard Worker 2214*344a7f5eSAndroid Build Coastguard Workerextern int3 __attribute__((const, overloadable)) 2215*344a7f5eSAndroid Build Coastguard Worker ilogb(float3 v); 2216*344a7f5eSAndroid Build Coastguard Worker 2217*344a7f5eSAndroid Build Coastguard Workerextern int4 __attribute__((const, overloadable)) 2218*344a7f5eSAndroid Build Coastguard Worker ilogb(float4 v); 2219*344a7f5eSAndroid Build Coastguard Worker 2220*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2221*344a7f5eSAndroid Build Coastguard Workerextern int __attribute__((const, overloadable)) 2222*344a7f5eSAndroid Build Coastguard Worker ilogb(half v); 2223*344a7f5eSAndroid Build Coastguard Worker#endif 2224*344a7f5eSAndroid Build Coastguard Worker 2225*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2226*344a7f5eSAndroid Build Coastguard Workerextern int2 __attribute__((const, overloadable)) 2227*344a7f5eSAndroid Build Coastguard Worker ilogb(half2 v); 2228*344a7f5eSAndroid Build Coastguard Worker#endif 2229*344a7f5eSAndroid Build Coastguard Worker 2230*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2231*344a7f5eSAndroid Build Coastguard Workerextern int3 __attribute__((const, overloadable)) 2232*344a7f5eSAndroid Build Coastguard Worker ilogb(half3 v); 2233*344a7f5eSAndroid Build Coastguard Worker#endif 2234*344a7f5eSAndroid Build Coastguard Worker 2235*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2236*344a7f5eSAndroid Build Coastguard Workerextern int4 __attribute__((const, overloadable)) 2237*344a7f5eSAndroid Build Coastguard Worker ilogb(half4 v); 2238*344a7f5eSAndroid Build Coastguard Worker#endif 2239*344a7f5eSAndroid Build Coastguard Worker 2240*344a7f5eSAndroid Build Coastguard Worker/* 2241*344a7f5eSAndroid Build Coastguard Worker * ldexp: Creates a floating point from mantissa and exponent 2242*344a7f5eSAndroid Build Coastguard Worker * 2243*344a7f5eSAndroid Build Coastguard Worker * Returns the floating point created from the mantissa and exponent, 2244*344a7f5eSAndroid Build Coastguard Worker * i.e. (mantissa * 2 ^ exponent). 2245*344a7f5eSAndroid Build Coastguard Worker * 2246*344a7f5eSAndroid Build Coastguard Worker * See frexp() for the reverse operation. 2247*344a7f5eSAndroid Build Coastguard Worker * 2248*344a7f5eSAndroid Build Coastguard Worker * Parameters: 2249*344a7f5eSAndroid Build Coastguard Worker * mantissa: Mantissa. 2250*344a7f5eSAndroid Build Coastguard Worker * exponent: Exponent, a single component or matching vector. 2251*344a7f5eSAndroid Build Coastguard Worker */ 2252*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2253*344a7f5eSAndroid Build Coastguard Worker ldexp(float mantissa, int exponent); 2254*344a7f5eSAndroid Build Coastguard Worker 2255*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2256*344a7f5eSAndroid Build Coastguard Worker ldexp(float2 mantissa, int2 exponent); 2257*344a7f5eSAndroid Build Coastguard Worker 2258*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2259*344a7f5eSAndroid Build Coastguard Worker ldexp(float3 mantissa, int3 exponent); 2260*344a7f5eSAndroid Build Coastguard Worker 2261*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2262*344a7f5eSAndroid Build Coastguard Worker ldexp(float4 mantissa, int4 exponent); 2263*344a7f5eSAndroid Build Coastguard Worker 2264*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2265*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 2266*344a7f5eSAndroid Build Coastguard Worker ldexp(half mantissa, int exponent); 2267*344a7f5eSAndroid Build Coastguard Worker#endif 2268*344a7f5eSAndroid Build Coastguard Worker 2269*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2270*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2271*344a7f5eSAndroid Build Coastguard Worker ldexp(half2 mantissa, int2 exponent); 2272*344a7f5eSAndroid Build Coastguard Worker#endif 2273*344a7f5eSAndroid Build Coastguard Worker 2274*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2275*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2276*344a7f5eSAndroid Build Coastguard Worker ldexp(half3 mantissa, int3 exponent); 2277*344a7f5eSAndroid Build Coastguard Worker#endif 2278*344a7f5eSAndroid Build Coastguard Worker 2279*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2280*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2281*344a7f5eSAndroid Build Coastguard Worker ldexp(half4 mantissa, int4 exponent); 2282*344a7f5eSAndroid Build Coastguard Worker#endif 2283*344a7f5eSAndroid Build Coastguard Worker 2284*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2285*344a7f5eSAndroid Build Coastguard Worker ldexp(float2 mantissa, int exponent); 2286*344a7f5eSAndroid Build Coastguard Worker 2287*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2288*344a7f5eSAndroid Build Coastguard Worker ldexp(float3 mantissa, int exponent); 2289*344a7f5eSAndroid Build Coastguard Worker 2290*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2291*344a7f5eSAndroid Build Coastguard Worker ldexp(float4 mantissa, int exponent); 2292*344a7f5eSAndroid Build Coastguard Worker 2293*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2294*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2295*344a7f5eSAndroid Build Coastguard Worker ldexp(half2 mantissa, int exponent); 2296*344a7f5eSAndroid Build Coastguard Worker#endif 2297*344a7f5eSAndroid Build Coastguard Worker 2298*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2299*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2300*344a7f5eSAndroid Build Coastguard Worker ldexp(half3 mantissa, int exponent); 2301*344a7f5eSAndroid Build Coastguard Worker#endif 2302*344a7f5eSAndroid Build Coastguard Worker 2303*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2304*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2305*344a7f5eSAndroid Build Coastguard Worker ldexp(half4 mantissa, int exponent); 2306*344a7f5eSAndroid Build Coastguard Worker#endif 2307*344a7f5eSAndroid Build Coastguard Worker 2308*344a7f5eSAndroid Build Coastguard Worker/* 2309*344a7f5eSAndroid Build Coastguard Worker * lgamma: Natural logarithm of the gamma function 2310*344a7f5eSAndroid Build Coastguard Worker * 2311*344a7f5eSAndroid Build Coastguard Worker * Returns the natural logarithm of the absolute value of the gamma function, 2312*344a7f5eSAndroid Build Coastguard Worker * i.e. log(fabs(tgamma(v))). 2313*344a7f5eSAndroid Build Coastguard Worker * 2314*344a7f5eSAndroid Build Coastguard Worker * See also tgamma(). 2315*344a7f5eSAndroid Build Coastguard Worker * 2316*344a7f5eSAndroid Build Coastguard Worker * Parameters: 2317*344a7f5eSAndroid Build Coastguard Worker * sign_of_gamma: If sign_of_gamma is not null, *sign_of_gamma will be set to -1.f if the gamma of v is negative, otherwise to 1.f. 2318*344a7f5eSAndroid Build Coastguard Worker */ 2319*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2320*344a7f5eSAndroid Build Coastguard Worker lgamma(float v); 2321*344a7f5eSAndroid Build Coastguard Worker 2322*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2323*344a7f5eSAndroid Build Coastguard Worker lgamma(float2 v); 2324*344a7f5eSAndroid Build Coastguard Worker 2325*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2326*344a7f5eSAndroid Build Coastguard Worker lgamma(float3 v); 2327*344a7f5eSAndroid Build Coastguard Worker 2328*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2329*344a7f5eSAndroid Build Coastguard Worker lgamma(float4 v); 2330*344a7f5eSAndroid Build Coastguard Worker 2331*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2332*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 2333*344a7f5eSAndroid Build Coastguard Worker lgamma(half v); 2334*344a7f5eSAndroid Build Coastguard Worker#endif 2335*344a7f5eSAndroid Build Coastguard Worker 2336*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2337*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2338*344a7f5eSAndroid Build Coastguard Worker lgamma(half2 v); 2339*344a7f5eSAndroid Build Coastguard Worker#endif 2340*344a7f5eSAndroid Build Coastguard Worker 2341*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2342*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2343*344a7f5eSAndroid Build Coastguard Worker lgamma(half3 v); 2344*344a7f5eSAndroid Build Coastguard Worker#endif 2345*344a7f5eSAndroid Build Coastguard Worker 2346*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2347*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2348*344a7f5eSAndroid Build Coastguard Worker lgamma(half4 v); 2349*344a7f5eSAndroid Build Coastguard Worker#endif 2350*344a7f5eSAndroid Build Coastguard Worker 2351*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((overloadable)) 2352*344a7f5eSAndroid Build Coastguard Worker lgamma(float v, int* sign_of_gamma); 2353*344a7f5eSAndroid Build Coastguard Worker 2354*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((overloadable)) 2355*344a7f5eSAndroid Build Coastguard Worker lgamma(float2 v, int2* sign_of_gamma); 2356*344a7f5eSAndroid Build Coastguard Worker 2357*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((overloadable)) 2358*344a7f5eSAndroid Build Coastguard Worker lgamma(float3 v, int3* sign_of_gamma); 2359*344a7f5eSAndroid Build Coastguard Worker 2360*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((overloadable)) 2361*344a7f5eSAndroid Build Coastguard Worker lgamma(float4 v, int4* sign_of_gamma); 2362*344a7f5eSAndroid Build Coastguard Worker 2363*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2364*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((overloadable)) 2365*344a7f5eSAndroid Build Coastguard Worker lgamma(half v, int* sign_of_gamma); 2366*344a7f5eSAndroid Build Coastguard Worker#endif 2367*344a7f5eSAndroid Build Coastguard Worker 2368*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2369*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((overloadable)) 2370*344a7f5eSAndroid Build Coastguard Worker lgamma(half2 v, int2* sign_of_gamma); 2371*344a7f5eSAndroid Build Coastguard Worker#endif 2372*344a7f5eSAndroid Build Coastguard Worker 2373*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2374*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((overloadable)) 2375*344a7f5eSAndroid Build Coastguard Worker lgamma(half3 v, int3* sign_of_gamma); 2376*344a7f5eSAndroid Build Coastguard Worker#endif 2377*344a7f5eSAndroid Build Coastguard Worker 2378*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2379*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((overloadable)) 2380*344a7f5eSAndroid Build Coastguard Worker lgamma(half4 v, int4* sign_of_gamma); 2381*344a7f5eSAndroid Build Coastguard Worker#endif 2382*344a7f5eSAndroid Build Coastguard Worker 2383*344a7f5eSAndroid Build Coastguard Worker/* 2384*344a7f5eSAndroid Build Coastguard Worker * log: Natural logarithm 2385*344a7f5eSAndroid Build Coastguard Worker * 2386*344a7f5eSAndroid Build Coastguard Worker * Returns the natural logarithm. 2387*344a7f5eSAndroid Build Coastguard Worker * 2388*344a7f5eSAndroid Build Coastguard Worker * See also native_log(). 2389*344a7f5eSAndroid Build Coastguard Worker */ 2390*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2391*344a7f5eSAndroid Build Coastguard Worker log(float v); 2392*344a7f5eSAndroid Build Coastguard Worker 2393*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2394*344a7f5eSAndroid Build Coastguard Worker log(float2 v); 2395*344a7f5eSAndroid Build Coastguard Worker 2396*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2397*344a7f5eSAndroid Build Coastguard Worker log(float3 v); 2398*344a7f5eSAndroid Build Coastguard Worker 2399*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2400*344a7f5eSAndroid Build Coastguard Worker log(float4 v); 2401*344a7f5eSAndroid Build Coastguard Worker 2402*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2403*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 2404*344a7f5eSAndroid Build Coastguard Worker log(half v); 2405*344a7f5eSAndroid Build Coastguard Worker#endif 2406*344a7f5eSAndroid Build Coastguard Worker 2407*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2408*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2409*344a7f5eSAndroid Build Coastguard Worker log(half2 v); 2410*344a7f5eSAndroid Build Coastguard Worker#endif 2411*344a7f5eSAndroid Build Coastguard Worker 2412*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2413*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2414*344a7f5eSAndroid Build Coastguard Worker log(half3 v); 2415*344a7f5eSAndroid Build Coastguard Worker#endif 2416*344a7f5eSAndroid Build Coastguard Worker 2417*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2418*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2419*344a7f5eSAndroid Build Coastguard Worker log(half4 v); 2420*344a7f5eSAndroid Build Coastguard Worker#endif 2421*344a7f5eSAndroid Build Coastguard Worker 2422*344a7f5eSAndroid Build Coastguard Worker/* 2423*344a7f5eSAndroid Build Coastguard Worker * log10: Base 10 logarithm 2424*344a7f5eSAndroid Build Coastguard Worker * 2425*344a7f5eSAndroid Build Coastguard Worker * Returns the base 10 logarithm. 2426*344a7f5eSAndroid Build Coastguard Worker * 2427*344a7f5eSAndroid Build Coastguard Worker * See also native_log10(). 2428*344a7f5eSAndroid Build Coastguard Worker */ 2429*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2430*344a7f5eSAndroid Build Coastguard Worker log10(float v); 2431*344a7f5eSAndroid Build Coastguard Worker 2432*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2433*344a7f5eSAndroid Build Coastguard Worker log10(float2 v); 2434*344a7f5eSAndroid Build Coastguard Worker 2435*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2436*344a7f5eSAndroid Build Coastguard Worker log10(float3 v); 2437*344a7f5eSAndroid Build Coastguard Worker 2438*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2439*344a7f5eSAndroid Build Coastguard Worker log10(float4 v); 2440*344a7f5eSAndroid Build Coastguard Worker 2441*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2442*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 2443*344a7f5eSAndroid Build Coastguard Worker log10(half v); 2444*344a7f5eSAndroid Build Coastguard Worker#endif 2445*344a7f5eSAndroid Build Coastguard Worker 2446*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2447*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2448*344a7f5eSAndroid Build Coastguard Worker log10(half2 v); 2449*344a7f5eSAndroid Build Coastguard Worker#endif 2450*344a7f5eSAndroid Build Coastguard Worker 2451*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2452*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2453*344a7f5eSAndroid Build Coastguard Worker log10(half3 v); 2454*344a7f5eSAndroid Build Coastguard Worker#endif 2455*344a7f5eSAndroid Build Coastguard Worker 2456*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2457*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2458*344a7f5eSAndroid Build Coastguard Worker log10(half4 v); 2459*344a7f5eSAndroid Build Coastguard Worker#endif 2460*344a7f5eSAndroid Build Coastguard Worker 2461*344a7f5eSAndroid Build Coastguard Worker/* 2462*344a7f5eSAndroid Build Coastguard Worker * log1p: Natural logarithm of a value plus 1 2463*344a7f5eSAndroid Build Coastguard Worker * 2464*344a7f5eSAndroid Build Coastguard Worker * Returns the natural logarithm of (v + 1.f). 2465*344a7f5eSAndroid Build Coastguard Worker * 2466*344a7f5eSAndroid Build Coastguard Worker * See also native_log1p(). 2467*344a7f5eSAndroid Build Coastguard Worker */ 2468*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2469*344a7f5eSAndroid Build Coastguard Worker log1p(float v); 2470*344a7f5eSAndroid Build Coastguard Worker 2471*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2472*344a7f5eSAndroid Build Coastguard Worker log1p(float2 v); 2473*344a7f5eSAndroid Build Coastguard Worker 2474*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2475*344a7f5eSAndroid Build Coastguard Worker log1p(float3 v); 2476*344a7f5eSAndroid Build Coastguard Worker 2477*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2478*344a7f5eSAndroid Build Coastguard Worker log1p(float4 v); 2479*344a7f5eSAndroid Build Coastguard Worker 2480*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2481*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 2482*344a7f5eSAndroid Build Coastguard Worker log1p(half v); 2483*344a7f5eSAndroid Build Coastguard Worker#endif 2484*344a7f5eSAndroid Build Coastguard Worker 2485*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2486*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2487*344a7f5eSAndroid Build Coastguard Worker log1p(half2 v); 2488*344a7f5eSAndroid Build Coastguard Worker#endif 2489*344a7f5eSAndroid Build Coastguard Worker 2490*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2491*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2492*344a7f5eSAndroid Build Coastguard Worker log1p(half3 v); 2493*344a7f5eSAndroid Build Coastguard Worker#endif 2494*344a7f5eSAndroid Build Coastguard Worker 2495*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2496*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2497*344a7f5eSAndroid Build Coastguard Worker log1p(half4 v); 2498*344a7f5eSAndroid Build Coastguard Worker#endif 2499*344a7f5eSAndroid Build Coastguard Worker 2500*344a7f5eSAndroid Build Coastguard Worker/* 2501*344a7f5eSAndroid Build Coastguard Worker * log2: Base 2 logarithm 2502*344a7f5eSAndroid Build Coastguard Worker * 2503*344a7f5eSAndroid Build Coastguard Worker * Returns the base 2 logarithm. 2504*344a7f5eSAndroid Build Coastguard Worker * 2505*344a7f5eSAndroid Build Coastguard Worker * See also native_log2(). 2506*344a7f5eSAndroid Build Coastguard Worker */ 2507*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2508*344a7f5eSAndroid Build Coastguard Worker log2(float v); 2509*344a7f5eSAndroid Build Coastguard Worker 2510*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2511*344a7f5eSAndroid Build Coastguard Worker log2(float2 v); 2512*344a7f5eSAndroid Build Coastguard Worker 2513*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2514*344a7f5eSAndroid Build Coastguard Worker log2(float3 v); 2515*344a7f5eSAndroid Build Coastguard Worker 2516*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2517*344a7f5eSAndroid Build Coastguard Worker log2(float4 v); 2518*344a7f5eSAndroid Build Coastguard Worker 2519*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2520*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 2521*344a7f5eSAndroid Build Coastguard Worker log2(half v); 2522*344a7f5eSAndroid Build Coastguard Worker#endif 2523*344a7f5eSAndroid Build Coastguard Worker 2524*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2525*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2526*344a7f5eSAndroid Build Coastguard Worker log2(half2 v); 2527*344a7f5eSAndroid Build Coastguard Worker#endif 2528*344a7f5eSAndroid Build Coastguard Worker 2529*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2530*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2531*344a7f5eSAndroid Build Coastguard Worker log2(half3 v); 2532*344a7f5eSAndroid Build Coastguard Worker#endif 2533*344a7f5eSAndroid Build Coastguard Worker 2534*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2535*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2536*344a7f5eSAndroid Build Coastguard Worker log2(half4 v); 2537*344a7f5eSAndroid Build Coastguard Worker#endif 2538*344a7f5eSAndroid Build Coastguard Worker 2539*344a7f5eSAndroid Build Coastguard Worker/* 2540*344a7f5eSAndroid Build Coastguard Worker * logb: Base two exponent 2541*344a7f5eSAndroid Build Coastguard Worker * 2542*344a7f5eSAndroid Build Coastguard Worker * Returns the base two exponent of a value, where the mantissa is between 2543*344a7f5eSAndroid Build Coastguard Worker * 1.f (inclusive) and 2.f (exclusive). 2544*344a7f5eSAndroid Build Coastguard Worker * 2545*344a7f5eSAndroid Build Coastguard Worker * For example, logb(8.5f) returns 3.f. 2546*344a7f5eSAndroid Build Coastguard Worker * 2547*344a7f5eSAndroid Build Coastguard Worker * Because of the difference in mantissa, this number is one less than is returned by frexp(). 2548*344a7f5eSAndroid Build Coastguard Worker * 2549*344a7f5eSAndroid Build Coastguard Worker * ilogb() is similar but returns an integer. 2550*344a7f5eSAndroid Build Coastguard Worker */ 2551*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2552*344a7f5eSAndroid Build Coastguard Worker logb(float v); 2553*344a7f5eSAndroid Build Coastguard Worker 2554*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2555*344a7f5eSAndroid Build Coastguard Worker logb(float2 v); 2556*344a7f5eSAndroid Build Coastguard Worker 2557*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2558*344a7f5eSAndroid Build Coastguard Worker logb(float3 v); 2559*344a7f5eSAndroid Build Coastguard Worker 2560*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2561*344a7f5eSAndroid Build Coastguard Worker logb(float4 v); 2562*344a7f5eSAndroid Build Coastguard Worker 2563*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2564*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 2565*344a7f5eSAndroid Build Coastguard Worker logb(half v); 2566*344a7f5eSAndroid Build Coastguard Worker#endif 2567*344a7f5eSAndroid Build Coastguard Worker 2568*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2569*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2570*344a7f5eSAndroid Build Coastguard Worker logb(half2 v); 2571*344a7f5eSAndroid Build Coastguard Worker#endif 2572*344a7f5eSAndroid Build Coastguard Worker 2573*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2574*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2575*344a7f5eSAndroid Build Coastguard Worker logb(half3 v); 2576*344a7f5eSAndroid Build Coastguard Worker#endif 2577*344a7f5eSAndroid Build Coastguard Worker 2578*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2579*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2580*344a7f5eSAndroid Build Coastguard Worker logb(half4 v); 2581*344a7f5eSAndroid Build Coastguard Worker#endif 2582*344a7f5eSAndroid Build Coastguard Worker 2583*344a7f5eSAndroid Build Coastguard Worker/* 2584*344a7f5eSAndroid Build Coastguard Worker * mad: Multiply and add 2585*344a7f5eSAndroid Build Coastguard Worker * 2586*344a7f5eSAndroid Build Coastguard Worker * Multiply and add. Returns (multiplicand1 * multiplicand2) + offset. 2587*344a7f5eSAndroid Build Coastguard Worker * 2588*344a7f5eSAndroid Build Coastguard Worker * This function is similar to fma(). fma() retains full precision of the multiplied result 2589*344a7f5eSAndroid Build Coastguard Worker * and rounds only after the addition. mad() rounds after the multiplication and the addition. 2590*344a7f5eSAndroid Build Coastguard Worker * In rs_fp_relaxed mode, mad() may not do the rounding after multiplicaiton. 2591*344a7f5eSAndroid Build Coastguard Worker */ 2592*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2593*344a7f5eSAndroid Build Coastguard Worker mad(float multiplicand1, float multiplicand2, float offset); 2594*344a7f5eSAndroid Build Coastguard Worker 2595*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2596*344a7f5eSAndroid Build Coastguard Worker mad(float2 multiplicand1, float2 multiplicand2, float2 offset); 2597*344a7f5eSAndroid Build Coastguard Worker 2598*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2599*344a7f5eSAndroid Build Coastguard Worker mad(float3 multiplicand1, float3 multiplicand2, float3 offset); 2600*344a7f5eSAndroid Build Coastguard Worker 2601*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2602*344a7f5eSAndroid Build Coastguard Worker mad(float4 multiplicand1, float4 multiplicand2, float4 offset); 2603*344a7f5eSAndroid Build Coastguard Worker 2604*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2605*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 2606*344a7f5eSAndroid Build Coastguard Worker mad(half multiplicand1, half multiplicand2, half offset); 2607*344a7f5eSAndroid Build Coastguard Worker#endif 2608*344a7f5eSAndroid Build Coastguard Worker 2609*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2610*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2611*344a7f5eSAndroid Build Coastguard Worker mad(half2 multiplicand1, half2 multiplicand2, half2 offset); 2612*344a7f5eSAndroid Build Coastguard Worker#endif 2613*344a7f5eSAndroid Build Coastguard Worker 2614*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2615*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2616*344a7f5eSAndroid Build Coastguard Worker mad(half3 multiplicand1, half3 multiplicand2, half3 offset); 2617*344a7f5eSAndroid Build Coastguard Worker#endif 2618*344a7f5eSAndroid Build Coastguard Worker 2619*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2620*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2621*344a7f5eSAndroid Build Coastguard Worker mad(half4 multiplicand1, half4 multiplicand2, half4 offset); 2622*344a7f5eSAndroid Build Coastguard Worker#endif 2623*344a7f5eSAndroid Build Coastguard Worker 2624*344a7f5eSAndroid Build Coastguard Worker/* 2625*344a7f5eSAndroid Build Coastguard Worker * max: Maximum 2626*344a7f5eSAndroid Build Coastguard Worker * 2627*344a7f5eSAndroid Build Coastguard Worker * Returns the maximum value of two arguments. 2628*344a7f5eSAndroid Build Coastguard Worker */ 2629*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 2630*344a7f5eSAndroid Build Coastguard Worker max(float a, float b); 2631*344a7f5eSAndroid Build Coastguard Worker 2632*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2633*344a7f5eSAndroid Build Coastguard Worker max(float2 a, float2 b); 2634*344a7f5eSAndroid Build Coastguard Worker 2635*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2636*344a7f5eSAndroid Build Coastguard Worker max(float3 a, float3 b); 2637*344a7f5eSAndroid Build Coastguard Worker 2638*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2639*344a7f5eSAndroid Build Coastguard Worker max(float4 a, float4 b); 2640*344a7f5eSAndroid Build Coastguard Worker 2641*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2642*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 2643*344a7f5eSAndroid Build Coastguard Worker max(half a, half b); 2644*344a7f5eSAndroid Build Coastguard Worker#endif 2645*344a7f5eSAndroid Build Coastguard Worker 2646*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2647*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2648*344a7f5eSAndroid Build Coastguard Worker max(half2 a, half2 b); 2649*344a7f5eSAndroid Build Coastguard Worker#endif 2650*344a7f5eSAndroid Build Coastguard Worker 2651*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2652*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2653*344a7f5eSAndroid Build Coastguard Worker max(half3 a, half3 b); 2654*344a7f5eSAndroid Build Coastguard Worker#endif 2655*344a7f5eSAndroid Build Coastguard Worker 2656*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2657*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2658*344a7f5eSAndroid Build Coastguard Worker max(half4 a, half4 b); 2659*344a7f5eSAndroid Build Coastguard Worker#endif 2660*344a7f5eSAndroid Build Coastguard Worker 2661*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 2662*344a7f5eSAndroid Build Coastguard Worker max(float2 a, float b); 2663*344a7f5eSAndroid Build Coastguard Worker 2664*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 2665*344a7f5eSAndroid Build Coastguard Worker max(float3 a, float b); 2666*344a7f5eSAndroid Build Coastguard Worker 2667*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 2668*344a7f5eSAndroid Build Coastguard Worker max(float4 a, float b); 2669*344a7f5eSAndroid Build Coastguard Worker 2670*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2671*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 2672*344a7f5eSAndroid Build Coastguard Worker max(half2 a, half b); 2673*344a7f5eSAndroid Build Coastguard Worker#endif 2674*344a7f5eSAndroid Build Coastguard Worker 2675*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2676*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 2677*344a7f5eSAndroid Build Coastguard Worker max(half3 a, half b); 2678*344a7f5eSAndroid Build Coastguard Worker#endif 2679*344a7f5eSAndroid Build Coastguard Worker 2680*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 2681*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 2682*344a7f5eSAndroid Build Coastguard Worker max(half4 a, half b); 2683*344a7f5eSAndroid Build Coastguard Worker#endif 2684*344a7f5eSAndroid Build Coastguard Worker 2685*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2686*344a7f5eSAndroid Build Coastguard Workerstatic inline char __attribute__((const, overloadable)) 2687*344a7f5eSAndroid Build Coastguard Worker max(char a, char b) { 2688*344a7f5eSAndroid Build Coastguard Worker return (a > b ? a : b); 2689*344a7f5eSAndroid Build Coastguard Worker} 2690*344a7f5eSAndroid Build Coastguard Worker#endif 2691*344a7f5eSAndroid Build Coastguard Worker 2692*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2693*344a7f5eSAndroid Build Coastguard Workerstatic inline uchar __attribute__((const, overloadable)) 2694*344a7f5eSAndroid Build Coastguard Worker max(uchar a, uchar b) { 2695*344a7f5eSAndroid Build Coastguard Worker return (a > b ? a : b); 2696*344a7f5eSAndroid Build Coastguard Worker} 2697*344a7f5eSAndroid Build Coastguard Worker#endif 2698*344a7f5eSAndroid Build Coastguard Worker 2699*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2700*344a7f5eSAndroid Build Coastguard Workerstatic inline short __attribute__((const, overloadable)) 2701*344a7f5eSAndroid Build Coastguard Worker max(short a, short b) { 2702*344a7f5eSAndroid Build Coastguard Worker return (a > b ? a : b); 2703*344a7f5eSAndroid Build Coastguard Worker} 2704*344a7f5eSAndroid Build Coastguard Worker#endif 2705*344a7f5eSAndroid Build Coastguard Worker 2706*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2707*344a7f5eSAndroid Build Coastguard Workerstatic inline ushort __attribute__((const, overloadable)) 2708*344a7f5eSAndroid Build Coastguard Worker max(ushort a, ushort b) { 2709*344a7f5eSAndroid Build Coastguard Worker return (a > b ? a : b); 2710*344a7f5eSAndroid Build Coastguard Worker} 2711*344a7f5eSAndroid Build Coastguard Worker#endif 2712*344a7f5eSAndroid Build Coastguard Worker 2713*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2714*344a7f5eSAndroid Build Coastguard Workerstatic inline int __attribute__((const, overloadable)) 2715*344a7f5eSAndroid Build Coastguard Worker max(int a, int b) { 2716*344a7f5eSAndroid Build Coastguard Worker return (a > b ? a : b); 2717*344a7f5eSAndroid Build Coastguard Worker} 2718*344a7f5eSAndroid Build Coastguard Worker#endif 2719*344a7f5eSAndroid Build Coastguard Worker 2720*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2721*344a7f5eSAndroid Build Coastguard Workerstatic inline uint __attribute__((const, overloadable)) 2722*344a7f5eSAndroid Build Coastguard Worker max(uint a, uint b) { 2723*344a7f5eSAndroid Build Coastguard Worker return (a > b ? a : b); 2724*344a7f5eSAndroid Build Coastguard Worker} 2725*344a7f5eSAndroid Build Coastguard Worker#endif 2726*344a7f5eSAndroid Build Coastguard Worker 2727*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2728*344a7f5eSAndroid Build Coastguard Workerstatic inline char2 __attribute__((const, overloadable)) 2729*344a7f5eSAndroid Build Coastguard Worker max(char2 a, char2 b) { 2730*344a7f5eSAndroid Build Coastguard Worker char2 tmp; 2731*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2732*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2733*344a7f5eSAndroid Build Coastguard Worker return tmp; 2734*344a7f5eSAndroid Build Coastguard Worker} 2735*344a7f5eSAndroid Build Coastguard Worker#endif 2736*344a7f5eSAndroid Build Coastguard Worker 2737*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2738*344a7f5eSAndroid Build Coastguard Workerstatic inline uchar2 __attribute__((const, overloadable)) 2739*344a7f5eSAndroid Build Coastguard Worker max(uchar2 a, uchar2 b) { 2740*344a7f5eSAndroid Build Coastguard Worker uchar2 tmp; 2741*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2742*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2743*344a7f5eSAndroid Build Coastguard Worker return tmp; 2744*344a7f5eSAndroid Build Coastguard Worker} 2745*344a7f5eSAndroid Build Coastguard Worker#endif 2746*344a7f5eSAndroid Build Coastguard Worker 2747*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2748*344a7f5eSAndroid Build Coastguard Workerstatic inline short2 __attribute__((const, overloadable)) 2749*344a7f5eSAndroid Build Coastguard Worker max(short2 a, short2 b) { 2750*344a7f5eSAndroid Build Coastguard Worker short2 tmp; 2751*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2752*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2753*344a7f5eSAndroid Build Coastguard Worker return tmp; 2754*344a7f5eSAndroid Build Coastguard Worker} 2755*344a7f5eSAndroid Build Coastguard Worker#endif 2756*344a7f5eSAndroid Build Coastguard Worker 2757*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2758*344a7f5eSAndroid Build Coastguard Workerstatic inline ushort2 __attribute__((const, overloadable)) 2759*344a7f5eSAndroid Build Coastguard Worker max(ushort2 a, ushort2 b) { 2760*344a7f5eSAndroid Build Coastguard Worker ushort2 tmp; 2761*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2762*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2763*344a7f5eSAndroid Build Coastguard Worker return tmp; 2764*344a7f5eSAndroid Build Coastguard Worker} 2765*344a7f5eSAndroid Build Coastguard Worker#endif 2766*344a7f5eSAndroid Build Coastguard Worker 2767*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2768*344a7f5eSAndroid Build Coastguard Workerstatic inline int2 __attribute__((const, overloadable)) 2769*344a7f5eSAndroid Build Coastguard Worker max(int2 a, int2 b) { 2770*344a7f5eSAndroid Build Coastguard Worker int2 tmp; 2771*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2772*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2773*344a7f5eSAndroid Build Coastguard Worker return tmp; 2774*344a7f5eSAndroid Build Coastguard Worker} 2775*344a7f5eSAndroid Build Coastguard Worker#endif 2776*344a7f5eSAndroid Build Coastguard Worker 2777*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2778*344a7f5eSAndroid Build Coastguard Workerstatic inline uint2 __attribute__((const, overloadable)) 2779*344a7f5eSAndroid Build Coastguard Worker max(uint2 a, uint2 b) { 2780*344a7f5eSAndroid Build Coastguard Worker uint2 tmp; 2781*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2782*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2783*344a7f5eSAndroid Build Coastguard Worker return tmp; 2784*344a7f5eSAndroid Build Coastguard Worker} 2785*344a7f5eSAndroid Build Coastguard Worker#endif 2786*344a7f5eSAndroid Build Coastguard Worker 2787*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2788*344a7f5eSAndroid Build Coastguard Workerstatic inline char3 __attribute__((const, overloadable)) 2789*344a7f5eSAndroid Build Coastguard Worker max(char3 a, char3 b) { 2790*344a7f5eSAndroid Build Coastguard Worker char3 tmp; 2791*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2792*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2793*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2794*344a7f5eSAndroid Build Coastguard Worker return tmp; 2795*344a7f5eSAndroid Build Coastguard Worker} 2796*344a7f5eSAndroid Build Coastguard Worker#endif 2797*344a7f5eSAndroid Build Coastguard Worker 2798*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2799*344a7f5eSAndroid Build Coastguard Workerstatic inline uchar3 __attribute__((const, overloadable)) 2800*344a7f5eSAndroid Build Coastguard Worker max(uchar3 a, uchar3 b) { 2801*344a7f5eSAndroid Build Coastguard Worker uchar3 tmp; 2802*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2803*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2804*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2805*344a7f5eSAndroid Build Coastguard Worker return tmp; 2806*344a7f5eSAndroid Build Coastguard Worker} 2807*344a7f5eSAndroid Build Coastguard Worker#endif 2808*344a7f5eSAndroid Build Coastguard Worker 2809*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2810*344a7f5eSAndroid Build Coastguard Workerstatic inline short3 __attribute__((const, overloadable)) 2811*344a7f5eSAndroid Build Coastguard Worker max(short3 a, short3 b) { 2812*344a7f5eSAndroid Build Coastguard Worker short3 tmp; 2813*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2814*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2815*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2816*344a7f5eSAndroid Build Coastguard Worker return tmp; 2817*344a7f5eSAndroid Build Coastguard Worker} 2818*344a7f5eSAndroid Build Coastguard Worker#endif 2819*344a7f5eSAndroid Build Coastguard Worker 2820*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2821*344a7f5eSAndroid Build Coastguard Workerstatic inline ushort3 __attribute__((const, overloadable)) 2822*344a7f5eSAndroid Build Coastguard Worker max(ushort3 a, ushort3 b) { 2823*344a7f5eSAndroid Build Coastguard Worker ushort3 tmp; 2824*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2825*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2826*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2827*344a7f5eSAndroid Build Coastguard Worker return tmp; 2828*344a7f5eSAndroid Build Coastguard Worker} 2829*344a7f5eSAndroid Build Coastguard Worker#endif 2830*344a7f5eSAndroid Build Coastguard Worker 2831*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2832*344a7f5eSAndroid Build Coastguard Workerstatic inline int3 __attribute__((const, overloadable)) 2833*344a7f5eSAndroid Build Coastguard Worker max(int3 a, int3 b) { 2834*344a7f5eSAndroid Build Coastguard Worker int3 tmp; 2835*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2836*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2837*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2838*344a7f5eSAndroid Build Coastguard Worker return tmp; 2839*344a7f5eSAndroid Build Coastguard Worker} 2840*344a7f5eSAndroid Build Coastguard Worker#endif 2841*344a7f5eSAndroid Build Coastguard Worker 2842*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2843*344a7f5eSAndroid Build Coastguard Workerstatic inline uint3 __attribute__((const, overloadable)) 2844*344a7f5eSAndroid Build Coastguard Worker max(uint3 a, uint3 b) { 2845*344a7f5eSAndroid Build Coastguard Worker uint3 tmp; 2846*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2847*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2848*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2849*344a7f5eSAndroid Build Coastguard Worker return tmp; 2850*344a7f5eSAndroid Build Coastguard Worker} 2851*344a7f5eSAndroid Build Coastguard Worker#endif 2852*344a7f5eSAndroid Build Coastguard Worker 2853*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2854*344a7f5eSAndroid Build Coastguard Workerstatic inline char4 __attribute__((const, overloadable)) 2855*344a7f5eSAndroid Build Coastguard Worker max(char4 a, char4 b) { 2856*344a7f5eSAndroid Build Coastguard Worker char4 tmp; 2857*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2858*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2859*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2860*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w > b.w ? a.w : b.w); 2861*344a7f5eSAndroid Build Coastguard Worker return tmp; 2862*344a7f5eSAndroid Build Coastguard Worker} 2863*344a7f5eSAndroid Build Coastguard Worker#endif 2864*344a7f5eSAndroid Build Coastguard Worker 2865*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2866*344a7f5eSAndroid Build Coastguard Workerstatic inline uchar4 __attribute__((const, overloadable)) 2867*344a7f5eSAndroid Build Coastguard Worker max(uchar4 a, uchar4 b) { 2868*344a7f5eSAndroid Build Coastguard Worker uchar4 tmp; 2869*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2870*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2871*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2872*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w > b.w ? a.w : b.w); 2873*344a7f5eSAndroid Build Coastguard Worker return tmp; 2874*344a7f5eSAndroid Build Coastguard Worker} 2875*344a7f5eSAndroid Build Coastguard Worker#endif 2876*344a7f5eSAndroid Build Coastguard Worker 2877*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2878*344a7f5eSAndroid Build Coastguard Workerstatic inline short4 __attribute__((const, overloadable)) 2879*344a7f5eSAndroid Build Coastguard Worker max(short4 a, short4 b) { 2880*344a7f5eSAndroid Build Coastguard Worker short4 tmp; 2881*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2882*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2883*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2884*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w > b.w ? a.w : b.w); 2885*344a7f5eSAndroid Build Coastguard Worker return tmp; 2886*344a7f5eSAndroid Build Coastguard Worker} 2887*344a7f5eSAndroid Build Coastguard Worker#endif 2888*344a7f5eSAndroid Build Coastguard Worker 2889*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2890*344a7f5eSAndroid Build Coastguard Workerstatic inline ushort4 __attribute__((const, overloadable)) 2891*344a7f5eSAndroid Build Coastguard Worker max(ushort4 a, ushort4 b) { 2892*344a7f5eSAndroid Build Coastguard Worker ushort4 tmp; 2893*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2894*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2895*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2896*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w > b.w ? a.w : b.w); 2897*344a7f5eSAndroid Build Coastguard Worker return tmp; 2898*344a7f5eSAndroid Build Coastguard Worker} 2899*344a7f5eSAndroid Build Coastguard Worker#endif 2900*344a7f5eSAndroid Build Coastguard Worker 2901*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2902*344a7f5eSAndroid Build Coastguard Workerstatic inline int4 __attribute__((const, overloadable)) 2903*344a7f5eSAndroid Build Coastguard Worker max(int4 a, int4 b) { 2904*344a7f5eSAndroid Build Coastguard Worker int4 tmp; 2905*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2906*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2907*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2908*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w > b.w ? a.w : b.w); 2909*344a7f5eSAndroid Build Coastguard Worker return tmp; 2910*344a7f5eSAndroid Build Coastguard Worker} 2911*344a7f5eSAndroid Build Coastguard Worker#endif 2912*344a7f5eSAndroid Build Coastguard Worker 2913*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 2914*344a7f5eSAndroid Build Coastguard Workerstatic inline uint4 __attribute__((const, overloadable)) 2915*344a7f5eSAndroid Build Coastguard Worker max(uint4 a, uint4 b) { 2916*344a7f5eSAndroid Build Coastguard Worker uint4 tmp; 2917*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x > b.x ? a.x : b.x); 2918*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y > b.y ? a.y : b.y); 2919*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z > b.z ? a.z : b.z); 2920*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w > b.w ? a.w : b.w); 2921*344a7f5eSAndroid Build Coastguard Worker return tmp; 2922*344a7f5eSAndroid Build Coastguard Worker} 2923*344a7f5eSAndroid Build Coastguard Worker#endif 2924*344a7f5eSAndroid Build Coastguard Worker 2925*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2926*344a7f5eSAndroid Build Coastguard Workerextern char __attribute__((const, overloadable)) 2927*344a7f5eSAndroid Build Coastguard Worker max(char a, char b); 2928*344a7f5eSAndroid Build Coastguard Worker#endif 2929*344a7f5eSAndroid Build Coastguard Worker 2930*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2931*344a7f5eSAndroid Build Coastguard Workerextern char2 __attribute__((const, overloadable)) 2932*344a7f5eSAndroid Build Coastguard Worker max(char2 a, char2 b); 2933*344a7f5eSAndroid Build Coastguard Worker#endif 2934*344a7f5eSAndroid Build Coastguard Worker 2935*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2936*344a7f5eSAndroid Build Coastguard Workerextern char3 __attribute__((const, overloadable)) 2937*344a7f5eSAndroid Build Coastguard Worker max(char3 a, char3 b); 2938*344a7f5eSAndroid Build Coastguard Worker#endif 2939*344a7f5eSAndroid Build Coastguard Worker 2940*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2941*344a7f5eSAndroid Build Coastguard Workerextern char4 __attribute__((const, overloadable)) 2942*344a7f5eSAndroid Build Coastguard Worker max(char4 a, char4 b); 2943*344a7f5eSAndroid Build Coastguard Worker#endif 2944*344a7f5eSAndroid Build Coastguard Worker 2945*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2946*344a7f5eSAndroid Build Coastguard Workerextern uchar __attribute__((const, overloadable)) 2947*344a7f5eSAndroid Build Coastguard Worker max(uchar a, uchar b); 2948*344a7f5eSAndroid Build Coastguard Worker#endif 2949*344a7f5eSAndroid Build Coastguard Worker 2950*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2951*344a7f5eSAndroid Build Coastguard Workerextern uchar2 __attribute__((const, overloadable)) 2952*344a7f5eSAndroid Build Coastguard Worker max(uchar2 a, uchar2 b); 2953*344a7f5eSAndroid Build Coastguard Worker#endif 2954*344a7f5eSAndroid Build Coastguard Worker 2955*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2956*344a7f5eSAndroid Build Coastguard Workerextern uchar3 __attribute__((const, overloadable)) 2957*344a7f5eSAndroid Build Coastguard Worker max(uchar3 a, uchar3 b); 2958*344a7f5eSAndroid Build Coastguard Worker#endif 2959*344a7f5eSAndroid Build Coastguard Worker 2960*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2961*344a7f5eSAndroid Build Coastguard Workerextern uchar4 __attribute__((const, overloadable)) 2962*344a7f5eSAndroid Build Coastguard Worker max(uchar4 a, uchar4 b); 2963*344a7f5eSAndroid Build Coastguard Worker#endif 2964*344a7f5eSAndroid Build Coastguard Worker 2965*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2966*344a7f5eSAndroid Build Coastguard Workerextern short __attribute__((const, overloadable)) 2967*344a7f5eSAndroid Build Coastguard Worker max(short a, short b); 2968*344a7f5eSAndroid Build Coastguard Worker#endif 2969*344a7f5eSAndroid Build Coastguard Worker 2970*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2971*344a7f5eSAndroid Build Coastguard Workerextern short2 __attribute__((const, overloadable)) 2972*344a7f5eSAndroid Build Coastguard Worker max(short2 a, short2 b); 2973*344a7f5eSAndroid Build Coastguard Worker#endif 2974*344a7f5eSAndroid Build Coastguard Worker 2975*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2976*344a7f5eSAndroid Build Coastguard Workerextern short3 __attribute__((const, overloadable)) 2977*344a7f5eSAndroid Build Coastguard Worker max(short3 a, short3 b); 2978*344a7f5eSAndroid Build Coastguard Worker#endif 2979*344a7f5eSAndroid Build Coastguard Worker 2980*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2981*344a7f5eSAndroid Build Coastguard Workerextern short4 __attribute__((const, overloadable)) 2982*344a7f5eSAndroid Build Coastguard Worker max(short4 a, short4 b); 2983*344a7f5eSAndroid Build Coastguard Worker#endif 2984*344a7f5eSAndroid Build Coastguard Worker 2985*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2986*344a7f5eSAndroid Build Coastguard Workerextern ushort __attribute__((const, overloadable)) 2987*344a7f5eSAndroid Build Coastguard Worker max(ushort a, ushort b); 2988*344a7f5eSAndroid Build Coastguard Worker#endif 2989*344a7f5eSAndroid Build Coastguard Worker 2990*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2991*344a7f5eSAndroid Build Coastguard Workerextern ushort2 __attribute__((const, overloadable)) 2992*344a7f5eSAndroid Build Coastguard Worker max(ushort2 a, ushort2 b); 2993*344a7f5eSAndroid Build Coastguard Worker#endif 2994*344a7f5eSAndroid Build Coastguard Worker 2995*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 2996*344a7f5eSAndroid Build Coastguard Workerextern ushort3 __attribute__((const, overloadable)) 2997*344a7f5eSAndroid Build Coastguard Worker max(ushort3 a, ushort3 b); 2998*344a7f5eSAndroid Build Coastguard Worker#endif 2999*344a7f5eSAndroid Build Coastguard Worker 3000*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3001*344a7f5eSAndroid Build Coastguard Workerextern ushort4 __attribute__((const, overloadable)) 3002*344a7f5eSAndroid Build Coastguard Worker max(ushort4 a, ushort4 b); 3003*344a7f5eSAndroid Build Coastguard Worker#endif 3004*344a7f5eSAndroid Build Coastguard Worker 3005*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3006*344a7f5eSAndroid Build Coastguard Workerextern int __attribute__((const, overloadable)) 3007*344a7f5eSAndroid Build Coastguard Worker max(int a, int b); 3008*344a7f5eSAndroid Build Coastguard Worker#endif 3009*344a7f5eSAndroid Build Coastguard Worker 3010*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3011*344a7f5eSAndroid Build Coastguard Workerextern int2 __attribute__((const, overloadable)) 3012*344a7f5eSAndroid Build Coastguard Worker max(int2 a, int2 b); 3013*344a7f5eSAndroid Build Coastguard Worker#endif 3014*344a7f5eSAndroid Build Coastguard Worker 3015*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3016*344a7f5eSAndroid Build Coastguard Workerextern int3 __attribute__((const, overloadable)) 3017*344a7f5eSAndroid Build Coastguard Worker max(int3 a, int3 b); 3018*344a7f5eSAndroid Build Coastguard Worker#endif 3019*344a7f5eSAndroid Build Coastguard Worker 3020*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3021*344a7f5eSAndroid Build Coastguard Workerextern int4 __attribute__((const, overloadable)) 3022*344a7f5eSAndroid Build Coastguard Worker max(int4 a, int4 b); 3023*344a7f5eSAndroid Build Coastguard Worker#endif 3024*344a7f5eSAndroid Build Coastguard Worker 3025*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3026*344a7f5eSAndroid Build Coastguard Workerextern uint __attribute__((const, overloadable)) 3027*344a7f5eSAndroid Build Coastguard Worker max(uint a, uint b); 3028*344a7f5eSAndroid Build Coastguard Worker#endif 3029*344a7f5eSAndroid Build Coastguard Worker 3030*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3031*344a7f5eSAndroid Build Coastguard Workerextern uint2 __attribute__((const, overloadable)) 3032*344a7f5eSAndroid Build Coastguard Worker max(uint2 a, uint2 b); 3033*344a7f5eSAndroid Build Coastguard Worker#endif 3034*344a7f5eSAndroid Build Coastguard Worker 3035*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3036*344a7f5eSAndroid Build Coastguard Workerextern uint3 __attribute__((const, overloadable)) 3037*344a7f5eSAndroid Build Coastguard Worker max(uint3 a, uint3 b); 3038*344a7f5eSAndroid Build Coastguard Worker#endif 3039*344a7f5eSAndroid Build Coastguard Worker 3040*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3041*344a7f5eSAndroid Build Coastguard Workerextern uint4 __attribute__((const, overloadable)) 3042*344a7f5eSAndroid Build Coastguard Worker max(uint4 a, uint4 b); 3043*344a7f5eSAndroid Build Coastguard Worker#endif 3044*344a7f5eSAndroid Build Coastguard Worker 3045*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3046*344a7f5eSAndroid Build Coastguard Workerextern long __attribute__((const, overloadable)) 3047*344a7f5eSAndroid Build Coastguard Worker max(long a, long b); 3048*344a7f5eSAndroid Build Coastguard Worker#endif 3049*344a7f5eSAndroid Build Coastguard Worker 3050*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3051*344a7f5eSAndroid Build Coastguard Workerextern long2 __attribute__((const, overloadable)) 3052*344a7f5eSAndroid Build Coastguard Worker max(long2 a, long2 b); 3053*344a7f5eSAndroid Build Coastguard Worker#endif 3054*344a7f5eSAndroid Build Coastguard Worker 3055*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3056*344a7f5eSAndroid Build Coastguard Workerextern long3 __attribute__((const, overloadable)) 3057*344a7f5eSAndroid Build Coastguard Worker max(long3 a, long3 b); 3058*344a7f5eSAndroid Build Coastguard Worker#endif 3059*344a7f5eSAndroid Build Coastguard Worker 3060*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3061*344a7f5eSAndroid Build Coastguard Workerextern long4 __attribute__((const, overloadable)) 3062*344a7f5eSAndroid Build Coastguard Worker max(long4 a, long4 b); 3063*344a7f5eSAndroid Build Coastguard Worker#endif 3064*344a7f5eSAndroid Build Coastguard Worker 3065*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3066*344a7f5eSAndroid Build Coastguard Workerextern ulong __attribute__((const, overloadable)) 3067*344a7f5eSAndroid Build Coastguard Worker max(ulong a, ulong b); 3068*344a7f5eSAndroid Build Coastguard Worker#endif 3069*344a7f5eSAndroid Build Coastguard Worker 3070*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3071*344a7f5eSAndroid Build Coastguard Workerextern ulong2 __attribute__((const, overloadable)) 3072*344a7f5eSAndroid Build Coastguard Worker max(ulong2 a, ulong2 b); 3073*344a7f5eSAndroid Build Coastguard Worker#endif 3074*344a7f5eSAndroid Build Coastguard Worker 3075*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3076*344a7f5eSAndroid Build Coastguard Workerextern ulong3 __attribute__((const, overloadable)) 3077*344a7f5eSAndroid Build Coastguard Worker max(ulong3 a, ulong3 b); 3078*344a7f5eSAndroid Build Coastguard Worker#endif 3079*344a7f5eSAndroid Build Coastguard Worker 3080*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3081*344a7f5eSAndroid Build Coastguard Workerextern ulong4 __attribute__((const, overloadable)) 3082*344a7f5eSAndroid Build Coastguard Worker max(ulong4 a, ulong4 b); 3083*344a7f5eSAndroid Build Coastguard Worker#endif 3084*344a7f5eSAndroid Build Coastguard Worker 3085*344a7f5eSAndroid Build Coastguard Worker/* 3086*344a7f5eSAndroid Build Coastguard Worker * min: Minimum 3087*344a7f5eSAndroid Build Coastguard Worker * 3088*344a7f5eSAndroid Build Coastguard Worker * Returns the minimum value of two arguments. 3089*344a7f5eSAndroid Build Coastguard Worker */ 3090*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 3091*344a7f5eSAndroid Build Coastguard Worker min(float a, float b); 3092*344a7f5eSAndroid Build Coastguard Worker 3093*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 3094*344a7f5eSAndroid Build Coastguard Worker min(float2 a, float2 b); 3095*344a7f5eSAndroid Build Coastguard Worker 3096*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 3097*344a7f5eSAndroid Build Coastguard Worker min(float3 a, float3 b); 3098*344a7f5eSAndroid Build Coastguard Worker 3099*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 3100*344a7f5eSAndroid Build Coastguard Worker min(float4 a, float4 b); 3101*344a7f5eSAndroid Build Coastguard Worker 3102*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3103*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 3104*344a7f5eSAndroid Build Coastguard Worker min(half a, half b); 3105*344a7f5eSAndroid Build Coastguard Worker#endif 3106*344a7f5eSAndroid Build Coastguard Worker 3107*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3108*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 3109*344a7f5eSAndroid Build Coastguard Worker min(half2 a, half2 b); 3110*344a7f5eSAndroid Build Coastguard Worker#endif 3111*344a7f5eSAndroid Build Coastguard Worker 3112*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3113*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 3114*344a7f5eSAndroid Build Coastguard Worker min(half3 a, half3 b); 3115*344a7f5eSAndroid Build Coastguard Worker#endif 3116*344a7f5eSAndroid Build Coastguard Worker 3117*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3118*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 3119*344a7f5eSAndroid Build Coastguard Worker min(half4 a, half4 b); 3120*344a7f5eSAndroid Build Coastguard Worker#endif 3121*344a7f5eSAndroid Build Coastguard Worker 3122*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 3123*344a7f5eSAndroid Build Coastguard Worker min(float2 a, float b); 3124*344a7f5eSAndroid Build Coastguard Worker 3125*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 3126*344a7f5eSAndroid Build Coastguard Worker min(float3 a, float b); 3127*344a7f5eSAndroid Build Coastguard Worker 3128*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 3129*344a7f5eSAndroid Build Coastguard Worker min(float4 a, float b); 3130*344a7f5eSAndroid Build Coastguard Worker 3131*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3132*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 3133*344a7f5eSAndroid Build Coastguard Worker min(half2 a, half b); 3134*344a7f5eSAndroid Build Coastguard Worker#endif 3135*344a7f5eSAndroid Build Coastguard Worker 3136*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3137*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 3138*344a7f5eSAndroid Build Coastguard Worker min(half3 a, half b); 3139*344a7f5eSAndroid Build Coastguard Worker#endif 3140*344a7f5eSAndroid Build Coastguard Worker 3141*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3142*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 3143*344a7f5eSAndroid Build Coastguard Worker min(half4 a, half b); 3144*344a7f5eSAndroid Build Coastguard Worker#endif 3145*344a7f5eSAndroid Build Coastguard Worker 3146*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3147*344a7f5eSAndroid Build Coastguard Workerstatic inline char __attribute__((const, overloadable)) 3148*344a7f5eSAndroid Build Coastguard Worker min(char a, char b) { 3149*344a7f5eSAndroid Build Coastguard Worker return (a < b ? a : b); 3150*344a7f5eSAndroid Build Coastguard Worker} 3151*344a7f5eSAndroid Build Coastguard Worker#endif 3152*344a7f5eSAndroid Build Coastguard Worker 3153*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3154*344a7f5eSAndroid Build Coastguard Workerstatic inline uchar __attribute__((const, overloadable)) 3155*344a7f5eSAndroid Build Coastguard Worker min(uchar a, uchar b) { 3156*344a7f5eSAndroid Build Coastguard Worker return (a < b ? a : b); 3157*344a7f5eSAndroid Build Coastguard Worker} 3158*344a7f5eSAndroid Build Coastguard Worker#endif 3159*344a7f5eSAndroid Build Coastguard Worker 3160*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3161*344a7f5eSAndroid Build Coastguard Workerstatic inline short __attribute__((const, overloadable)) 3162*344a7f5eSAndroid Build Coastguard Worker min(short a, short b) { 3163*344a7f5eSAndroid Build Coastguard Worker return (a < b ? a : b); 3164*344a7f5eSAndroid Build Coastguard Worker} 3165*344a7f5eSAndroid Build Coastguard Worker#endif 3166*344a7f5eSAndroid Build Coastguard Worker 3167*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3168*344a7f5eSAndroid Build Coastguard Workerstatic inline ushort __attribute__((const, overloadable)) 3169*344a7f5eSAndroid Build Coastguard Worker min(ushort a, ushort b) { 3170*344a7f5eSAndroid Build Coastguard Worker return (a < b ? a : b); 3171*344a7f5eSAndroid Build Coastguard Worker} 3172*344a7f5eSAndroid Build Coastguard Worker#endif 3173*344a7f5eSAndroid Build Coastguard Worker 3174*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3175*344a7f5eSAndroid Build Coastguard Workerstatic inline int __attribute__((const, overloadable)) 3176*344a7f5eSAndroid Build Coastguard Worker min(int a, int b) { 3177*344a7f5eSAndroid Build Coastguard Worker return (a < b ? a : b); 3178*344a7f5eSAndroid Build Coastguard Worker} 3179*344a7f5eSAndroid Build Coastguard Worker#endif 3180*344a7f5eSAndroid Build Coastguard Worker 3181*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3182*344a7f5eSAndroid Build Coastguard Workerstatic inline uint __attribute__((const, overloadable)) 3183*344a7f5eSAndroid Build Coastguard Worker min(uint a, uint b) { 3184*344a7f5eSAndroid Build Coastguard Worker return (a < b ? a : b); 3185*344a7f5eSAndroid Build Coastguard Worker} 3186*344a7f5eSAndroid Build Coastguard Worker#endif 3187*344a7f5eSAndroid Build Coastguard Worker 3188*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3189*344a7f5eSAndroid Build Coastguard Workerstatic inline char2 __attribute__((const, overloadable)) 3190*344a7f5eSAndroid Build Coastguard Worker min(char2 a, char2 b) { 3191*344a7f5eSAndroid Build Coastguard Worker char2 tmp; 3192*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3193*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3194*344a7f5eSAndroid Build Coastguard Worker return tmp; 3195*344a7f5eSAndroid Build Coastguard Worker} 3196*344a7f5eSAndroid Build Coastguard Worker#endif 3197*344a7f5eSAndroid Build Coastguard Worker 3198*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3199*344a7f5eSAndroid Build Coastguard Workerstatic inline uchar2 __attribute__((const, overloadable)) 3200*344a7f5eSAndroid Build Coastguard Worker min(uchar2 a, uchar2 b) { 3201*344a7f5eSAndroid Build Coastguard Worker uchar2 tmp; 3202*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3203*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3204*344a7f5eSAndroid Build Coastguard Worker return tmp; 3205*344a7f5eSAndroid Build Coastguard Worker} 3206*344a7f5eSAndroid Build Coastguard Worker#endif 3207*344a7f5eSAndroid Build Coastguard Worker 3208*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3209*344a7f5eSAndroid Build Coastguard Workerstatic inline short2 __attribute__((const, overloadable)) 3210*344a7f5eSAndroid Build Coastguard Worker min(short2 a, short2 b) { 3211*344a7f5eSAndroid Build Coastguard Worker short2 tmp; 3212*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3213*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3214*344a7f5eSAndroid Build Coastguard Worker return tmp; 3215*344a7f5eSAndroid Build Coastguard Worker} 3216*344a7f5eSAndroid Build Coastguard Worker#endif 3217*344a7f5eSAndroid Build Coastguard Worker 3218*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3219*344a7f5eSAndroid Build Coastguard Workerstatic inline ushort2 __attribute__((const, overloadable)) 3220*344a7f5eSAndroid Build Coastguard Worker min(ushort2 a, ushort2 b) { 3221*344a7f5eSAndroid Build Coastguard Worker ushort2 tmp; 3222*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3223*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3224*344a7f5eSAndroid Build Coastguard Worker return tmp; 3225*344a7f5eSAndroid Build Coastguard Worker} 3226*344a7f5eSAndroid Build Coastguard Worker#endif 3227*344a7f5eSAndroid Build Coastguard Worker 3228*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3229*344a7f5eSAndroid Build Coastguard Workerstatic inline int2 __attribute__((const, overloadable)) 3230*344a7f5eSAndroid Build Coastguard Worker min(int2 a, int2 b) { 3231*344a7f5eSAndroid Build Coastguard Worker int2 tmp; 3232*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3233*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3234*344a7f5eSAndroid Build Coastguard Worker return tmp; 3235*344a7f5eSAndroid Build Coastguard Worker} 3236*344a7f5eSAndroid Build Coastguard Worker#endif 3237*344a7f5eSAndroid Build Coastguard Worker 3238*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3239*344a7f5eSAndroid Build Coastguard Workerstatic inline uint2 __attribute__((const, overloadable)) 3240*344a7f5eSAndroid Build Coastguard Worker min(uint2 a, uint2 b) { 3241*344a7f5eSAndroid Build Coastguard Worker uint2 tmp; 3242*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3243*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3244*344a7f5eSAndroid Build Coastguard Worker return tmp; 3245*344a7f5eSAndroid Build Coastguard Worker} 3246*344a7f5eSAndroid Build Coastguard Worker#endif 3247*344a7f5eSAndroid Build Coastguard Worker 3248*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3249*344a7f5eSAndroid Build Coastguard Workerstatic inline char3 __attribute__((const, overloadable)) 3250*344a7f5eSAndroid Build Coastguard Worker min(char3 a, char3 b) { 3251*344a7f5eSAndroid Build Coastguard Worker char3 tmp; 3252*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3253*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3254*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3255*344a7f5eSAndroid Build Coastguard Worker return tmp; 3256*344a7f5eSAndroid Build Coastguard Worker} 3257*344a7f5eSAndroid Build Coastguard Worker#endif 3258*344a7f5eSAndroid Build Coastguard Worker 3259*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3260*344a7f5eSAndroid Build Coastguard Workerstatic inline uchar3 __attribute__((const, overloadable)) 3261*344a7f5eSAndroid Build Coastguard Worker min(uchar3 a, uchar3 b) { 3262*344a7f5eSAndroid Build Coastguard Worker uchar3 tmp; 3263*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3264*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3265*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3266*344a7f5eSAndroid Build Coastguard Worker return tmp; 3267*344a7f5eSAndroid Build Coastguard Worker} 3268*344a7f5eSAndroid Build Coastguard Worker#endif 3269*344a7f5eSAndroid Build Coastguard Worker 3270*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3271*344a7f5eSAndroid Build Coastguard Workerstatic inline short3 __attribute__((const, overloadable)) 3272*344a7f5eSAndroid Build Coastguard Worker min(short3 a, short3 b) { 3273*344a7f5eSAndroid Build Coastguard Worker short3 tmp; 3274*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3275*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3276*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3277*344a7f5eSAndroid Build Coastguard Worker return tmp; 3278*344a7f5eSAndroid Build Coastguard Worker} 3279*344a7f5eSAndroid Build Coastguard Worker#endif 3280*344a7f5eSAndroid Build Coastguard Worker 3281*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3282*344a7f5eSAndroid Build Coastguard Workerstatic inline ushort3 __attribute__((const, overloadable)) 3283*344a7f5eSAndroid Build Coastguard Worker min(ushort3 a, ushort3 b) { 3284*344a7f5eSAndroid Build Coastguard Worker ushort3 tmp; 3285*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3286*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3287*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3288*344a7f5eSAndroid Build Coastguard Worker return tmp; 3289*344a7f5eSAndroid Build Coastguard Worker} 3290*344a7f5eSAndroid Build Coastguard Worker#endif 3291*344a7f5eSAndroid Build Coastguard Worker 3292*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3293*344a7f5eSAndroid Build Coastguard Workerstatic inline int3 __attribute__((const, overloadable)) 3294*344a7f5eSAndroid Build Coastguard Worker min(int3 a, int3 b) { 3295*344a7f5eSAndroid Build Coastguard Worker int3 tmp; 3296*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3297*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3298*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3299*344a7f5eSAndroid Build Coastguard Worker return tmp; 3300*344a7f5eSAndroid Build Coastguard Worker} 3301*344a7f5eSAndroid Build Coastguard Worker#endif 3302*344a7f5eSAndroid Build Coastguard Worker 3303*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3304*344a7f5eSAndroid Build Coastguard Workerstatic inline uint3 __attribute__((const, overloadable)) 3305*344a7f5eSAndroid Build Coastguard Worker min(uint3 a, uint3 b) { 3306*344a7f5eSAndroid Build Coastguard Worker uint3 tmp; 3307*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3308*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3309*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3310*344a7f5eSAndroid Build Coastguard Worker return tmp; 3311*344a7f5eSAndroid Build Coastguard Worker} 3312*344a7f5eSAndroid Build Coastguard Worker#endif 3313*344a7f5eSAndroid Build Coastguard Worker 3314*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3315*344a7f5eSAndroid Build Coastguard Workerstatic inline char4 __attribute__((const, overloadable)) 3316*344a7f5eSAndroid Build Coastguard Worker min(char4 a, char4 b) { 3317*344a7f5eSAndroid Build Coastguard Worker char4 tmp; 3318*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3319*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3320*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3321*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w < b.w ? a.w : b.w); 3322*344a7f5eSAndroid Build Coastguard Worker return tmp; 3323*344a7f5eSAndroid Build Coastguard Worker} 3324*344a7f5eSAndroid Build Coastguard Worker#endif 3325*344a7f5eSAndroid Build Coastguard Worker 3326*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3327*344a7f5eSAndroid Build Coastguard Workerstatic inline uchar4 __attribute__((const, overloadable)) 3328*344a7f5eSAndroid Build Coastguard Worker min(uchar4 a, uchar4 b) { 3329*344a7f5eSAndroid Build Coastguard Worker uchar4 tmp; 3330*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3331*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3332*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3333*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w < b.w ? a.w : b.w); 3334*344a7f5eSAndroid Build Coastguard Worker return tmp; 3335*344a7f5eSAndroid Build Coastguard Worker} 3336*344a7f5eSAndroid Build Coastguard Worker#endif 3337*344a7f5eSAndroid Build Coastguard Worker 3338*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3339*344a7f5eSAndroid Build Coastguard Workerstatic inline short4 __attribute__((const, overloadable)) 3340*344a7f5eSAndroid Build Coastguard Worker min(short4 a, short4 b) { 3341*344a7f5eSAndroid Build Coastguard Worker short4 tmp; 3342*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3343*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3344*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3345*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w < b.w ? a.w : b.w); 3346*344a7f5eSAndroid Build Coastguard Worker return tmp; 3347*344a7f5eSAndroid Build Coastguard Worker} 3348*344a7f5eSAndroid Build Coastguard Worker#endif 3349*344a7f5eSAndroid Build Coastguard Worker 3350*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3351*344a7f5eSAndroid Build Coastguard Workerstatic inline ushort4 __attribute__((const, overloadable)) 3352*344a7f5eSAndroid Build Coastguard Worker min(ushort4 a, ushort4 b) { 3353*344a7f5eSAndroid Build Coastguard Worker ushort4 tmp; 3354*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3355*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3356*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3357*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w < b.w ? a.w : b.w); 3358*344a7f5eSAndroid Build Coastguard Worker return tmp; 3359*344a7f5eSAndroid Build Coastguard Worker} 3360*344a7f5eSAndroid Build Coastguard Worker#endif 3361*344a7f5eSAndroid Build Coastguard Worker 3362*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3363*344a7f5eSAndroid Build Coastguard Workerstatic inline int4 __attribute__((const, overloadable)) 3364*344a7f5eSAndroid Build Coastguard Worker min(int4 a, int4 b) { 3365*344a7f5eSAndroid Build Coastguard Worker int4 tmp; 3366*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3367*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3368*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3369*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w < b.w ? a.w : b.w); 3370*344a7f5eSAndroid Build Coastguard Worker return tmp; 3371*344a7f5eSAndroid Build Coastguard Worker} 3372*344a7f5eSAndroid Build Coastguard Worker#endif 3373*344a7f5eSAndroid Build Coastguard Worker 3374*344a7f5eSAndroid Build Coastguard Worker#if !defined(RS_VERSION) || (RS_VERSION <= 20) 3375*344a7f5eSAndroid Build Coastguard Workerstatic inline uint4 __attribute__((const, overloadable)) 3376*344a7f5eSAndroid Build Coastguard Worker min(uint4 a, uint4 b) { 3377*344a7f5eSAndroid Build Coastguard Worker uint4 tmp; 3378*344a7f5eSAndroid Build Coastguard Worker tmp.x = (a.x < b.x ? a.x : b.x); 3379*344a7f5eSAndroid Build Coastguard Worker tmp.y = (a.y < b.y ? a.y : b.y); 3380*344a7f5eSAndroid Build Coastguard Worker tmp.z = (a.z < b.z ? a.z : b.z); 3381*344a7f5eSAndroid Build Coastguard Worker tmp.w = (a.w < b.w ? a.w : b.w); 3382*344a7f5eSAndroid Build Coastguard Worker return tmp; 3383*344a7f5eSAndroid Build Coastguard Worker} 3384*344a7f5eSAndroid Build Coastguard Worker#endif 3385*344a7f5eSAndroid Build Coastguard Worker 3386*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3387*344a7f5eSAndroid Build Coastguard Workerextern char __attribute__((const, overloadable)) 3388*344a7f5eSAndroid Build Coastguard Worker min(char a, char b); 3389*344a7f5eSAndroid Build Coastguard Worker#endif 3390*344a7f5eSAndroid Build Coastguard Worker 3391*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3392*344a7f5eSAndroid Build Coastguard Workerextern char2 __attribute__((const, overloadable)) 3393*344a7f5eSAndroid Build Coastguard Worker min(char2 a, char2 b); 3394*344a7f5eSAndroid Build Coastguard Worker#endif 3395*344a7f5eSAndroid Build Coastguard Worker 3396*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3397*344a7f5eSAndroid Build Coastguard Workerextern char3 __attribute__((const, overloadable)) 3398*344a7f5eSAndroid Build Coastguard Worker min(char3 a, char3 b); 3399*344a7f5eSAndroid Build Coastguard Worker#endif 3400*344a7f5eSAndroid Build Coastguard Worker 3401*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3402*344a7f5eSAndroid Build Coastguard Workerextern char4 __attribute__((const, overloadable)) 3403*344a7f5eSAndroid Build Coastguard Worker min(char4 a, char4 b); 3404*344a7f5eSAndroid Build Coastguard Worker#endif 3405*344a7f5eSAndroid Build Coastguard Worker 3406*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3407*344a7f5eSAndroid Build Coastguard Workerextern uchar __attribute__((const, overloadable)) 3408*344a7f5eSAndroid Build Coastguard Worker min(uchar a, uchar b); 3409*344a7f5eSAndroid Build Coastguard Worker#endif 3410*344a7f5eSAndroid Build Coastguard Worker 3411*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3412*344a7f5eSAndroid Build Coastguard Workerextern uchar2 __attribute__((const, overloadable)) 3413*344a7f5eSAndroid Build Coastguard Worker min(uchar2 a, uchar2 b); 3414*344a7f5eSAndroid Build Coastguard Worker#endif 3415*344a7f5eSAndroid Build Coastguard Worker 3416*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3417*344a7f5eSAndroid Build Coastguard Workerextern uchar3 __attribute__((const, overloadable)) 3418*344a7f5eSAndroid Build Coastguard Worker min(uchar3 a, uchar3 b); 3419*344a7f5eSAndroid Build Coastguard Worker#endif 3420*344a7f5eSAndroid Build Coastguard Worker 3421*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3422*344a7f5eSAndroid Build Coastguard Workerextern uchar4 __attribute__((const, overloadable)) 3423*344a7f5eSAndroid Build Coastguard Worker min(uchar4 a, uchar4 b); 3424*344a7f5eSAndroid Build Coastguard Worker#endif 3425*344a7f5eSAndroid Build Coastguard Worker 3426*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3427*344a7f5eSAndroid Build Coastguard Workerextern short __attribute__((const, overloadable)) 3428*344a7f5eSAndroid Build Coastguard Worker min(short a, short b); 3429*344a7f5eSAndroid Build Coastguard Worker#endif 3430*344a7f5eSAndroid Build Coastguard Worker 3431*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3432*344a7f5eSAndroid Build Coastguard Workerextern short2 __attribute__((const, overloadable)) 3433*344a7f5eSAndroid Build Coastguard Worker min(short2 a, short2 b); 3434*344a7f5eSAndroid Build Coastguard Worker#endif 3435*344a7f5eSAndroid Build Coastguard Worker 3436*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3437*344a7f5eSAndroid Build Coastguard Workerextern short3 __attribute__((const, overloadable)) 3438*344a7f5eSAndroid Build Coastguard Worker min(short3 a, short3 b); 3439*344a7f5eSAndroid Build Coastguard Worker#endif 3440*344a7f5eSAndroid Build Coastguard Worker 3441*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3442*344a7f5eSAndroid Build Coastguard Workerextern short4 __attribute__((const, overloadable)) 3443*344a7f5eSAndroid Build Coastguard Worker min(short4 a, short4 b); 3444*344a7f5eSAndroid Build Coastguard Worker#endif 3445*344a7f5eSAndroid Build Coastguard Worker 3446*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3447*344a7f5eSAndroid Build Coastguard Workerextern ushort __attribute__((const, overloadable)) 3448*344a7f5eSAndroid Build Coastguard Worker min(ushort a, ushort b); 3449*344a7f5eSAndroid Build Coastguard Worker#endif 3450*344a7f5eSAndroid Build Coastguard Worker 3451*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3452*344a7f5eSAndroid Build Coastguard Workerextern ushort2 __attribute__((const, overloadable)) 3453*344a7f5eSAndroid Build Coastguard Worker min(ushort2 a, ushort2 b); 3454*344a7f5eSAndroid Build Coastguard Worker#endif 3455*344a7f5eSAndroid Build Coastguard Worker 3456*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3457*344a7f5eSAndroid Build Coastguard Workerextern ushort3 __attribute__((const, overloadable)) 3458*344a7f5eSAndroid Build Coastguard Worker min(ushort3 a, ushort3 b); 3459*344a7f5eSAndroid Build Coastguard Worker#endif 3460*344a7f5eSAndroid Build Coastguard Worker 3461*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3462*344a7f5eSAndroid Build Coastguard Workerextern ushort4 __attribute__((const, overloadable)) 3463*344a7f5eSAndroid Build Coastguard Worker min(ushort4 a, ushort4 b); 3464*344a7f5eSAndroid Build Coastguard Worker#endif 3465*344a7f5eSAndroid Build Coastguard Worker 3466*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3467*344a7f5eSAndroid Build Coastguard Workerextern int __attribute__((const, overloadable)) 3468*344a7f5eSAndroid Build Coastguard Worker min(int a, int b); 3469*344a7f5eSAndroid Build Coastguard Worker#endif 3470*344a7f5eSAndroid Build Coastguard Worker 3471*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3472*344a7f5eSAndroid Build Coastguard Workerextern int2 __attribute__((const, overloadable)) 3473*344a7f5eSAndroid Build Coastguard Worker min(int2 a, int2 b); 3474*344a7f5eSAndroid Build Coastguard Worker#endif 3475*344a7f5eSAndroid Build Coastguard Worker 3476*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3477*344a7f5eSAndroid Build Coastguard Workerextern int3 __attribute__((const, overloadable)) 3478*344a7f5eSAndroid Build Coastguard Worker min(int3 a, int3 b); 3479*344a7f5eSAndroid Build Coastguard Worker#endif 3480*344a7f5eSAndroid Build Coastguard Worker 3481*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3482*344a7f5eSAndroid Build Coastguard Workerextern int4 __attribute__((const, overloadable)) 3483*344a7f5eSAndroid Build Coastguard Worker min(int4 a, int4 b); 3484*344a7f5eSAndroid Build Coastguard Worker#endif 3485*344a7f5eSAndroid Build Coastguard Worker 3486*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3487*344a7f5eSAndroid Build Coastguard Workerextern uint __attribute__((const, overloadable)) 3488*344a7f5eSAndroid Build Coastguard Worker min(uint a, uint b); 3489*344a7f5eSAndroid Build Coastguard Worker#endif 3490*344a7f5eSAndroid Build Coastguard Worker 3491*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3492*344a7f5eSAndroid Build Coastguard Workerextern uint2 __attribute__((const, overloadable)) 3493*344a7f5eSAndroid Build Coastguard Worker min(uint2 a, uint2 b); 3494*344a7f5eSAndroid Build Coastguard Worker#endif 3495*344a7f5eSAndroid Build Coastguard Worker 3496*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3497*344a7f5eSAndroid Build Coastguard Workerextern uint3 __attribute__((const, overloadable)) 3498*344a7f5eSAndroid Build Coastguard Worker min(uint3 a, uint3 b); 3499*344a7f5eSAndroid Build Coastguard Worker#endif 3500*344a7f5eSAndroid Build Coastguard Worker 3501*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3502*344a7f5eSAndroid Build Coastguard Workerextern uint4 __attribute__((const, overloadable)) 3503*344a7f5eSAndroid Build Coastguard Worker min(uint4 a, uint4 b); 3504*344a7f5eSAndroid Build Coastguard Worker#endif 3505*344a7f5eSAndroid Build Coastguard Worker 3506*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3507*344a7f5eSAndroid Build Coastguard Workerextern long __attribute__((const, overloadable)) 3508*344a7f5eSAndroid Build Coastguard Worker min(long a, long b); 3509*344a7f5eSAndroid Build Coastguard Worker#endif 3510*344a7f5eSAndroid Build Coastguard Worker 3511*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3512*344a7f5eSAndroid Build Coastguard Workerextern long2 __attribute__((const, overloadable)) 3513*344a7f5eSAndroid Build Coastguard Worker min(long2 a, long2 b); 3514*344a7f5eSAndroid Build Coastguard Worker#endif 3515*344a7f5eSAndroid Build Coastguard Worker 3516*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3517*344a7f5eSAndroid Build Coastguard Workerextern long3 __attribute__((const, overloadable)) 3518*344a7f5eSAndroid Build Coastguard Worker min(long3 a, long3 b); 3519*344a7f5eSAndroid Build Coastguard Worker#endif 3520*344a7f5eSAndroid Build Coastguard Worker 3521*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3522*344a7f5eSAndroid Build Coastguard Workerextern long4 __attribute__((const, overloadable)) 3523*344a7f5eSAndroid Build Coastguard Worker min(long4 a, long4 b); 3524*344a7f5eSAndroid Build Coastguard Worker#endif 3525*344a7f5eSAndroid Build Coastguard Worker 3526*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3527*344a7f5eSAndroid Build Coastguard Workerextern ulong __attribute__((const, overloadable)) 3528*344a7f5eSAndroid Build Coastguard Worker min(ulong a, ulong b); 3529*344a7f5eSAndroid Build Coastguard Worker#endif 3530*344a7f5eSAndroid Build Coastguard Worker 3531*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3532*344a7f5eSAndroid Build Coastguard Workerextern ulong2 __attribute__((const, overloadable)) 3533*344a7f5eSAndroid Build Coastguard Worker min(ulong2 a, ulong2 b); 3534*344a7f5eSAndroid Build Coastguard Worker#endif 3535*344a7f5eSAndroid Build Coastguard Worker 3536*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3537*344a7f5eSAndroid Build Coastguard Workerextern ulong3 __attribute__((const, overloadable)) 3538*344a7f5eSAndroid Build Coastguard Worker min(ulong3 a, ulong3 b); 3539*344a7f5eSAndroid Build Coastguard Worker#endif 3540*344a7f5eSAndroid Build Coastguard Worker 3541*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3542*344a7f5eSAndroid Build Coastguard Workerextern ulong4 __attribute__((const, overloadable)) 3543*344a7f5eSAndroid Build Coastguard Worker min(ulong4 a, ulong4 b); 3544*344a7f5eSAndroid Build Coastguard Worker#endif 3545*344a7f5eSAndroid Build Coastguard Worker 3546*344a7f5eSAndroid Build Coastguard Worker/* 3547*344a7f5eSAndroid Build Coastguard Worker * mix: Mixes two values 3548*344a7f5eSAndroid Build Coastguard Worker * 3549*344a7f5eSAndroid Build Coastguard Worker * Returns start + ((stop - start) * fraction). 3550*344a7f5eSAndroid Build Coastguard Worker * 3551*344a7f5eSAndroid Build Coastguard Worker * This can be useful for mixing two values. For example, to create a new color that is 3552*344a7f5eSAndroid Build Coastguard Worker * 40% color1 and 60% color2, use mix(color1, color2, 0.6f). 3553*344a7f5eSAndroid Build Coastguard Worker */ 3554*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 3555*344a7f5eSAndroid Build Coastguard Worker mix(float start, float stop, float fraction); 3556*344a7f5eSAndroid Build Coastguard Worker 3557*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 3558*344a7f5eSAndroid Build Coastguard Worker mix(float2 start, float2 stop, float2 fraction); 3559*344a7f5eSAndroid Build Coastguard Worker 3560*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 3561*344a7f5eSAndroid Build Coastguard Worker mix(float3 start, float3 stop, float3 fraction); 3562*344a7f5eSAndroid Build Coastguard Worker 3563*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 3564*344a7f5eSAndroid Build Coastguard Worker mix(float4 start, float4 stop, float4 fraction); 3565*344a7f5eSAndroid Build Coastguard Worker 3566*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3567*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 3568*344a7f5eSAndroid Build Coastguard Worker mix(half start, half stop, half fraction); 3569*344a7f5eSAndroid Build Coastguard Worker#endif 3570*344a7f5eSAndroid Build Coastguard Worker 3571*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3572*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 3573*344a7f5eSAndroid Build Coastguard Worker mix(half2 start, half2 stop, half2 fraction); 3574*344a7f5eSAndroid Build Coastguard Worker#endif 3575*344a7f5eSAndroid Build Coastguard Worker 3576*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3577*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 3578*344a7f5eSAndroid Build Coastguard Worker mix(half3 start, half3 stop, half3 fraction); 3579*344a7f5eSAndroid Build Coastguard Worker#endif 3580*344a7f5eSAndroid Build Coastguard Worker 3581*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3582*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 3583*344a7f5eSAndroid Build Coastguard Worker mix(half4 start, half4 stop, half4 fraction); 3584*344a7f5eSAndroid Build Coastguard Worker#endif 3585*344a7f5eSAndroid Build Coastguard Worker 3586*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 3587*344a7f5eSAndroid Build Coastguard Worker mix(float2 start, float2 stop, float fraction); 3588*344a7f5eSAndroid Build Coastguard Worker 3589*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 3590*344a7f5eSAndroid Build Coastguard Worker mix(float3 start, float3 stop, float fraction); 3591*344a7f5eSAndroid Build Coastguard Worker 3592*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 3593*344a7f5eSAndroid Build Coastguard Worker mix(float4 start, float4 stop, float fraction); 3594*344a7f5eSAndroid Build Coastguard Worker 3595*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3596*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 3597*344a7f5eSAndroid Build Coastguard Worker mix(half2 start, half2 stop, half fraction); 3598*344a7f5eSAndroid Build Coastguard Worker#endif 3599*344a7f5eSAndroid Build Coastguard Worker 3600*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3601*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 3602*344a7f5eSAndroid Build Coastguard Worker mix(half3 start, half3 stop, half fraction); 3603*344a7f5eSAndroid Build Coastguard Worker#endif 3604*344a7f5eSAndroid Build Coastguard Worker 3605*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3606*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 3607*344a7f5eSAndroid Build Coastguard Worker mix(half4 start, half4 stop, half fraction); 3608*344a7f5eSAndroid Build Coastguard Worker#endif 3609*344a7f5eSAndroid Build Coastguard Worker 3610*344a7f5eSAndroid Build Coastguard Worker/* 3611*344a7f5eSAndroid Build Coastguard Worker * modf: Integral and fractional components 3612*344a7f5eSAndroid Build Coastguard Worker * 3613*344a7f5eSAndroid Build Coastguard Worker * Returns the integral and fractional components of a number. 3614*344a7f5eSAndroid Build Coastguard Worker * 3615*344a7f5eSAndroid Build Coastguard Worker * Both components will have the same sign as x. For example, for an input of -3.72f, 3616*344a7f5eSAndroid Build Coastguard Worker * *integral_part will be set to -3.f and .72f will be returned. 3617*344a7f5eSAndroid Build Coastguard Worker * 3618*344a7f5eSAndroid Build Coastguard Worker * Parameters: 3619*344a7f5eSAndroid Build Coastguard Worker * v: Source value. 3620*344a7f5eSAndroid Build Coastguard Worker * integral_part: *integral_part will be set to the integral portion of the number. 3621*344a7f5eSAndroid Build Coastguard Worker * 3622*344a7f5eSAndroid Build Coastguard Worker * Returns: Floating point portion of the value. 3623*344a7f5eSAndroid Build Coastguard Worker */ 3624*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((overloadable)) 3625*344a7f5eSAndroid Build Coastguard Worker modf(float v, float* integral_part); 3626*344a7f5eSAndroid Build Coastguard Worker 3627*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((overloadable)) 3628*344a7f5eSAndroid Build Coastguard Worker modf(float2 v, float2* integral_part); 3629*344a7f5eSAndroid Build Coastguard Worker 3630*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((overloadable)) 3631*344a7f5eSAndroid Build Coastguard Worker modf(float3 v, float3* integral_part); 3632*344a7f5eSAndroid Build Coastguard Worker 3633*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((overloadable)) 3634*344a7f5eSAndroid Build Coastguard Worker modf(float4 v, float4* integral_part); 3635*344a7f5eSAndroid Build Coastguard Worker 3636*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3637*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((overloadable)) 3638*344a7f5eSAndroid Build Coastguard Worker modf(half v, half* integral_part); 3639*344a7f5eSAndroid Build Coastguard Worker#endif 3640*344a7f5eSAndroid Build Coastguard Worker 3641*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3642*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((overloadable)) 3643*344a7f5eSAndroid Build Coastguard Worker modf(half2 v, half2* integral_part); 3644*344a7f5eSAndroid Build Coastguard Worker#endif 3645*344a7f5eSAndroid Build Coastguard Worker 3646*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3647*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((overloadable)) 3648*344a7f5eSAndroid Build Coastguard Worker modf(half3 v, half3* integral_part); 3649*344a7f5eSAndroid Build Coastguard Worker#endif 3650*344a7f5eSAndroid Build Coastguard Worker 3651*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3652*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((overloadable)) 3653*344a7f5eSAndroid Build Coastguard Worker modf(half4 v, half4* integral_part); 3654*344a7f5eSAndroid Build Coastguard Worker#endif 3655*344a7f5eSAndroid Build Coastguard Worker 3656*344a7f5eSAndroid Build Coastguard Worker/* 3657*344a7f5eSAndroid Build Coastguard Worker * nan: Not a Number 3658*344a7f5eSAndroid Build Coastguard Worker * 3659*344a7f5eSAndroid Build Coastguard Worker * Returns a NaN value (Not a Number). 3660*344a7f5eSAndroid Build Coastguard Worker * 3661*344a7f5eSAndroid Build Coastguard Worker * Parameters: 3662*344a7f5eSAndroid Build Coastguard Worker * v: Not used. 3663*344a7f5eSAndroid Build Coastguard Worker */ 3664*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 3665*344a7f5eSAndroid Build Coastguard Worker nan(uint v); 3666*344a7f5eSAndroid Build Coastguard Worker 3667*344a7f5eSAndroid Build Coastguard Worker/* 3668*344a7f5eSAndroid Build Coastguard Worker * nan_half: Not a Number 3669*344a7f5eSAndroid Build Coastguard Worker * 3670*344a7f5eSAndroid Build Coastguard Worker * Returns a half-precision floating point NaN value (Not a Number). 3671*344a7f5eSAndroid Build Coastguard Worker */ 3672*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3673*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 3674*344a7f5eSAndroid Build Coastguard Worker nan_half(void); 3675*344a7f5eSAndroid Build Coastguard Worker#endif 3676*344a7f5eSAndroid Build Coastguard Worker 3677*344a7f5eSAndroid Build Coastguard Worker/* 3678*344a7f5eSAndroid Build Coastguard Worker * native_acos: Approximate inverse cosine 3679*344a7f5eSAndroid Build Coastguard Worker * 3680*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate inverse cosine, in radians. 3681*344a7f5eSAndroid Build Coastguard Worker * 3682*344a7f5eSAndroid Build Coastguard Worker * This function yields undefined results from input values less than -1 or greater than 1. 3683*344a7f5eSAndroid Build Coastguard Worker * 3684*344a7f5eSAndroid Build Coastguard Worker * See also acos(). 3685*344a7f5eSAndroid Build Coastguard Worker */ 3686*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3687*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 3688*344a7f5eSAndroid Build Coastguard Worker native_acos(float v); 3689*344a7f5eSAndroid Build Coastguard Worker#endif 3690*344a7f5eSAndroid Build Coastguard Worker 3691*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3692*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 3693*344a7f5eSAndroid Build Coastguard Worker native_acos(float2 v); 3694*344a7f5eSAndroid Build Coastguard Worker#endif 3695*344a7f5eSAndroid Build Coastguard Worker 3696*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3697*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 3698*344a7f5eSAndroid Build Coastguard Worker native_acos(float3 v); 3699*344a7f5eSAndroid Build Coastguard Worker#endif 3700*344a7f5eSAndroid Build Coastguard Worker 3701*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3702*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 3703*344a7f5eSAndroid Build Coastguard Worker native_acos(float4 v); 3704*344a7f5eSAndroid Build Coastguard Worker#endif 3705*344a7f5eSAndroid Build Coastguard Worker 3706*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3707*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 3708*344a7f5eSAndroid Build Coastguard Worker native_acos(half v); 3709*344a7f5eSAndroid Build Coastguard Worker#endif 3710*344a7f5eSAndroid Build Coastguard Worker 3711*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3712*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 3713*344a7f5eSAndroid Build Coastguard Worker native_acos(half2 v); 3714*344a7f5eSAndroid Build Coastguard Worker#endif 3715*344a7f5eSAndroid Build Coastguard Worker 3716*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3717*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 3718*344a7f5eSAndroid Build Coastguard Worker native_acos(half3 v); 3719*344a7f5eSAndroid Build Coastguard Worker#endif 3720*344a7f5eSAndroid Build Coastguard Worker 3721*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3722*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 3723*344a7f5eSAndroid Build Coastguard Worker native_acos(half4 v); 3724*344a7f5eSAndroid Build Coastguard Worker#endif 3725*344a7f5eSAndroid Build Coastguard Worker 3726*344a7f5eSAndroid Build Coastguard Worker/* 3727*344a7f5eSAndroid Build Coastguard Worker * native_acosh: Approximate inverse hyperbolic cosine 3728*344a7f5eSAndroid Build Coastguard Worker * 3729*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate inverse hyperbolic cosine, in radians. 3730*344a7f5eSAndroid Build Coastguard Worker * 3731*344a7f5eSAndroid Build Coastguard Worker * See also acosh(). 3732*344a7f5eSAndroid Build Coastguard Worker */ 3733*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3734*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 3735*344a7f5eSAndroid Build Coastguard Worker native_acosh(float v); 3736*344a7f5eSAndroid Build Coastguard Worker#endif 3737*344a7f5eSAndroid Build Coastguard Worker 3738*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3739*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 3740*344a7f5eSAndroid Build Coastguard Worker native_acosh(float2 v); 3741*344a7f5eSAndroid Build Coastguard Worker#endif 3742*344a7f5eSAndroid Build Coastguard Worker 3743*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3744*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 3745*344a7f5eSAndroid Build Coastguard Worker native_acosh(float3 v); 3746*344a7f5eSAndroid Build Coastguard Worker#endif 3747*344a7f5eSAndroid Build Coastguard Worker 3748*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3749*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 3750*344a7f5eSAndroid Build Coastguard Worker native_acosh(float4 v); 3751*344a7f5eSAndroid Build Coastguard Worker#endif 3752*344a7f5eSAndroid Build Coastguard Worker 3753*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3754*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 3755*344a7f5eSAndroid Build Coastguard Worker native_acosh(half v); 3756*344a7f5eSAndroid Build Coastguard Worker#endif 3757*344a7f5eSAndroid Build Coastguard Worker 3758*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3759*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 3760*344a7f5eSAndroid Build Coastguard Worker native_acosh(half2 v); 3761*344a7f5eSAndroid Build Coastguard Worker#endif 3762*344a7f5eSAndroid Build Coastguard Worker 3763*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3764*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 3765*344a7f5eSAndroid Build Coastguard Worker native_acosh(half3 v); 3766*344a7f5eSAndroid Build Coastguard Worker#endif 3767*344a7f5eSAndroid Build Coastguard Worker 3768*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3769*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 3770*344a7f5eSAndroid Build Coastguard Worker native_acosh(half4 v); 3771*344a7f5eSAndroid Build Coastguard Worker#endif 3772*344a7f5eSAndroid Build Coastguard Worker 3773*344a7f5eSAndroid Build Coastguard Worker/* 3774*344a7f5eSAndroid Build Coastguard Worker * native_acospi: Approximate inverse cosine divided by pi 3775*344a7f5eSAndroid Build Coastguard Worker * 3776*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate inverse cosine in radians, divided by pi. 3777*344a7f5eSAndroid Build Coastguard Worker * 3778*344a7f5eSAndroid Build Coastguard Worker * To get an inverse cosine measured in degrees, use acospi(a) * 180.f. 3779*344a7f5eSAndroid Build Coastguard Worker * 3780*344a7f5eSAndroid Build Coastguard Worker * This function yields undefined results from input values less than -1 or greater than 1. 3781*344a7f5eSAndroid Build Coastguard Worker * 3782*344a7f5eSAndroid Build Coastguard Worker * See also acospi(). 3783*344a7f5eSAndroid Build Coastguard Worker */ 3784*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3785*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 3786*344a7f5eSAndroid Build Coastguard Worker native_acospi(float v); 3787*344a7f5eSAndroid Build Coastguard Worker#endif 3788*344a7f5eSAndroid Build Coastguard Worker 3789*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3790*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 3791*344a7f5eSAndroid Build Coastguard Worker native_acospi(float2 v); 3792*344a7f5eSAndroid Build Coastguard Worker#endif 3793*344a7f5eSAndroid Build Coastguard Worker 3794*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3795*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 3796*344a7f5eSAndroid Build Coastguard Worker native_acospi(float3 v); 3797*344a7f5eSAndroid Build Coastguard Worker#endif 3798*344a7f5eSAndroid Build Coastguard Worker 3799*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3800*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 3801*344a7f5eSAndroid Build Coastguard Worker native_acospi(float4 v); 3802*344a7f5eSAndroid Build Coastguard Worker#endif 3803*344a7f5eSAndroid Build Coastguard Worker 3804*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3805*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 3806*344a7f5eSAndroid Build Coastguard Worker native_acospi(half v); 3807*344a7f5eSAndroid Build Coastguard Worker#endif 3808*344a7f5eSAndroid Build Coastguard Worker 3809*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3810*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 3811*344a7f5eSAndroid Build Coastguard Worker native_acospi(half2 v); 3812*344a7f5eSAndroid Build Coastguard Worker#endif 3813*344a7f5eSAndroid Build Coastguard Worker 3814*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3815*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 3816*344a7f5eSAndroid Build Coastguard Worker native_acospi(half3 v); 3817*344a7f5eSAndroid Build Coastguard Worker#endif 3818*344a7f5eSAndroid Build Coastguard Worker 3819*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3820*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 3821*344a7f5eSAndroid Build Coastguard Worker native_acospi(half4 v); 3822*344a7f5eSAndroid Build Coastguard Worker#endif 3823*344a7f5eSAndroid Build Coastguard Worker 3824*344a7f5eSAndroid Build Coastguard Worker/* 3825*344a7f5eSAndroid Build Coastguard Worker * native_asin: Approximate inverse sine 3826*344a7f5eSAndroid Build Coastguard Worker * 3827*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate inverse sine, in radians. 3828*344a7f5eSAndroid Build Coastguard Worker * 3829*344a7f5eSAndroid Build Coastguard Worker * This function yields undefined results from input values less than -1 or greater than 1. 3830*344a7f5eSAndroid Build Coastguard Worker * 3831*344a7f5eSAndroid Build Coastguard Worker * See also asin(). 3832*344a7f5eSAndroid Build Coastguard Worker */ 3833*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3834*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 3835*344a7f5eSAndroid Build Coastguard Worker native_asin(float v); 3836*344a7f5eSAndroid Build Coastguard Worker#endif 3837*344a7f5eSAndroid Build Coastguard Worker 3838*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3839*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 3840*344a7f5eSAndroid Build Coastguard Worker native_asin(float2 v); 3841*344a7f5eSAndroid Build Coastguard Worker#endif 3842*344a7f5eSAndroid Build Coastguard Worker 3843*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3844*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 3845*344a7f5eSAndroid Build Coastguard Worker native_asin(float3 v); 3846*344a7f5eSAndroid Build Coastguard Worker#endif 3847*344a7f5eSAndroid Build Coastguard Worker 3848*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3849*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 3850*344a7f5eSAndroid Build Coastguard Worker native_asin(float4 v); 3851*344a7f5eSAndroid Build Coastguard Worker#endif 3852*344a7f5eSAndroid Build Coastguard Worker 3853*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3854*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 3855*344a7f5eSAndroid Build Coastguard Worker native_asin(half v); 3856*344a7f5eSAndroid Build Coastguard Worker#endif 3857*344a7f5eSAndroid Build Coastguard Worker 3858*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3859*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 3860*344a7f5eSAndroid Build Coastguard Worker native_asin(half2 v); 3861*344a7f5eSAndroid Build Coastguard Worker#endif 3862*344a7f5eSAndroid Build Coastguard Worker 3863*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3864*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 3865*344a7f5eSAndroid Build Coastguard Worker native_asin(half3 v); 3866*344a7f5eSAndroid Build Coastguard Worker#endif 3867*344a7f5eSAndroid Build Coastguard Worker 3868*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3869*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 3870*344a7f5eSAndroid Build Coastguard Worker native_asin(half4 v); 3871*344a7f5eSAndroid Build Coastguard Worker#endif 3872*344a7f5eSAndroid Build Coastguard Worker 3873*344a7f5eSAndroid Build Coastguard Worker/* 3874*344a7f5eSAndroid Build Coastguard Worker * native_asinh: Approximate inverse hyperbolic sine 3875*344a7f5eSAndroid Build Coastguard Worker * 3876*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate inverse hyperbolic sine, in radians. 3877*344a7f5eSAndroid Build Coastguard Worker * 3878*344a7f5eSAndroid Build Coastguard Worker * See also asinh(). 3879*344a7f5eSAndroid Build Coastguard Worker */ 3880*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3881*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 3882*344a7f5eSAndroid Build Coastguard Worker native_asinh(float v); 3883*344a7f5eSAndroid Build Coastguard Worker#endif 3884*344a7f5eSAndroid Build Coastguard Worker 3885*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3886*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 3887*344a7f5eSAndroid Build Coastguard Worker native_asinh(float2 v); 3888*344a7f5eSAndroid Build Coastguard Worker#endif 3889*344a7f5eSAndroid Build Coastguard Worker 3890*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3891*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 3892*344a7f5eSAndroid Build Coastguard Worker native_asinh(float3 v); 3893*344a7f5eSAndroid Build Coastguard Worker#endif 3894*344a7f5eSAndroid Build Coastguard Worker 3895*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3896*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 3897*344a7f5eSAndroid Build Coastguard Worker native_asinh(float4 v); 3898*344a7f5eSAndroid Build Coastguard Worker#endif 3899*344a7f5eSAndroid Build Coastguard Worker 3900*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3901*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 3902*344a7f5eSAndroid Build Coastguard Worker native_asinh(half v); 3903*344a7f5eSAndroid Build Coastguard Worker#endif 3904*344a7f5eSAndroid Build Coastguard Worker 3905*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3906*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 3907*344a7f5eSAndroid Build Coastguard Worker native_asinh(half2 v); 3908*344a7f5eSAndroid Build Coastguard Worker#endif 3909*344a7f5eSAndroid Build Coastguard Worker 3910*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3911*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 3912*344a7f5eSAndroid Build Coastguard Worker native_asinh(half3 v); 3913*344a7f5eSAndroid Build Coastguard Worker#endif 3914*344a7f5eSAndroid Build Coastguard Worker 3915*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3916*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 3917*344a7f5eSAndroid Build Coastguard Worker native_asinh(half4 v); 3918*344a7f5eSAndroid Build Coastguard Worker#endif 3919*344a7f5eSAndroid Build Coastguard Worker 3920*344a7f5eSAndroid Build Coastguard Worker/* 3921*344a7f5eSAndroid Build Coastguard Worker * native_asinpi: Approximate inverse sine divided by pi 3922*344a7f5eSAndroid Build Coastguard Worker * 3923*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate inverse sine in radians, divided by pi. 3924*344a7f5eSAndroid Build Coastguard Worker * 3925*344a7f5eSAndroid Build Coastguard Worker * To get an inverse sine measured in degrees, use asinpi(a) * 180.f. 3926*344a7f5eSAndroid Build Coastguard Worker * 3927*344a7f5eSAndroid Build Coastguard Worker * This function yields undefined results from input values less than -1 or greater than 1. 3928*344a7f5eSAndroid Build Coastguard Worker * 3929*344a7f5eSAndroid Build Coastguard Worker * See also asinpi(). 3930*344a7f5eSAndroid Build Coastguard Worker */ 3931*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3932*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 3933*344a7f5eSAndroid Build Coastguard Worker native_asinpi(float v); 3934*344a7f5eSAndroid Build Coastguard Worker#endif 3935*344a7f5eSAndroid Build Coastguard Worker 3936*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3937*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 3938*344a7f5eSAndroid Build Coastguard Worker native_asinpi(float2 v); 3939*344a7f5eSAndroid Build Coastguard Worker#endif 3940*344a7f5eSAndroid Build Coastguard Worker 3941*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3942*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 3943*344a7f5eSAndroid Build Coastguard Worker native_asinpi(float3 v); 3944*344a7f5eSAndroid Build Coastguard Worker#endif 3945*344a7f5eSAndroid Build Coastguard Worker 3946*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3947*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 3948*344a7f5eSAndroid Build Coastguard Worker native_asinpi(float4 v); 3949*344a7f5eSAndroid Build Coastguard Worker#endif 3950*344a7f5eSAndroid Build Coastguard Worker 3951*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3952*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 3953*344a7f5eSAndroid Build Coastguard Worker native_asinpi(half v); 3954*344a7f5eSAndroid Build Coastguard Worker#endif 3955*344a7f5eSAndroid Build Coastguard Worker 3956*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3957*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 3958*344a7f5eSAndroid Build Coastguard Worker native_asinpi(half2 v); 3959*344a7f5eSAndroid Build Coastguard Worker#endif 3960*344a7f5eSAndroid Build Coastguard Worker 3961*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3962*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 3963*344a7f5eSAndroid Build Coastguard Worker native_asinpi(half3 v); 3964*344a7f5eSAndroid Build Coastguard Worker#endif 3965*344a7f5eSAndroid Build Coastguard Worker 3966*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3967*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 3968*344a7f5eSAndroid Build Coastguard Worker native_asinpi(half4 v); 3969*344a7f5eSAndroid Build Coastguard Worker#endif 3970*344a7f5eSAndroid Build Coastguard Worker 3971*344a7f5eSAndroid Build Coastguard Worker/* 3972*344a7f5eSAndroid Build Coastguard Worker * native_atan: Approximate inverse tangent 3973*344a7f5eSAndroid Build Coastguard Worker * 3974*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate inverse tangent, in radians. 3975*344a7f5eSAndroid Build Coastguard Worker * 3976*344a7f5eSAndroid Build Coastguard Worker * See also atan(). 3977*344a7f5eSAndroid Build Coastguard Worker */ 3978*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3979*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 3980*344a7f5eSAndroid Build Coastguard Worker native_atan(float v); 3981*344a7f5eSAndroid Build Coastguard Worker#endif 3982*344a7f5eSAndroid Build Coastguard Worker 3983*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3984*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 3985*344a7f5eSAndroid Build Coastguard Worker native_atan(float2 v); 3986*344a7f5eSAndroid Build Coastguard Worker#endif 3987*344a7f5eSAndroid Build Coastguard Worker 3988*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3989*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 3990*344a7f5eSAndroid Build Coastguard Worker native_atan(float3 v); 3991*344a7f5eSAndroid Build Coastguard Worker#endif 3992*344a7f5eSAndroid Build Coastguard Worker 3993*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 3994*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 3995*344a7f5eSAndroid Build Coastguard Worker native_atan(float4 v); 3996*344a7f5eSAndroid Build Coastguard Worker#endif 3997*344a7f5eSAndroid Build Coastguard Worker 3998*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 3999*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4000*344a7f5eSAndroid Build Coastguard Worker native_atan(half v); 4001*344a7f5eSAndroid Build Coastguard Worker#endif 4002*344a7f5eSAndroid Build Coastguard Worker 4003*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4004*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4005*344a7f5eSAndroid Build Coastguard Worker native_atan(half2 v); 4006*344a7f5eSAndroid Build Coastguard Worker#endif 4007*344a7f5eSAndroid Build Coastguard Worker 4008*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4009*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4010*344a7f5eSAndroid Build Coastguard Worker native_atan(half3 v); 4011*344a7f5eSAndroid Build Coastguard Worker#endif 4012*344a7f5eSAndroid Build Coastguard Worker 4013*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4014*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4015*344a7f5eSAndroid Build Coastguard Worker native_atan(half4 v); 4016*344a7f5eSAndroid Build Coastguard Worker#endif 4017*344a7f5eSAndroid Build Coastguard Worker 4018*344a7f5eSAndroid Build Coastguard Worker/* 4019*344a7f5eSAndroid Build Coastguard Worker * native_atan2: Approximate inverse tangent of a ratio 4020*344a7f5eSAndroid Build Coastguard Worker * 4021*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate inverse tangent of (numerator / denominator), in radians. 4022*344a7f5eSAndroid Build Coastguard Worker * 4023*344a7f5eSAndroid Build Coastguard Worker * See also atan2(). 4024*344a7f5eSAndroid Build Coastguard Worker * 4025*344a7f5eSAndroid Build Coastguard Worker * Parameters: 4026*344a7f5eSAndroid Build Coastguard Worker * numerator: Numerator. 4027*344a7f5eSAndroid Build Coastguard Worker * denominator: Denominator. Can be 0. 4028*344a7f5eSAndroid Build Coastguard Worker */ 4029*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4030*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4031*344a7f5eSAndroid Build Coastguard Worker native_atan2(float numerator, float denominator); 4032*344a7f5eSAndroid Build Coastguard Worker#endif 4033*344a7f5eSAndroid Build Coastguard Worker 4034*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4035*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4036*344a7f5eSAndroid Build Coastguard Worker native_atan2(float2 numerator, float2 denominator); 4037*344a7f5eSAndroid Build Coastguard Worker#endif 4038*344a7f5eSAndroid Build Coastguard Worker 4039*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4040*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4041*344a7f5eSAndroid Build Coastguard Worker native_atan2(float3 numerator, float3 denominator); 4042*344a7f5eSAndroid Build Coastguard Worker#endif 4043*344a7f5eSAndroid Build Coastguard Worker 4044*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4045*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4046*344a7f5eSAndroid Build Coastguard Worker native_atan2(float4 numerator, float4 denominator); 4047*344a7f5eSAndroid Build Coastguard Worker#endif 4048*344a7f5eSAndroid Build Coastguard Worker 4049*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4050*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4051*344a7f5eSAndroid Build Coastguard Worker native_atan2(half numerator, half denominator); 4052*344a7f5eSAndroid Build Coastguard Worker#endif 4053*344a7f5eSAndroid Build Coastguard Worker 4054*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4055*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4056*344a7f5eSAndroid Build Coastguard Worker native_atan2(half2 numerator, half2 denominator); 4057*344a7f5eSAndroid Build Coastguard Worker#endif 4058*344a7f5eSAndroid Build Coastguard Worker 4059*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4060*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4061*344a7f5eSAndroid Build Coastguard Worker native_atan2(half3 numerator, half3 denominator); 4062*344a7f5eSAndroid Build Coastguard Worker#endif 4063*344a7f5eSAndroid Build Coastguard Worker 4064*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4065*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4066*344a7f5eSAndroid Build Coastguard Worker native_atan2(half4 numerator, half4 denominator); 4067*344a7f5eSAndroid Build Coastguard Worker#endif 4068*344a7f5eSAndroid Build Coastguard Worker 4069*344a7f5eSAndroid Build Coastguard Worker/* 4070*344a7f5eSAndroid Build Coastguard Worker * native_atan2pi: Approximate inverse tangent of a ratio, divided by pi 4071*344a7f5eSAndroid Build Coastguard Worker * 4072*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate inverse tangent of (numerator / denominator), 4073*344a7f5eSAndroid Build Coastguard Worker * in radians, divided by pi. 4074*344a7f5eSAndroid Build Coastguard Worker * 4075*344a7f5eSAndroid Build Coastguard Worker * To get an inverse tangent measured in degrees, use atan2pi(n, d) * 180.f. 4076*344a7f5eSAndroid Build Coastguard Worker * 4077*344a7f5eSAndroid Build Coastguard Worker * See also atan2pi(). 4078*344a7f5eSAndroid Build Coastguard Worker * 4079*344a7f5eSAndroid Build Coastguard Worker * Parameters: 4080*344a7f5eSAndroid Build Coastguard Worker * numerator: Numerator. 4081*344a7f5eSAndroid Build Coastguard Worker * denominator: Denominator. Can be 0. 4082*344a7f5eSAndroid Build Coastguard Worker */ 4083*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4084*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4085*344a7f5eSAndroid Build Coastguard Worker native_atan2pi(float numerator, float denominator); 4086*344a7f5eSAndroid Build Coastguard Worker#endif 4087*344a7f5eSAndroid Build Coastguard Worker 4088*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4089*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4090*344a7f5eSAndroid Build Coastguard Worker native_atan2pi(float2 numerator, float2 denominator); 4091*344a7f5eSAndroid Build Coastguard Worker#endif 4092*344a7f5eSAndroid Build Coastguard Worker 4093*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4094*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4095*344a7f5eSAndroid Build Coastguard Worker native_atan2pi(float3 numerator, float3 denominator); 4096*344a7f5eSAndroid Build Coastguard Worker#endif 4097*344a7f5eSAndroid Build Coastguard Worker 4098*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4099*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4100*344a7f5eSAndroid Build Coastguard Worker native_atan2pi(float4 numerator, float4 denominator); 4101*344a7f5eSAndroid Build Coastguard Worker#endif 4102*344a7f5eSAndroid Build Coastguard Worker 4103*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4104*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4105*344a7f5eSAndroid Build Coastguard Worker native_atan2pi(half numerator, half denominator); 4106*344a7f5eSAndroid Build Coastguard Worker#endif 4107*344a7f5eSAndroid Build Coastguard Worker 4108*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4109*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4110*344a7f5eSAndroid Build Coastguard Worker native_atan2pi(half2 numerator, half2 denominator); 4111*344a7f5eSAndroid Build Coastguard Worker#endif 4112*344a7f5eSAndroid Build Coastguard Worker 4113*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4114*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4115*344a7f5eSAndroid Build Coastguard Worker native_atan2pi(half3 numerator, half3 denominator); 4116*344a7f5eSAndroid Build Coastguard Worker#endif 4117*344a7f5eSAndroid Build Coastguard Worker 4118*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4119*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4120*344a7f5eSAndroid Build Coastguard Worker native_atan2pi(half4 numerator, half4 denominator); 4121*344a7f5eSAndroid Build Coastguard Worker#endif 4122*344a7f5eSAndroid Build Coastguard Worker 4123*344a7f5eSAndroid Build Coastguard Worker/* 4124*344a7f5eSAndroid Build Coastguard Worker * native_atanh: Approximate inverse hyperbolic tangent 4125*344a7f5eSAndroid Build Coastguard Worker * 4126*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate inverse hyperbolic tangent, in radians. 4127*344a7f5eSAndroid Build Coastguard Worker * 4128*344a7f5eSAndroid Build Coastguard Worker * See also atanh(). 4129*344a7f5eSAndroid Build Coastguard Worker */ 4130*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4131*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4132*344a7f5eSAndroid Build Coastguard Worker native_atanh(float v); 4133*344a7f5eSAndroid Build Coastguard Worker#endif 4134*344a7f5eSAndroid Build Coastguard Worker 4135*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4136*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4137*344a7f5eSAndroid Build Coastguard Worker native_atanh(float2 v); 4138*344a7f5eSAndroid Build Coastguard Worker#endif 4139*344a7f5eSAndroid Build Coastguard Worker 4140*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4141*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4142*344a7f5eSAndroid Build Coastguard Worker native_atanh(float3 v); 4143*344a7f5eSAndroid Build Coastguard Worker#endif 4144*344a7f5eSAndroid Build Coastguard Worker 4145*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4146*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4147*344a7f5eSAndroid Build Coastguard Worker native_atanh(float4 v); 4148*344a7f5eSAndroid Build Coastguard Worker#endif 4149*344a7f5eSAndroid Build Coastguard Worker 4150*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4151*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4152*344a7f5eSAndroid Build Coastguard Worker native_atanh(half v); 4153*344a7f5eSAndroid Build Coastguard Worker#endif 4154*344a7f5eSAndroid Build Coastguard Worker 4155*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4156*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4157*344a7f5eSAndroid Build Coastguard Worker native_atanh(half2 v); 4158*344a7f5eSAndroid Build Coastguard Worker#endif 4159*344a7f5eSAndroid Build Coastguard Worker 4160*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4161*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4162*344a7f5eSAndroid Build Coastguard Worker native_atanh(half3 v); 4163*344a7f5eSAndroid Build Coastguard Worker#endif 4164*344a7f5eSAndroid Build Coastguard Worker 4165*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4166*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4167*344a7f5eSAndroid Build Coastguard Worker native_atanh(half4 v); 4168*344a7f5eSAndroid Build Coastguard Worker#endif 4169*344a7f5eSAndroid Build Coastguard Worker 4170*344a7f5eSAndroid Build Coastguard Worker/* 4171*344a7f5eSAndroid Build Coastguard Worker * native_atanpi: Approximate inverse tangent divided by pi 4172*344a7f5eSAndroid Build Coastguard Worker * 4173*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate inverse tangent in radians, divided by pi. 4174*344a7f5eSAndroid Build Coastguard Worker * 4175*344a7f5eSAndroid Build Coastguard Worker * To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. 4176*344a7f5eSAndroid Build Coastguard Worker * 4177*344a7f5eSAndroid Build Coastguard Worker * See also atanpi(). 4178*344a7f5eSAndroid Build Coastguard Worker */ 4179*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4180*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4181*344a7f5eSAndroid Build Coastguard Worker native_atanpi(float v); 4182*344a7f5eSAndroid Build Coastguard Worker#endif 4183*344a7f5eSAndroid Build Coastguard Worker 4184*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4185*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4186*344a7f5eSAndroid Build Coastguard Worker native_atanpi(float2 v); 4187*344a7f5eSAndroid Build Coastguard Worker#endif 4188*344a7f5eSAndroid Build Coastguard Worker 4189*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4190*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4191*344a7f5eSAndroid Build Coastguard Worker native_atanpi(float3 v); 4192*344a7f5eSAndroid Build Coastguard Worker#endif 4193*344a7f5eSAndroid Build Coastguard Worker 4194*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4195*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4196*344a7f5eSAndroid Build Coastguard Worker native_atanpi(float4 v); 4197*344a7f5eSAndroid Build Coastguard Worker#endif 4198*344a7f5eSAndroid Build Coastguard Worker 4199*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4200*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4201*344a7f5eSAndroid Build Coastguard Worker native_atanpi(half v); 4202*344a7f5eSAndroid Build Coastguard Worker#endif 4203*344a7f5eSAndroid Build Coastguard Worker 4204*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4205*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4206*344a7f5eSAndroid Build Coastguard Worker native_atanpi(half2 v); 4207*344a7f5eSAndroid Build Coastguard Worker#endif 4208*344a7f5eSAndroid Build Coastguard Worker 4209*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4210*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4211*344a7f5eSAndroid Build Coastguard Worker native_atanpi(half3 v); 4212*344a7f5eSAndroid Build Coastguard Worker#endif 4213*344a7f5eSAndroid Build Coastguard Worker 4214*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4215*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4216*344a7f5eSAndroid Build Coastguard Worker native_atanpi(half4 v); 4217*344a7f5eSAndroid Build Coastguard Worker#endif 4218*344a7f5eSAndroid Build Coastguard Worker 4219*344a7f5eSAndroid Build Coastguard Worker/* 4220*344a7f5eSAndroid Build Coastguard Worker * native_cbrt: Approximate cube root 4221*344a7f5eSAndroid Build Coastguard Worker * 4222*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate cubic root. 4223*344a7f5eSAndroid Build Coastguard Worker * 4224*344a7f5eSAndroid Build Coastguard Worker * See also cbrt(). 4225*344a7f5eSAndroid Build Coastguard Worker */ 4226*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4227*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4228*344a7f5eSAndroid Build Coastguard Worker native_cbrt(float v); 4229*344a7f5eSAndroid Build Coastguard Worker#endif 4230*344a7f5eSAndroid Build Coastguard Worker 4231*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4232*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4233*344a7f5eSAndroid Build Coastguard Worker native_cbrt(float2 v); 4234*344a7f5eSAndroid Build Coastguard Worker#endif 4235*344a7f5eSAndroid Build Coastguard Worker 4236*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4237*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4238*344a7f5eSAndroid Build Coastguard Worker native_cbrt(float3 v); 4239*344a7f5eSAndroid Build Coastguard Worker#endif 4240*344a7f5eSAndroid Build Coastguard Worker 4241*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4242*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4243*344a7f5eSAndroid Build Coastguard Worker native_cbrt(float4 v); 4244*344a7f5eSAndroid Build Coastguard Worker#endif 4245*344a7f5eSAndroid Build Coastguard Worker 4246*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4247*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4248*344a7f5eSAndroid Build Coastguard Worker native_cbrt(half v); 4249*344a7f5eSAndroid Build Coastguard Worker#endif 4250*344a7f5eSAndroid Build Coastguard Worker 4251*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4252*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4253*344a7f5eSAndroid Build Coastguard Worker native_cbrt(half2 v); 4254*344a7f5eSAndroid Build Coastguard Worker#endif 4255*344a7f5eSAndroid Build Coastguard Worker 4256*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4257*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4258*344a7f5eSAndroid Build Coastguard Worker native_cbrt(half3 v); 4259*344a7f5eSAndroid Build Coastguard Worker#endif 4260*344a7f5eSAndroid Build Coastguard Worker 4261*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4262*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4263*344a7f5eSAndroid Build Coastguard Worker native_cbrt(half4 v); 4264*344a7f5eSAndroid Build Coastguard Worker#endif 4265*344a7f5eSAndroid Build Coastguard Worker 4266*344a7f5eSAndroid Build Coastguard Worker/* 4267*344a7f5eSAndroid Build Coastguard Worker * native_cos: Approximate cosine 4268*344a7f5eSAndroid Build Coastguard Worker * 4269*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate cosine of an angle measured in radians. 4270*344a7f5eSAndroid Build Coastguard Worker * 4271*344a7f5eSAndroid Build Coastguard Worker * See also cos(). 4272*344a7f5eSAndroid Build Coastguard Worker */ 4273*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4274*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4275*344a7f5eSAndroid Build Coastguard Worker native_cos(float v); 4276*344a7f5eSAndroid Build Coastguard Worker#endif 4277*344a7f5eSAndroid Build Coastguard Worker 4278*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4279*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4280*344a7f5eSAndroid Build Coastguard Worker native_cos(float2 v); 4281*344a7f5eSAndroid Build Coastguard Worker#endif 4282*344a7f5eSAndroid Build Coastguard Worker 4283*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4284*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4285*344a7f5eSAndroid Build Coastguard Worker native_cos(float3 v); 4286*344a7f5eSAndroid Build Coastguard Worker#endif 4287*344a7f5eSAndroid Build Coastguard Worker 4288*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4289*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4290*344a7f5eSAndroid Build Coastguard Worker native_cos(float4 v); 4291*344a7f5eSAndroid Build Coastguard Worker#endif 4292*344a7f5eSAndroid Build Coastguard Worker 4293*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4294*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4295*344a7f5eSAndroid Build Coastguard Worker native_cos(half v); 4296*344a7f5eSAndroid Build Coastguard Worker#endif 4297*344a7f5eSAndroid Build Coastguard Worker 4298*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4299*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4300*344a7f5eSAndroid Build Coastguard Worker native_cos(half2 v); 4301*344a7f5eSAndroid Build Coastguard Worker#endif 4302*344a7f5eSAndroid Build Coastguard Worker 4303*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4304*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4305*344a7f5eSAndroid Build Coastguard Worker native_cos(half3 v); 4306*344a7f5eSAndroid Build Coastguard Worker#endif 4307*344a7f5eSAndroid Build Coastguard Worker 4308*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4309*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4310*344a7f5eSAndroid Build Coastguard Worker native_cos(half4 v); 4311*344a7f5eSAndroid Build Coastguard Worker#endif 4312*344a7f5eSAndroid Build Coastguard Worker 4313*344a7f5eSAndroid Build Coastguard Worker/* 4314*344a7f5eSAndroid Build Coastguard Worker * native_cosh: Approximate hypebolic cosine 4315*344a7f5eSAndroid Build Coastguard Worker * 4316*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate hypebolic cosine. 4317*344a7f5eSAndroid Build Coastguard Worker * 4318*344a7f5eSAndroid Build Coastguard Worker * See also cosh(). 4319*344a7f5eSAndroid Build Coastguard Worker */ 4320*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4321*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4322*344a7f5eSAndroid Build Coastguard Worker native_cosh(float v); 4323*344a7f5eSAndroid Build Coastguard Worker#endif 4324*344a7f5eSAndroid Build Coastguard Worker 4325*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4326*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4327*344a7f5eSAndroid Build Coastguard Worker native_cosh(float2 v); 4328*344a7f5eSAndroid Build Coastguard Worker#endif 4329*344a7f5eSAndroid Build Coastguard Worker 4330*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4331*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4332*344a7f5eSAndroid Build Coastguard Worker native_cosh(float3 v); 4333*344a7f5eSAndroid Build Coastguard Worker#endif 4334*344a7f5eSAndroid Build Coastguard Worker 4335*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4336*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4337*344a7f5eSAndroid Build Coastguard Worker native_cosh(float4 v); 4338*344a7f5eSAndroid Build Coastguard Worker#endif 4339*344a7f5eSAndroid Build Coastguard Worker 4340*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4341*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4342*344a7f5eSAndroid Build Coastguard Worker native_cosh(half v); 4343*344a7f5eSAndroid Build Coastguard Worker#endif 4344*344a7f5eSAndroid Build Coastguard Worker 4345*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4346*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4347*344a7f5eSAndroid Build Coastguard Worker native_cosh(half2 v); 4348*344a7f5eSAndroid Build Coastguard Worker#endif 4349*344a7f5eSAndroid Build Coastguard Worker 4350*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4351*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4352*344a7f5eSAndroid Build Coastguard Worker native_cosh(half3 v); 4353*344a7f5eSAndroid Build Coastguard Worker#endif 4354*344a7f5eSAndroid Build Coastguard Worker 4355*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4356*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4357*344a7f5eSAndroid Build Coastguard Worker native_cosh(half4 v); 4358*344a7f5eSAndroid Build Coastguard Worker#endif 4359*344a7f5eSAndroid Build Coastguard Worker 4360*344a7f5eSAndroid Build Coastguard Worker/* 4361*344a7f5eSAndroid Build Coastguard Worker * native_cospi: Approximate cosine of a number multiplied by pi 4362*344a7f5eSAndroid Build Coastguard Worker * 4363*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate cosine of (v * pi), where (v * pi) is measured in radians. 4364*344a7f5eSAndroid Build Coastguard Worker * 4365*344a7f5eSAndroid Build Coastguard Worker * To get the cosine of a value measured in degrees, call cospi(v / 180.f). 4366*344a7f5eSAndroid Build Coastguard Worker * 4367*344a7f5eSAndroid Build Coastguard Worker * See also cospi(). 4368*344a7f5eSAndroid Build Coastguard Worker */ 4369*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4370*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4371*344a7f5eSAndroid Build Coastguard Worker native_cospi(float v); 4372*344a7f5eSAndroid Build Coastguard Worker#endif 4373*344a7f5eSAndroid Build Coastguard Worker 4374*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4375*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4376*344a7f5eSAndroid Build Coastguard Worker native_cospi(float2 v); 4377*344a7f5eSAndroid Build Coastguard Worker#endif 4378*344a7f5eSAndroid Build Coastguard Worker 4379*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4380*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4381*344a7f5eSAndroid Build Coastguard Worker native_cospi(float3 v); 4382*344a7f5eSAndroid Build Coastguard Worker#endif 4383*344a7f5eSAndroid Build Coastguard Worker 4384*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4385*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4386*344a7f5eSAndroid Build Coastguard Worker native_cospi(float4 v); 4387*344a7f5eSAndroid Build Coastguard Worker#endif 4388*344a7f5eSAndroid Build Coastguard Worker 4389*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4390*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4391*344a7f5eSAndroid Build Coastguard Worker native_cospi(half v); 4392*344a7f5eSAndroid Build Coastguard Worker#endif 4393*344a7f5eSAndroid Build Coastguard Worker 4394*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4395*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4396*344a7f5eSAndroid Build Coastguard Worker native_cospi(half2 v); 4397*344a7f5eSAndroid Build Coastguard Worker#endif 4398*344a7f5eSAndroid Build Coastguard Worker 4399*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4400*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4401*344a7f5eSAndroid Build Coastguard Worker native_cospi(half3 v); 4402*344a7f5eSAndroid Build Coastguard Worker#endif 4403*344a7f5eSAndroid Build Coastguard Worker 4404*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4405*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4406*344a7f5eSAndroid Build Coastguard Worker native_cospi(half4 v); 4407*344a7f5eSAndroid Build Coastguard Worker#endif 4408*344a7f5eSAndroid Build Coastguard Worker 4409*344a7f5eSAndroid Build Coastguard Worker/* 4410*344a7f5eSAndroid Build Coastguard Worker * native_divide: Approximate division 4411*344a7f5eSAndroid Build Coastguard Worker * 4412*344a7f5eSAndroid Build Coastguard Worker * Computes the approximate division of two values. 4413*344a7f5eSAndroid Build Coastguard Worker */ 4414*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4415*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4416*344a7f5eSAndroid Build Coastguard Worker native_divide(float left_vector, float right_vector); 4417*344a7f5eSAndroid Build Coastguard Worker#endif 4418*344a7f5eSAndroid Build Coastguard Worker 4419*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4420*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4421*344a7f5eSAndroid Build Coastguard Worker native_divide(float2 left_vector, float2 right_vector); 4422*344a7f5eSAndroid Build Coastguard Worker#endif 4423*344a7f5eSAndroid Build Coastguard Worker 4424*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4425*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4426*344a7f5eSAndroid Build Coastguard Worker native_divide(float3 left_vector, float3 right_vector); 4427*344a7f5eSAndroid Build Coastguard Worker#endif 4428*344a7f5eSAndroid Build Coastguard Worker 4429*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4430*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4431*344a7f5eSAndroid Build Coastguard Worker native_divide(float4 left_vector, float4 right_vector); 4432*344a7f5eSAndroid Build Coastguard Worker#endif 4433*344a7f5eSAndroid Build Coastguard Worker 4434*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4435*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4436*344a7f5eSAndroid Build Coastguard Worker native_divide(half left_vector, half right_vector); 4437*344a7f5eSAndroid Build Coastguard Worker#endif 4438*344a7f5eSAndroid Build Coastguard Worker 4439*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4440*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4441*344a7f5eSAndroid Build Coastguard Worker native_divide(half2 left_vector, half2 right_vector); 4442*344a7f5eSAndroid Build Coastguard Worker#endif 4443*344a7f5eSAndroid Build Coastguard Worker 4444*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4445*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4446*344a7f5eSAndroid Build Coastguard Worker native_divide(half3 left_vector, half3 right_vector); 4447*344a7f5eSAndroid Build Coastguard Worker#endif 4448*344a7f5eSAndroid Build Coastguard Worker 4449*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4450*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4451*344a7f5eSAndroid Build Coastguard Worker native_divide(half4 left_vector, half4 right_vector); 4452*344a7f5eSAndroid Build Coastguard Worker#endif 4453*344a7f5eSAndroid Build Coastguard Worker 4454*344a7f5eSAndroid Build Coastguard Worker/* 4455*344a7f5eSAndroid Build Coastguard Worker * native_exp: Approximate e raised to a number 4456*344a7f5eSAndroid Build Coastguard Worker * 4457*344a7f5eSAndroid Build Coastguard Worker * Fast approximate exp. 4458*344a7f5eSAndroid Build Coastguard Worker * 4459*344a7f5eSAndroid Build Coastguard Worker * It is valid for inputs from -86.f to 86.f. The precision is no worse than what would be 4460*344a7f5eSAndroid Build Coastguard Worker * expected from using 16 bit floating point values. 4461*344a7f5eSAndroid Build Coastguard Worker * 4462*344a7f5eSAndroid Build Coastguard Worker * See also exp(). 4463*344a7f5eSAndroid Build Coastguard Worker */ 4464*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4465*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4466*344a7f5eSAndroid Build Coastguard Worker native_exp(float v); 4467*344a7f5eSAndroid Build Coastguard Worker#endif 4468*344a7f5eSAndroid Build Coastguard Worker 4469*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4470*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4471*344a7f5eSAndroid Build Coastguard Worker native_exp(float2 v); 4472*344a7f5eSAndroid Build Coastguard Worker#endif 4473*344a7f5eSAndroid Build Coastguard Worker 4474*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4475*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4476*344a7f5eSAndroid Build Coastguard Worker native_exp(float3 v); 4477*344a7f5eSAndroid Build Coastguard Worker#endif 4478*344a7f5eSAndroid Build Coastguard Worker 4479*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4480*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4481*344a7f5eSAndroid Build Coastguard Worker native_exp(float4 v); 4482*344a7f5eSAndroid Build Coastguard Worker#endif 4483*344a7f5eSAndroid Build Coastguard Worker 4484*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4485*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4486*344a7f5eSAndroid Build Coastguard Worker native_exp(half v); 4487*344a7f5eSAndroid Build Coastguard Worker#endif 4488*344a7f5eSAndroid Build Coastguard Worker 4489*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4490*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4491*344a7f5eSAndroid Build Coastguard Worker native_exp(half2 v); 4492*344a7f5eSAndroid Build Coastguard Worker#endif 4493*344a7f5eSAndroid Build Coastguard Worker 4494*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4495*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4496*344a7f5eSAndroid Build Coastguard Worker native_exp(half3 v); 4497*344a7f5eSAndroid Build Coastguard Worker#endif 4498*344a7f5eSAndroid Build Coastguard Worker 4499*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4500*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4501*344a7f5eSAndroid Build Coastguard Worker native_exp(half4 v); 4502*344a7f5eSAndroid Build Coastguard Worker#endif 4503*344a7f5eSAndroid Build Coastguard Worker 4504*344a7f5eSAndroid Build Coastguard Worker/* 4505*344a7f5eSAndroid Build Coastguard Worker * native_exp10: Approximate 10 raised to a number 4506*344a7f5eSAndroid Build Coastguard Worker * 4507*344a7f5eSAndroid Build Coastguard Worker * Fast approximate exp10. 4508*344a7f5eSAndroid Build Coastguard Worker * 4509*344a7f5eSAndroid Build Coastguard Worker * It is valid for inputs from -37.f to 37.f. The precision is no worse than what would be 4510*344a7f5eSAndroid Build Coastguard Worker * expected from using 16 bit floating point values. 4511*344a7f5eSAndroid Build Coastguard Worker * 4512*344a7f5eSAndroid Build Coastguard Worker * See also exp10(). 4513*344a7f5eSAndroid Build Coastguard Worker */ 4514*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4515*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4516*344a7f5eSAndroid Build Coastguard Worker native_exp10(float v); 4517*344a7f5eSAndroid Build Coastguard Worker#endif 4518*344a7f5eSAndroid Build Coastguard Worker 4519*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4520*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4521*344a7f5eSAndroid Build Coastguard Worker native_exp10(float2 v); 4522*344a7f5eSAndroid Build Coastguard Worker#endif 4523*344a7f5eSAndroid Build Coastguard Worker 4524*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4525*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4526*344a7f5eSAndroid Build Coastguard Worker native_exp10(float3 v); 4527*344a7f5eSAndroid Build Coastguard Worker#endif 4528*344a7f5eSAndroid Build Coastguard Worker 4529*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4530*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4531*344a7f5eSAndroid Build Coastguard Worker native_exp10(float4 v); 4532*344a7f5eSAndroid Build Coastguard Worker#endif 4533*344a7f5eSAndroid Build Coastguard Worker 4534*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4535*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4536*344a7f5eSAndroid Build Coastguard Worker native_exp10(half v); 4537*344a7f5eSAndroid Build Coastguard Worker#endif 4538*344a7f5eSAndroid Build Coastguard Worker 4539*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4540*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4541*344a7f5eSAndroid Build Coastguard Worker native_exp10(half2 v); 4542*344a7f5eSAndroid Build Coastguard Worker#endif 4543*344a7f5eSAndroid Build Coastguard Worker 4544*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4545*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4546*344a7f5eSAndroid Build Coastguard Worker native_exp10(half3 v); 4547*344a7f5eSAndroid Build Coastguard Worker#endif 4548*344a7f5eSAndroid Build Coastguard Worker 4549*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4550*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4551*344a7f5eSAndroid Build Coastguard Worker native_exp10(half4 v); 4552*344a7f5eSAndroid Build Coastguard Worker#endif 4553*344a7f5eSAndroid Build Coastguard Worker 4554*344a7f5eSAndroid Build Coastguard Worker/* 4555*344a7f5eSAndroid Build Coastguard Worker * native_exp2: Approximate 2 raised to a number 4556*344a7f5eSAndroid Build Coastguard Worker * 4557*344a7f5eSAndroid Build Coastguard Worker * Fast approximate exp2. 4558*344a7f5eSAndroid Build Coastguard Worker * 4559*344a7f5eSAndroid Build Coastguard Worker * It is valid for inputs from -125.f to 125.f. The precision is no worse than what would be 4560*344a7f5eSAndroid Build Coastguard Worker * expected from using 16 bit floating point values. 4561*344a7f5eSAndroid Build Coastguard Worker * 4562*344a7f5eSAndroid Build Coastguard Worker * See also exp2(). 4563*344a7f5eSAndroid Build Coastguard Worker */ 4564*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4565*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4566*344a7f5eSAndroid Build Coastguard Worker native_exp2(float v); 4567*344a7f5eSAndroid Build Coastguard Worker#endif 4568*344a7f5eSAndroid Build Coastguard Worker 4569*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4570*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4571*344a7f5eSAndroid Build Coastguard Worker native_exp2(float2 v); 4572*344a7f5eSAndroid Build Coastguard Worker#endif 4573*344a7f5eSAndroid Build Coastguard Worker 4574*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4575*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4576*344a7f5eSAndroid Build Coastguard Worker native_exp2(float3 v); 4577*344a7f5eSAndroid Build Coastguard Worker#endif 4578*344a7f5eSAndroid Build Coastguard Worker 4579*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4580*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4581*344a7f5eSAndroid Build Coastguard Worker native_exp2(float4 v); 4582*344a7f5eSAndroid Build Coastguard Worker#endif 4583*344a7f5eSAndroid Build Coastguard Worker 4584*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4585*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4586*344a7f5eSAndroid Build Coastguard Worker native_exp2(half v); 4587*344a7f5eSAndroid Build Coastguard Worker#endif 4588*344a7f5eSAndroid Build Coastguard Worker 4589*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4590*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4591*344a7f5eSAndroid Build Coastguard Worker native_exp2(half2 v); 4592*344a7f5eSAndroid Build Coastguard Worker#endif 4593*344a7f5eSAndroid Build Coastguard Worker 4594*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4595*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4596*344a7f5eSAndroid Build Coastguard Worker native_exp2(half3 v); 4597*344a7f5eSAndroid Build Coastguard Worker#endif 4598*344a7f5eSAndroid Build Coastguard Worker 4599*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4600*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4601*344a7f5eSAndroid Build Coastguard Worker native_exp2(half4 v); 4602*344a7f5eSAndroid Build Coastguard Worker#endif 4603*344a7f5eSAndroid Build Coastguard Worker 4604*344a7f5eSAndroid Build Coastguard Worker/* 4605*344a7f5eSAndroid Build Coastguard Worker * native_expm1: Approximate e raised to a number minus one 4606*344a7f5eSAndroid Build Coastguard Worker * 4607*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate (e ^ v) - 1. 4608*344a7f5eSAndroid Build Coastguard Worker * 4609*344a7f5eSAndroid Build Coastguard Worker * See also expm1(). 4610*344a7f5eSAndroid Build Coastguard Worker */ 4611*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4612*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4613*344a7f5eSAndroid Build Coastguard Worker native_expm1(float v); 4614*344a7f5eSAndroid Build Coastguard Worker#endif 4615*344a7f5eSAndroid Build Coastguard Worker 4616*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4617*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4618*344a7f5eSAndroid Build Coastguard Worker native_expm1(float2 v); 4619*344a7f5eSAndroid Build Coastguard Worker#endif 4620*344a7f5eSAndroid Build Coastguard Worker 4621*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4622*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4623*344a7f5eSAndroid Build Coastguard Worker native_expm1(float3 v); 4624*344a7f5eSAndroid Build Coastguard Worker#endif 4625*344a7f5eSAndroid Build Coastguard Worker 4626*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4627*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4628*344a7f5eSAndroid Build Coastguard Worker native_expm1(float4 v); 4629*344a7f5eSAndroid Build Coastguard Worker#endif 4630*344a7f5eSAndroid Build Coastguard Worker 4631*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4632*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4633*344a7f5eSAndroid Build Coastguard Worker native_expm1(half v); 4634*344a7f5eSAndroid Build Coastguard Worker#endif 4635*344a7f5eSAndroid Build Coastguard Worker 4636*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4637*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4638*344a7f5eSAndroid Build Coastguard Worker native_expm1(half2 v); 4639*344a7f5eSAndroid Build Coastguard Worker#endif 4640*344a7f5eSAndroid Build Coastguard Worker 4641*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4642*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4643*344a7f5eSAndroid Build Coastguard Worker native_expm1(half3 v); 4644*344a7f5eSAndroid Build Coastguard Worker#endif 4645*344a7f5eSAndroid Build Coastguard Worker 4646*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4647*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4648*344a7f5eSAndroid Build Coastguard Worker native_expm1(half4 v); 4649*344a7f5eSAndroid Build Coastguard Worker#endif 4650*344a7f5eSAndroid Build Coastguard Worker 4651*344a7f5eSAndroid Build Coastguard Worker/* 4652*344a7f5eSAndroid Build Coastguard Worker * native_hypot: Approximate hypotenuse 4653*344a7f5eSAndroid Build Coastguard Worker * 4654*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate native_sqrt(a * a + b * b) 4655*344a7f5eSAndroid Build Coastguard Worker * 4656*344a7f5eSAndroid Build Coastguard Worker * See also hypot(). 4657*344a7f5eSAndroid Build Coastguard Worker */ 4658*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4659*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4660*344a7f5eSAndroid Build Coastguard Worker native_hypot(float a, float b); 4661*344a7f5eSAndroid Build Coastguard Worker#endif 4662*344a7f5eSAndroid Build Coastguard Worker 4663*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4664*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4665*344a7f5eSAndroid Build Coastguard Worker native_hypot(float2 a, float2 b); 4666*344a7f5eSAndroid Build Coastguard Worker#endif 4667*344a7f5eSAndroid Build Coastguard Worker 4668*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4669*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4670*344a7f5eSAndroid Build Coastguard Worker native_hypot(float3 a, float3 b); 4671*344a7f5eSAndroid Build Coastguard Worker#endif 4672*344a7f5eSAndroid Build Coastguard Worker 4673*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4674*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4675*344a7f5eSAndroid Build Coastguard Worker native_hypot(float4 a, float4 b); 4676*344a7f5eSAndroid Build Coastguard Worker#endif 4677*344a7f5eSAndroid Build Coastguard Worker 4678*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4679*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4680*344a7f5eSAndroid Build Coastguard Worker native_hypot(half a, half b); 4681*344a7f5eSAndroid Build Coastguard Worker#endif 4682*344a7f5eSAndroid Build Coastguard Worker 4683*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4684*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4685*344a7f5eSAndroid Build Coastguard Worker native_hypot(half2 a, half2 b); 4686*344a7f5eSAndroid Build Coastguard Worker#endif 4687*344a7f5eSAndroid Build Coastguard Worker 4688*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4689*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4690*344a7f5eSAndroid Build Coastguard Worker native_hypot(half3 a, half3 b); 4691*344a7f5eSAndroid Build Coastguard Worker#endif 4692*344a7f5eSAndroid Build Coastguard Worker 4693*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4694*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4695*344a7f5eSAndroid Build Coastguard Worker native_hypot(half4 a, half4 b); 4696*344a7f5eSAndroid Build Coastguard Worker#endif 4697*344a7f5eSAndroid Build Coastguard Worker 4698*344a7f5eSAndroid Build Coastguard Worker/* 4699*344a7f5eSAndroid Build Coastguard Worker * native_log: Approximate natural logarithm 4700*344a7f5eSAndroid Build Coastguard Worker * 4701*344a7f5eSAndroid Build Coastguard Worker * Fast approximate log. 4702*344a7f5eSAndroid Build Coastguard Worker * 4703*344a7f5eSAndroid Build Coastguard Worker * It is not accurate for values very close to zero. 4704*344a7f5eSAndroid Build Coastguard Worker * 4705*344a7f5eSAndroid Build Coastguard Worker * See also log(). 4706*344a7f5eSAndroid Build Coastguard Worker */ 4707*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4708*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4709*344a7f5eSAndroid Build Coastguard Worker native_log(float v); 4710*344a7f5eSAndroid Build Coastguard Worker#endif 4711*344a7f5eSAndroid Build Coastguard Worker 4712*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4713*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4714*344a7f5eSAndroid Build Coastguard Worker native_log(float2 v); 4715*344a7f5eSAndroid Build Coastguard Worker#endif 4716*344a7f5eSAndroid Build Coastguard Worker 4717*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4718*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4719*344a7f5eSAndroid Build Coastguard Worker native_log(float3 v); 4720*344a7f5eSAndroid Build Coastguard Worker#endif 4721*344a7f5eSAndroid Build Coastguard Worker 4722*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4723*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4724*344a7f5eSAndroid Build Coastguard Worker native_log(float4 v); 4725*344a7f5eSAndroid Build Coastguard Worker#endif 4726*344a7f5eSAndroid Build Coastguard Worker 4727*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4728*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4729*344a7f5eSAndroid Build Coastguard Worker native_log(half v); 4730*344a7f5eSAndroid Build Coastguard Worker#endif 4731*344a7f5eSAndroid Build Coastguard Worker 4732*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4733*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4734*344a7f5eSAndroid Build Coastguard Worker native_log(half2 v); 4735*344a7f5eSAndroid Build Coastguard Worker#endif 4736*344a7f5eSAndroid Build Coastguard Worker 4737*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4738*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4739*344a7f5eSAndroid Build Coastguard Worker native_log(half3 v); 4740*344a7f5eSAndroid Build Coastguard Worker#endif 4741*344a7f5eSAndroid Build Coastguard Worker 4742*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4743*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4744*344a7f5eSAndroid Build Coastguard Worker native_log(half4 v); 4745*344a7f5eSAndroid Build Coastguard Worker#endif 4746*344a7f5eSAndroid Build Coastguard Worker 4747*344a7f5eSAndroid Build Coastguard Worker/* 4748*344a7f5eSAndroid Build Coastguard Worker * native_log10: Approximate base 10 logarithm 4749*344a7f5eSAndroid Build Coastguard Worker * 4750*344a7f5eSAndroid Build Coastguard Worker * Fast approximate log10. 4751*344a7f5eSAndroid Build Coastguard Worker * 4752*344a7f5eSAndroid Build Coastguard Worker * It is not accurate for values very close to zero. 4753*344a7f5eSAndroid Build Coastguard Worker * 4754*344a7f5eSAndroid Build Coastguard Worker * See also log10(). 4755*344a7f5eSAndroid Build Coastguard Worker */ 4756*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4757*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4758*344a7f5eSAndroid Build Coastguard Worker native_log10(float v); 4759*344a7f5eSAndroid Build Coastguard Worker#endif 4760*344a7f5eSAndroid Build Coastguard Worker 4761*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4762*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4763*344a7f5eSAndroid Build Coastguard Worker native_log10(float2 v); 4764*344a7f5eSAndroid Build Coastguard Worker#endif 4765*344a7f5eSAndroid Build Coastguard Worker 4766*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4767*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4768*344a7f5eSAndroid Build Coastguard Worker native_log10(float3 v); 4769*344a7f5eSAndroid Build Coastguard Worker#endif 4770*344a7f5eSAndroid Build Coastguard Worker 4771*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4772*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4773*344a7f5eSAndroid Build Coastguard Worker native_log10(float4 v); 4774*344a7f5eSAndroid Build Coastguard Worker#endif 4775*344a7f5eSAndroid Build Coastguard Worker 4776*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4777*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4778*344a7f5eSAndroid Build Coastguard Worker native_log10(half v); 4779*344a7f5eSAndroid Build Coastguard Worker#endif 4780*344a7f5eSAndroid Build Coastguard Worker 4781*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4782*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4783*344a7f5eSAndroid Build Coastguard Worker native_log10(half2 v); 4784*344a7f5eSAndroid Build Coastguard Worker#endif 4785*344a7f5eSAndroid Build Coastguard Worker 4786*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4787*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4788*344a7f5eSAndroid Build Coastguard Worker native_log10(half3 v); 4789*344a7f5eSAndroid Build Coastguard Worker#endif 4790*344a7f5eSAndroid Build Coastguard Worker 4791*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4792*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4793*344a7f5eSAndroid Build Coastguard Worker native_log10(half4 v); 4794*344a7f5eSAndroid Build Coastguard Worker#endif 4795*344a7f5eSAndroid Build Coastguard Worker 4796*344a7f5eSAndroid Build Coastguard Worker/* 4797*344a7f5eSAndroid Build Coastguard Worker * native_log1p: Approximate natural logarithm of a value plus 1 4798*344a7f5eSAndroid Build Coastguard Worker * 4799*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate natural logarithm of (v + 1.0f) 4800*344a7f5eSAndroid Build Coastguard Worker * 4801*344a7f5eSAndroid Build Coastguard Worker * See also log1p(). 4802*344a7f5eSAndroid Build Coastguard Worker */ 4803*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4804*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4805*344a7f5eSAndroid Build Coastguard Worker native_log1p(float v); 4806*344a7f5eSAndroid Build Coastguard Worker#endif 4807*344a7f5eSAndroid Build Coastguard Worker 4808*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4809*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4810*344a7f5eSAndroid Build Coastguard Worker native_log1p(float2 v); 4811*344a7f5eSAndroid Build Coastguard Worker#endif 4812*344a7f5eSAndroid Build Coastguard Worker 4813*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4814*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4815*344a7f5eSAndroid Build Coastguard Worker native_log1p(float3 v); 4816*344a7f5eSAndroid Build Coastguard Worker#endif 4817*344a7f5eSAndroid Build Coastguard Worker 4818*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4819*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4820*344a7f5eSAndroid Build Coastguard Worker native_log1p(float4 v); 4821*344a7f5eSAndroid Build Coastguard Worker#endif 4822*344a7f5eSAndroid Build Coastguard Worker 4823*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4824*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4825*344a7f5eSAndroid Build Coastguard Worker native_log1p(half v); 4826*344a7f5eSAndroid Build Coastguard Worker#endif 4827*344a7f5eSAndroid Build Coastguard Worker 4828*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4829*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4830*344a7f5eSAndroid Build Coastguard Worker native_log1p(half2 v); 4831*344a7f5eSAndroid Build Coastguard Worker#endif 4832*344a7f5eSAndroid Build Coastguard Worker 4833*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4834*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4835*344a7f5eSAndroid Build Coastguard Worker native_log1p(half3 v); 4836*344a7f5eSAndroid Build Coastguard Worker#endif 4837*344a7f5eSAndroid Build Coastguard Worker 4838*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4839*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4840*344a7f5eSAndroid Build Coastguard Worker native_log1p(half4 v); 4841*344a7f5eSAndroid Build Coastguard Worker#endif 4842*344a7f5eSAndroid Build Coastguard Worker 4843*344a7f5eSAndroid Build Coastguard Worker/* 4844*344a7f5eSAndroid Build Coastguard Worker * native_log2: Approximate base 2 logarithm 4845*344a7f5eSAndroid Build Coastguard Worker * 4846*344a7f5eSAndroid Build Coastguard Worker * Fast approximate log2. 4847*344a7f5eSAndroid Build Coastguard Worker * 4848*344a7f5eSAndroid Build Coastguard Worker * It is not accurate for values very close to zero. 4849*344a7f5eSAndroid Build Coastguard Worker * 4850*344a7f5eSAndroid Build Coastguard Worker * See also log2(). 4851*344a7f5eSAndroid Build Coastguard Worker */ 4852*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4853*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4854*344a7f5eSAndroid Build Coastguard Worker native_log2(float v); 4855*344a7f5eSAndroid Build Coastguard Worker#endif 4856*344a7f5eSAndroid Build Coastguard Worker 4857*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4858*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4859*344a7f5eSAndroid Build Coastguard Worker native_log2(float2 v); 4860*344a7f5eSAndroid Build Coastguard Worker#endif 4861*344a7f5eSAndroid Build Coastguard Worker 4862*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4863*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4864*344a7f5eSAndroid Build Coastguard Worker native_log2(float3 v); 4865*344a7f5eSAndroid Build Coastguard Worker#endif 4866*344a7f5eSAndroid Build Coastguard Worker 4867*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4868*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4869*344a7f5eSAndroid Build Coastguard Worker native_log2(float4 v); 4870*344a7f5eSAndroid Build Coastguard Worker#endif 4871*344a7f5eSAndroid Build Coastguard Worker 4872*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4873*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4874*344a7f5eSAndroid Build Coastguard Worker native_log2(half v); 4875*344a7f5eSAndroid Build Coastguard Worker#endif 4876*344a7f5eSAndroid Build Coastguard Worker 4877*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4878*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4879*344a7f5eSAndroid Build Coastguard Worker native_log2(half2 v); 4880*344a7f5eSAndroid Build Coastguard Worker#endif 4881*344a7f5eSAndroid Build Coastguard Worker 4882*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4883*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4884*344a7f5eSAndroid Build Coastguard Worker native_log2(half3 v); 4885*344a7f5eSAndroid Build Coastguard Worker#endif 4886*344a7f5eSAndroid Build Coastguard Worker 4887*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4888*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4889*344a7f5eSAndroid Build Coastguard Worker native_log2(half4 v); 4890*344a7f5eSAndroid Build Coastguard Worker#endif 4891*344a7f5eSAndroid Build Coastguard Worker 4892*344a7f5eSAndroid Build Coastguard Worker/* 4893*344a7f5eSAndroid Build Coastguard Worker * native_powr: Approximate positive base raised to an exponent 4894*344a7f5eSAndroid Build Coastguard Worker * 4895*344a7f5eSAndroid Build Coastguard Worker * Fast approximate (base ^ exponent). 4896*344a7f5eSAndroid Build Coastguard Worker * 4897*344a7f5eSAndroid Build Coastguard Worker * See also powr(). 4898*344a7f5eSAndroid Build Coastguard Worker * 4899*344a7f5eSAndroid Build Coastguard Worker * Parameters: 4900*344a7f5eSAndroid Build Coastguard Worker * base: Must be between 0.f and 256.f. The function is not accurate for values very close to zero. 4901*344a7f5eSAndroid Build Coastguard Worker * exponent: Must be between -15.f and 15.f. 4902*344a7f5eSAndroid Build Coastguard Worker */ 4903*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4904*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4905*344a7f5eSAndroid Build Coastguard Worker native_powr(float base, float exponent); 4906*344a7f5eSAndroid Build Coastguard Worker#endif 4907*344a7f5eSAndroid Build Coastguard Worker 4908*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4909*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4910*344a7f5eSAndroid Build Coastguard Worker native_powr(float2 base, float2 exponent); 4911*344a7f5eSAndroid Build Coastguard Worker#endif 4912*344a7f5eSAndroid Build Coastguard Worker 4913*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4914*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4915*344a7f5eSAndroid Build Coastguard Worker native_powr(float3 base, float3 exponent); 4916*344a7f5eSAndroid Build Coastguard Worker#endif 4917*344a7f5eSAndroid Build Coastguard Worker 4918*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 18)) 4919*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4920*344a7f5eSAndroid Build Coastguard Worker native_powr(float4 base, float4 exponent); 4921*344a7f5eSAndroid Build Coastguard Worker#endif 4922*344a7f5eSAndroid Build Coastguard Worker 4923*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4924*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4925*344a7f5eSAndroid Build Coastguard Worker native_powr(half base, half exponent); 4926*344a7f5eSAndroid Build Coastguard Worker#endif 4927*344a7f5eSAndroid Build Coastguard Worker 4928*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4929*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4930*344a7f5eSAndroid Build Coastguard Worker native_powr(half2 base, half2 exponent); 4931*344a7f5eSAndroid Build Coastguard Worker#endif 4932*344a7f5eSAndroid Build Coastguard Worker 4933*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4934*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4935*344a7f5eSAndroid Build Coastguard Worker native_powr(half3 base, half3 exponent); 4936*344a7f5eSAndroid Build Coastguard Worker#endif 4937*344a7f5eSAndroid Build Coastguard Worker 4938*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4939*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4940*344a7f5eSAndroid Build Coastguard Worker native_powr(half4 base, half4 exponent); 4941*344a7f5eSAndroid Build Coastguard Worker#endif 4942*344a7f5eSAndroid Build Coastguard Worker 4943*344a7f5eSAndroid Build Coastguard Worker/* 4944*344a7f5eSAndroid Build Coastguard Worker * native_recip: Approximate reciprocal 4945*344a7f5eSAndroid Build Coastguard Worker * 4946*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate approximate reciprocal of a value. 4947*344a7f5eSAndroid Build Coastguard Worker * 4948*344a7f5eSAndroid Build Coastguard Worker * See also half_recip(). 4949*344a7f5eSAndroid Build Coastguard Worker */ 4950*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4951*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4952*344a7f5eSAndroid Build Coastguard Worker native_recip(float v); 4953*344a7f5eSAndroid Build Coastguard Worker#endif 4954*344a7f5eSAndroid Build Coastguard Worker 4955*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4956*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 4957*344a7f5eSAndroid Build Coastguard Worker native_recip(float2 v); 4958*344a7f5eSAndroid Build Coastguard Worker#endif 4959*344a7f5eSAndroid Build Coastguard Worker 4960*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4961*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 4962*344a7f5eSAndroid Build Coastguard Worker native_recip(float3 v); 4963*344a7f5eSAndroid Build Coastguard Worker#endif 4964*344a7f5eSAndroid Build Coastguard Worker 4965*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4966*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 4967*344a7f5eSAndroid Build Coastguard Worker native_recip(float4 v); 4968*344a7f5eSAndroid Build Coastguard Worker#endif 4969*344a7f5eSAndroid Build Coastguard Worker 4970*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4971*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 4972*344a7f5eSAndroid Build Coastguard Worker native_recip(half v); 4973*344a7f5eSAndroid Build Coastguard Worker#endif 4974*344a7f5eSAndroid Build Coastguard Worker 4975*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4976*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 4977*344a7f5eSAndroid Build Coastguard Worker native_recip(half2 v); 4978*344a7f5eSAndroid Build Coastguard Worker#endif 4979*344a7f5eSAndroid Build Coastguard Worker 4980*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4981*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 4982*344a7f5eSAndroid Build Coastguard Worker native_recip(half3 v); 4983*344a7f5eSAndroid Build Coastguard Worker#endif 4984*344a7f5eSAndroid Build Coastguard Worker 4985*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 4986*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 4987*344a7f5eSAndroid Build Coastguard Worker native_recip(half4 v); 4988*344a7f5eSAndroid Build Coastguard Worker#endif 4989*344a7f5eSAndroid Build Coastguard Worker 4990*344a7f5eSAndroid Build Coastguard Worker/* 4991*344a7f5eSAndroid Build Coastguard Worker * native_rootn: Approximate nth root 4992*344a7f5eSAndroid Build Coastguard Worker * 4993*344a7f5eSAndroid Build Coastguard Worker * Compute the approximate Nth root of a value. 4994*344a7f5eSAndroid Build Coastguard Worker * 4995*344a7f5eSAndroid Build Coastguard Worker * See also rootn(). 4996*344a7f5eSAndroid Build Coastguard Worker */ 4997*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 4998*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 4999*344a7f5eSAndroid Build Coastguard Worker native_rootn(float v, int n); 5000*344a7f5eSAndroid Build Coastguard Worker#endif 5001*344a7f5eSAndroid Build Coastguard Worker 5002*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5003*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5004*344a7f5eSAndroid Build Coastguard Worker native_rootn(float2 v, int2 n); 5005*344a7f5eSAndroid Build Coastguard Worker#endif 5006*344a7f5eSAndroid Build Coastguard Worker 5007*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5008*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5009*344a7f5eSAndroid Build Coastguard Worker native_rootn(float3 v, int3 n); 5010*344a7f5eSAndroid Build Coastguard Worker#endif 5011*344a7f5eSAndroid Build Coastguard Worker 5012*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5013*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5014*344a7f5eSAndroid Build Coastguard Worker native_rootn(float4 v, int4 n); 5015*344a7f5eSAndroid Build Coastguard Worker#endif 5016*344a7f5eSAndroid Build Coastguard Worker 5017*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5018*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5019*344a7f5eSAndroid Build Coastguard Worker native_rootn(half v, int n); 5020*344a7f5eSAndroid Build Coastguard Worker#endif 5021*344a7f5eSAndroid Build Coastguard Worker 5022*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5023*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5024*344a7f5eSAndroid Build Coastguard Worker native_rootn(half2 v, int2 n); 5025*344a7f5eSAndroid Build Coastguard Worker#endif 5026*344a7f5eSAndroid Build Coastguard Worker 5027*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5028*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5029*344a7f5eSAndroid Build Coastguard Worker native_rootn(half3 v, int3 n); 5030*344a7f5eSAndroid Build Coastguard Worker#endif 5031*344a7f5eSAndroid Build Coastguard Worker 5032*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5033*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5034*344a7f5eSAndroid Build Coastguard Worker native_rootn(half4 v, int4 n); 5035*344a7f5eSAndroid Build Coastguard Worker#endif 5036*344a7f5eSAndroid Build Coastguard Worker 5037*344a7f5eSAndroid Build Coastguard Worker/* 5038*344a7f5eSAndroid Build Coastguard Worker * native_rsqrt: Approximate reciprocal of a square root 5039*344a7f5eSAndroid Build Coastguard Worker * 5040*344a7f5eSAndroid Build Coastguard Worker * Returns approximate (1 / sqrt(v)). 5041*344a7f5eSAndroid Build Coastguard Worker * 5042*344a7f5eSAndroid Build Coastguard Worker * See also rsqrt(), half_rsqrt(). 5043*344a7f5eSAndroid Build Coastguard Worker */ 5044*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5045*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5046*344a7f5eSAndroid Build Coastguard Worker native_rsqrt(float v); 5047*344a7f5eSAndroid Build Coastguard Worker#endif 5048*344a7f5eSAndroid Build Coastguard Worker 5049*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5050*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5051*344a7f5eSAndroid Build Coastguard Worker native_rsqrt(float2 v); 5052*344a7f5eSAndroid Build Coastguard Worker#endif 5053*344a7f5eSAndroid Build Coastguard Worker 5054*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5055*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5056*344a7f5eSAndroid Build Coastguard Worker native_rsqrt(float3 v); 5057*344a7f5eSAndroid Build Coastguard Worker#endif 5058*344a7f5eSAndroid Build Coastguard Worker 5059*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5060*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5061*344a7f5eSAndroid Build Coastguard Worker native_rsqrt(float4 v); 5062*344a7f5eSAndroid Build Coastguard Worker#endif 5063*344a7f5eSAndroid Build Coastguard Worker 5064*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5065*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5066*344a7f5eSAndroid Build Coastguard Worker native_rsqrt(half v); 5067*344a7f5eSAndroid Build Coastguard Worker#endif 5068*344a7f5eSAndroid Build Coastguard Worker 5069*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5070*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5071*344a7f5eSAndroid Build Coastguard Worker native_rsqrt(half2 v); 5072*344a7f5eSAndroid Build Coastguard Worker#endif 5073*344a7f5eSAndroid Build Coastguard Worker 5074*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5075*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5076*344a7f5eSAndroid Build Coastguard Worker native_rsqrt(half3 v); 5077*344a7f5eSAndroid Build Coastguard Worker#endif 5078*344a7f5eSAndroid Build Coastguard Worker 5079*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5080*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5081*344a7f5eSAndroid Build Coastguard Worker native_rsqrt(half4 v); 5082*344a7f5eSAndroid Build Coastguard Worker#endif 5083*344a7f5eSAndroid Build Coastguard Worker 5084*344a7f5eSAndroid Build Coastguard Worker/* 5085*344a7f5eSAndroid Build Coastguard Worker * native_sin: Approximate sine 5086*344a7f5eSAndroid Build Coastguard Worker * 5087*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate sine of an angle measured in radians. 5088*344a7f5eSAndroid Build Coastguard Worker * 5089*344a7f5eSAndroid Build Coastguard Worker * See also sin(). 5090*344a7f5eSAndroid Build Coastguard Worker */ 5091*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5092*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5093*344a7f5eSAndroid Build Coastguard Worker native_sin(float v); 5094*344a7f5eSAndroid Build Coastguard Worker#endif 5095*344a7f5eSAndroid Build Coastguard Worker 5096*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5097*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5098*344a7f5eSAndroid Build Coastguard Worker native_sin(float2 v); 5099*344a7f5eSAndroid Build Coastguard Worker#endif 5100*344a7f5eSAndroid Build Coastguard Worker 5101*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5102*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5103*344a7f5eSAndroid Build Coastguard Worker native_sin(float3 v); 5104*344a7f5eSAndroid Build Coastguard Worker#endif 5105*344a7f5eSAndroid Build Coastguard Worker 5106*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5107*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5108*344a7f5eSAndroid Build Coastguard Worker native_sin(float4 v); 5109*344a7f5eSAndroid Build Coastguard Worker#endif 5110*344a7f5eSAndroid Build Coastguard Worker 5111*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5112*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5113*344a7f5eSAndroid Build Coastguard Worker native_sin(half v); 5114*344a7f5eSAndroid Build Coastguard Worker#endif 5115*344a7f5eSAndroid Build Coastguard Worker 5116*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5117*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5118*344a7f5eSAndroid Build Coastguard Worker native_sin(half2 v); 5119*344a7f5eSAndroid Build Coastguard Worker#endif 5120*344a7f5eSAndroid Build Coastguard Worker 5121*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5122*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5123*344a7f5eSAndroid Build Coastguard Worker native_sin(half3 v); 5124*344a7f5eSAndroid Build Coastguard Worker#endif 5125*344a7f5eSAndroid Build Coastguard Worker 5126*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5127*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5128*344a7f5eSAndroid Build Coastguard Worker native_sin(half4 v); 5129*344a7f5eSAndroid Build Coastguard Worker#endif 5130*344a7f5eSAndroid Build Coastguard Worker 5131*344a7f5eSAndroid Build Coastguard Worker/* 5132*344a7f5eSAndroid Build Coastguard Worker * native_sincos: Approximate sine and cosine 5133*344a7f5eSAndroid Build Coastguard Worker * 5134*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate sine and cosine of a value. 5135*344a7f5eSAndroid Build Coastguard Worker * 5136*344a7f5eSAndroid Build Coastguard Worker * See also sincos(). 5137*344a7f5eSAndroid Build Coastguard Worker * 5138*344a7f5eSAndroid Build Coastguard Worker * Parameters: 5139*344a7f5eSAndroid Build Coastguard Worker * v: Incoming value in radians. 5140*344a7f5eSAndroid Build Coastguard Worker * cos: *cos will be set to the cosine value. 5141*344a7f5eSAndroid Build Coastguard Worker * 5142*344a7f5eSAndroid Build Coastguard Worker * Returns: Sine. 5143*344a7f5eSAndroid Build Coastguard Worker */ 5144*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5145*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((overloadable)) 5146*344a7f5eSAndroid Build Coastguard Worker native_sincos(float v, float* cos); 5147*344a7f5eSAndroid Build Coastguard Worker#endif 5148*344a7f5eSAndroid Build Coastguard Worker 5149*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5150*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((overloadable)) 5151*344a7f5eSAndroid Build Coastguard Worker native_sincos(float2 v, float2* cos); 5152*344a7f5eSAndroid Build Coastguard Worker#endif 5153*344a7f5eSAndroid Build Coastguard Worker 5154*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5155*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((overloadable)) 5156*344a7f5eSAndroid Build Coastguard Worker native_sincos(float3 v, float3* cos); 5157*344a7f5eSAndroid Build Coastguard Worker#endif 5158*344a7f5eSAndroid Build Coastguard Worker 5159*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5160*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((overloadable)) 5161*344a7f5eSAndroid Build Coastguard Worker native_sincos(float4 v, float4* cos); 5162*344a7f5eSAndroid Build Coastguard Worker#endif 5163*344a7f5eSAndroid Build Coastguard Worker 5164*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5165*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((overloadable)) 5166*344a7f5eSAndroid Build Coastguard Worker native_sincos(half v, half* cos); 5167*344a7f5eSAndroid Build Coastguard Worker#endif 5168*344a7f5eSAndroid Build Coastguard Worker 5169*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5170*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((overloadable)) 5171*344a7f5eSAndroid Build Coastguard Worker native_sincos(half2 v, half2* cos); 5172*344a7f5eSAndroid Build Coastguard Worker#endif 5173*344a7f5eSAndroid Build Coastguard Worker 5174*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5175*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((overloadable)) 5176*344a7f5eSAndroid Build Coastguard Worker native_sincos(half3 v, half3* cos); 5177*344a7f5eSAndroid Build Coastguard Worker#endif 5178*344a7f5eSAndroid Build Coastguard Worker 5179*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5180*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((overloadable)) 5181*344a7f5eSAndroid Build Coastguard Worker native_sincos(half4 v, half4* cos); 5182*344a7f5eSAndroid Build Coastguard Worker#endif 5183*344a7f5eSAndroid Build Coastguard Worker 5184*344a7f5eSAndroid Build Coastguard Worker/* 5185*344a7f5eSAndroid Build Coastguard Worker * native_sinh: Approximate hyperbolic sine 5186*344a7f5eSAndroid Build Coastguard Worker * 5187*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate hyperbolic sine of a value specified in radians. 5188*344a7f5eSAndroid Build Coastguard Worker * 5189*344a7f5eSAndroid Build Coastguard Worker * See also sinh(). 5190*344a7f5eSAndroid Build Coastguard Worker */ 5191*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5192*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5193*344a7f5eSAndroid Build Coastguard Worker native_sinh(float v); 5194*344a7f5eSAndroid Build Coastguard Worker#endif 5195*344a7f5eSAndroid Build Coastguard Worker 5196*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5197*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5198*344a7f5eSAndroid Build Coastguard Worker native_sinh(float2 v); 5199*344a7f5eSAndroid Build Coastguard Worker#endif 5200*344a7f5eSAndroid Build Coastguard Worker 5201*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5202*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5203*344a7f5eSAndroid Build Coastguard Worker native_sinh(float3 v); 5204*344a7f5eSAndroid Build Coastguard Worker#endif 5205*344a7f5eSAndroid Build Coastguard Worker 5206*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5207*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5208*344a7f5eSAndroid Build Coastguard Worker native_sinh(float4 v); 5209*344a7f5eSAndroid Build Coastguard Worker#endif 5210*344a7f5eSAndroid Build Coastguard Worker 5211*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5212*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5213*344a7f5eSAndroid Build Coastguard Worker native_sinh(half v); 5214*344a7f5eSAndroid Build Coastguard Worker#endif 5215*344a7f5eSAndroid Build Coastguard Worker 5216*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5217*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5218*344a7f5eSAndroid Build Coastguard Worker native_sinh(half2 v); 5219*344a7f5eSAndroid Build Coastguard Worker#endif 5220*344a7f5eSAndroid Build Coastguard Worker 5221*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5222*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5223*344a7f5eSAndroid Build Coastguard Worker native_sinh(half3 v); 5224*344a7f5eSAndroid Build Coastguard Worker#endif 5225*344a7f5eSAndroid Build Coastguard Worker 5226*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5227*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5228*344a7f5eSAndroid Build Coastguard Worker native_sinh(half4 v); 5229*344a7f5eSAndroid Build Coastguard Worker#endif 5230*344a7f5eSAndroid Build Coastguard Worker 5231*344a7f5eSAndroid Build Coastguard Worker/* 5232*344a7f5eSAndroid Build Coastguard Worker * native_sinpi: Approximate sine of a number multiplied by pi 5233*344a7f5eSAndroid Build Coastguard Worker * 5234*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate sine of (v * pi), where (v * pi) is measured in radians. 5235*344a7f5eSAndroid Build Coastguard Worker * 5236*344a7f5eSAndroid Build Coastguard Worker * To get the sine of a value measured in degrees, call sinpi(v / 180.f). 5237*344a7f5eSAndroid Build Coastguard Worker * 5238*344a7f5eSAndroid Build Coastguard Worker * See also sinpi(). 5239*344a7f5eSAndroid Build Coastguard Worker */ 5240*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5241*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5242*344a7f5eSAndroid Build Coastguard Worker native_sinpi(float v); 5243*344a7f5eSAndroid Build Coastguard Worker#endif 5244*344a7f5eSAndroid Build Coastguard Worker 5245*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5246*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5247*344a7f5eSAndroid Build Coastguard Worker native_sinpi(float2 v); 5248*344a7f5eSAndroid Build Coastguard Worker#endif 5249*344a7f5eSAndroid Build Coastguard Worker 5250*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5251*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5252*344a7f5eSAndroid Build Coastguard Worker native_sinpi(float3 v); 5253*344a7f5eSAndroid Build Coastguard Worker#endif 5254*344a7f5eSAndroid Build Coastguard Worker 5255*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5256*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5257*344a7f5eSAndroid Build Coastguard Worker native_sinpi(float4 v); 5258*344a7f5eSAndroid Build Coastguard Worker#endif 5259*344a7f5eSAndroid Build Coastguard Worker 5260*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5261*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5262*344a7f5eSAndroid Build Coastguard Worker native_sinpi(half v); 5263*344a7f5eSAndroid Build Coastguard Worker#endif 5264*344a7f5eSAndroid Build Coastguard Worker 5265*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5266*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5267*344a7f5eSAndroid Build Coastguard Worker native_sinpi(half2 v); 5268*344a7f5eSAndroid Build Coastguard Worker#endif 5269*344a7f5eSAndroid Build Coastguard Worker 5270*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5271*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5272*344a7f5eSAndroid Build Coastguard Worker native_sinpi(half3 v); 5273*344a7f5eSAndroid Build Coastguard Worker#endif 5274*344a7f5eSAndroid Build Coastguard Worker 5275*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5276*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5277*344a7f5eSAndroid Build Coastguard Worker native_sinpi(half4 v); 5278*344a7f5eSAndroid Build Coastguard Worker#endif 5279*344a7f5eSAndroid Build Coastguard Worker 5280*344a7f5eSAndroid Build Coastguard Worker/* 5281*344a7f5eSAndroid Build Coastguard Worker * native_sqrt: Approximate square root 5282*344a7f5eSAndroid Build Coastguard Worker * 5283*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate sqrt(v). 5284*344a7f5eSAndroid Build Coastguard Worker * 5285*344a7f5eSAndroid Build Coastguard Worker * See also sqrt(), half_sqrt(). 5286*344a7f5eSAndroid Build Coastguard Worker */ 5287*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5288*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5289*344a7f5eSAndroid Build Coastguard Worker native_sqrt(float v); 5290*344a7f5eSAndroid Build Coastguard Worker#endif 5291*344a7f5eSAndroid Build Coastguard Worker 5292*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5293*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5294*344a7f5eSAndroid Build Coastguard Worker native_sqrt(float2 v); 5295*344a7f5eSAndroid Build Coastguard Worker#endif 5296*344a7f5eSAndroid Build Coastguard Worker 5297*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5298*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5299*344a7f5eSAndroid Build Coastguard Worker native_sqrt(float3 v); 5300*344a7f5eSAndroid Build Coastguard Worker#endif 5301*344a7f5eSAndroid Build Coastguard Worker 5302*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5303*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5304*344a7f5eSAndroid Build Coastguard Worker native_sqrt(float4 v); 5305*344a7f5eSAndroid Build Coastguard Worker#endif 5306*344a7f5eSAndroid Build Coastguard Worker 5307*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5308*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5309*344a7f5eSAndroid Build Coastguard Worker native_sqrt(half v); 5310*344a7f5eSAndroid Build Coastguard Worker#endif 5311*344a7f5eSAndroid Build Coastguard Worker 5312*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5313*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5314*344a7f5eSAndroid Build Coastguard Worker native_sqrt(half2 v); 5315*344a7f5eSAndroid Build Coastguard Worker#endif 5316*344a7f5eSAndroid Build Coastguard Worker 5317*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5318*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5319*344a7f5eSAndroid Build Coastguard Worker native_sqrt(half3 v); 5320*344a7f5eSAndroid Build Coastguard Worker#endif 5321*344a7f5eSAndroid Build Coastguard Worker 5322*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5323*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5324*344a7f5eSAndroid Build Coastguard Worker native_sqrt(half4 v); 5325*344a7f5eSAndroid Build Coastguard Worker#endif 5326*344a7f5eSAndroid Build Coastguard Worker 5327*344a7f5eSAndroid Build Coastguard Worker/* 5328*344a7f5eSAndroid Build Coastguard Worker * native_tan: Approximate tangent 5329*344a7f5eSAndroid Build Coastguard Worker * 5330*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate tangent of an angle measured in radians. 5331*344a7f5eSAndroid Build Coastguard Worker */ 5332*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5333*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5334*344a7f5eSAndroid Build Coastguard Worker native_tan(float v); 5335*344a7f5eSAndroid Build Coastguard Worker#endif 5336*344a7f5eSAndroid Build Coastguard Worker 5337*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5338*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5339*344a7f5eSAndroid Build Coastguard Worker native_tan(float2 v); 5340*344a7f5eSAndroid Build Coastguard Worker#endif 5341*344a7f5eSAndroid Build Coastguard Worker 5342*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5343*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5344*344a7f5eSAndroid Build Coastguard Worker native_tan(float3 v); 5345*344a7f5eSAndroid Build Coastguard Worker#endif 5346*344a7f5eSAndroid Build Coastguard Worker 5347*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5348*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5349*344a7f5eSAndroid Build Coastguard Worker native_tan(float4 v); 5350*344a7f5eSAndroid Build Coastguard Worker#endif 5351*344a7f5eSAndroid Build Coastguard Worker 5352*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5353*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5354*344a7f5eSAndroid Build Coastguard Worker native_tan(half v); 5355*344a7f5eSAndroid Build Coastguard Worker#endif 5356*344a7f5eSAndroid Build Coastguard Worker 5357*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5358*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5359*344a7f5eSAndroid Build Coastguard Worker native_tan(half2 v); 5360*344a7f5eSAndroid Build Coastguard Worker#endif 5361*344a7f5eSAndroid Build Coastguard Worker 5362*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5363*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5364*344a7f5eSAndroid Build Coastguard Worker native_tan(half3 v); 5365*344a7f5eSAndroid Build Coastguard Worker#endif 5366*344a7f5eSAndroid Build Coastguard Worker 5367*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5368*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5369*344a7f5eSAndroid Build Coastguard Worker native_tan(half4 v); 5370*344a7f5eSAndroid Build Coastguard Worker#endif 5371*344a7f5eSAndroid Build Coastguard Worker 5372*344a7f5eSAndroid Build Coastguard Worker/* 5373*344a7f5eSAndroid Build Coastguard Worker * native_tanh: Approximate hyperbolic tangent 5374*344a7f5eSAndroid Build Coastguard Worker * 5375*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate hyperbolic tangent of a value. 5376*344a7f5eSAndroid Build Coastguard Worker * 5377*344a7f5eSAndroid Build Coastguard Worker * See also tanh(). 5378*344a7f5eSAndroid Build Coastguard Worker */ 5379*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5380*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5381*344a7f5eSAndroid Build Coastguard Worker native_tanh(float v); 5382*344a7f5eSAndroid Build Coastguard Worker#endif 5383*344a7f5eSAndroid Build Coastguard Worker 5384*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5385*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5386*344a7f5eSAndroid Build Coastguard Worker native_tanh(float2 v); 5387*344a7f5eSAndroid Build Coastguard Worker#endif 5388*344a7f5eSAndroid Build Coastguard Worker 5389*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5390*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5391*344a7f5eSAndroid Build Coastguard Worker native_tanh(float3 v); 5392*344a7f5eSAndroid Build Coastguard Worker#endif 5393*344a7f5eSAndroid Build Coastguard Worker 5394*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5395*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5396*344a7f5eSAndroid Build Coastguard Worker native_tanh(float4 v); 5397*344a7f5eSAndroid Build Coastguard Worker#endif 5398*344a7f5eSAndroid Build Coastguard Worker 5399*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5400*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5401*344a7f5eSAndroid Build Coastguard Worker native_tanh(half v); 5402*344a7f5eSAndroid Build Coastguard Worker#endif 5403*344a7f5eSAndroid Build Coastguard Worker 5404*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5405*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5406*344a7f5eSAndroid Build Coastguard Worker native_tanh(half2 v); 5407*344a7f5eSAndroid Build Coastguard Worker#endif 5408*344a7f5eSAndroid Build Coastguard Worker 5409*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5410*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5411*344a7f5eSAndroid Build Coastguard Worker native_tanh(half3 v); 5412*344a7f5eSAndroid Build Coastguard Worker#endif 5413*344a7f5eSAndroid Build Coastguard Worker 5414*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5415*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5416*344a7f5eSAndroid Build Coastguard Worker native_tanh(half4 v); 5417*344a7f5eSAndroid Build Coastguard Worker#endif 5418*344a7f5eSAndroid Build Coastguard Worker 5419*344a7f5eSAndroid Build Coastguard Worker/* 5420*344a7f5eSAndroid Build Coastguard Worker * native_tanpi: Approximate tangent of a number multiplied by pi 5421*344a7f5eSAndroid Build Coastguard Worker * 5422*344a7f5eSAndroid Build Coastguard Worker * Returns the approximate tangent of (v * pi), where (v * pi) is measured in radians. 5423*344a7f5eSAndroid Build Coastguard Worker * 5424*344a7f5eSAndroid Build Coastguard Worker * To get the tangent of a value measured in degrees, call tanpi(v / 180.f). 5425*344a7f5eSAndroid Build Coastguard Worker * 5426*344a7f5eSAndroid Build Coastguard Worker * See also tanpi(). 5427*344a7f5eSAndroid Build Coastguard Worker */ 5428*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5429*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5430*344a7f5eSAndroid Build Coastguard Worker native_tanpi(float v); 5431*344a7f5eSAndroid Build Coastguard Worker#endif 5432*344a7f5eSAndroid Build Coastguard Worker 5433*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5434*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5435*344a7f5eSAndroid Build Coastguard Worker native_tanpi(float2 v); 5436*344a7f5eSAndroid Build Coastguard Worker#endif 5437*344a7f5eSAndroid Build Coastguard Worker 5438*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5439*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5440*344a7f5eSAndroid Build Coastguard Worker native_tanpi(float3 v); 5441*344a7f5eSAndroid Build Coastguard Worker#endif 5442*344a7f5eSAndroid Build Coastguard Worker 5443*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 5444*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5445*344a7f5eSAndroid Build Coastguard Worker native_tanpi(float4 v); 5446*344a7f5eSAndroid Build Coastguard Worker#endif 5447*344a7f5eSAndroid Build Coastguard Worker 5448*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5449*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5450*344a7f5eSAndroid Build Coastguard Worker native_tanpi(half v); 5451*344a7f5eSAndroid Build Coastguard Worker#endif 5452*344a7f5eSAndroid Build Coastguard Worker 5453*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5454*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5455*344a7f5eSAndroid Build Coastguard Worker native_tanpi(half2 v); 5456*344a7f5eSAndroid Build Coastguard Worker#endif 5457*344a7f5eSAndroid Build Coastguard Worker 5458*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5459*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5460*344a7f5eSAndroid Build Coastguard Worker native_tanpi(half3 v); 5461*344a7f5eSAndroid Build Coastguard Worker#endif 5462*344a7f5eSAndroid Build Coastguard Worker 5463*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5464*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5465*344a7f5eSAndroid Build Coastguard Worker native_tanpi(half4 v); 5466*344a7f5eSAndroid Build Coastguard Worker#endif 5467*344a7f5eSAndroid Build Coastguard Worker 5468*344a7f5eSAndroid Build Coastguard Worker/* 5469*344a7f5eSAndroid Build Coastguard Worker * nextafter: Next floating point number 5470*344a7f5eSAndroid Build Coastguard Worker * 5471*344a7f5eSAndroid Build Coastguard Worker * Returns the next representable floating point number from v towards target. 5472*344a7f5eSAndroid Build Coastguard Worker * 5473*344a7f5eSAndroid Build Coastguard Worker * In rs_fp_relaxed mode, a denormalized input value may not yield the next denormalized 5474*344a7f5eSAndroid Build Coastguard Worker * value, as support of denormalized values is optional in relaxed mode. 5475*344a7f5eSAndroid Build Coastguard Worker */ 5476*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5477*344a7f5eSAndroid Build Coastguard Worker nextafter(float v, float target); 5478*344a7f5eSAndroid Build Coastguard Worker 5479*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5480*344a7f5eSAndroid Build Coastguard Worker nextafter(float2 v, float2 target); 5481*344a7f5eSAndroid Build Coastguard Worker 5482*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5483*344a7f5eSAndroid Build Coastguard Worker nextafter(float3 v, float3 target); 5484*344a7f5eSAndroid Build Coastguard Worker 5485*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5486*344a7f5eSAndroid Build Coastguard Worker nextafter(float4 v, float4 target); 5487*344a7f5eSAndroid Build Coastguard Worker 5488*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5489*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5490*344a7f5eSAndroid Build Coastguard Worker nextafter(half v, half target); 5491*344a7f5eSAndroid Build Coastguard Worker#endif 5492*344a7f5eSAndroid Build Coastguard Worker 5493*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5494*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5495*344a7f5eSAndroid Build Coastguard Worker nextafter(half2 v, half2 target); 5496*344a7f5eSAndroid Build Coastguard Worker#endif 5497*344a7f5eSAndroid Build Coastguard Worker 5498*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5499*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5500*344a7f5eSAndroid Build Coastguard Worker nextafter(half3 v, half3 target); 5501*344a7f5eSAndroid Build Coastguard Worker#endif 5502*344a7f5eSAndroid Build Coastguard Worker 5503*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5504*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5505*344a7f5eSAndroid Build Coastguard Worker nextafter(half4 v, half4 target); 5506*344a7f5eSAndroid Build Coastguard Worker#endif 5507*344a7f5eSAndroid Build Coastguard Worker 5508*344a7f5eSAndroid Build Coastguard Worker/* 5509*344a7f5eSAndroid Build Coastguard Worker * pow: Base raised to an exponent 5510*344a7f5eSAndroid Build Coastguard Worker * 5511*344a7f5eSAndroid Build Coastguard Worker * Returns base raised to the power exponent, i.e. base ^ exponent. 5512*344a7f5eSAndroid Build Coastguard Worker * 5513*344a7f5eSAndroid Build Coastguard Worker * pown() and powr() are similar. pown() takes an integer exponent. powr() assumes the 5514*344a7f5eSAndroid Build Coastguard Worker * base to be non-negative. 5515*344a7f5eSAndroid Build Coastguard Worker */ 5516*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5517*344a7f5eSAndroid Build Coastguard Worker pow(float base, float exponent); 5518*344a7f5eSAndroid Build Coastguard Worker 5519*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5520*344a7f5eSAndroid Build Coastguard Worker pow(float2 base, float2 exponent); 5521*344a7f5eSAndroid Build Coastguard Worker 5522*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5523*344a7f5eSAndroid Build Coastguard Worker pow(float3 base, float3 exponent); 5524*344a7f5eSAndroid Build Coastguard Worker 5525*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5526*344a7f5eSAndroid Build Coastguard Worker pow(float4 base, float4 exponent); 5527*344a7f5eSAndroid Build Coastguard Worker 5528*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5529*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5530*344a7f5eSAndroid Build Coastguard Worker pow(half base, half exponent); 5531*344a7f5eSAndroid Build Coastguard Worker#endif 5532*344a7f5eSAndroid Build Coastguard Worker 5533*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5534*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5535*344a7f5eSAndroid Build Coastguard Worker pow(half2 base, half2 exponent); 5536*344a7f5eSAndroid Build Coastguard Worker#endif 5537*344a7f5eSAndroid Build Coastguard Worker 5538*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5539*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5540*344a7f5eSAndroid Build Coastguard Worker pow(half3 base, half3 exponent); 5541*344a7f5eSAndroid Build Coastguard Worker#endif 5542*344a7f5eSAndroid Build Coastguard Worker 5543*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5544*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5545*344a7f5eSAndroid Build Coastguard Worker pow(half4 base, half4 exponent); 5546*344a7f5eSAndroid Build Coastguard Worker#endif 5547*344a7f5eSAndroid Build Coastguard Worker 5548*344a7f5eSAndroid Build Coastguard Worker/* 5549*344a7f5eSAndroid Build Coastguard Worker * pown: Base raised to an integer exponent 5550*344a7f5eSAndroid Build Coastguard Worker * 5551*344a7f5eSAndroid Build Coastguard Worker * Returns base raised to the power exponent, i.e. base ^ exponent. 5552*344a7f5eSAndroid Build Coastguard Worker * 5553*344a7f5eSAndroid Build Coastguard Worker * pow() and powr() are similar. The both take a float exponent. powr() also assumes the 5554*344a7f5eSAndroid Build Coastguard Worker * base to be non-negative. 5555*344a7f5eSAndroid Build Coastguard Worker */ 5556*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5557*344a7f5eSAndroid Build Coastguard Worker pown(float base, int exponent); 5558*344a7f5eSAndroid Build Coastguard Worker 5559*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5560*344a7f5eSAndroid Build Coastguard Worker pown(float2 base, int2 exponent); 5561*344a7f5eSAndroid Build Coastguard Worker 5562*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5563*344a7f5eSAndroid Build Coastguard Worker pown(float3 base, int3 exponent); 5564*344a7f5eSAndroid Build Coastguard Worker 5565*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5566*344a7f5eSAndroid Build Coastguard Worker pown(float4 base, int4 exponent); 5567*344a7f5eSAndroid Build Coastguard Worker 5568*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5569*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5570*344a7f5eSAndroid Build Coastguard Worker pown(half base, int exponent); 5571*344a7f5eSAndroid Build Coastguard Worker#endif 5572*344a7f5eSAndroid Build Coastguard Worker 5573*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5574*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5575*344a7f5eSAndroid Build Coastguard Worker pown(half2 base, int2 exponent); 5576*344a7f5eSAndroid Build Coastguard Worker#endif 5577*344a7f5eSAndroid Build Coastguard Worker 5578*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5579*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5580*344a7f5eSAndroid Build Coastguard Worker pown(half3 base, int3 exponent); 5581*344a7f5eSAndroid Build Coastguard Worker#endif 5582*344a7f5eSAndroid Build Coastguard Worker 5583*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5584*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5585*344a7f5eSAndroid Build Coastguard Worker pown(half4 base, int4 exponent); 5586*344a7f5eSAndroid Build Coastguard Worker#endif 5587*344a7f5eSAndroid Build Coastguard Worker 5588*344a7f5eSAndroid Build Coastguard Worker/* 5589*344a7f5eSAndroid Build Coastguard Worker * powr: Positive base raised to an exponent 5590*344a7f5eSAndroid Build Coastguard Worker * 5591*344a7f5eSAndroid Build Coastguard Worker * Returns base raised to the power exponent, i.e. base ^ exponent. base must be >= 0. 5592*344a7f5eSAndroid Build Coastguard Worker * 5593*344a7f5eSAndroid Build Coastguard Worker * pow() and pown() are similar. They both make no assumptions about the base. 5594*344a7f5eSAndroid Build Coastguard Worker * pow() takes a float exponent while pown() take an integer. 5595*344a7f5eSAndroid Build Coastguard Worker * 5596*344a7f5eSAndroid Build Coastguard Worker * See also native_powr(). 5597*344a7f5eSAndroid Build Coastguard Worker */ 5598*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5599*344a7f5eSAndroid Build Coastguard Worker powr(float base, float exponent); 5600*344a7f5eSAndroid Build Coastguard Worker 5601*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5602*344a7f5eSAndroid Build Coastguard Worker powr(float2 base, float2 exponent); 5603*344a7f5eSAndroid Build Coastguard Worker 5604*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5605*344a7f5eSAndroid Build Coastguard Worker powr(float3 base, float3 exponent); 5606*344a7f5eSAndroid Build Coastguard Worker 5607*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5608*344a7f5eSAndroid Build Coastguard Worker powr(float4 base, float4 exponent); 5609*344a7f5eSAndroid Build Coastguard Worker 5610*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5611*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5612*344a7f5eSAndroid Build Coastguard Worker powr(half base, half exponent); 5613*344a7f5eSAndroid Build Coastguard Worker#endif 5614*344a7f5eSAndroid Build Coastguard Worker 5615*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5616*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5617*344a7f5eSAndroid Build Coastguard Worker powr(half2 base, half2 exponent); 5618*344a7f5eSAndroid Build Coastguard Worker#endif 5619*344a7f5eSAndroid Build Coastguard Worker 5620*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5621*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5622*344a7f5eSAndroid Build Coastguard Worker powr(half3 base, half3 exponent); 5623*344a7f5eSAndroid Build Coastguard Worker#endif 5624*344a7f5eSAndroid Build Coastguard Worker 5625*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5626*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5627*344a7f5eSAndroid Build Coastguard Worker powr(half4 base, half4 exponent); 5628*344a7f5eSAndroid Build Coastguard Worker#endif 5629*344a7f5eSAndroid Build Coastguard Worker 5630*344a7f5eSAndroid Build Coastguard Worker/* 5631*344a7f5eSAndroid Build Coastguard Worker * radians: Converts degrees into radians 5632*344a7f5eSAndroid Build Coastguard Worker * 5633*344a7f5eSAndroid Build Coastguard Worker * Converts from degrees to radians. 5634*344a7f5eSAndroid Build Coastguard Worker */ 5635*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5636*344a7f5eSAndroid Build Coastguard Worker radians(float v); 5637*344a7f5eSAndroid Build Coastguard Worker 5638*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5639*344a7f5eSAndroid Build Coastguard Worker radians(float2 v); 5640*344a7f5eSAndroid Build Coastguard Worker 5641*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5642*344a7f5eSAndroid Build Coastguard Worker radians(float3 v); 5643*344a7f5eSAndroid Build Coastguard Worker 5644*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5645*344a7f5eSAndroid Build Coastguard Worker radians(float4 v); 5646*344a7f5eSAndroid Build Coastguard Worker 5647*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5648*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5649*344a7f5eSAndroid Build Coastguard Worker radians(half v); 5650*344a7f5eSAndroid Build Coastguard Worker#endif 5651*344a7f5eSAndroid Build Coastguard Worker 5652*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5653*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5654*344a7f5eSAndroid Build Coastguard Worker radians(half2 v); 5655*344a7f5eSAndroid Build Coastguard Worker#endif 5656*344a7f5eSAndroid Build Coastguard Worker 5657*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5658*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5659*344a7f5eSAndroid Build Coastguard Worker radians(half3 v); 5660*344a7f5eSAndroid Build Coastguard Worker#endif 5661*344a7f5eSAndroid Build Coastguard Worker 5662*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5663*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5664*344a7f5eSAndroid Build Coastguard Worker radians(half4 v); 5665*344a7f5eSAndroid Build Coastguard Worker#endif 5666*344a7f5eSAndroid Build Coastguard Worker 5667*344a7f5eSAndroid Build Coastguard Worker/* 5668*344a7f5eSAndroid Build Coastguard Worker * remainder: Remainder of a division 5669*344a7f5eSAndroid Build Coastguard Worker * 5670*344a7f5eSAndroid Build Coastguard Worker * Returns the remainder of (numerator / denominator), where the quotient is rounded towards 5671*344a7f5eSAndroid Build Coastguard Worker * the nearest integer. 5672*344a7f5eSAndroid Build Coastguard Worker * 5673*344a7f5eSAndroid Build Coastguard Worker * The function fmod() is similar but rounds toward the closest interger. 5674*344a7f5eSAndroid Build Coastguard Worker * For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) 5675*344a7f5eSAndroid Build Coastguard Worker * while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). 5676*344a7f5eSAndroid Build Coastguard Worker */ 5677*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5678*344a7f5eSAndroid Build Coastguard Worker remainder(float numerator, float denominator); 5679*344a7f5eSAndroid Build Coastguard Worker 5680*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5681*344a7f5eSAndroid Build Coastguard Worker remainder(float2 numerator, float2 denominator); 5682*344a7f5eSAndroid Build Coastguard Worker 5683*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5684*344a7f5eSAndroid Build Coastguard Worker remainder(float3 numerator, float3 denominator); 5685*344a7f5eSAndroid Build Coastguard Worker 5686*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5687*344a7f5eSAndroid Build Coastguard Worker remainder(float4 numerator, float4 denominator); 5688*344a7f5eSAndroid Build Coastguard Worker 5689*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5690*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5691*344a7f5eSAndroid Build Coastguard Worker remainder(half numerator, half denominator); 5692*344a7f5eSAndroid Build Coastguard Worker#endif 5693*344a7f5eSAndroid Build Coastguard Worker 5694*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5695*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5696*344a7f5eSAndroid Build Coastguard Worker remainder(half2 numerator, half2 denominator); 5697*344a7f5eSAndroid Build Coastguard Worker#endif 5698*344a7f5eSAndroid Build Coastguard Worker 5699*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5700*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5701*344a7f5eSAndroid Build Coastguard Worker remainder(half3 numerator, half3 denominator); 5702*344a7f5eSAndroid Build Coastguard Worker#endif 5703*344a7f5eSAndroid Build Coastguard Worker 5704*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5705*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5706*344a7f5eSAndroid Build Coastguard Worker remainder(half4 numerator, half4 denominator); 5707*344a7f5eSAndroid Build Coastguard Worker#endif 5708*344a7f5eSAndroid Build Coastguard Worker 5709*344a7f5eSAndroid Build Coastguard Worker/* 5710*344a7f5eSAndroid Build Coastguard Worker * remquo: Remainder and quotient of a division 5711*344a7f5eSAndroid Build Coastguard Worker * 5712*344a7f5eSAndroid Build Coastguard Worker * Returns the quotient and the remainder of (numerator / denominator). 5713*344a7f5eSAndroid Build Coastguard Worker * 5714*344a7f5eSAndroid Build Coastguard Worker * Only the sign and lowest three bits of the quotient are guaranteed to be accurate. 5715*344a7f5eSAndroid Build Coastguard Worker * 5716*344a7f5eSAndroid Build Coastguard Worker * This function is useful for implementing periodic functions. The low three bits of the 5717*344a7f5eSAndroid Build Coastguard Worker * quotient gives the quadrant and the remainder the distance within the quadrant. 5718*344a7f5eSAndroid Build Coastguard Worker * For example, an implementation of sin(x) could call remquo(x, PI / 2.f, &quadrant) 5719*344a7f5eSAndroid Build Coastguard Worker * to reduce very large value of x to something within a limited range. 5720*344a7f5eSAndroid Build Coastguard Worker * 5721*344a7f5eSAndroid Build Coastguard Worker * Example: remquo(-23.5f, 8.f, ") sets the lowest three bits of quot to 3 5722*344a7f5eSAndroid Build Coastguard Worker * and the sign negative. It returns 0.5f. 5723*344a7f5eSAndroid Build Coastguard Worker * 5724*344a7f5eSAndroid Build Coastguard Worker * Parameters: 5725*344a7f5eSAndroid Build Coastguard Worker * numerator: Numerator. 5726*344a7f5eSAndroid Build Coastguard Worker * denominator: Denominator. 5727*344a7f5eSAndroid Build Coastguard Worker * quotient: *quotient will be set to the integer quotient. 5728*344a7f5eSAndroid Build Coastguard Worker * 5729*344a7f5eSAndroid Build Coastguard Worker * Returns: Remainder, precise only for the low three bits. 5730*344a7f5eSAndroid Build Coastguard Worker */ 5731*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((overloadable)) 5732*344a7f5eSAndroid Build Coastguard Worker remquo(float numerator, float denominator, int* quotient); 5733*344a7f5eSAndroid Build Coastguard Worker 5734*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((overloadable)) 5735*344a7f5eSAndroid Build Coastguard Worker remquo(float2 numerator, float2 denominator, int2* quotient); 5736*344a7f5eSAndroid Build Coastguard Worker 5737*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((overloadable)) 5738*344a7f5eSAndroid Build Coastguard Worker remquo(float3 numerator, float3 denominator, int3* quotient); 5739*344a7f5eSAndroid Build Coastguard Worker 5740*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((overloadable)) 5741*344a7f5eSAndroid Build Coastguard Worker remquo(float4 numerator, float4 denominator, int4* quotient); 5742*344a7f5eSAndroid Build Coastguard Worker 5743*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5744*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((overloadable)) 5745*344a7f5eSAndroid Build Coastguard Worker remquo(half numerator, half denominator, int* quotient); 5746*344a7f5eSAndroid Build Coastguard Worker#endif 5747*344a7f5eSAndroid Build Coastguard Worker 5748*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5749*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((overloadable)) 5750*344a7f5eSAndroid Build Coastguard Worker remquo(half2 numerator, half2 denominator, int2* quotient); 5751*344a7f5eSAndroid Build Coastguard Worker#endif 5752*344a7f5eSAndroid Build Coastguard Worker 5753*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5754*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((overloadable)) 5755*344a7f5eSAndroid Build Coastguard Worker remquo(half3 numerator, half3 denominator, int3* quotient); 5756*344a7f5eSAndroid Build Coastguard Worker#endif 5757*344a7f5eSAndroid Build Coastguard Worker 5758*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5759*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((overloadable)) 5760*344a7f5eSAndroid Build Coastguard Worker remquo(half4 numerator, half4 denominator, int4* quotient); 5761*344a7f5eSAndroid Build Coastguard Worker#endif 5762*344a7f5eSAndroid Build Coastguard Worker 5763*344a7f5eSAndroid Build Coastguard Worker/* 5764*344a7f5eSAndroid Build Coastguard Worker * rint: Round to even 5765*344a7f5eSAndroid Build Coastguard Worker * 5766*344a7f5eSAndroid Build Coastguard Worker * Rounds to the nearest integral value. 5767*344a7f5eSAndroid Build Coastguard Worker * 5768*344a7f5eSAndroid Build Coastguard Worker * rint() rounds half values to even. For example, rint(0.5f) returns 0.f and 5769*344a7f5eSAndroid Build Coastguard Worker * rint(1.5f) returns 2.f. Similarly, rint(-0.5f) returns -0.f and 5770*344a7f5eSAndroid Build Coastguard Worker * rint(-1.5f) returns -2.f. 5771*344a7f5eSAndroid Build Coastguard Worker * 5772*344a7f5eSAndroid Build Coastguard Worker * round() is similar but rounds away from zero. trunc() truncates the decimal fraction. 5773*344a7f5eSAndroid Build Coastguard Worker */ 5774*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5775*344a7f5eSAndroid Build Coastguard Worker rint(float v); 5776*344a7f5eSAndroid Build Coastguard Worker 5777*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5778*344a7f5eSAndroid Build Coastguard Worker rint(float2 v); 5779*344a7f5eSAndroid Build Coastguard Worker 5780*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5781*344a7f5eSAndroid Build Coastguard Worker rint(float3 v); 5782*344a7f5eSAndroid Build Coastguard Worker 5783*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5784*344a7f5eSAndroid Build Coastguard Worker rint(float4 v); 5785*344a7f5eSAndroid Build Coastguard Worker 5786*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5787*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5788*344a7f5eSAndroid Build Coastguard Worker rint(half v); 5789*344a7f5eSAndroid Build Coastguard Worker#endif 5790*344a7f5eSAndroid Build Coastguard Worker 5791*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5792*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5793*344a7f5eSAndroid Build Coastguard Worker rint(half2 v); 5794*344a7f5eSAndroid Build Coastguard Worker#endif 5795*344a7f5eSAndroid Build Coastguard Worker 5796*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5797*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5798*344a7f5eSAndroid Build Coastguard Worker rint(half3 v); 5799*344a7f5eSAndroid Build Coastguard Worker#endif 5800*344a7f5eSAndroid Build Coastguard Worker 5801*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5802*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5803*344a7f5eSAndroid Build Coastguard Worker rint(half4 v); 5804*344a7f5eSAndroid Build Coastguard Worker#endif 5805*344a7f5eSAndroid Build Coastguard Worker 5806*344a7f5eSAndroid Build Coastguard Worker/* 5807*344a7f5eSAndroid Build Coastguard Worker * rootn: Nth root 5808*344a7f5eSAndroid Build Coastguard Worker * 5809*344a7f5eSAndroid Build Coastguard Worker * Compute the Nth root of a value. 5810*344a7f5eSAndroid Build Coastguard Worker * 5811*344a7f5eSAndroid Build Coastguard Worker * See also native_rootn(). 5812*344a7f5eSAndroid Build Coastguard Worker */ 5813*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5814*344a7f5eSAndroid Build Coastguard Worker rootn(float v, int n); 5815*344a7f5eSAndroid Build Coastguard Worker 5816*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5817*344a7f5eSAndroid Build Coastguard Worker rootn(float2 v, int2 n); 5818*344a7f5eSAndroid Build Coastguard Worker 5819*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5820*344a7f5eSAndroid Build Coastguard Worker rootn(float3 v, int3 n); 5821*344a7f5eSAndroid Build Coastguard Worker 5822*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5823*344a7f5eSAndroid Build Coastguard Worker rootn(float4 v, int4 n); 5824*344a7f5eSAndroid Build Coastguard Worker 5825*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5826*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5827*344a7f5eSAndroid Build Coastguard Worker rootn(half v, int n); 5828*344a7f5eSAndroid Build Coastguard Worker#endif 5829*344a7f5eSAndroid Build Coastguard Worker 5830*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5831*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5832*344a7f5eSAndroid Build Coastguard Worker rootn(half2 v, int2 n); 5833*344a7f5eSAndroid Build Coastguard Worker#endif 5834*344a7f5eSAndroid Build Coastguard Worker 5835*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5836*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5837*344a7f5eSAndroid Build Coastguard Worker rootn(half3 v, int3 n); 5838*344a7f5eSAndroid Build Coastguard Worker#endif 5839*344a7f5eSAndroid Build Coastguard Worker 5840*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5841*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5842*344a7f5eSAndroid Build Coastguard Worker rootn(half4 v, int4 n); 5843*344a7f5eSAndroid Build Coastguard Worker#endif 5844*344a7f5eSAndroid Build Coastguard Worker 5845*344a7f5eSAndroid Build Coastguard Worker/* 5846*344a7f5eSAndroid Build Coastguard Worker * round: Round away from zero 5847*344a7f5eSAndroid Build Coastguard Worker * 5848*344a7f5eSAndroid Build Coastguard Worker * Round to the nearest integral value. 5849*344a7f5eSAndroid Build Coastguard Worker * 5850*344a7f5eSAndroid Build Coastguard Worker * round() rounds half values away from zero. For example, round(0.5f) returns 1.f 5851*344a7f5eSAndroid Build Coastguard Worker * and round(1.5f) returns 2.f. Similarly, round(-0.5f) returns -1.f 5852*344a7f5eSAndroid Build Coastguard Worker * and round(-1.5f) returns -2.f. 5853*344a7f5eSAndroid Build Coastguard Worker * 5854*344a7f5eSAndroid Build Coastguard Worker * rint() is similar but rounds half values toward even. trunc() truncates the decimal fraction. 5855*344a7f5eSAndroid Build Coastguard Worker */ 5856*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5857*344a7f5eSAndroid Build Coastguard Worker round(float v); 5858*344a7f5eSAndroid Build Coastguard Worker 5859*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5860*344a7f5eSAndroid Build Coastguard Worker round(float2 v); 5861*344a7f5eSAndroid Build Coastguard Worker 5862*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5863*344a7f5eSAndroid Build Coastguard Worker round(float3 v); 5864*344a7f5eSAndroid Build Coastguard Worker 5865*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5866*344a7f5eSAndroid Build Coastguard Worker round(float4 v); 5867*344a7f5eSAndroid Build Coastguard Worker 5868*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5869*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5870*344a7f5eSAndroid Build Coastguard Worker round(half v); 5871*344a7f5eSAndroid Build Coastguard Worker#endif 5872*344a7f5eSAndroid Build Coastguard Worker 5873*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5874*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5875*344a7f5eSAndroid Build Coastguard Worker round(half2 v); 5876*344a7f5eSAndroid Build Coastguard Worker#endif 5877*344a7f5eSAndroid Build Coastguard Worker 5878*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5879*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5880*344a7f5eSAndroid Build Coastguard Worker round(half3 v); 5881*344a7f5eSAndroid Build Coastguard Worker#endif 5882*344a7f5eSAndroid Build Coastguard Worker 5883*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5884*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5885*344a7f5eSAndroid Build Coastguard Worker round(half4 v); 5886*344a7f5eSAndroid Build Coastguard Worker#endif 5887*344a7f5eSAndroid Build Coastguard Worker 5888*344a7f5eSAndroid Build Coastguard Worker/* 5889*344a7f5eSAndroid Build Coastguard Worker * rsqrt: Reciprocal of a square root 5890*344a7f5eSAndroid Build Coastguard Worker * 5891*344a7f5eSAndroid Build Coastguard Worker * Returns (1 / sqrt(v)). 5892*344a7f5eSAndroid Build Coastguard Worker * 5893*344a7f5eSAndroid Build Coastguard Worker * See also half_rsqrt(), native_rsqrt(). 5894*344a7f5eSAndroid Build Coastguard Worker */ 5895*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5896*344a7f5eSAndroid Build Coastguard Worker rsqrt(float v); 5897*344a7f5eSAndroid Build Coastguard Worker 5898*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5899*344a7f5eSAndroid Build Coastguard Worker rsqrt(float2 v); 5900*344a7f5eSAndroid Build Coastguard Worker 5901*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5902*344a7f5eSAndroid Build Coastguard Worker rsqrt(float3 v); 5903*344a7f5eSAndroid Build Coastguard Worker 5904*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5905*344a7f5eSAndroid Build Coastguard Worker rsqrt(float4 v); 5906*344a7f5eSAndroid Build Coastguard Worker 5907*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5908*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5909*344a7f5eSAndroid Build Coastguard Worker rsqrt(half v); 5910*344a7f5eSAndroid Build Coastguard Worker#endif 5911*344a7f5eSAndroid Build Coastguard Worker 5912*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5913*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5914*344a7f5eSAndroid Build Coastguard Worker rsqrt(half2 v); 5915*344a7f5eSAndroid Build Coastguard Worker#endif 5916*344a7f5eSAndroid Build Coastguard Worker 5917*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5918*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5919*344a7f5eSAndroid Build Coastguard Worker rsqrt(half3 v); 5920*344a7f5eSAndroid Build Coastguard Worker#endif 5921*344a7f5eSAndroid Build Coastguard Worker 5922*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5923*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5924*344a7f5eSAndroid Build Coastguard Worker rsqrt(half4 v); 5925*344a7f5eSAndroid Build Coastguard Worker#endif 5926*344a7f5eSAndroid Build Coastguard Worker 5927*344a7f5eSAndroid Build Coastguard Worker/* 5928*344a7f5eSAndroid Build Coastguard Worker * sign: Sign of a value 5929*344a7f5eSAndroid Build Coastguard Worker * 5930*344a7f5eSAndroid Build Coastguard Worker * Returns the sign of a value. 5931*344a7f5eSAndroid Build Coastguard Worker * 5932*344a7f5eSAndroid Build Coastguard Worker * if (v < 0) return -1.f; 5933*344a7f5eSAndroid Build Coastguard Worker * else if (v > 0) return 1.f; 5934*344a7f5eSAndroid Build Coastguard Worker * else return 0.f; 5935*344a7f5eSAndroid Build Coastguard Worker */ 5936*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5937*344a7f5eSAndroid Build Coastguard Worker sign(float v); 5938*344a7f5eSAndroid Build Coastguard Worker 5939*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5940*344a7f5eSAndroid Build Coastguard Worker sign(float2 v); 5941*344a7f5eSAndroid Build Coastguard Worker 5942*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5943*344a7f5eSAndroid Build Coastguard Worker sign(float3 v); 5944*344a7f5eSAndroid Build Coastguard Worker 5945*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5946*344a7f5eSAndroid Build Coastguard Worker sign(float4 v); 5947*344a7f5eSAndroid Build Coastguard Worker 5948*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5949*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5950*344a7f5eSAndroid Build Coastguard Worker sign(half v); 5951*344a7f5eSAndroid Build Coastguard Worker#endif 5952*344a7f5eSAndroid Build Coastguard Worker 5953*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5954*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5955*344a7f5eSAndroid Build Coastguard Worker sign(half2 v); 5956*344a7f5eSAndroid Build Coastguard Worker#endif 5957*344a7f5eSAndroid Build Coastguard Worker 5958*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5959*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5960*344a7f5eSAndroid Build Coastguard Worker sign(half3 v); 5961*344a7f5eSAndroid Build Coastguard Worker#endif 5962*344a7f5eSAndroid Build Coastguard Worker 5963*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5964*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 5965*344a7f5eSAndroid Build Coastguard Worker sign(half4 v); 5966*344a7f5eSAndroid Build Coastguard Worker#endif 5967*344a7f5eSAndroid Build Coastguard Worker 5968*344a7f5eSAndroid Build Coastguard Worker/* 5969*344a7f5eSAndroid Build Coastguard Worker * sin: Sine 5970*344a7f5eSAndroid Build Coastguard Worker * 5971*344a7f5eSAndroid Build Coastguard Worker * Returns the sine of an angle measured in radians. 5972*344a7f5eSAndroid Build Coastguard Worker * 5973*344a7f5eSAndroid Build Coastguard Worker * See also native_sin(). 5974*344a7f5eSAndroid Build Coastguard Worker */ 5975*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 5976*344a7f5eSAndroid Build Coastguard Worker sin(float v); 5977*344a7f5eSAndroid Build Coastguard Worker 5978*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 5979*344a7f5eSAndroid Build Coastguard Worker sin(float2 v); 5980*344a7f5eSAndroid Build Coastguard Worker 5981*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 5982*344a7f5eSAndroid Build Coastguard Worker sin(float3 v); 5983*344a7f5eSAndroid Build Coastguard Worker 5984*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 5985*344a7f5eSAndroid Build Coastguard Worker sin(float4 v); 5986*344a7f5eSAndroid Build Coastguard Worker 5987*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5988*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 5989*344a7f5eSAndroid Build Coastguard Worker sin(half v); 5990*344a7f5eSAndroid Build Coastguard Worker#endif 5991*344a7f5eSAndroid Build Coastguard Worker 5992*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5993*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 5994*344a7f5eSAndroid Build Coastguard Worker sin(half2 v); 5995*344a7f5eSAndroid Build Coastguard Worker#endif 5996*344a7f5eSAndroid Build Coastguard Worker 5997*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 5998*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 5999*344a7f5eSAndroid Build Coastguard Worker sin(half3 v); 6000*344a7f5eSAndroid Build Coastguard Worker#endif 6001*344a7f5eSAndroid Build Coastguard Worker 6002*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6003*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6004*344a7f5eSAndroid Build Coastguard Worker sin(half4 v); 6005*344a7f5eSAndroid Build Coastguard Worker#endif 6006*344a7f5eSAndroid Build Coastguard Worker 6007*344a7f5eSAndroid Build Coastguard Worker/* 6008*344a7f5eSAndroid Build Coastguard Worker * sincos: Sine and cosine 6009*344a7f5eSAndroid Build Coastguard Worker * 6010*344a7f5eSAndroid Build Coastguard Worker * Returns the sine and cosine of a value. 6011*344a7f5eSAndroid Build Coastguard Worker * 6012*344a7f5eSAndroid Build Coastguard Worker * See also native_sincos(). 6013*344a7f5eSAndroid Build Coastguard Worker * 6014*344a7f5eSAndroid Build Coastguard Worker * Parameters: 6015*344a7f5eSAndroid Build Coastguard Worker * v: Incoming value in radians. 6016*344a7f5eSAndroid Build Coastguard Worker * cos: *cos will be set to the cosine value. 6017*344a7f5eSAndroid Build Coastguard Worker * 6018*344a7f5eSAndroid Build Coastguard Worker * Returns: Sine of v. 6019*344a7f5eSAndroid Build Coastguard Worker */ 6020*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((overloadable)) 6021*344a7f5eSAndroid Build Coastguard Worker sincos(float v, float* cos); 6022*344a7f5eSAndroid Build Coastguard Worker 6023*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((overloadable)) 6024*344a7f5eSAndroid Build Coastguard Worker sincos(float2 v, float2* cos); 6025*344a7f5eSAndroid Build Coastguard Worker 6026*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((overloadable)) 6027*344a7f5eSAndroid Build Coastguard Worker sincos(float3 v, float3* cos); 6028*344a7f5eSAndroid Build Coastguard Worker 6029*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((overloadable)) 6030*344a7f5eSAndroid Build Coastguard Worker sincos(float4 v, float4* cos); 6031*344a7f5eSAndroid Build Coastguard Worker 6032*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6033*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((overloadable)) 6034*344a7f5eSAndroid Build Coastguard Worker sincos(half v, half* cos); 6035*344a7f5eSAndroid Build Coastguard Worker#endif 6036*344a7f5eSAndroid Build Coastguard Worker 6037*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6038*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((overloadable)) 6039*344a7f5eSAndroid Build Coastguard Worker sincos(half2 v, half2* cos); 6040*344a7f5eSAndroid Build Coastguard Worker#endif 6041*344a7f5eSAndroid Build Coastguard Worker 6042*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6043*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((overloadable)) 6044*344a7f5eSAndroid Build Coastguard Worker sincos(half3 v, half3* cos); 6045*344a7f5eSAndroid Build Coastguard Worker#endif 6046*344a7f5eSAndroid Build Coastguard Worker 6047*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6048*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((overloadable)) 6049*344a7f5eSAndroid Build Coastguard Worker sincos(half4 v, half4* cos); 6050*344a7f5eSAndroid Build Coastguard Worker#endif 6051*344a7f5eSAndroid Build Coastguard Worker 6052*344a7f5eSAndroid Build Coastguard Worker/* 6053*344a7f5eSAndroid Build Coastguard Worker * sinh: Hyperbolic sine 6054*344a7f5eSAndroid Build Coastguard Worker * 6055*344a7f5eSAndroid Build Coastguard Worker * Returns the hyperbolic sine of v, where v is measured in radians. 6056*344a7f5eSAndroid Build Coastguard Worker * 6057*344a7f5eSAndroid Build Coastguard Worker * See also native_sinh(). 6058*344a7f5eSAndroid Build Coastguard Worker */ 6059*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 6060*344a7f5eSAndroid Build Coastguard Worker sinh(float v); 6061*344a7f5eSAndroid Build Coastguard Worker 6062*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 6063*344a7f5eSAndroid Build Coastguard Worker sinh(float2 v); 6064*344a7f5eSAndroid Build Coastguard Worker 6065*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 6066*344a7f5eSAndroid Build Coastguard Worker sinh(float3 v); 6067*344a7f5eSAndroid Build Coastguard Worker 6068*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 6069*344a7f5eSAndroid Build Coastguard Worker sinh(float4 v); 6070*344a7f5eSAndroid Build Coastguard Worker 6071*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6072*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 6073*344a7f5eSAndroid Build Coastguard Worker sinh(half v); 6074*344a7f5eSAndroid Build Coastguard Worker#endif 6075*344a7f5eSAndroid Build Coastguard Worker 6076*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6077*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 6078*344a7f5eSAndroid Build Coastguard Worker sinh(half2 v); 6079*344a7f5eSAndroid Build Coastguard Worker#endif 6080*344a7f5eSAndroid Build Coastguard Worker 6081*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6082*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 6083*344a7f5eSAndroid Build Coastguard Worker sinh(half3 v); 6084*344a7f5eSAndroid Build Coastguard Worker#endif 6085*344a7f5eSAndroid Build Coastguard Worker 6086*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6087*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6088*344a7f5eSAndroid Build Coastguard Worker sinh(half4 v); 6089*344a7f5eSAndroid Build Coastguard Worker#endif 6090*344a7f5eSAndroid Build Coastguard Worker 6091*344a7f5eSAndroid Build Coastguard Worker/* 6092*344a7f5eSAndroid Build Coastguard Worker * sinpi: Sine of a number multiplied by pi 6093*344a7f5eSAndroid Build Coastguard Worker * 6094*344a7f5eSAndroid Build Coastguard Worker * Returns the sine of (v * pi), where (v * pi) is measured in radians. 6095*344a7f5eSAndroid Build Coastguard Worker * 6096*344a7f5eSAndroid Build Coastguard Worker * To get the sine of a value measured in degrees, call sinpi(v / 180.f). 6097*344a7f5eSAndroid Build Coastguard Worker * 6098*344a7f5eSAndroid Build Coastguard Worker * See also native_sinpi(). 6099*344a7f5eSAndroid Build Coastguard Worker */ 6100*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 6101*344a7f5eSAndroid Build Coastguard Worker sinpi(float v); 6102*344a7f5eSAndroid Build Coastguard Worker 6103*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 6104*344a7f5eSAndroid Build Coastguard Worker sinpi(float2 v); 6105*344a7f5eSAndroid Build Coastguard Worker 6106*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 6107*344a7f5eSAndroid Build Coastguard Worker sinpi(float3 v); 6108*344a7f5eSAndroid Build Coastguard Worker 6109*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 6110*344a7f5eSAndroid Build Coastguard Worker sinpi(float4 v); 6111*344a7f5eSAndroid Build Coastguard Worker 6112*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6113*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 6114*344a7f5eSAndroid Build Coastguard Worker sinpi(half v); 6115*344a7f5eSAndroid Build Coastguard Worker#endif 6116*344a7f5eSAndroid Build Coastguard Worker 6117*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6118*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 6119*344a7f5eSAndroid Build Coastguard Worker sinpi(half2 v); 6120*344a7f5eSAndroid Build Coastguard Worker#endif 6121*344a7f5eSAndroid Build Coastguard Worker 6122*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6123*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 6124*344a7f5eSAndroid Build Coastguard Worker sinpi(half3 v); 6125*344a7f5eSAndroid Build Coastguard Worker#endif 6126*344a7f5eSAndroid Build Coastguard Worker 6127*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6128*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6129*344a7f5eSAndroid Build Coastguard Worker sinpi(half4 v); 6130*344a7f5eSAndroid Build Coastguard Worker#endif 6131*344a7f5eSAndroid Build Coastguard Worker 6132*344a7f5eSAndroid Build Coastguard Worker/* 6133*344a7f5eSAndroid Build Coastguard Worker * sqrt: Square root 6134*344a7f5eSAndroid Build Coastguard Worker * 6135*344a7f5eSAndroid Build Coastguard Worker * Returns the square root of a value. 6136*344a7f5eSAndroid Build Coastguard Worker * 6137*344a7f5eSAndroid Build Coastguard Worker * See also half_sqrt(), native_sqrt(). 6138*344a7f5eSAndroid Build Coastguard Worker */ 6139*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 6140*344a7f5eSAndroid Build Coastguard Worker sqrt(float v); 6141*344a7f5eSAndroid Build Coastguard Worker 6142*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 6143*344a7f5eSAndroid Build Coastguard Worker sqrt(float2 v); 6144*344a7f5eSAndroid Build Coastguard Worker 6145*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 6146*344a7f5eSAndroid Build Coastguard Worker sqrt(float3 v); 6147*344a7f5eSAndroid Build Coastguard Worker 6148*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 6149*344a7f5eSAndroid Build Coastguard Worker sqrt(float4 v); 6150*344a7f5eSAndroid Build Coastguard Worker 6151*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6152*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 6153*344a7f5eSAndroid Build Coastguard Worker sqrt(half v); 6154*344a7f5eSAndroid Build Coastguard Worker#endif 6155*344a7f5eSAndroid Build Coastguard Worker 6156*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6157*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 6158*344a7f5eSAndroid Build Coastguard Worker sqrt(half2 v); 6159*344a7f5eSAndroid Build Coastguard Worker#endif 6160*344a7f5eSAndroid Build Coastguard Worker 6161*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6162*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 6163*344a7f5eSAndroid Build Coastguard Worker sqrt(half3 v); 6164*344a7f5eSAndroid Build Coastguard Worker#endif 6165*344a7f5eSAndroid Build Coastguard Worker 6166*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6167*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6168*344a7f5eSAndroid Build Coastguard Worker sqrt(half4 v); 6169*344a7f5eSAndroid Build Coastguard Worker#endif 6170*344a7f5eSAndroid Build Coastguard Worker 6171*344a7f5eSAndroid Build Coastguard Worker/* 6172*344a7f5eSAndroid Build Coastguard Worker * step: 0 if less than a value, 0 otherwise 6173*344a7f5eSAndroid Build Coastguard Worker * 6174*344a7f5eSAndroid Build Coastguard Worker * Returns 0.f if v < edge, 1.f otherwise. 6175*344a7f5eSAndroid Build Coastguard Worker * 6176*344a7f5eSAndroid Build Coastguard Worker * This can be useful to create conditional computations without using loops and branching 6177*344a7f5eSAndroid Build Coastguard Worker * instructions. For example, instead of computing (a[i] < b[i]) ? 0.f : atan2(a[i], b[i]) 6178*344a7f5eSAndroid Build Coastguard Worker * for the corresponding elements of a vector, you could instead use step(a, b) * atan2(a, b). 6179*344a7f5eSAndroid Build Coastguard Worker */ 6180*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 6181*344a7f5eSAndroid Build Coastguard Worker step(float edge, float v); 6182*344a7f5eSAndroid Build Coastguard Worker 6183*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 6184*344a7f5eSAndroid Build Coastguard Worker step(float2 edge, float2 v); 6185*344a7f5eSAndroid Build Coastguard Worker 6186*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 6187*344a7f5eSAndroid Build Coastguard Worker step(float3 edge, float3 v); 6188*344a7f5eSAndroid Build Coastguard Worker 6189*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 6190*344a7f5eSAndroid Build Coastguard Worker step(float4 edge, float4 v); 6191*344a7f5eSAndroid Build Coastguard Worker 6192*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6193*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 6194*344a7f5eSAndroid Build Coastguard Worker step(half edge, half v); 6195*344a7f5eSAndroid Build Coastguard Worker#endif 6196*344a7f5eSAndroid Build Coastguard Worker 6197*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6198*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 6199*344a7f5eSAndroid Build Coastguard Worker step(half2 edge, half2 v); 6200*344a7f5eSAndroid Build Coastguard Worker#endif 6201*344a7f5eSAndroid Build Coastguard Worker 6202*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6203*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 6204*344a7f5eSAndroid Build Coastguard Worker step(half3 edge, half3 v); 6205*344a7f5eSAndroid Build Coastguard Worker#endif 6206*344a7f5eSAndroid Build Coastguard Worker 6207*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6208*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6209*344a7f5eSAndroid Build Coastguard Worker step(half4 edge, half4 v); 6210*344a7f5eSAndroid Build Coastguard Worker#endif 6211*344a7f5eSAndroid Build Coastguard Worker 6212*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 6213*344a7f5eSAndroid Build Coastguard Worker step(float2 edge, float v); 6214*344a7f5eSAndroid Build Coastguard Worker 6215*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 6216*344a7f5eSAndroid Build Coastguard Worker step(float3 edge, float v); 6217*344a7f5eSAndroid Build Coastguard Worker 6218*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 6219*344a7f5eSAndroid Build Coastguard Worker step(float4 edge, float v); 6220*344a7f5eSAndroid Build Coastguard Worker 6221*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6222*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 6223*344a7f5eSAndroid Build Coastguard Worker step(half2 edge, half v); 6224*344a7f5eSAndroid Build Coastguard Worker#endif 6225*344a7f5eSAndroid Build Coastguard Worker 6226*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6227*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 6228*344a7f5eSAndroid Build Coastguard Worker step(half3 edge, half v); 6229*344a7f5eSAndroid Build Coastguard Worker#endif 6230*344a7f5eSAndroid Build Coastguard Worker 6231*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6232*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6233*344a7f5eSAndroid Build Coastguard Worker step(half4 edge, half v); 6234*344a7f5eSAndroid Build Coastguard Worker#endif 6235*344a7f5eSAndroid Build Coastguard Worker 6236*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 6237*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 6238*344a7f5eSAndroid Build Coastguard Worker step(float edge, float2 v); 6239*344a7f5eSAndroid Build Coastguard Worker#endif 6240*344a7f5eSAndroid Build Coastguard Worker 6241*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 6242*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 6243*344a7f5eSAndroid Build Coastguard Worker step(float edge, float3 v); 6244*344a7f5eSAndroid Build Coastguard Worker#endif 6245*344a7f5eSAndroid Build Coastguard Worker 6246*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 21)) 6247*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 6248*344a7f5eSAndroid Build Coastguard Worker step(float edge, float4 v); 6249*344a7f5eSAndroid Build Coastguard Worker#endif 6250*344a7f5eSAndroid Build Coastguard Worker 6251*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6252*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 6253*344a7f5eSAndroid Build Coastguard Worker step(half edge, half2 v); 6254*344a7f5eSAndroid Build Coastguard Worker#endif 6255*344a7f5eSAndroid Build Coastguard Worker 6256*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6257*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 6258*344a7f5eSAndroid Build Coastguard Worker step(half edge, half3 v); 6259*344a7f5eSAndroid Build Coastguard Worker#endif 6260*344a7f5eSAndroid Build Coastguard Worker 6261*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6262*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6263*344a7f5eSAndroid Build Coastguard Worker step(half edge, half4 v); 6264*344a7f5eSAndroid Build Coastguard Worker#endif 6265*344a7f5eSAndroid Build Coastguard Worker 6266*344a7f5eSAndroid Build Coastguard Worker/* 6267*344a7f5eSAndroid Build Coastguard Worker * tan: Tangent 6268*344a7f5eSAndroid Build Coastguard Worker * 6269*344a7f5eSAndroid Build Coastguard Worker * Returns the tangent of an angle measured in radians. 6270*344a7f5eSAndroid Build Coastguard Worker * 6271*344a7f5eSAndroid Build Coastguard Worker * See also native_tan(). 6272*344a7f5eSAndroid Build Coastguard Worker */ 6273*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 6274*344a7f5eSAndroid Build Coastguard Worker tan(float v); 6275*344a7f5eSAndroid Build Coastguard Worker 6276*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 6277*344a7f5eSAndroid Build Coastguard Worker tan(float2 v); 6278*344a7f5eSAndroid Build Coastguard Worker 6279*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 6280*344a7f5eSAndroid Build Coastguard Worker tan(float3 v); 6281*344a7f5eSAndroid Build Coastguard Worker 6282*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 6283*344a7f5eSAndroid Build Coastguard Worker tan(float4 v); 6284*344a7f5eSAndroid Build Coastguard Worker 6285*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6286*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 6287*344a7f5eSAndroid Build Coastguard Worker tan(half v); 6288*344a7f5eSAndroid Build Coastguard Worker#endif 6289*344a7f5eSAndroid Build Coastguard Worker 6290*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6291*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 6292*344a7f5eSAndroid Build Coastguard Worker tan(half2 v); 6293*344a7f5eSAndroid Build Coastguard Worker#endif 6294*344a7f5eSAndroid Build Coastguard Worker 6295*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6296*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 6297*344a7f5eSAndroid Build Coastguard Worker tan(half3 v); 6298*344a7f5eSAndroid Build Coastguard Worker#endif 6299*344a7f5eSAndroid Build Coastguard Worker 6300*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6301*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6302*344a7f5eSAndroid Build Coastguard Worker tan(half4 v); 6303*344a7f5eSAndroid Build Coastguard Worker#endif 6304*344a7f5eSAndroid Build Coastguard Worker 6305*344a7f5eSAndroid Build Coastguard Worker/* 6306*344a7f5eSAndroid Build Coastguard Worker * tanh: Hyperbolic tangent 6307*344a7f5eSAndroid Build Coastguard Worker * 6308*344a7f5eSAndroid Build Coastguard Worker * Returns the hyperbolic tangent of a value. 6309*344a7f5eSAndroid Build Coastguard Worker * 6310*344a7f5eSAndroid Build Coastguard Worker * See also native_tanh(). 6311*344a7f5eSAndroid Build Coastguard Worker */ 6312*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 6313*344a7f5eSAndroid Build Coastguard Worker tanh(float v); 6314*344a7f5eSAndroid Build Coastguard Worker 6315*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 6316*344a7f5eSAndroid Build Coastguard Worker tanh(float2 v); 6317*344a7f5eSAndroid Build Coastguard Worker 6318*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 6319*344a7f5eSAndroid Build Coastguard Worker tanh(float3 v); 6320*344a7f5eSAndroid Build Coastguard Worker 6321*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 6322*344a7f5eSAndroid Build Coastguard Worker tanh(float4 v); 6323*344a7f5eSAndroid Build Coastguard Worker 6324*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6325*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 6326*344a7f5eSAndroid Build Coastguard Worker tanh(half v); 6327*344a7f5eSAndroid Build Coastguard Worker#endif 6328*344a7f5eSAndroid Build Coastguard Worker 6329*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6330*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 6331*344a7f5eSAndroid Build Coastguard Worker tanh(half2 v); 6332*344a7f5eSAndroid Build Coastguard Worker#endif 6333*344a7f5eSAndroid Build Coastguard Worker 6334*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6335*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 6336*344a7f5eSAndroid Build Coastguard Worker tanh(half3 v); 6337*344a7f5eSAndroid Build Coastguard Worker#endif 6338*344a7f5eSAndroid Build Coastguard Worker 6339*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6340*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6341*344a7f5eSAndroid Build Coastguard Worker tanh(half4 v); 6342*344a7f5eSAndroid Build Coastguard Worker#endif 6343*344a7f5eSAndroid Build Coastguard Worker 6344*344a7f5eSAndroid Build Coastguard Worker/* 6345*344a7f5eSAndroid Build Coastguard Worker * tanpi: Tangent of a number multiplied by pi 6346*344a7f5eSAndroid Build Coastguard Worker * 6347*344a7f5eSAndroid Build Coastguard Worker * Returns the tangent of (v * pi), where (v * pi) is measured in radians. 6348*344a7f5eSAndroid Build Coastguard Worker * 6349*344a7f5eSAndroid Build Coastguard Worker * To get the tangent of a value measured in degrees, call tanpi(v / 180.f). 6350*344a7f5eSAndroid Build Coastguard Worker * 6351*344a7f5eSAndroid Build Coastguard Worker * See also native_tanpi(). 6352*344a7f5eSAndroid Build Coastguard Worker */ 6353*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 6354*344a7f5eSAndroid Build Coastguard Worker tanpi(float v); 6355*344a7f5eSAndroid Build Coastguard Worker 6356*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 6357*344a7f5eSAndroid Build Coastguard Worker tanpi(float2 v); 6358*344a7f5eSAndroid Build Coastguard Worker 6359*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 6360*344a7f5eSAndroid Build Coastguard Worker tanpi(float3 v); 6361*344a7f5eSAndroid Build Coastguard Worker 6362*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 6363*344a7f5eSAndroid Build Coastguard Worker tanpi(float4 v); 6364*344a7f5eSAndroid Build Coastguard Worker 6365*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6366*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 6367*344a7f5eSAndroid Build Coastguard Worker tanpi(half v); 6368*344a7f5eSAndroid Build Coastguard Worker#endif 6369*344a7f5eSAndroid Build Coastguard Worker 6370*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6371*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 6372*344a7f5eSAndroid Build Coastguard Worker tanpi(half2 v); 6373*344a7f5eSAndroid Build Coastguard Worker#endif 6374*344a7f5eSAndroid Build Coastguard Worker 6375*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6376*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 6377*344a7f5eSAndroid Build Coastguard Worker tanpi(half3 v); 6378*344a7f5eSAndroid Build Coastguard Worker#endif 6379*344a7f5eSAndroid Build Coastguard Worker 6380*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6381*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6382*344a7f5eSAndroid Build Coastguard Worker tanpi(half4 v); 6383*344a7f5eSAndroid Build Coastguard Worker#endif 6384*344a7f5eSAndroid Build Coastguard Worker 6385*344a7f5eSAndroid Build Coastguard Worker/* 6386*344a7f5eSAndroid Build Coastguard Worker * tgamma: Gamma function 6387*344a7f5eSAndroid Build Coastguard Worker * 6388*344a7f5eSAndroid Build Coastguard Worker * Returns the gamma function of a value. 6389*344a7f5eSAndroid Build Coastguard Worker * 6390*344a7f5eSAndroid Build Coastguard Worker * See also lgamma(). 6391*344a7f5eSAndroid Build Coastguard Worker */ 6392*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 6393*344a7f5eSAndroid Build Coastguard Worker tgamma(float v); 6394*344a7f5eSAndroid Build Coastguard Worker 6395*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 6396*344a7f5eSAndroid Build Coastguard Worker tgamma(float2 v); 6397*344a7f5eSAndroid Build Coastguard Worker 6398*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 6399*344a7f5eSAndroid Build Coastguard Worker tgamma(float3 v); 6400*344a7f5eSAndroid Build Coastguard Worker 6401*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 6402*344a7f5eSAndroid Build Coastguard Worker tgamma(float4 v); 6403*344a7f5eSAndroid Build Coastguard Worker 6404*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6405*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 6406*344a7f5eSAndroid Build Coastguard Worker tgamma(half v); 6407*344a7f5eSAndroid Build Coastguard Worker#endif 6408*344a7f5eSAndroid Build Coastguard Worker 6409*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6410*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 6411*344a7f5eSAndroid Build Coastguard Worker tgamma(half2 v); 6412*344a7f5eSAndroid Build Coastguard Worker#endif 6413*344a7f5eSAndroid Build Coastguard Worker 6414*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6415*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 6416*344a7f5eSAndroid Build Coastguard Worker tgamma(half3 v); 6417*344a7f5eSAndroid Build Coastguard Worker#endif 6418*344a7f5eSAndroid Build Coastguard Worker 6419*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6420*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6421*344a7f5eSAndroid Build Coastguard Worker tgamma(half4 v); 6422*344a7f5eSAndroid Build Coastguard Worker#endif 6423*344a7f5eSAndroid Build Coastguard Worker 6424*344a7f5eSAndroid Build Coastguard Worker/* 6425*344a7f5eSAndroid Build Coastguard Worker * trunc: Truncates a floating point 6426*344a7f5eSAndroid Build Coastguard Worker * 6427*344a7f5eSAndroid Build Coastguard Worker * Rounds to integral using truncation. 6428*344a7f5eSAndroid Build Coastguard Worker * 6429*344a7f5eSAndroid Build Coastguard Worker * For example, trunc(1.7f) returns 1.f and trunc(-1.7f) returns -1.f. 6430*344a7f5eSAndroid Build Coastguard Worker * 6431*344a7f5eSAndroid Build Coastguard Worker * See rint() and round() for other rounding options. 6432*344a7f5eSAndroid Build Coastguard Worker */ 6433*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable)) 6434*344a7f5eSAndroid Build Coastguard Worker trunc(float v); 6435*344a7f5eSAndroid Build Coastguard Worker 6436*344a7f5eSAndroid Build Coastguard Workerextern float2 __attribute__((const, overloadable)) 6437*344a7f5eSAndroid Build Coastguard Worker trunc(float2 v); 6438*344a7f5eSAndroid Build Coastguard Worker 6439*344a7f5eSAndroid Build Coastguard Workerextern float3 __attribute__((const, overloadable)) 6440*344a7f5eSAndroid Build Coastguard Worker trunc(float3 v); 6441*344a7f5eSAndroid Build Coastguard Worker 6442*344a7f5eSAndroid Build Coastguard Workerextern float4 __attribute__((const, overloadable)) 6443*344a7f5eSAndroid Build Coastguard Worker trunc(float4 v); 6444*344a7f5eSAndroid Build Coastguard Worker 6445*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6446*344a7f5eSAndroid Build Coastguard Workerextern half __attribute__((const, overloadable)) 6447*344a7f5eSAndroid Build Coastguard Worker trunc(half v); 6448*344a7f5eSAndroid Build Coastguard Worker#endif 6449*344a7f5eSAndroid Build Coastguard Worker 6450*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6451*344a7f5eSAndroid Build Coastguard Workerextern half2 __attribute__((const, overloadable)) 6452*344a7f5eSAndroid Build Coastguard Worker trunc(half2 v); 6453*344a7f5eSAndroid Build Coastguard Worker#endif 6454*344a7f5eSAndroid Build Coastguard Worker 6455*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6456*344a7f5eSAndroid Build Coastguard Workerextern half3 __attribute__((const, overloadable)) 6457*344a7f5eSAndroid Build Coastguard Worker trunc(half3 v); 6458*344a7f5eSAndroid Build Coastguard Worker#endif 6459*344a7f5eSAndroid Build Coastguard Worker 6460*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 24)) 6461*344a7f5eSAndroid Build Coastguard Workerextern half4 __attribute__((const, overloadable)) 6462*344a7f5eSAndroid Build Coastguard Worker trunc(half4 v); 6463*344a7f5eSAndroid Build Coastguard Worker#endif 6464*344a7f5eSAndroid Build Coastguard Worker 6465*344a7f5eSAndroid Build Coastguard Worker/* 6466*344a7f5eSAndroid Build Coastguard Worker * rsClamp: Restrain a value to a range 6467*344a7f5eSAndroid Build Coastguard Worker * 6468*344a7f5eSAndroid Build Coastguard Worker * DEPRECATED. Do not use. 6469*344a7f5eSAndroid Build Coastguard Worker * 6470*344a7f5eSAndroid Build Coastguard Worker * Clamp a value between low and high. 6471*344a7f5eSAndroid Build Coastguard Worker * 6472*344a7f5eSAndroid Build Coastguard Worker * Parameters: 6473*344a7f5eSAndroid Build Coastguard Worker * amount: Value to clamp. 6474*344a7f5eSAndroid Build Coastguard Worker * low: Lower bound. 6475*344a7f5eSAndroid Build Coastguard Worker * high: Upper bound. 6476*344a7f5eSAndroid Build Coastguard Worker */ 6477*344a7f5eSAndroid Build Coastguard Workerextern char __attribute__((const, overloadable 6478*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 22)) 6479*344a7f5eSAndroid Build Coastguard Worker, deprecated("Use clamp() instead.") 6480*344a7f5eSAndroid Build Coastguard Worker#endif 6481*344a7f5eSAndroid Build Coastguard Worker)) 6482*344a7f5eSAndroid Build Coastguard Worker rsClamp(char amount, char low, char high); 6483*344a7f5eSAndroid Build Coastguard Worker 6484*344a7f5eSAndroid Build Coastguard Workerextern uchar __attribute__((const, overloadable 6485*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 22)) 6486*344a7f5eSAndroid Build Coastguard Worker, deprecated("Use clamp() instead.") 6487*344a7f5eSAndroid Build Coastguard Worker#endif 6488*344a7f5eSAndroid Build Coastguard Worker)) 6489*344a7f5eSAndroid Build Coastguard Worker rsClamp(uchar amount, uchar low, uchar high); 6490*344a7f5eSAndroid Build Coastguard Worker 6491*344a7f5eSAndroid Build Coastguard Workerextern short __attribute__((const, overloadable 6492*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 22)) 6493*344a7f5eSAndroid Build Coastguard Worker, deprecated("Use clamp() instead.") 6494*344a7f5eSAndroid Build Coastguard Worker#endif 6495*344a7f5eSAndroid Build Coastguard Worker)) 6496*344a7f5eSAndroid Build Coastguard Worker rsClamp(short amount, short low, short high); 6497*344a7f5eSAndroid Build Coastguard Worker 6498*344a7f5eSAndroid Build Coastguard Workerextern ushort __attribute__((const, overloadable 6499*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 22)) 6500*344a7f5eSAndroid Build Coastguard Worker, deprecated("Use clamp() instead.") 6501*344a7f5eSAndroid Build Coastguard Worker#endif 6502*344a7f5eSAndroid Build Coastguard Worker)) 6503*344a7f5eSAndroid Build Coastguard Worker rsClamp(ushort amount, ushort low, ushort high); 6504*344a7f5eSAndroid Build Coastguard Worker 6505*344a7f5eSAndroid Build Coastguard Workerextern int __attribute__((const, overloadable 6506*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 22)) 6507*344a7f5eSAndroid Build Coastguard Worker, deprecated("Use clamp() instead.") 6508*344a7f5eSAndroid Build Coastguard Worker#endif 6509*344a7f5eSAndroid Build Coastguard Worker)) 6510*344a7f5eSAndroid Build Coastguard Worker rsClamp(int amount, int low, int high); 6511*344a7f5eSAndroid Build Coastguard Worker 6512*344a7f5eSAndroid Build Coastguard Workerextern uint __attribute__((const, overloadable 6513*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 22)) 6514*344a7f5eSAndroid Build Coastguard Worker, deprecated("Use clamp() instead.") 6515*344a7f5eSAndroid Build Coastguard Worker#endif 6516*344a7f5eSAndroid Build Coastguard Worker)) 6517*344a7f5eSAndroid Build Coastguard Worker rsClamp(uint amount, uint low, uint high); 6518*344a7f5eSAndroid Build Coastguard Worker 6519*344a7f5eSAndroid Build Coastguard Worker/* 6520*344a7f5eSAndroid Build Coastguard Worker * rsFrac: Returns the fractional part of a float 6521*344a7f5eSAndroid Build Coastguard Worker * 6522*344a7f5eSAndroid Build Coastguard Worker * DEPRECATED. Do not use. 6523*344a7f5eSAndroid Build Coastguard Worker * 6524*344a7f5eSAndroid Build Coastguard Worker * Returns the fractional part of a float 6525*344a7f5eSAndroid Build Coastguard Worker */ 6526*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((const, overloadable 6527*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 22)) 6528*344a7f5eSAndroid Build Coastguard Worker, deprecated("Use fract() instead.") 6529*344a7f5eSAndroid Build Coastguard Worker#endif 6530*344a7f5eSAndroid Build Coastguard Worker)) 6531*344a7f5eSAndroid Build Coastguard Worker rsFrac(float v); 6532*344a7f5eSAndroid Build Coastguard Worker 6533*344a7f5eSAndroid Build Coastguard Worker/* 6534*344a7f5eSAndroid Build Coastguard Worker * rsRand: Pseudo-random number 6535*344a7f5eSAndroid Build Coastguard Worker * 6536*344a7f5eSAndroid Build Coastguard Worker * Return a random value between 0 (or min_value) and max_malue. 6537*344a7f5eSAndroid Build Coastguard Worker */ 6538*344a7f5eSAndroid Build Coastguard Workerextern int __attribute__((overloadable)) 6539*344a7f5eSAndroid Build Coastguard Worker rsRand(int max_value); 6540*344a7f5eSAndroid Build Coastguard Worker 6541*344a7f5eSAndroid Build Coastguard Workerextern int __attribute__((overloadable)) 6542*344a7f5eSAndroid Build Coastguard Worker rsRand(int min_value, int max_value); 6543*344a7f5eSAndroid Build Coastguard Worker 6544*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((overloadable)) 6545*344a7f5eSAndroid Build Coastguard Worker rsRand(float max_value); 6546*344a7f5eSAndroid Build Coastguard Worker 6547*344a7f5eSAndroid Build Coastguard Workerextern float __attribute__((overloadable)) 6548*344a7f5eSAndroid Build Coastguard Worker rsRand(float min_value, float max_value); 6549*344a7f5eSAndroid Build Coastguard Worker 6550*344a7f5eSAndroid Build Coastguard Worker#endif // RENDERSCRIPT_RS_MATH_RSH 6551