From ca43cf1d5d9f0fc2892f2678a0e83179a3213185 Mon Sep 17 00:00:00 2001 From: Tim Murray Date: Wed, 19 Feb 2014 18:32:37 -0800 Subject: Update RS prebuilts for LLVM 3.4. Change-Id: Ia8840135dd2e0a58fa3e39d91cc1b9512c34d300 --- renderscript/include/rs_core_math.rsh | 5936 +++++++++++++++++---------------- renderscript/include/rs_dct.rsh | 14 + renderscript/include/rs_fadst.rsh | 14 + renderscript/include/rs_iadst.rsh | 14 + renderscript/include/rs_idct.rsh | 13 + renderscript/include/rs_vp9.rsh | 29 + renderscript/include/rs_walsh.rsh | 11 + renderscript/lib/arm/libRSSupport.so | Bin 338220 -> 338220 bytes renderscript/lib/arm/libc.so | Bin 310140 -> 310140 bytes renderscript/lib/arm/libclcore.bc | Bin 175936 -> 216532 bytes renderscript/lib/arm/libm.so | Bin 103692 -> 103692 bytes renderscript/lib/arm/librsjni.so | Bin 22640 -> 22640 bytes renderscript/lib/arm/librsrt_arm.bc | Bin 175936 -> 216532 bytes renderscript/lib/javalib.jar | Bin 137990 -> 138525 bytes renderscript/lib/mips/libRSSupport.so | Bin 536836 -> 536836 bytes renderscript/lib/mips/libc.so | Bin 611248 -> 611248 bytes renderscript/lib/mips/libclcore.bc | Bin 224976 -> 266484 bytes renderscript/lib/mips/libm.so | Bin 136880 -> 136880 bytes renderscript/lib/mips/librsjni.so | Bin 71996 -> 71996 bytes renderscript/lib/mips/librsrt_mips.bc | Bin 224976 -> 266484 bytes renderscript/lib/x86/libRSSupport.so | Bin 591633 -> 641386 bytes renderscript/lib/x86/libc.so | Bin 746025 -> 746830 bytes renderscript/lib/x86/libclcore.bc | Bin 171152 -> 212024 bytes renderscript/lib/x86/libm.so | Bin 187085 -> 187085 bytes renderscript/lib/x86/librsjni.so | Bin 43880 -> 44567 bytes renderscript/lib/x86/librsrt_x86.bc | Bin 172908 -> 213792 bytes 26 files changed, 3064 insertions(+), 2967 deletions(-) create mode 100644 renderscript/include/rs_dct.rsh create mode 100644 renderscript/include/rs_fadst.rsh create mode 100644 renderscript/include/rs_iadst.rsh create mode 100644 renderscript/include/rs_idct.rsh create mode 100644 renderscript/include/rs_vp9.rsh create mode 100644 renderscript/include/rs_walsh.rsh (limited to 'renderscript') diff --git a/renderscript/include/rs_core_math.rsh b/renderscript/include/rs_core_math.rsh index 2b7c362..8fe6ad2 100644 --- a/renderscript/include/rs_core_math.rsh +++ b/renderscript/include/rs_core_math.rsh @@ -14,8645 +14,8647 @@ * limitations under the License. */ +// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. + #ifndef __rs_core_math_rsh__ #define __rs_core_math_rsh__ #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float2 to float2 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))convert_float2(float2); +extern uchar __attribute__((const, overloadable))abs(char value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float3 to float3 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))convert_float3(float3); +extern uchar2 __attribute__((const, overloadable))abs(char2 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float4 to float4 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))convert_float4(float4); +extern uchar3 __attribute__((const, overloadable))abs(char3 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double2 to float2 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))convert_float2(double2); +extern uchar4 __attribute__((const, overloadable))abs(char4 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double3 to float3 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))convert_float3(double3); +extern ushort __attribute__((const, overloadable))abs(short value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double4 to float4 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))convert_float4(double4); +extern ushort2 __attribute__((const, overloadable))abs(short2 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char2 to float2 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))convert_float2(char2); +extern ushort3 __attribute__((const, overloadable))abs(short3 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char3 to float3 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))convert_float3(char3); +extern ushort4 __attribute__((const, overloadable))abs(short4 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char4 to float4 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))convert_float4(char4); +extern uint __attribute__((const, overloadable))abs(int value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar2 to float2 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))convert_float2(uchar2); +extern uint2 __attribute__((const, overloadable))abs(int2 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar3 to float3 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))convert_float3(uchar3); +extern uint3 __attribute__((const, overloadable))abs(int3 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar4 to float4 + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))convert_float4(uchar4); +extern uint4 __attribute__((const, overloadable))abs(int4 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short2 to float2 + * acos * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))convert_float2(short2); +extern float __attribute__((const, overloadable))acos(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short3 to float3 + * acos * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))convert_float3(short3); +extern float2 __attribute__((const, overloadable))acos(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short4 to float4 + * acos * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))convert_float4(short4); +extern float3 __attribute__((const, overloadable))acos(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort2 to float2 + * acos * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))convert_float2(ushort2); +extern float4 __attribute__((const, overloadable))acos(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort3 to float3 + * acosh * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))convert_float3(ushort3); +extern float __attribute__((const, overloadable))acosh(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort4 to float4 + * acosh * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))convert_float4(ushort4); +extern float2 __attribute__((const, overloadable))acosh(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int2 to float2 + * acosh * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))convert_float2(int2); +extern float3 __attribute__((const, overloadable))acosh(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int3 to float3 + * acosh * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))convert_float3(int3); +extern float4 __attribute__((const, overloadable))acosh(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int4 to float4 + * acospi * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))convert_float4(int4); +extern float __attribute__((const, overloadable))acospi(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint2 to float2 + * acospi * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))convert_float2(uint2); +extern float2 __attribute__((const, overloadable))acospi(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint3 to float3 + * acospi * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))convert_float3(uint3); +extern float3 __attribute__((const, overloadable))acospi(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint4 to float4 + * acospi * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))convert_float4(uint4); +extern float4 __attribute__((const, overloadable))acospi(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long2 to float2 + * asin * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))convert_float2(long2); +extern float __attribute__((const, overloadable))asin(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long3 to float3 + * asin * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))convert_float3(long3); +extern float2 __attribute__((const, overloadable))asin(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long4 to float4 + * asin * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))convert_float4(long4); +extern float3 __attribute__((const, overloadable))asin(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong2 to float2 + * asin * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))convert_float2(ulong2); +extern float4 __attribute__((const, overloadable))asin(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong3 to float3 + * asinh * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))convert_float3(ulong3); +extern float __attribute__((const, overloadable))asinh(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong4 to float4 + * asinh * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))convert_float4(ulong4); +extern float2 __attribute__((const, overloadable))asinh(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float2 to double2 + * asinh * * Supported by API versions 9 and newer. */ -extern double2 __attribute__((const, overloadable))convert_double2(float2); +extern float3 __attribute__((const, overloadable))asinh(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float3 to double3 + * asinh * * Supported by API versions 9 and newer. */ -extern double3 __attribute__((const, overloadable))convert_double3(float3); +extern float4 __attribute__((const, overloadable))asinh(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float4 to double4 + * Return the inverse sine divided by PI. * * Supported by API versions 9 and newer. */ -extern double4 __attribute__((const, overloadable))convert_double4(float4); +extern float __attribute__((const, overloadable))asinpi(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double2 to double2 + * Return the inverse sine divided by PI. * * Supported by API versions 9 and newer. */ -extern double2 __attribute__((const, overloadable))convert_double2(double2); +extern float2 __attribute__((const, overloadable))asinpi(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double3 to double3 + * Return the inverse sine divided by PI. * * Supported by API versions 9 and newer. */ -extern double3 __attribute__((const, overloadable))convert_double3(double3); +extern float3 __attribute__((const, overloadable))asinpi(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double4 to double4 + * Return the inverse sine divided by PI. * * Supported by API versions 9 and newer. */ -extern double4 __attribute__((const, overloadable))convert_double4(double4); +extern float4 __attribute__((const, overloadable))asinpi(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char2 to double2 + * Return the inverse tangent. * * Supported by API versions 9 and newer. */ -extern double2 __attribute__((const, overloadable))convert_double2(char2); +extern float __attribute__((const, overloadable))atan(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char3 to double3 + * Return the inverse tangent. * * Supported by API versions 9 and newer. */ -extern double3 __attribute__((const, overloadable))convert_double3(char3); +extern float2 __attribute__((const, overloadable))atan(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char4 to double4 + * Return the inverse tangent. * * Supported by API versions 9 and newer. */ -extern double4 __attribute__((const, overloadable))convert_double4(char4); +extern float3 __attribute__((const, overloadable))atan(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar2 to double2 + * Return the inverse tangent. * * Supported by API versions 9 and newer. */ -extern double2 __attribute__((const, overloadable))convert_double2(uchar2); +extern float4 __attribute__((const, overloadable))atan(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar3 to double3 + * Return the inverse tangent of y / x. * * Supported by API versions 9 and newer. */ -extern double3 __attribute__((const, overloadable))convert_double3(uchar3); +extern float __attribute__((const, overloadable))atan2(float y, float x); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar4 to double4 + * Return the inverse tangent of y / x. * * Supported by API versions 9 and newer. */ -extern double4 __attribute__((const, overloadable))convert_double4(uchar4); +extern float2 __attribute__((const, overloadable))atan2(float2 y, float2 x); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short2 to double2 + * Return the inverse tangent of y / x. * * Supported by API versions 9 and newer. */ -extern double2 __attribute__((const, overloadable))convert_double2(short2); +extern float3 __attribute__((const, overloadable))atan2(float3 y, float3 x); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short3 to double3 + * Return the inverse tangent of y / x. * * Supported by API versions 9 and newer. */ -extern double3 __attribute__((const, overloadable))convert_double3(short3); +extern float4 __attribute__((const, overloadable))atan2(float4 y, float4 x); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short4 to double4 + * Return the inverse tangent of y / x, divided by PI. * * Supported by API versions 9 and newer. */ -extern double4 __attribute__((const, overloadable))convert_double4(short4); +extern float __attribute__((const, overloadable))atan2pi(float y, float x); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort2 to double2 + * Return the inverse tangent of y / x, divided by PI. * * Supported by API versions 9 and newer. */ -extern double2 __attribute__((const, overloadable))convert_double2(ushort2); +extern float2 __attribute__((const, overloadable))atan2pi(float2 y, float2 x); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort3 to double3 + * Return the inverse tangent of y / x, divided by PI. * * Supported by API versions 9 and newer. */ -extern double3 __attribute__((const, overloadable))convert_double3(ushort3); +extern float3 __attribute__((const, overloadable))atan2pi(float3 y, float3 x); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort4 to double4 + * Return the inverse tangent of y / x, divided by PI. * * Supported by API versions 9 and newer. */ -extern double4 __attribute__((const, overloadable))convert_double4(ushort4); +extern float4 __attribute__((const, overloadable))atan2pi(float4 y, float4 x); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int2 to double2 + * Return the inverse hyperbolic tangent. * * Supported by API versions 9 and newer. */ -extern double2 __attribute__((const, overloadable))convert_double2(int2); +extern float __attribute__((const, overloadable))atanh(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int3 to double3 + * Return the inverse hyperbolic tangent. * * Supported by API versions 9 and newer. */ -extern double3 __attribute__((const, overloadable))convert_double3(int3); +extern float2 __attribute__((const, overloadable))atanh(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int4 to double4 + * Return the inverse hyperbolic tangent. * * Supported by API versions 9 and newer. */ -extern double4 __attribute__((const, overloadable))convert_double4(int4); +extern float3 __attribute__((const, overloadable))atanh(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint2 to double2 + * Return the inverse hyperbolic tangent. * * Supported by API versions 9 and newer. */ -extern double2 __attribute__((const, overloadable))convert_double2(uint2); +extern float4 __attribute__((const, overloadable))atanh(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint3 to double3 + * Return the inverse tangent divided by PI. * * Supported by API versions 9 and newer. */ -extern double3 __attribute__((const, overloadable))convert_double3(uint3); +extern float __attribute__((const, overloadable))atanpi(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint4 to double4 + * Return the inverse tangent divided by PI. * * Supported by API versions 9 and newer. */ -extern double4 __attribute__((const, overloadable))convert_double4(uint4); +extern float2 __attribute__((const, overloadable))atanpi(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long2 to double2 + * Return the inverse tangent divided by PI. * * Supported by API versions 9 and newer. */ -extern double2 __attribute__((const, overloadable))convert_double2(long2); +extern float3 __attribute__((const, overloadable))atanpi(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long3 to double3 + * Return the inverse tangent divided by PI. * * Supported by API versions 9 and newer. */ -extern double3 __attribute__((const, overloadable))convert_double3(long3); +extern float4 __attribute__((const, overloadable))atanpi(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long4 to double4 + * Return the cube root. * * Supported by API versions 9 and newer. */ -extern double4 __attribute__((const, overloadable))convert_double4(long4); +extern float __attribute__((const, overloadable))cbrt(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong2 to double2 + * Return the cube root. * * Supported by API versions 9 and newer. */ -extern double2 __attribute__((const, overloadable))convert_double2(ulong2); +extern float2 __attribute__((const, overloadable))cbrt(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong3 to double3 + * Return the cube root. * * Supported by API versions 9 and newer. */ -extern double3 __attribute__((const, overloadable))convert_double3(ulong3); +extern float3 __attribute__((const, overloadable))cbrt(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong4 to double4 + * Return the cube root. * * Supported by API versions 9 and newer. */ -extern double4 __attribute__((const, overloadable))convert_double4(ulong4); +extern float4 __attribute__((const, overloadable))cbrt(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float2 to char2 + * Return the smallest integer not less than a value. * * Supported by API versions 9 and newer. */ -extern char2 __attribute__((const, overloadable))convert_char2(float2); +extern float __attribute__((const, overloadable))ceil(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float3 to char3 + * Return the smallest integer not less than a value. * * Supported by API versions 9 and newer. */ -extern char3 __attribute__((const, overloadable))convert_char3(float3); +extern float2 __attribute__((const, overloadable))ceil(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float4 to char4 + * Return the smallest integer not less than a value. * * Supported by API versions 9 and newer. */ -extern char4 __attribute__((const, overloadable))convert_char4(float4); +extern float3 __attribute__((const, overloadable))ceil(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double2 to char2 + * Return the smallest integer not less than a value. * * Supported by API versions 9 and newer. */ -extern char2 __attribute__((const, overloadable))convert_char2(double2); +extern float4 __attribute__((const, overloadable))ceil(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double3 to char3 + * Clamp a value to a specified high and low bound. + * + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low * * Supported by API versions 9 and newer. */ -extern char3 __attribute__((const, overloadable))convert_char3(double3); +extern float __attribute__((const, overloadable))clamp(float value, float min_value, float max_value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double4 to char4 + * Clamp a value to a specified high and low bound. + * + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low * * Supported by API versions 9 and newer. */ -extern char4 __attribute__((const, overloadable))convert_char4(double4); +extern float2 __attribute__((const, overloadable))clamp(float2 value, float2 min_value, float2 max_value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char2 to char2 + * Clamp a value to a specified high and low bound. + * + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low * * Supported by API versions 9 and newer. */ -extern char2 __attribute__((const, overloadable))convert_char2(char2); +extern float3 __attribute__((const, overloadable))clamp(float3 value, float3 min_value, float3 max_value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char3 to char3 + * Clamp a value to a specified high and low bound. + * + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low * * Supported by API versions 9 and newer. */ -extern char3 __attribute__((const, overloadable))convert_char3(char3); +extern float4 __attribute__((const, overloadable))clamp(float4 value, float4 min_value, float4 max_value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char4 to char4 + * Clamp a value to a specified high and low bound. + * + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low * * Supported by API versions 9 and newer. */ -extern char4 __attribute__((const, overloadable))convert_char4(char4); +extern float2 __attribute__((const, overloadable))clamp(float2 value, float min_value, float max_value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar2 to char2 + * Clamp a value to a specified high and low bound. + * + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low * * Supported by API versions 9 and newer. */ -extern char2 __attribute__((const, overloadable))convert_char2(uchar2); +extern float3 __attribute__((const, overloadable))clamp(float3 value, float min_value, float max_value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar3 to char3 + * Clamp a value to a specified high and low bound. + * + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low * * Supported by API versions 9 and newer. */ -extern char3 __attribute__((const, overloadable))convert_char3(uchar3); +extern float4 __attribute__((const, overloadable))clamp(float4 value, float min_value, float max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from uchar4 to char4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char4 __attribute__((const, overloadable))convert_char4(uchar4); +extern char __attribute__((const, overloadable))clamp(char value, char min_value, char max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from short2 to char2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char2 __attribute__((const, overloadable))convert_char2(short2); +extern char2 __attribute__((const, overloadable))clamp(char2 value, char2 min_value, char2 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from short3 to char3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char3 __attribute__((const, overloadable))convert_char3(short3); +extern char3 __attribute__((const, overloadable))clamp(char3 value, char3 min_value, char3 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from short4 to char4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char4 __attribute__((const, overloadable))convert_char4(short4); +extern char4 __attribute__((const, overloadable))clamp(char4 value, char4 min_value, char4 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from ushort2 to char2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char2 __attribute__((const, overloadable))convert_char2(ushort2); +extern uchar __attribute__((const, overloadable))clamp(uchar value, uchar min_value, uchar max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from ushort3 to char3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char3 __attribute__((const, overloadable))convert_char3(ushort3); +extern uchar2 __attribute__((const, overloadable))clamp(uchar2 value, uchar2 min_value, uchar2 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from ushort4 to char4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char4 __attribute__((const, overloadable))convert_char4(ushort4); +extern uchar3 __attribute__((const, overloadable))clamp(uchar3 value, uchar3 min_value, uchar3 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from int2 to char2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char2 __attribute__((const, overloadable))convert_char2(int2); +extern uchar4 __attribute__((const, overloadable))clamp(uchar4 value, uchar4 min_value, uchar4 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from int3 to char3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char3 __attribute__((const, overloadable))convert_char3(int3); +extern short __attribute__((const, overloadable))clamp(short value, short min_value, short max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from int4 to char4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char4 __attribute__((const, overloadable))convert_char4(int4); +extern short2 __attribute__((const, overloadable))clamp(short2 value, short2 min_value, short2 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from uint2 to char2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char2 __attribute__((const, overloadable))convert_char2(uint2); +extern short3 __attribute__((const, overloadable))clamp(short3 value, short3 min_value, short3 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from uint3 to char3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char3 __attribute__((const, overloadable))convert_char3(uint3); +extern short4 __attribute__((const, overloadable))clamp(short4 value, short4 min_value, short4 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from uint4 to char4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char4 __attribute__((const, overloadable))convert_char4(uint4); +extern ushort __attribute__((const, overloadable))clamp(ushort value, ushort min_value, ushort max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from long2 to char2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char2 __attribute__((const, overloadable))convert_char2(long2); +extern ushort2 __attribute__((const, overloadable))clamp(ushort2 value, ushort2 min_value, ushort2 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from long3 to char3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char3 __attribute__((const, overloadable))convert_char3(long3); +extern ushort3 __attribute__((const, overloadable))clamp(ushort3 value, ushort3 min_value, ushort3 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from long4 to char4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char4 __attribute__((const, overloadable))convert_char4(long4); +extern ushort4 __attribute__((const, overloadable))clamp(ushort4 value, ushort4 min_value, ushort4 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from ulong2 to char2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. - */ -extern char2 __attribute__((const, overloadable))convert_char2(ulong2); -#endif - -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) -/* - * Component wise conversion from ulong3 to char3 + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low * - * Supported by API versions 9 and newer. + * Supported by API versions 19 and newer. */ -extern char3 __attribute__((const, overloadable))convert_char3(ulong3); +extern int __attribute__((const, overloadable))clamp(int value, int min_value, int max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from ulong4 to char4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern char4 __attribute__((const, overloadable))convert_char4(ulong4); +extern int2 __attribute__((const, overloadable))clamp(int2 value, int2 min_value, int2 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from float2 to uchar2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar2 __attribute__((const, overloadable))convert_uchar2(float2); +extern int3 __attribute__((const, overloadable))clamp(int3 value, int3 min_value, int3 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from float3 to uchar3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar3 __attribute__((const, overloadable))convert_uchar3(float3); +extern int4 __attribute__((const, overloadable))clamp(int4 value, int4 min_value, int4 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from float4 to uchar4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar4 __attribute__((const, overloadable))convert_uchar4(float4); +extern uint __attribute__((const, overloadable))clamp(uint value, uint min_value, uint max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from double2 to uchar2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar2 __attribute__((const, overloadable))convert_uchar2(double2); +extern uint2 __attribute__((const, overloadable))clamp(uint2 value, uint2 min_value, uint2 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from double3 to uchar3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar3 __attribute__((const, overloadable))convert_uchar3(double3); +extern uint3 __attribute__((const, overloadable))clamp(uint3 value, uint3 min_value, uint3 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from double4 to uchar4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar4 __attribute__((const, overloadable))convert_uchar4(double4); +extern uint4 __attribute__((const, overloadable))clamp(uint4 value, uint4 min_value, uint4 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from char2 to uchar2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar2 __attribute__((const, overloadable))convert_uchar2(char2); +extern long __attribute__((const, overloadable))clamp(long value, long min_value, long max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from char3 to uchar3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar3 __attribute__((const, overloadable))convert_uchar3(char3); +extern long2 __attribute__((const, overloadable))clamp(long2 value, long2 min_value, long2 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from char4 to uchar4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar4 __attribute__((const, overloadable))convert_uchar4(char4); +extern long3 __attribute__((const, overloadable))clamp(long3 value, long3 min_value, long3 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from uchar2 to uchar2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar2 __attribute__((const, overloadable))convert_uchar2(uchar2); +extern long4 __attribute__((const, overloadable))clamp(long4 value, long4 min_value, long4 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from uchar3 to uchar3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar3 __attribute__((const, overloadable))convert_uchar3(uchar3); +extern ulong __attribute__((const, overloadable))clamp(ulong value, ulong min_value, ulong max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from uchar4 to uchar4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar4 __attribute__((const, overloadable))convert_uchar4(uchar4); +extern ulong2 __attribute__((const, overloadable))clamp(ulong2 value, ulong2 min_value, ulong2 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from short2 to uchar2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar2 __attribute__((const, overloadable))convert_uchar2(short2); +extern ulong3 __attribute__((const, overloadable))clamp(ulong3 value, ulong3 min_value, ulong3 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from short3 to uchar3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar3 __attribute__((const, overloadable))convert_uchar3(short3); +extern ulong4 __attribute__((const, overloadable))clamp(ulong4 value, ulong4 min_value, ulong4 max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from short4 to uchar4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar4 __attribute__((const, overloadable))convert_uchar4(short4); +extern char2 __attribute__((const, overloadable))clamp(char2 value, char min_value, char max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from ushort2 to uchar2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar2 __attribute__((const, overloadable))convert_uchar2(ushort2); +extern char3 __attribute__((const, overloadable))clamp(char3 value, char min_value, char max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from ushort3 to uchar3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar3 __attribute__((const, overloadable))convert_uchar3(ushort3); +extern char4 __attribute__((const, overloadable))clamp(char4 value, char min_value, char max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from ushort4 to uchar4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar4 __attribute__((const, overloadable))convert_uchar4(ushort4); +extern uchar2 __attribute__((const, overloadable))clamp(uchar2 value, uchar min_value, uchar max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from int2 to uchar2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar2 __attribute__((const, overloadable))convert_uchar2(int2); +extern uchar3 __attribute__((const, overloadable))clamp(uchar3 value, uchar min_value, uchar max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from int3 to uchar3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar3 __attribute__((const, overloadable))convert_uchar3(int3); +extern uchar4 __attribute__((const, overloadable))clamp(uchar4 value, uchar min_value, uchar max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from int4 to uchar4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar4 __attribute__((const, overloadable))convert_uchar4(int4); +extern short2 __attribute__((const, overloadable))clamp(short2 value, short min_value, short max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from uint2 to uchar2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar2 __attribute__((const, overloadable))convert_uchar2(uint2); +extern short3 __attribute__((const, overloadable))clamp(short3 value, short min_value, short max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from uint3 to uchar3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar3 __attribute__((const, overloadable))convert_uchar3(uint3); +extern short4 __attribute__((const, overloadable))clamp(short4 value, short min_value, short max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from uint4 to uchar4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar4 __attribute__((const, overloadable))convert_uchar4(uint4); +extern ushort2 __attribute__((const, overloadable))clamp(ushort2 value, ushort min_value, ushort max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from long2 to uchar2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar2 __attribute__((const, overloadable))convert_uchar2(long2); +extern ushort3 __attribute__((const, overloadable))clamp(ushort3 value, ushort min_value, ushort max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from long3 to uchar3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar3 __attribute__((const, overloadable))convert_uchar3(long3); +extern ushort4 __attribute__((const, overloadable))clamp(ushort4 value, ushort min_value, ushort max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from long4 to uchar4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar4 __attribute__((const, overloadable))convert_uchar4(long4); +extern int2 __attribute__((const, overloadable))clamp(int2 value, int min_value, int max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from ulong2 to uchar2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar2 __attribute__((const, overloadable))convert_uchar2(ulong2); +extern int3 __attribute__((const, overloadable))clamp(int3 value, int min_value, int max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from ulong3 to uchar3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar3 __attribute__((const, overloadable))convert_uchar3(ulong3); +extern int4 __attribute__((const, overloadable))clamp(int4 value, int min_value, int max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from ulong4 to uchar4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern uchar4 __attribute__((const, overloadable))convert_uchar4(ulong4); +extern uint2 __attribute__((const, overloadable))clamp(uint2 value, uint min_value, uint max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from float2 to short2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern short2 __attribute__((const, overloadable))convert_short2(float2); +extern uint3 __attribute__((const, overloadable))clamp(uint3 value, uint min_value, uint max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from float3 to short3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern short3 __attribute__((const, overloadable))convert_short3(float3); +extern uint4 __attribute__((const, overloadable))clamp(uint4 value, uint min_value, uint max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from float4 to short4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern short4 __attribute__((const, overloadable))convert_short4(float4); +extern long2 __attribute__((const, overloadable))clamp(long2 value, long min_value, long max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from double2 to short2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern short2 __attribute__((const, overloadable))convert_short2(double2); +extern long3 __attribute__((const, overloadable))clamp(long3 value, long min_value, long max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from double3 to short3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern short3 __attribute__((const, overloadable))convert_short3(double3); +extern long4 __attribute__((const, overloadable))clamp(long4 value, long min_value, long max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from double4 to short4 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern short4 __attribute__((const, overloadable))convert_short4(double4); +extern ulong2 __attribute__((const, overloadable))clamp(ulong2 value, ulong min_value, ulong max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from char2 to short2 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern short2 __attribute__((const, overloadable))convert_short2(char2); +extern ulong3 __attribute__((const, overloadable))clamp(ulong3 value, ulong min_value, ulong max_value); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 19)) /* - * Component wise conversion from char3 to short3 + * Clamp a value to a specified high and low bound. * - * Supported by API versions 9 and newer. + * @param amount value to be clamped. Supports 1,2,3,4 components + * @param min_value Lower bound, must be scalar or matching vector. + * @param max_value High bound, must match type of low + * + * Supported by API versions 19 and newer. */ -extern short3 __attribute__((const, overloadable))convert_short3(char3); +extern ulong4 __attribute__((const, overloadable))clamp(ulong4 value, ulong min_value, ulong max_value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char4 to short4 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short4 __attribute__((const, overloadable))convert_short4(char4); +extern char __attribute__((const, overloadable))clz(char value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar2 to short2 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short2 __attribute__((const, overloadable))convert_short2(uchar2); +extern char2 __attribute__((const, overloadable))clz(char2 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar3 to short3 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short3 __attribute__((const, overloadable))convert_short3(uchar3); +extern char3 __attribute__((const, overloadable))clz(char3 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar4 to short4 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short4 __attribute__((const, overloadable))convert_short4(uchar4); +extern char4 __attribute__((const, overloadable))clz(char4 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short2 to short2 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short2 __attribute__((const, overloadable))convert_short2(short2); +extern uchar __attribute__((const, overloadable))clz(uchar value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short3 to short3 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short3 __attribute__((const, overloadable))convert_short3(short3); +extern uchar2 __attribute__((const, overloadable))clz(uchar2 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short4 to short4 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short4 __attribute__((const, overloadable))convert_short4(short4); +extern uchar3 __attribute__((const, overloadable))clz(uchar3 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort2 to short2 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short2 __attribute__((const, overloadable))convert_short2(ushort2); +extern uchar4 __attribute__((const, overloadable))clz(uchar4 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort3 to short3 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short3 __attribute__((const, overloadable))convert_short3(ushort3); +extern short __attribute__((const, overloadable))clz(short value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort4 to short4 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short4 __attribute__((const, overloadable))convert_short4(ushort4); +extern short2 __attribute__((const, overloadable))clz(short2 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int2 to short2 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short2 __attribute__((const, overloadable))convert_short2(int2); +extern short3 __attribute__((const, overloadable))clz(short3 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int3 to short3 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short3 __attribute__((const, overloadable))convert_short3(int3); +extern short4 __attribute__((const, overloadable))clz(short4 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int4 to short4 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short4 __attribute__((const, overloadable))convert_short4(int4); +extern ushort __attribute__((const, overloadable))clz(ushort value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint2 to short2 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short2 __attribute__((const, overloadable))convert_short2(uint2); +extern ushort2 __attribute__((const, overloadable))clz(ushort2 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint3 to short3 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short3 __attribute__((const, overloadable))convert_short3(uint3); +extern ushort3 __attribute__((const, overloadable))clz(ushort3 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint4 to short4 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short4 __attribute__((const, overloadable))convert_short4(uint4); +extern ushort4 __attribute__((const, overloadable))clz(ushort4 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long2 to short2 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short2 __attribute__((const, overloadable))convert_short2(long2); +extern int __attribute__((const, overloadable))clz(int value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long3 to short3 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short3 __attribute__((const, overloadable))convert_short3(long3); +extern int2 __attribute__((const, overloadable))clz(int2 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long4 to short4 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short4 __attribute__((const, overloadable))convert_short4(long4); +extern int3 __attribute__((const, overloadable))clz(int3 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong2 to short2 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short2 __attribute__((const, overloadable))convert_short2(ulong2); +extern int4 __attribute__((const, overloadable))clz(int4 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong3 to short3 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short3 __attribute__((const, overloadable))convert_short3(ulong3); +extern uint __attribute__((const, overloadable))clz(uint value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong4 to short4 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern short4 __attribute__((const, overloadable))convert_short4(ulong4); +extern uint2 __attribute__((const, overloadable))clz(uint2 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float2 to ushort2 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))convert_ushort2(float2); +extern uint3 __attribute__((const, overloadable))clz(uint3 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float3 to ushort3 + * Return the number of leading 0-bits in a value. * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))convert_ushort3(float3); +extern uint4 __attribute__((const, overloadable))clz(uint4 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float4 to ushort4 + * Component wise conversion from float2 to float2 * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))convert_ushort4(float4); +extern float2 __attribute__((const, overloadable))convert_float2(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double2 to ushort2 + * Component wise conversion from float3 to float3 * * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))convert_ushort2(double2); +extern float3 __attribute__((const, overloadable))convert_float3(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double3 to ushort3 + * Component wise conversion from float4 to float4 * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))convert_ushort3(double3); +extern float4 __attribute__((const, overloadable))convert_float4(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double4 to ushort4 + * Component wise conversion from double2 to float2 * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))convert_ushort4(double4); +extern float2 __attribute__((const, overloadable))convert_float2(double2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char2 to ushort2 + * Component wise conversion from double3 to float3 * * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))convert_ushort2(char2); +extern float3 __attribute__((const, overloadable))convert_float3(double3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char3 to ushort3 + * Component wise conversion from double4 to float4 * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))convert_ushort3(char3); +extern float4 __attribute__((const, overloadable))convert_float4(double4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char4 to ushort4 + * Component wise conversion from char2 to float2 * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))convert_ushort4(char4); +extern float2 __attribute__((const, overloadable))convert_float2(char2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar2 to ushort2 + * Component wise conversion from char3 to float3 * * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))convert_ushort2(uchar2); +extern float3 __attribute__((const, overloadable))convert_float3(char3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar3 to ushort3 + * Component wise conversion from char4 to float4 * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))convert_ushort3(uchar3); +extern float4 __attribute__((const, overloadable))convert_float4(char4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar4 to ushort4 + * Component wise conversion from uchar2 to float2 * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))convert_ushort4(uchar4); +extern float2 __attribute__((const, overloadable))convert_float2(uchar2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short2 to ushort2 + * Component wise conversion from uchar3 to float3 * * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))convert_ushort2(short2); +extern float3 __attribute__((const, overloadable))convert_float3(uchar3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short3 to ushort3 + * Component wise conversion from uchar4 to float4 * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))convert_ushort3(short3); +extern float4 __attribute__((const, overloadable))convert_float4(uchar4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short4 to ushort4 + * Component wise conversion from short2 to float2 * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))convert_ushort4(short4); +extern float2 __attribute__((const, overloadable))convert_float2(short2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort2 to ushort2 + * Component wise conversion from short3 to float3 * * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))convert_ushort2(ushort2); +extern float3 __attribute__((const, overloadable))convert_float3(short3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort3 to ushort3 + * Component wise conversion from short4 to float4 * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))convert_ushort3(ushort3); +extern float4 __attribute__((const, overloadable))convert_float4(short4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort4 to ushort4 + * Component wise conversion from ushort2 to float2 * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))convert_ushort4(ushort4); +extern float2 __attribute__((const, overloadable))convert_float2(ushort2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int2 to ushort2 + * Component wise conversion from ushort3 to float3 * * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))convert_ushort2(int2); +extern float3 __attribute__((const, overloadable))convert_float3(ushort3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int3 to ushort3 + * Component wise conversion from ushort4 to float4 * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))convert_ushort3(int3); +extern float4 __attribute__((const, overloadable))convert_float4(ushort4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int4 to ushort4 + * Component wise conversion from int2 to float2 * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))convert_ushort4(int4); +extern float2 __attribute__((const, overloadable))convert_float2(int2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint2 to ushort2 + * Component wise conversion from int3 to float3 * * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))convert_ushort2(uint2); +extern float3 __attribute__((const, overloadable))convert_float3(int3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint3 to ushort3 + * Component wise conversion from int4 to float4 * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))convert_ushort3(uint3); +extern float4 __attribute__((const, overloadable))convert_float4(int4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint4 to ushort4 + * Component wise conversion from uint2 to float2 * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))convert_ushort4(uint4); +extern float2 __attribute__((const, overloadable))convert_float2(uint2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long2 to ushort2 + * Component wise conversion from uint3 to float3 * * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))convert_ushort2(long2); +extern float3 __attribute__((const, overloadable))convert_float3(uint3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long3 to ushort3 + * Component wise conversion from uint4 to float4 * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))convert_ushort3(long3); +extern float4 __attribute__((const, overloadable))convert_float4(uint4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long4 to ushort4 + * Component wise conversion from long2 to float2 * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))convert_ushort4(long4); +extern float2 __attribute__((const, overloadable))convert_float2(long2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong2 to ushort2 + * Component wise conversion from long3 to float3 * * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))convert_ushort2(ulong2); +extern float3 __attribute__((const, overloadable))convert_float3(long3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong3 to ushort3 + * Component wise conversion from long4 to float4 * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))convert_ushort3(ulong3); +extern float4 __attribute__((const, overloadable))convert_float4(long4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong4 to ushort4 + * Component wise conversion from ulong2 to float2 * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))convert_ushort4(ulong4); +extern float2 __attribute__((const, overloadable))convert_float2(ulong2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float2 to int2 + * Component wise conversion from ulong3 to float3 * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))convert_int2(float2); +extern float3 __attribute__((const, overloadable))convert_float3(ulong3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float3 to int3 + * Component wise conversion from ulong4 to float4 * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))convert_int3(float3); +extern float4 __attribute__((const, overloadable))convert_float4(ulong4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float4 to int4 + * Component wise conversion from float2 to double2 * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))convert_int4(float4); +extern double2 __attribute__((const, overloadable))convert_double2(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double2 to int2 + * Component wise conversion from float3 to double3 * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))convert_int2(double2); +extern double3 __attribute__((const, overloadable))convert_double3(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double3 to int3 + * Component wise conversion from float4 to double4 * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))convert_int3(double3); +extern double4 __attribute__((const, overloadable))convert_double4(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double4 to int4 + * Component wise conversion from double2 to double2 * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))convert_int4(double4); +extern double2 __attribute__((const, overloadable))convert_double2(double2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char2 to int2 + * Component wise conversion from double3 to double3 * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))convert_int2(char2); +extern double3 __attribute__((const, overloadable))convert_double3(double3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char3 to int3 + * Component wise conversion from double4 to double4 * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))convert_int3(char3); +extern double4 __attribute__((const, overloadable))convert_double4(double4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char4 to int4 + * Component wise conversion from char2 to double2 * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))convert_int4(char4); +extern double2 __attribute__((const, overloadable))convert_double2(char2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar2 to int2 + * Component wise conversion from char3 to double3 * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))convert_int2(uchar2); +extern double3 __attribute__((const, overloadable))convert_double3(char3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar3 to int3 + * Component wise conversion from char4 to double4 * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))convert_int3(uchar3); +extern double4 __attribute__((const, overloadable))convert_double4(char4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar4 to int4 + * Component wise conversion from uchar2 to double2 * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))convert_int4(uchar4); +extern double2 __attribute__((const, overloadable))convert_double2(uchar2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short2 to int2 + * Component wise conversion from uchar3 to double3 * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))convert_int2(short2); +extern double3 __attribute__((const, overloadable))convert_double3(uchar3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short3 to int3 + * Component wise conversion from uchar4 to double4 * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))convert_int3(short3); +extern double4 __attribute__((const, overloadable))convert_double4(uchar4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short4 to int4 + * Component wise conversion from short2 to double2 * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))convert_int4(short4); +extern double2 __attribute__((const, overloadable))convert_double2(short2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort2 to int2 + * Component wise conversion from short3 to double3 * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))convert_int2(ushort2); +extern double3 __attribute__((const, overloadable))convert_double3(short3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort3 to int3 + * Component wise conversion from short4 to double4 * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))convert_int3(ushort3); +extern double4 __attribute__((const, overloadable))convert_double4(short4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort4 to int4 + * Component wise conversion from ushort2 to double2 * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))convert_int4(ushort4); +extern double2 __attribute__((const, overloadable))convert_double2(ushort2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int2 to int2 + * Component wise conversion from ushort3 to double3 * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))convert_int2(int2); +extern double3 __attribute__((const, overloadable))convert_double3(ushort3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int3 to int3 + * Component wise conversion from ushort4 to double4 * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))convert_int3(int3); +extern double4 __attribute__((const, overloadable))convert_double4(ushort4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int4 to int4 + * Component wise conversion from int2 to double2 * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))convert_int4(int4); +extern double2 __attribute__((const, overloadable))convert_double2(int2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint2 to int2 + * Component wise conversion from int3 to double3 * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))convert_int2(uint2); +extern double3 __attribute__((const, overloadable))convert_double3(int3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint3 to int3 + * Component wise conversion from int4 to double4 * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))convert_int3(uint3); +extern double4 __attribute__((const, overloadable))convert_double4(int4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint4 to int4 + * Component wise conversion from uint2 to double2 * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))convert_int4(uint4); +extern double2 __attribute__((const, overloadable))convert_double2(uint2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long2 to int2 + * Component wise conversion from uint3 to double3 * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))convert_int2(long2); +extern double3 __attribute__((const, overloadable))convert_double3(uint3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long3 to int3 + * Component wise conversion from uint4 to double4 * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))convert_int3(long3); +extern double4 __attribute__((const, overloadable))convert_double4(uint4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long4 to int4 + * Component wise conversion from long2 to double2 * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))convert_int4(long4); +extern double2 __attribute__((const, overloadable))convert_double2(long2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong2 to int2 + * Component wise conversion from long3 to double3 * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))convert_int2(ulong2); +extern double3 __attribute__((const, overloadable))convert_double3(long3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong3 to int3 + * Component wise conversion from long4 to double4 * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))convert_int3(ulong3); +extern double4 __attribute__((const, overloadable))convert_double4(long4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong4 to int4 + * Component wise conversion from ulong2 to double2 * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))convert_int4(ulong4); +extern double2 __attribute__((const, overloadable))convert_double2(ulong2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float2 to uint2 + * Component wise conversion from ulong3 to double3 * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))convert_uint2(float2); +extern double3 __attribute__((const, overloadable))convert_double3(ulong3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float3 to uint3 + * Component wise conversion from ulong4 to double4 * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))convert_uint3(float3); +extern double4 __attribute__((const, overloadable))convert_double4(ulong4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float4 to uint4 + * Component wise conversion from float2 to char2 * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))convert_uint4(float4); +extern char2 __attribute__((const, overloadable))convert_char2(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double2 to uint2 + * Component wise conversion from float3 to char3 * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))convert_uint2(double2); +extern char3 __attribute__((const, overloadable))convert_char3(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double3 to uint3 + * Component wise conversion from float4 to char4 * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))convert_uint3(double3); +extern char4 __attribute__((const, overloadable))convert_char4(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double4 to uint4 + * Component wise conversion from double2 to char2 * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))convert_uint4(double4); +extern char2 __attribute__((const, overloadable))convert_char2(double2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char2 to uint2 + * Component wise conversion from double3 to char3 * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))convert_uint2(char2); +extern char3 __attribute__((const, overloadable))convert_char3(double3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char3 to uint3 + * Component wise conversion from double4 to char4 * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))convert_uint3(char3); +extern char4 __attribute__((const, overloadable))convert_char4(double4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char4 to uint4 + * Component wise conversion from char2 to char2 * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))convert_uint4(char4); +extern char2 __attribute__((const, overloadable))convert_char2(char2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar2 to uint2 + * Component wise conversion from char3 to char3 * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))convert_uint2(uchar2); +extern char3 __attribute__((const, overloadable))convert_char3(char3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar3 to uint3 + * Component wise conversion from char4 to char4 * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))convert_uint3(uchar3); +extern char4 __attribute__((const, overloadable))convert_char4(char4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar4 to uint4 + * Component wise conversion from uchar2 to char2 * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))convert_uint4(uchar4); +extern char2 __attribute__((const, overloadable))convert_char2(uchar2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short2 to uint2 + * Component wise conversion from uchar3 to char3 * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))convert_uint2(short2); +extern char3 __attribute__((const, overloadable))convert_char3(uchar3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short3 to uint3 + * Component wise conversion from uchar4 to char4 * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))convert_uint3(short3); +extern char4 __attribute__((const, overloadable))convert_char4(uchar4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short4 to uint4 + * Component wise conversion from short2 to char2 * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))convert_uint4(short4); +extern char2 __attribute__((const, overloadable))convert_char2(short2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort2 to uint2 + * Component wise conversion from short3 to char3 * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))convert_uint2(ushort2); +extern char3 __attribute__((const, overloadable))convert_char3(short3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort3 to uint3 + * Component wise conversion from short4 to char4 * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))convert_uint3(ushort3); +extern char4 __attribute__((const, overloadable))convert_char4(short4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort4 to uint4 + * Component wise conversion from ushort2 to char2 * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))convert_uint4(ushort4); +extern char2 __attribute__((const, overloadable))convert_char2(ushort2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int2 to uint2 + * Component wise conversion from ushort3 to char3 * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))convert_uint2(int2); +extern char3 __attribute__((const, overloadable))convert_char3(ushort3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int3 to uint3 + * Component wise conversion from ushort4 to char4 * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))convert_uint3(int3); +extern char4 __attribute__((const, overloadable))convert_char4(ushort4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int4 to uint4 + * Component wise conversion from int2 to char2 * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))convert_uint4(int4); +extern char2 __attribute__((const, overloadable))convert_char2(int2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint2 to uint2 + * Component wise conversion from int3 to char3 * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))convert_uint2(uint2); +extern char3 __attribute__((const, overloadable))convert_char3(int3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint3 to uint3 + * Component wise conversion from int4 to char4 * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))convert_uint3(uint3); +extern char4 __attribute__((const, overloadable))convert_char4(int4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint4 to uint4 + * Component wise conversion from uint2 to char2 * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))convert_uint4(uint4); +extern char2 __attribute__((const, overloadable))convert_char2(uint2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long2 to uint2 + * Component wise conversion from uint3 to char3 * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))convert_uint2(long2); +extern char3 __attribute__((const, overloadable))convert_char3(uint3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long3 to uint3 + * Component wise conversion from uint4 to char4 * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))convert_uint3(long3); +extern char4 __attribute__((const, overloadable))convert_char4(uint4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long4 to uint4 + * Component wise conversion from long2 to char2 * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))convert_uint4(long4); +extern char2 __attribute__((const, overloadable))convert_char2(long2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong2 to uint2 + * Component wise conversion from long3 to char3 * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))convert_uint2(ulong2); +extern char3 __attribute__((const, overloadable))convert_char3(long3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong3 to uint3 + * Component wise conversion from long4 to char4 * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))convert_uint3(ulong3); +extern char4 __attribute__((const, overloadable))convert_char4(long4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong4 to uint4 + * Component wise conversion from ulong2 to char2 * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))convert_uint4(ulong4); +extern char2 __attribute__((const, overloadable))convert_char2(ulong2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float2 to long2 + * Component wise conversion from ulong3 to char3 * * Supported by API versions 9 and newer. */ -extern long2 __attribute__((const, overloadable))convert_long2(float2); +extern char3 __attribute__((const, overloadable))convert_char3(ulong3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float3 to long3 + * Component wise conversion from ulong4 to char4 * * Supported by API versions 9 and newer. */ -extern long3 __attribute__((const, overloadable))convert_long3(float3); +extern char4 __attribute__((const, overloadable))convert_char4(ulong4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float4 to long4 + * Component wise conversion from float2 to uchar2 * * Supported by API versions 9 and newer. */ -extern long4 __attribute__((const, overloadable))convert_long4(float4); +extern uchar2 __attribute__((const, overloadable))convert_uchar2(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double2 to long2 + * Component wise conversion from float3 to uchar3 * * Supported by API versions 9 and newer. */ -extern long2 __attribute__((const, overloadable))convert_long2(double2); +extern uchar3 __attribute__((const, overloadable))convert_uchar3(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double3 to long3 + * Component wise conversion from float4 to uchar4 * * Supported by API versions 9 and newer. */ -extern long3 __attribute__((const, overloadable))convert_long3(double3); +extern uchar4 __attribute__((const, overloadable))convert_uchar4(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double4 to long4 + * Component wise conversion from double2 to uchar2 * * Supported by API versions 9 and newer. */ -extern long4 __attribute__((const, overloadable))convert_long4(double4); +extern uchar2 __attribute__((const, overloadable))convert_uchar2(double2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char2 to long2 + * Component wise conversion from double3 to uchar3 * * Supported by API versions 9 and newer. */ -extern long2 __attribute__((const, overloadable))convert_long2(char2); +extern uchar3 __attribute__((const, overloadable))convert_uchar3(double3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char3 to long3 + * Component wise conversion from double4 to uchar4 * * Supported by API versions 9 and newer. */ -extern long3 __attribute__((const, overloadable))convert_long3(char3); +extern uchar4 __attribute__((const, overloadable))convert_uchar4(double4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char4 to long4 + * Component wise conversion from char2 to uchar2 * * Supported by API versions 9 and newer. */ -extern long4 __attribute__((const, overloadable))convert_long4(char4); +extern uchar2 __attribute__((const, overloadable))convert_uchar2(char2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar2 to long2 + * Component wise conversion from char3 to uchar3 * * Supported by API versions 9 and newer. */ -extern long2 __attribute__((const, overloadable))convert_long2(uchar2); +extern uchar3 __attribute__((const, overloadable))convert_uchar3(char3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar3 to long3 + * Component wise conversion from char4 to uchar4 * * Supported by API versions 9 and newer. */ -extern long3 __attribute__((const, overloadable))convert_long3(uchar3); +extern uchar4 __attribute__((const, overloadable))convert_uchar4(char4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar4 to long4 + * Component wise conversion from uchar2 to uchar2 * * Supported by API versions 9 and newer. */ -extern long4 __attribute__((const, overloadable))convert_long4(uchar4); +extern uchar2 __attribute__((const, overloadable))convert_uchar2(uchar2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short2 to long2 + * Component wise conversion from uchar3 to uchar3 * * Supported by API versions 9 and newer. */ -extern long2 __attribute__((const, overloadable))convert_long2(short2); +extern uchar3 __attribute__((const, overloadable))convert_uchar3(uchar3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short3 to long3 + * Component wise conversion from uchar4 to uchar4 * * Supported by API versions 9 and newer. */ -extern long3 __attribute__((const, overloadable))convert_long3(short3); +extern uchar4 __attribute__((const, overloadable))convert_uchar4(uchar4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short4 to long4 + * Component wise conversion from short2 to uchar2 * * Supported by API versions 9 and newer. */ -extern long4 __attribute__((const, overloadable))convert_long4(short4); +extern uchar2 __attribute__((const, overloadable))convert_uchar2(short2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort2 to long2 + * Component wise conversion from short3 to uchar3 * * Supported by API versions 9 and newer. */ -extern long2 __attribute__((const, overloadable))convert_long2(ushort2); +extern uchar3 __attribute__((const, overloadable))convert_uchar3(short3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort3 to long3 + * Component wise conversion from short4 to uchar4 * * Supported by API versions 9 and newer. */ -extern long3 __attribute__((const, overloadable))convert_long3(ushort3); +extern uchar4 __attribute__((const, overloadable))convert_uchar4(short4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort4 to long4 + * Component wise conversion from ushort2 to uchar2 * * Supported by API versions 9 and newer. */ -extern long4 __attribute__((const, overloadable))convert_long4(ushort4); +extern uchar2 __attribute__((const, overloadable))convert_uchar2(ushort2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int2 to long2 + * Component wise conversion from ushort3 to uchar3 * * Supported by API versions 9 and newer. */ -extern long2 __attribute__((const, overloadable))convert_long2(int2); +extern uchar3 __attribute__((const, overloadable))convert_uchar3(ushort3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int3 to long3 + * Component wise conversion from ushort4 to uchar4 * * Supported by API versions 9 and newer. */ -extern long3 __attribute__((const, overloadable))convert_long3(int3); +extern uchar4 __attribute__((const, overloadable))convert_uchar4(ushort4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int4 to long4 + * Component wise conversion from int2 to uchar2 * * Supported by API versions 9 and newer. */ -extern long4 __attribute__((const, overloadable))convert_long4(int4); +extern uchar2 __attribute__((const, overloadable))convert_uchar2(int2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint2 to long2 + * Component wise conversion from int3 to uchar3 * * Supported by API versions 9 and newer. */ -extern long2 __attribute__((const, overloadable))convert_long2(uint2); +extern uchar3 __attribute__((const, overloadable))convert_uchar3(int3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint3 to long3 + * Component wise conversion from int4 to uchar4 * * Supported by API versions 9 and newer. */ -extern long3 __attribute__((const, overloadable))convert_long3(uint3); +extern uchar4 __attribute__((const, overloadable))convert_uchar4(int4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint4 to long4 + * Component wise conversion from uint2 to uchar2 * * Supported by API versions 9 and newer. */ -extern long4 __attribute__((const, overloadable))convert_long4(uint4); +extern uchar2 __attribute__((const, overloadable))convert_uchar2(uint2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long2 to long2 + * Component wise conversion from uint3 to uchar3 * * Supported by API versions 9 and newer. */ -extern long2 __attribute__((const, overloadable))convert_long2(long2); +extern uchar3 __attribute__((const, overloadable))convert_uchar3(uint3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long3 to long3 + * Component wise conversion from uint4 to uchar4 * * Supported by API versions 9 and newer. */ -extern long3 __attribute__((const, overloadable))convert_long3(long3); +extern uchar4 __attribute__((const, overloadable))convert_uchar4(uint4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long4 to long4 + * Component wise conversion from long2 to uchar2 * * Supported by API versions 9 and newer. */ -extern long4 __attribute__((const, overloadable))convert_long4(long4); +extern uchar2 __attribute__((const, overloadable))convert_uchar2(long2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong2 to long2 + * Component wise conversion from long3 to uchar3 * * Supported by API versions 9 and newer. */ -extern long2 __attribute__((const, overloadable))convert_long2(ulong2); +extern uchar3 __attribute__((const, overloadable))convert_uchar3(long3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong3 to long3 + * Component wise conversion from long4 to uchar4 * * Supported by API versions 9 and newer. */ -extern long3 __attribute__((const, overloadable))convert_long3(ulong3); +extern uchar4 __attribute__((const, overloadable))convert_uchar4(long4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong4 to long4 + * Component wise conversion from ulong2 to uchar2 * * Supported by API versions 9 and newer. */ -extern long4 __attribute__((const, overloadable))convert_long4(ulong4); +extern uchar2 __attribute__((const, overloadable))convert_uchar2(ulong2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float2 to ulong2 + * Component wise conversion from ulong3 to uchar3 * * Supported by API versions 9 and newer. */ -extern ulong2 __attribute__((const, overloadable))convert_ulong2(float2); +extern uchar3 __attribute__((const, overloadable))convert_uchar3(ulong3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float3 to ulong3 + * Component wise conversion from ulong4 to uchar4 * * Supported by API versions 9 and newer. */ -extern ulong3 __attribute__((const, overloadable))convert_ulong3(float3); +extern uchar4 __attribute__((const, overloadable))convert_uchar4(ulong4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from float4 to ulong4 + * Component wise conversion from float2 to short2 * * Supported by API versions 9 and newer. */ -extern ulong4 __attribute__((const, overloadable))convert_ulong4(float4); +extern short2 __attribute__((const, overloadable))convert_short2(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double2 to ulong2 + * Component wise conversion from float3 to short3 * * Supported by API versions 9 and newer. */ -extern ulong2 __attribute__((const, overloadable))convert_ulong2(double2); +extern short3 __attribute__((const, overloadable))convert_short3(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double3 to ulong3 + * Component wise conversion from float4 to short4 * * Supported by API versions 9 and newer. */ -extern ulong3 __attribute__((const, overloadable))convert_ulong3(double3); +extern short4 __attribute__((const, overloadable))convert_short4(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from double4 to ulong4 + * Component wise conversion from double2 to short2 * * Supported by API versions 9 and newer. */ -extern ulong4 __attribute__((const, overloadable))convert_ulong4(double4); +extern short2 __attribute__((const, overloadable))convert_short2(double2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char2 to ulong2 + * Component wise conversion from double3 to short3 * * Supported by API versions 9 and newer. */ -extern ulong2 __attribute__((const, overloadable))convert_ulong2(char2); +extern short3 __attribute__((const, overloadable))convert_short3(double3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char3 to ulong3 + * Component wise conversion from double4 to short4 * * Supported by API versions 9 and newer. */ -extern ulong3 __attribute__((const, overloadable))convert_ulong3(char3); +extern short4 __attribute__((const, overloadable))convert_short4(double4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from char4 to ulong4 + * Component wise conversion from char2 to short2 * * Supported by API versions 9 and newer. */ -extern ulong4 __attribute__((const, overloadable))convert_ulong4(char4); +extern short2 __attribute__((const, overloadable))convert_short2(char2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar2 to ulong2 + * Component wise conversion from char3 to short3 * * Supported by API versions 9 and newer. */ -extern ulong2 __attribute__((const, overloadable))convert_ulong2(uchar2); +extern short3 __attribute__((const, overloadable))convert_short3(char3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar3 to ulong3 + * Component wise conversion from char4 to short4 * * Supported by API versions 9 and newer. */ -extern ulong3 __attribute__((const, overloadable))convert_ulong3(uchar3); +extern short4 __attribute__((const, overloadable))convert_short4(char4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uchar4 to ulong4 + * Component wise conversion from uchar2 to short2 * * Supported by API versions 9 and newer. */ -extern ulong4 __attribute__((const, overloadable))convert_ulong4(uchar4); +extern short2 __attribute__((const, overloadable))convert_short2(uchar2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short2 to ulong2 + * Component wise conversion from uchar3 to short3 * * Supported by API versions 9 and newer. */ -extern ulong2 __attribute__((const, overloadable))convert_ulong2(short2); +extern short3 __attribute__((const, overloadable))convert_short3(uchar3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short3 to ulong3 + * Component wise conversion from uchar4 to short4 * * Supported by API versions 9 and newer. */ -extern ulong3 __attribute__((const, overloadable))convert_ulong3(short3); +extern short4 __attribute__((const, overloadable))convert_short4(uchar4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from short4 to ulong4 + * Component wise conversion from short2 to short2 * * Supported by API versions 9 and newer. */ -extern ulong4 __attribute__((const, overloadable))convert_ulong4(short4); +extern short2 __attribute__((const, overloadable))convert_short2(short2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort2 to ulong2 + * Component wise conversion from short3 to short3 * * Supported by API versions 9 and newer. */ -extern ulong2 __attribute__((const, overloadable))convert_ulong2(ushort2); +extern short3 __attribute__((const, overloadable))convert_short3(short3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort3 to ulong3 + * Component wise conversion from short4 to short4 * * Supported by API versions 9 and newer. */ -extern ulong3 __attribute__((const, overloadable))convert_ulong3(ushort3); +extern short4 __attribute__((const, overloadable))convert_short4(short4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ushort4 to ulong4 + * Component wise conversion from ushort2 to short2 * * Supported by API versions 9 and newer. */ -extern ulong4 __attribute__((const, overloadable))convert_ulong4(ushort4); +extern short2 __attribute__((const, overloadable))convert_short2(ushort2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int2 to ulong2 + * Component wise conversion from ushort3 to short3 * * Supported by API versions 9 and newer. */ -extern ulong2 __attribute__((const, overloadable))convert_ulong2(int2); +extern short3 __attribute__((const, overloadable))convert_short3(ushort3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int3 to ulong3 + * Component wise conversion from ushort4 to short4 * * Supported by API versions 9 and newer. */ -extern ulong3 __attribute__((const, overloadable))convert_ulong3(int3); +extern short4 __attribute__((const, overloadable))convert_short4(ushort4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from int4 to ulong4 + * Component wise conversion from int2 to short2 * * Supported by API versions 9 and newer. */ -extern ulong4 __attribute__((const, overloadable))convert_ulong4(int4); +extern short2 __attribute__((const, overloadable))convert_short2(int2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint2 to ulong2 + * Component wise conversion from int3 to short3 * * Supported by API versions 9 and newer. */ -extern ulong2 __attribute__((const, overloadable))convert_ulong2(uint2); +extern short3 __attribute__((const, overloadable))convert_short3(int3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint3 to ulong3 + * Component wise conversion from int4 to short4 * * Supported by API versions 9 and newer. */ -extern ulong3 __attribute__((const, overloadable))convert_ulong3(uint3); +extern short4 __attribute__((const, overloadable))convert_short4(int4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from uint4 to ulong4 + * Component wise conversion from uint2 to short2 * * Supported by API versions 9 and newer. */ -extern ulong4 __attribute__((const, overloadable))convert_ulong4(uint4); +extern short2 __attribute__((const, overloadable))convert_short2(uint2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long2 to ulong2 + * Component wise conversion from uint3 to short3 * * Supported by API versions 9 and newer. */ -extern ulong2 __attribute__((const, overloadable))convert_ulong2(long2); +extern short3 __attribute__((const, overloadable))convert_short3(uint3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long3 to ulong3 + * Component wise conversion from uint4 to short4 * * Supported by API versions 9 and newer. */ -extern ulong3 __attribute__((const, overloadable))convert_ulong3(long3); +extern short4 __attribute__((const, overloadable))convert_short4(uint4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from long4 to ulong4 + * Component wise conversion from long2 to short2 * * Supported by API versions 9 and newer. */ -extern ulong4 __attribute__((const, overloadable))convert_ulong4(long4); +extern short2 __attribute__((const, overloadable))convert_short2(long2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong2 to ulong2 + * Component wise conversion from long3 to short3 * * Supported by API versions 9 and newer. */ -extern ulong2 __attribute__((const, overloadable))convert_ulong2(ulong2); +extern short3 __attribute__((const, overloadable))convert_short3(long3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong3 to ulong3 + * Component wise conversion from long4 to short4 * * Supported by API versions 9 and newer. */ -extern ulong3 __attribute__((const, overloadable))convert_ulong3(ulong3); +extern short4 __attribute__((const, overloadable))convert_short4(long4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Component wise conversion from ulong4 to ulong4 + * Component wise conversion from ulong2 to short2 * * Supported by API versions 9 and newer. */ -extern ulong4 __attribute__((const, overloadable))convert_ulong4(ulong4); +extern short2 __attribute__((const, overloadable))convert_short2(ulong2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acos + * Component wise conversion from ulong3 to short3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))acos(float); +extern short3 __attribute__((const, overloadable))convert_short3(ulong3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acos + * Component wise conversion from ulong4 to short4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))acos(float2); +extern short4 __attribute__((const, overloadable))convert_short4(ulong4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acos + * Component wise conversion from float2 to ushort2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))acos(float3); +extern ushort2 __attribute__((const, overloadable))convert_ushort2(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acos + * Component wise conversion from float3 to ushort3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))acos(float4); +extern ushort3 __attribute__((const, overloadable))convert_ushort3(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acosh + * Component wise conversion from float4 to ushort4 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))acosh(float); +extern ushort4 __attribute__((const, overloadable))convert_ushort4(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acosh + * Component wise conversion from double2 to ushort2 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))acosh(float2); +extern ushort2 __attribute__((const, overloadable))convert_ushort2(double2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acosh + * Component wise conversion from double3 to ushort3 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))acosh(float3); +extern ushort3 __attribute__((const, overloadable))convert_ushort3(double3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acosh + * Component wise conversion from double4 to ushort4 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))acosh(float4); +extern ushort4 __attribute__((const, overloadable))convert_ushort4(double4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acospi + * Component wise conversion from char2 to ushort2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))acospi(float); +extern ushort2 __attribute__((const, overloadable))convert_ushort2(char2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acospi + * Component wise conversion from char3 to ushort3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))acospi(float2); +extern ushort3 __attribute__((const, overloadable))convert_ushort3(char3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acospi + * Component wise conversion from char4 to ushort4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))acospi(float3); +extern ushort4 __attribute__((const, overloadable))convert_ushort4(char4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * acospi + * Component wise conversion from uchar2 to ushort2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))acospi(float4); +extern ushort2 __attribute__((const, overloadable))convert_ushort2(uchar2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * asin + * Component wise conversion from uchar3 to ushort3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))asin(float); +extern ushort3 __attribute__((const, overloadable))convert_ushort3(uchar3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * asin + * Component wise conversion from uchar4 to ushort4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))asin(float2); +extern ushort4 __attribute__((const, overloadable))convert_ushort4(uchar4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * asin + * Component wise conversion from short2 to ushort2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))asin(float3); +extern ushort2 __attribute__((const, overloadable))convert_ushort2(short2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * asin + * Component wise conversion from short3 to ushort3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))asin(float4); +extern ushort3 __attribute__((const, overloadable))convert_ushort3(short3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * asinh + * Component wise conversion from short4 to ushort4 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))asinh(float); +extern ushort4 __attribute__((const, overloadable))convert_ushort4(short4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * asinh + * Component wise conversion from ushort2 to ushort2 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))asinh(float2); +extern ushort2 __attribute__((const, overloadable))convert_ushort2(ushort2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * asinh + * Component wise conversion from ushort3 to ushort3 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))asinh(float3); +extern ushort3 __attribute__((const, overloadable))convert_ushort3(ushort3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * asinh + * Component wise conversion from ushort4 to ushort4 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))asinh(float4); +extern ushort4 __attribute__((const, overloadable))convert_ushort4(ushort4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse sine divided by PI. + * Component wise conversion from int2 to ushort2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))asinpi(float); +extern ushort2 __attribute__((const, overloadable))convert_ushort2(int2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse sine divided by PI. + * Component wise conversion from int3 to ushort3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))asinpi(float2); +extern ushort3 __attribute__((const, overloadable))convert_ushort3(int3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse sine divided by PI. + * Component wise conversion from int4 to ushort4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))asinpi(float3); +extern ushort4 __attribute__((const, overloadable))convert_ushort4(int4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse sine divided by PI. + * Component wise conversion from uint2 to ushort2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))asinpi(float4); +extern ushort2 __attribute__((const, overloadable))convert_ushort2(uint2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent. + * Component wise conversion from uint3 to ushort3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))atan(float); +extern ushort3 __attribute__((const, overloadable))convert_ushort3(uint3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent. + * Component wise conversion from uint4 to ushort4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))atan(float2); +extern ushort4 __attribute__((const, overloadable))convert_ushort4(uint4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent. + * Component wise conversion from long2 to ushort2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))atan(float3); +extern ushort2 __attribute__((const, overloadable))convert_ushort2(long2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent. + * Component wise conversion from long3 to ushort3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))atan(float4); +extern ushort3 __attribute__((const, overloadable))convert_ushort3(long3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent of y / x. + * Component wise conversion from long4 to ushort4 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))atan2(float y, float x); +extern ushort4 __attribute__((const, overloadable))convert_ushort4(long4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent of y / x. + * Component wise conversion from ulong2 to ushort2 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))atan2(float2 y, float2 x); +extern ushort2 __attribute__((const, overloadable))convert_ushort2(ulong2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent of y / x. + * Component wise conversion from ulong3 to ushort3 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))atan2(float3 y, float3 x); +extern ushort3 __attribute__((const, overloadable))convert_ushort3(ulong3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent of y / x. + * Component wise conversion from ulong4 to ushort4 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))atan2(float4 y, float4 x); +extern ushort4 __attribute__((const, overloadable))convert_ushort4(ulong4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse hyperbolic tangent. + * Component wise conversion from float2 to int2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))atanh(float); +extern int2 __attribute__((const, overloadable))convert_int2(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse hyperbolic tangent. + * Component wise conversion from float3 to int3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))atanh(float2); +extern int3 __attribute__((const, overloadable))convert_int3(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse hyperbolic tangent. + * Component wise conversion from float4 to int4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))atanh(float3); +extern int4 __attribute__((const, overloadable))convert_int4(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse hyperbolic tangent. + * Component wise conversion from double2 to int2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))atanh(float4); +extern int2 __attribute__((const, overloadable))convert_int2(double2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent divided by PI. + * Component wise conversion from double3 to int3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))atanpi(float); +extern int3 __attribute__((const, overloadable))convert_int3(double3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent divided by PI. + * Component wise conversion from double4 to int4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))atanpi(float2); +extern int4 __attribute__((const, overloadable))convert_int4(double4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent divided by PI. + * Component wise conversion from char2 to int2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))atanpi(float3); +extern int2 __attribute__((const, overloadable))convert_int2(char2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent divided by PI. + * Component wise conversion from char3 to int3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))atanpi(float4); +extern int3 __attribute__((const, overloadable))convert_int3(char3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent of y / x, divided by PI. + * Component wise conversion from char4 to int4 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))atan2pi(float y, float x); +extern int4 __attribute__((const, overloadable))convert_int4(char4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent of y / x, divided by PI. + * Component wise conversion from uchar2 to int2 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))atan2pi(float2 y, float2 x); +extern int2 __attribute__((const, overloadable))convert_int2(uchar2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent of y / x, divided by PI. + * Component wise conversion from uchar3 to int3 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))atan2pi(float3 y, float3 x); +extern int3 __attribute__((const, overloadable))convert_int3(uchar3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the inverse tangent of y / x, divided by PI. + * Component wise conversion from uchar4 to int4 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))atan2pi(float4 y, float4 x); +extern int4 __attribute__((const, overloadable))convert_int4(uchar4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cube root. + * Component wise conversion from short2 to int2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))cbrt(float); +extern int2 __attribute__((const, overloadable))convert_int2(short2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cube root. + * Component wise conversion from short3 to int3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))cbrt(float2); +extern int3 __attribute__((const, overloadable))convert_int3(short3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cube root. + * Component wise conversion from short4 to int4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))cbrt(float3); +extern int4 __attribute__((const, overloadable))convert_int4(short4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cube root. + * Component wise conversion from ushort2 to int2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))cbrt(float4); +extern int2 __attribute__((const, overloadable))convert_int2(ushort2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the smallest integer not less than a value. + * Component wise conversion from ushort3 to int3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))ceil(float); +extern int3 __attribute__((const, overloadable))convert_int3(ushort3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the smallest integer not less than a value. + * Component wise conversion from ushort4 to int4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))ceil(float2); +extern int4 __attribute__((const, overloadable))convert_int4(ushort4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the smallest integer not less than a value. + * Component wise conversion from int2 to int2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))ceil(float3); +extern int2 __attribute__((const, overloadable))convert_int2(int2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the smallest integer not less than a value. + * Component wise conversion from int3 to int3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))ceil(float4); +extern int3 __attribute__((const, overloadable))convert_int3(int3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Copy the sign bit from y to x. + * Component wise conversion from int4 to int4 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))copysign(float x, float y); +extern int4 __attribute__((const, overloadable))convert_int4(int4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Copy the sign bit from y to x. + * Component wise conversion from uint2 to int2 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))copysign(float2 x, float2 y); +extern int2 __attribute__((const, overloadable))convert_int2(uint2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Copy the sign bit from y to x. + * Component wise conversion from uint3 to int3 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))copysign(float3 x, float3 y); +extern int3 __attribute__((const, overloadable))convert_int3(uint3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Copy the sign bit from y to x. + * Component wise conversion from uint4 to int4 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))copysign(float4 x, float4 y); +extern int4 __attribute__((const, overloadable))convert_int4(uint4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cosine. + * Component wise conversion from long2 to int2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))cos(float); +extern int2 __attribute__((const, overloadable))convert_int2(long2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cosine. + * Component wise conversion from long3 to int3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))cos(float2); +extern int3 __attribute__((const, overloadable))convert_int3(long3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cosine. + * Component wise conversion from long4 to int4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))cos(float3); +extern int4 __attribute__((const, overloadable))convert_int4(long4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cosine. + * Component wise conversion from ulong2 to int2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))cos(float4); +extern int2 __attribute__((const, overloadable))convert_int2(ulong2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hypebolic cosine. + * Component wise conversion from ulong3 to int3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))cosh(float); +extern int3 __attribute__((const, overloadable))convert_int3(ulong3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hypebolic cosine. + * Component wise conversion from ulong4 to int4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))cosh(float2); +extern int4 __attribute__((const, overloadable))convert_int4(ulong4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hypebolic cosine. + * Component wise conversion from float2 to uint2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))cosh(float3); +extern uint2 __attribute__((const, overloadable))convert_uint2(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hypebolic cosine. + * Component wise conversion from float3 to uint3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))cosh(float4); +extern uint3 __attribute__((const, overloadable))convert_uint3(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cosine of the value * PI. + * Component wise conversion from float4 to uint4 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))cospi(float); +extern uint4 __attribute__((const, overloadable))convert_uint4(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cosine of the value * PI. + * Component wise conversion from double2 to uint2 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))cospi(float2); +extern uint2 __attribute__((const, overloadable))convert_uint2(double2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cosine of the value * PI. + * Component wise conversion from double3 to uint3 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))cospi(float3); +extern uint3 __attribute__((const, overloadable))convert_uint3(double3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the cosine of the value * PI. + * Component wise conversion from double4 to uint4 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))cospi(float4); +extern uint4 __attribute__((const, overloadable))convert_uint4(double4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the complementary error function. + * Component wise conversion from char2 to uint2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))erfc(float); +extern uint2 __attribute__((const, overloadable))convert_uint2(char2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the complementary error function. + * Component wise conversion from char3 to uint3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))erfc(float2); +extern uint3 __attribute__((const, overloadable))convert_uint3(char3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the complementary error function. + * Component wise conversion from char4 to uint4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))erfc(float3); +extern uint4 __attribute__((const, overloadable))convert_uint4(char4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the complementary error function. + * Component wise conversion from uchar2 to uint2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))erfc(float4); +extern uint2 __attribute__((const, overloadable))convert_uint2(uchar2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the error function. + * Component wise conversion from uchar3 to uint3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))erf(float); +extern uint3 __attribute__((const, overloadable))convert_uint3(uchar3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the error function. + * Component wise conversion from uchar4 to uint4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))erf(float2); +extern uint4 __attribute__((const, overloadable))convert_uint4(uchar4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the error function. + * Component wise conversion from short2 to uint2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))erf(float3); +extern uint2 __attribute__((const, overloadable))convert_uint2(short2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the error function. + * Component wise conversion from short3 to uint3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))erf(float4); +extern uint3 __attribute__((const, overloadable))convert_uint3(short3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return e ^ value. + * Component wise conversion from short4 to uint4 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))exp(float); +extern uint4 __attribute__((const, overloadable))convert_uint4(short4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return e ^ value. + * Component wise conversion from ushort2 to uint2 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))exp(float2); +extern uint2 __attribute__((const, overloadable))convert_uint2(ushort2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return e ^ value. + * Component wise conversion from ushort3 to uint3 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))exp(float3); +extern uint3 __attribute__((const, overloadable))convert_uint3(ushort3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return e ^ value. + * Component wise conversion from ushort4 to uint4 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))exp(float4); +extern uint4 __attribute__((const, overloadable))convert_uint4(ushort4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return 2 ^ value. + * Component wise conversion from int2 to uint2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))exp2(float); +extern uint2 __attribute__((const, overloadable))convert_uint2(int2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return 2 ^ value. + * Component wise conversion from int3 to uint3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))exp2(float2); +extern uint3 __attribute__((const, overloadable))convert_uint3(int3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return 2 ^ value. + * Component wise conversion from int4 to uint4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))exp2(float3); +extern uint4 __attribute__((const, overloadable))convert_uint4(int4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return 2 ^ value. + * Component wise conversion from uint2 to uint2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))exp2(float4); +extern uint2 __attribute__((const, overloadable))convert_uint2(uint2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return 10 ^ value. + * Component wise conversion from uint3 to uint3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))exp10(float); +extern uint3 __attribute__((const, overloadable))convert_uint3(uint3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return 10 ^ value. + * Component wise conversion from uint4 to uint4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))exp10(float2); +extern uint4 __attribute__((const, overloadable))convert_uint4(uint4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return 10 ^ value. + * Component wise conversion from long2 to uint2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))exp10(float3); +extern uint2 __attribute__((const, overloadable))convert_uint2(long2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return 10 ^ value. + * Component wise conversion from long3 to uint3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))exp10(float4); +extern uint3 __attribute__((const, overloadable))convert_uint3(long3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (e ^ value) - 1. + * Component wise conversion from long4 to uint4 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))expm1(float); +extern uint4 __attribute__((const, overloadable))convert_uint4(long4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (e ^ value) - 1. + * Component wise conversion from ulong2 to uint2 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))expm1(float2); +extern uint2 __attribute__((const, overloadable))convert_uint2(ulong2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (e ^ value) - 1. + * Component wise conversion from ulong3 to uint3 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))expm1(float3); +extern uint3 __attribute__((const, overloadable))convert_uint3(ulong3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (e ^ value) - 1. + * Component wise conversion from ulong4 to uint4 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))expm1(float4); +extern uint4 __attribute__((const, overloadable))convert_uint4(ulong4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the absolute value of a value. + * Component wise conversion from float2 to long2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fabs(float); +extern long2 __attribute__((const, overloadable))convert_long2(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the absolute value of a value. + * Component wise conversion from float3 to long3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))fabs(float2); +extern long3 __attribute__((const, overloadable))convert_long3(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the absolute value of a value. + * Component wise conversion from float4 to long4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))fabs(float3); +extern long4 __attribute__((const, overloadable))convert_long4(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the absolute value of a value. + * Component wise conversion from double2 to long2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))fabs(float4); +extern long2 __attribute__((const, overloadable))convert_long2(double2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the positive difference between two values. + * Component wise conversion from double3 to long3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fdim(float, float); +extern long3 __attribute__((const, overloadable))convert_long3(double3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the positive difference between two values. + * Component wise conversion from double4 to long4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))fdim(float2, float2); +extern long4 __attribute__((const, overloadable))convert_long4(double4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the positive difference between two values. + * Component wise conversion from char2 to long2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))fdim(float3, float3); +extern long2 __attribute__((const, overloadable))convert_long2(char2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the positive difference between two values. + * Component wise conversion from char3 to long3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))fdim(float4, float4); +extern long3 __attribute__((const, overloadable))convert_long3(char3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the smallest integer not greater than a value. + * Component wise conversion from char4 to long4 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))floor(float); +extern long4 __attribute__((const, overloadable))convert_long4(char4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the smallest integer not greater than a value. + * Component wise conversion from uchar2 to long2 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))floor(float2); +extern long2 __attribute__((const, overloadable))convert_long2(uchar2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the smallest integer not greater than a value. + * Component wise conversion from uchar3 to long3 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))floor(float3); +extern long3 __attribute__((const, overloadable))convert_long3(uchar3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the smallest integer not greater than a value. + * Component wise conversion from uchar4 to long4 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))floor(float4); +extern long4 __attribute__((const, overloadable))convert_long4(uchar4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (a * b) + c. + * Component wise conversion from short2 to long2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fma(float a, float b, float c); +extern long2 __attribute__((const, overloadable))convert_long2(short2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (a * b) + c. + * Component wise conversion from short3 to long3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))fma(float2 a, float2 b, float2 c); +extern long3 __attribute__((const, overloadable))convert_long3(short3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (a * b) + c. + * Component wise conversion from short4 to long4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))fma(float3 a, float3 b, float3 c); +extern long4 __attribute__((const, overloadable))convert_long4(short4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (a * b) + c. + * Component wise conversion from ushort2 to long2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))fma(float4 a, float4 b, float4 c); +extern long2 __attribute__((const, overloadable))convert_long2(ushort2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x < y ? y : x) + * Component wise conversion from ushort3 to long3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fmax(float x, float y); +extern long3 __attribute__((const, overloadable))convert_long3(ushort3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x < y ? y : x) + * Component wise conversion from ushort4 to long4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))fmax(float2 x, float2 y); +extern long4 __attribute__((const, overloadable))convert_long4(ushort4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x < y ? y : x) + * Component wise conversion from int2 to long2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))fmax(float3 x, float3 y); +extern long2 __attribute__((const, overloadable))convert_long2(int2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x < y ? y : x) + * Component wise conversion from int3 to long3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))fmax(float4 x, float4 y); +extern long3 __attribute__((const, overloadable))convert_long3(int3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x < y ? y : x) + * Component wise conversion from int4 to long4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))fmax(float2 x, float y); +extern long4 __attribute__((const, overloadable))convert_long4(int4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x < y ? y : x) + * Component wise conversion from uint2 to long2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))fmax(float3 x, float y); +extern long2 __attribute__((const, overloadable))convert_long2(uint2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x < y ? y : x) + * Component wise conversion from uint3 to long3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))fmax(float4 x, float y); +extern long3 __attribute__((const, overloadable))convert_long3(uint3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x > y ? y : x) + * Component wise conversion from uint4 to long4 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fmin(float x, float y); +extern long4 __attribute__((const, overloadable))convert_long4(uint4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x > y ? y : x) + * Component wise conversion from long2 to long2 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))fmin(float2 x, float2 y); +extern long2 __attribute__((const, overloadable))convert_long2(long2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x > y ? y : x) + * Component wise conversion from long3 to long3 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))fmin(float3 x, float3 y); +extern long3 __attribute__((const, overloadable))convert_long3(long3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x > y ? y : x) + * Component wise conversion from long4 to long4 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))fmin(float4 x, float4 y); +extern long4 __attribute__((const, overloadable))convert_long4(long4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x > y ? y : x) + * Component wise conversion from ulong2 to long2 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))fmin(float2 x, float y); +extern long2 __attribute__((const, overloadable))convert_long2(ulong2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x > y ? y : x) + * Component wise conversion from ulong3 to long3 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))fmin(float3 x, float y); +extern long3 __attribute__((const, overloadable))convert_long3(ulong3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x > y ? y : x) + * Component wise conversion from ulong4 to long4 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))fmin(float4 x, float y); +extern long4 __attribute__((const, overloadable))convert_long4(ulong4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the remainder from x / y + * Component wise conversion from float2 to ulong2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fmod(float x, float y); +extern ulong2 __attribute__((const, overloadable))convert_ulong2(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the remainder from x / y + * Component wise conversion from float3 to ulong3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))fmod(float2 x, float2 y); +extern ulong3 __attribute__((const, overloadable))convert_ulong3(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the remainder from x / y + * Component wise conversion from float4 to ulong4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))fmod(float3 x, float3 y); +extern ulong4 __attribute__((const, overloadable))convert_ulong4(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the remainder from x / y + * Component wise conversion from double2 to ulong2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))fmod(float4 x, float4 y); +extern ulong2 __attribute__((const, overloadable))convert_ulong2(double2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return fractional part of v - * - * @param iptr iptr[0] will be set to the floor of the input value. + * Component wise conversion from double3 to ulong3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fract(float v, float *iptr); +extern ulong3 __attribute__((const, overloadable))convert_ulong3(double3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return fractional part of v - * - * @param iptr iptr[0] will be set to the floor of the input value. + * Component wise conversion from double4 to ulong4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))fract(float2 v, float2 *iptr); +extern ulong4 __attribute__((const, overloadable))convert_ulong4(double4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return fractional part of v - * - * @param iptr iptr[0] will be set to the floor of the input value. + * Component wise conversion from char2 to ulong2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))fract(float3 v, float3 *iptr); +extern ulong2 __attribute__((const, overloadable))convert_ulong2(char2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return fractional part of v - * - * @param iptr iptr[0] will be set to the floor of the input value. + * Component wise conversion from char3 to ulong3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))fract(float4 v, float4 *iptr); +extern ulong3 __attribute__((const, overloadable))convert_ulong3(char3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return fractional part of v + * Component wise conversion from char4 to ulong4 * * Supported by API versions 9 and newer. */ -static float __attribute__((const, overloadable))fract(float v) { - float unused; - return fract(v, &unused); -} +extern ulong4 __attribute__((const, overloadable))convert_ulong4(char4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return fractional part of v + * Component wise conversion from uchar2 to ulong2 * * Supported by API versions 9 and newer. */ -static float2 __attribute__((const, overloadable))fract(float2 v) { - float2 unused; - return fract(v, &unused); -} +extern ulong2 __attribute__((const, overloadable))convert_ulong2(uchar2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return fractional part of v + * Component wise conversion from uchar3 to ulong3 * * Supported by API versions 9 and newer. */ -static float3 __attribute__((const, overloadable))fract(float3 v) { - float3 unused; - return fract(v, &unused); -} +extern ulong3 __attribute__((const, overloadable))convert_ulong3(uchar3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return fractional part of v + * Component wise conversion from uchar4 to ulong4 * * Supported by API versions 9 and newer. */ -static float4 __attribute__((const, overloadable))fract(float4 v) { - float4 unused; - return fract(v, &unused); -} +extern ulong4 __attribute__((const, overloadable))convert_ulong4(uchar4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the mantissa and place the exponent into iptr[0] - * - * @param v Supports float, float2, float3, float4. + * Component wise conversion from short2 to ulong2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))frexp(float v, int *iptr); +extern ulong2 __attribute__((const, overloadable))convert_ulong2(short2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the mantissa and place the exponent into iptr[0] - * - * @param v Supports float, float2, float3, float4. + * Component wise conversion from short3 to ulong3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))frexp(float2 v, int2 *iptr); +extern ulong3 __attribute__((const, overloadable))convert_ulong3(short3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the mantissa and place the exponent into iptr[0] - * - * @param v Supports float, float2, float3, float4. + * Component wise conversion from short4 to ulong4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))frexp(float3 v, int3 *iptr); +extern ulong4 __attribute__((const, overloadable))convert_ulong4(short4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the mantissa and place the exponent into iptr[0] - * - * @param v Supports float, float2, float3, float4. + * Component wise conversion from ushort2 to ulong2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))frexp(float4 v, int4 *iptr); +extern ulong2 __attribute__((const, overloadable))convert_ulong2(ushort2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return sqrt(x*x + y*y) + * Component wise conversion from ushort3 to ulong3 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))hypot(float x, float y); +extern ulong3 __attribute__((const, overloadable))convert_ulong3(ushort3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return sqrt(x*x + y*y) + * Component wise conversion from ushort4 to ulong4 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))hypot(float2 x, float2 y); +extern ulong4 __attribute__((const, overloadable))convert_ulong4(ushort4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return sqrt(x*x + y*y) + * Component wise conversion from int2 to ulong2 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))hypot(float3 x, float3 y); +extern ulong2 __attribute__((const, overloadable))convert_ulong2(int2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return sqrt(x*x + y*y) + * Component wise conversion from int3 to ulong3 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))hypot(float4 x, float4 y); +extern ulong3 __attribute__((const, overloadable))convert_ulong3(int3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the integer exponent of a value + * Component wise conversion from int4 to ulong4 * * Supported by API versions 9 and newer. */ -extern int __attribute__((const, overloadable))ilogb(float); +extern ulong4 __attribute__((const, overloadable))convert_ulong4(int4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the integer exponent of a value + * Component wise conversion from uint2 to ulong2 * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))ilogb(float2); +extern ulong2 __attribute__((const, overloadable))convert_ulong2(uint2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the integer exponent of a value + * Component wise conversion from uint3 to ulong3 * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))ilogb(float3); +extern ulong3 __attribute__((const, overloadable))convert_ulong3(uint3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the integer exponent of a value + * Component wise conversion from uint4 to ulong4 * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))ilogb(float4); +extern ulong4 __attribute__((const, overloadable))convert_ulong4(uint4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x * 2^y) - * - * @param x Supports 1,2,3,4 components - * @param y Supports single component or matching vector. + * Component wise conversion from long2 to ulong2 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))ldexp(float x, int y); +extern ulong2 __attribute__((const, overloadable))convert_ulong2(long2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x * 2^y) - * - * @param x Supports 1,2,3,4 components - * @param y Supports single component or matching vector. + * Component wise conversion from long3 to ulong3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))ldexp(float2 x, int2 y); +extern ulong3 __attribute__((const, overloadable))convert_ulong3(long3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x * 2^y) - * - * @param x Supports 1,2,3,4 components - * @param y Supports single component or matching vector. + * Component wise conversion from long4 to ulong4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))ldexp(float3 x, int3 y); +extern ulong4 __attribute__((const, overloadable))convert_ulong4(long4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x * 2^y) - * - * @param x Supports 1,2,3,4 components - * @param y Supports single component or matching vector. + * Component wise conversion from ulong2 to ulong2 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))ldexp(float4 x, int4 y); +extern ulong2 __attribute__((const, overloadable))convert_ulong2(ulong2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x * 2^y) - * - * @param x Supports 1,2,3,4 components - * @param y Supports single component or matching vector. + * Component wise conversion from ulong3 to ulong3 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))ldexp(float2 x, int y); +extern ulong3 __attribute__((const, overloadable))convert_ulong3(ulong3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x * 2^y) - * - * @param x Supports 1,2,3,4 components - * @param y Supports single component or matching vector. + * Component wise conversion from ulong4 to ulong4 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))ldexp(float3 x, int y); +extern ulong4 __attribute__((const, overloadable))convert_ulong4(ulong4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (x * 2^y) - * - * @param x Supports 1,2,3,4 components - * @param y Supports single component or matching vector. + * Copy the sign bit from y to x. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))ldexp(float4 x, int y); +extern float __attribute__((const, overloadable))copysign(float x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the log gamma and sign + * Copy the sign bit from y to x. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))lgamma(float x); +extern float2 __attribute__((const, overloadable))copysign(float2 x, float2 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the log gamma and sign + * Copy the sign bit from y to x. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))lgamma(float2 x); +extern float3 __attribute__((const, overloadable))copysign(float3 x, float3 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the log gamma and sign + * Copy the sign bit from y to x. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))lgamma(float3 x); +extern float4 __attribute__((const, overloadable))copysign(float4 x, float4 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the log gamma and sign + * Return the cosine. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))lgamma(float4 x); +extern float __attribute__((const, overloadable))cos(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the log gamma and sign + * Return the cosine. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))lgamma(float x, int *y); +extern float2 __attribute__((const, overloadable))cos(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the log gamma and sign + * Return the cosine. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))lgamma(float2 x, int2 *y); +extern float3 __attribute__((const, overloadable))cos(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the log gamma and sign + * Return the cosine. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))lgamma(float3 x, int3 *y); +extern float4 __attribute__((const, overloadable))cos(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the log gamma and sign + * Return the hypebolic cosine. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))lgamma(float4 x, int4 *y); +extern float __attribute__((const, overloadable))cosh(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the natural logarithm. + * Return the hypebolic cosine. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))log(float x); +extern float2 __attribute__((const, overloadable))cosh(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the natural logarithm. + * Return the hypebolic cosine. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))log(float2 x); +extern float3 __attribute__((const, overloadable))cosh(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the natural logarithm. + * Return the hypebolic cosine. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))log(float3 x); +extern float4 __attribute__((const, overloadable))cosh(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the natural logarithm. + * Return the cosine of the value * PI. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))log(float4 x); +extern float __attribute__((const, overloadable))cospi(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the base 2 logarithm. + * Return the cosine of the value * PI. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))log2(float x); +extern float2 __attribute__((const, overloadable))cospi(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the base 2 logarithm. + * Return the cosine of the value * PI. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))log2(float2 x); +extern float3 __attribute__((const, overloadable))cospi(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the base 2 logarithm. + * Return the cosine of the value * PI. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))log2(float3 x); +extern float4 __attribute__((const, overloadable))cospi(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the base 2 logarithm. + * Compute the cross product of two vectors. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))log2(float4 x); +extern float3 __attribute__((const, overloadable))cross(float3 lhs, float3 rhs); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the base 10 logarithm. + * Compute the cross product of two vectors. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))log10(float x); +extern float4 __attribute__((const, overloadable))cross(float4 lhs, float4 rhs); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the base 10 logarithm. + * Convert from radians to degrees. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))log10(float2 x); +extern float __attribute__((const, overloadable))degrees(float value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the base 10 logarithm. + * Convert from radians to degrees. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))log10(float3 x); +extern float2 __attribute__((const, overloadable))degrees(float2 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the base 10 logarithm. + * Convert from radians to degrees. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))log10(float4 x); +extern float3 __attribute__((const, overloadable))degrees(float3 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the natural logarithm of (v + 1.0f) + * Convert from radians to degrees. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))log1p(float x); +extern float4 __attribute__((const, overloadable))degrees(float4 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the natural logarithm of (v + 1.0f) + * Compute the distance between two points. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))log1p(float2 x); +extern float __attribute__((const, overloadable))distance(float lhs, float rhs); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the natural logarithm of (v + 1.0f) + * Compute the distance between two points. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))log1p(float3 x); +extern float __attribute__((const, overloadable))distance(float2 lhs, float2 rhs); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the natural logarithm of (v + 1.0f) + * Compute the distance between two points. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))log1p(float4 x); +extern float __attribute__((const, overloadable))distance(float3 lhs, float3 rhs); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the exponent of the value. + * Compute the distance between two points. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))logb(float x); +extern float __attribute__((const, overloadable))distance(float4 lhs, float4 rhs); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the exponent of the value. + * Compute the dot product of two vectors. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))logb(float2 x); +extern float __attribute__((const, overloadable))dot(float lhs, float rhs); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the exponent of the value. + * Compute the dot product of two vectors. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))logb(float3 x); +extern float __attribute__((const, overloadable))dot(float2 lhs, float2 rhs); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the exponent of the value. + * Compute the dot product of two vectors. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))logb(float4 x); +extern float __attribute__((const, overloadable))dot(float3 lhs, float3 rhs); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute (a * b) + c + * Compute the dot product of two vectors. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))mad(float a, float b, float c); +extern float __attribute__((const, overloadable))dot(float4 lhs, float4 rhs); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute (a * b) + c + * Return the error function. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))mad(float2 a, float2 b, float2 c); +extern float __attribute__((const, overloadable))erf(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute (a * b) + c + * Return the error function. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))mad(float3 a, float3 b, float3 c); +extern float2 __attribute__((const, overloadable))erf(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute (a * b) + c + * Return the error function. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))mad(float4 a, float4 b, float4 c); +extern float3 __attribute__((const, overloadable))erf(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the integral and fractional components of a number. - * - * @param x Source value - * @param iret iret[0] will be set to the integral portion of the number. - * @return The floating point portion of the value. + * Return the error function. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))modf(float x, float *iret); +extern float4 __attribute__((const, overloadable))erf(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the integral and fractional components of a number. - * - * @param x Source value - * @param iret iret[0] will be set to the integral portion of the number. - * @return The floating point portion of the value. + * Return the complementary error function. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))modf(float2 x, float2 *iret); +extern float __attribute__((const, overloadable))erfc(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the integral and fractional components of a number. - * - * @param x Source value - * @param iret iret[0] will be set to the integral portion of the number. - * @return The floating point portion of the value. + * Return the complementary error function. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))modf(float3 x, float3 *iret); +extern float2 __attribute__((const, overloadable))erfc(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the integral and fractional components of a number. - * - * @param x Source value - * @param iret iret[0] will be set to the integral portion of the number. - * @return The floating point portion of the value. + * Return the complementary error function. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))modf(float4 x, float4 *iret); +extern float3 __attribute__((const, overloadable))erfc(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * generate a nan + * Return the complementary error function. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))nan(uint); +extern float4 __attribute__((const, overloadable))erfc(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the next floating point number from x towards y. + * Return e ^ value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))nextafter(float x, float y); +extern float __attribute__((const, overloadable))exp(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the next floating point number from x towards y. + * Return e ^ value. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))nextafter(float2 x, float2 y); +extern float2 __attribute__((const, overloadable))exp(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the next floating point number from x towards y. + * Return e ^ value. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))nextafter(float3 x, float3 y); +extern float3 __attribute__((const, overloadable))exp(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the next floating point number from x towards y. + * Return e ^ value. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))nextafter(float4 x, float4 y); +extern float4 __attribute__((const, overloadable))exp(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. + * Return 10 ^ value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))pow(float x, float y); +extern float __attribute__((const, overloadable))exp10(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. + * Return 10 ^ value. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))pow(float2 x, float2 y); +extern float2 __attribute__((const, overloadable))exp10(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. + * Return 10 ^ value. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))pow(float3 x, float3 y); +extern float3 __attribute__((const, overloadable))exp10(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. + * Return 10 ^ value. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))pow(float4 x, float4 y); +extern float4 __attribute__((const, overloadable))exp10(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. + * Return 2 ^ value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))pown(float x, int y); +extern float __attribute__((const, overloadable))exp2(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. + * Return 2 ^ value. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))pown(float2 x, int2 y); +extern float2 __attribute__((const, overloadable))exp2(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. + * Return 2 ^ value. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))pown(float3 x, int3 y); +extern float3 __attribute__((const, overloadable))exp2(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. + * Return 2 ^ value. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))pown(float4 x, int4 y); +extern float4 __attribute__((const, overloadable))exp2(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. - * y must be > 0 + * Return (e ^ value) - 1. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))powr(float x, float y); +extern float __attribute__((const, overloadable))expm1(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. - * y must be > 0 + * Return (e ^ value) - 1. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))powr(float2 x, float2 y); +extern float2 __attribute__((const, overloadable))expm1(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. - * y must be > 0 + * Return (e ^ value) - 1. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))powr(float3 x, float3 y); +extern float3 __attribute__((const, overloadable))expm1(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return x ^ y. - * y must be > 0 + * Return (e ^ value) - 1. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))powr(float4 x, float4 y); +extern float4 __attribute__((const, overloadable))expm1(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return round x/y to the nearest integer then compute the remander. + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))remainder(float x, float y); +extern float __attribute__((const, overloadable))fabs(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return round x/y to the nearest integer then compute the remander. + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))remainder(float2 x, float2 y); +extern float2 __attribute__((const, overloadable))fabs(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return round x/y to the nearest integer then compute the remander. + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))remainder(float3 x, float3 y); +extern float3 __attribute__((const, overloadable))fabs(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return round x/y to the nearest integer then compute the remander. + * Return the absolute value of a value. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))remainder(float4 x, float4 y); +extern float4 __attribute__((const, overloadable))fabs(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * todo + * Compute the approximate distance between two points. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float __attribute__((const, overloadable))remquo(float, float, int *); +extern float __attribute__((const, overloadable))fast_distance(float lhs, float rhs); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * todo + * Compute the approximate distance between two points. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float2 __attribute__((const, overloadable))remquo(float2, float2, int2 *); +extern float __attribute__((const, overloadable))fast_distance(float2 lhs, float2 rhs); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * todo + * Compute the approximate distance between two points. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float3 __attribute__((const, overloadable))remquo(float3, float3, int3 *); +extern float __attribute__((const, overloadable))fast_distance(float3 lhs, float3 rhs); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * todo + * Compute the approximate distance between two points. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float4 __attribute__((const, overloadable))remquo(float4, float4, int4 *); +extern float __attribute__((const, overloadable))fast_distance(float4 lhs, float4 rhs); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Round to the nearest integral value. + * Compute the approximate length of a vector. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float __attribute__((const, overloadable))rint(float); +extern float __attribute__((const, overloadable))fast_length(float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Round to the nearest integral value. + * Compute the approximate length of a vector. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float2 __attribute__((const, overloadable))rint(float2); +extern float __attribute__((const, overloadable))fast_length(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Round to the nearest integral value. + * Compute the approximate length of a vector. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float3 __attribute__((const, overloadable))rint(float3); +extern float __attribute__((const, overloadable))fast_length(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Round to the nearest integral value. + * Compute the approximate length of a vector. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float4 __attribute__((const, overloadable))rint(float4); +extern float __attribute__((const, overloadable))fast_length(float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Compute the Nth root of a value. + * Approximately normalize a vector. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float __attribute__((const, overloadable))rootn(float v, int n); +extern float __attribute__((const, overloadable))fast_normalize(float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Compute the Nth root of a value. + * Approximately normalize a vector. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float2 __attribute__((const, overloadable))rootn(float2 v, int2 n); +extern float2 __attribute__((const, overloadable))fast_normalize(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Compute the Nth root of a value. + * Approximately normalize a vector. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float3 __attribute__((const, overloadable))rootn(float3 v, int3 n); +extern float3 __attribute__((const, overloadable))fast_normalize(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Compute the Nth root of a value. + * Approximately normalize a vector. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float4 __attribute__((const, overloadable))rootn(float4 v, int4 n); +extern float4 __attribute__((const, overloadable))fast_normalize(float4 v); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Round to the nearest integral value. Half values are rounded away from zero. + * Return the positive difference between two values. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))round(float); +extern float __attribute__((const, overloadable))fdim(float a, float b); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Round to the nearest integral value. Half values are rounded away from zero. + * Return the positive difference between two values. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))round(float2); +extern float2 __attribute__((const, overloadable))fdim(float2 a, float2 b); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Round to the nearest integral value. Half values are rounded away from zero. + * Return the positive difference between two values. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))round(float3); +extern float3 __attribute__((const, overloadable))fdim(float3 a, float3 b); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Round to the nearest integral value. Half values are rounded away from zero. + * Return the positive difference between two values. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))round(float4); +extern float4 __attribute__((const, overloadable))fdim(float4 a, float4 b); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (1 / sqrt(value)). + * Return the smallest integer not greater than a value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))rsqrt(float); +extern float __attribute__((const, overloadable))floor(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (1 / sqrt(value)). + * Return the smallest integer not greater than a value. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))rsqrt(float2); +extern float2 __attribute__((const, overloadable))floor(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (1 / sqrt(value)). + * Return the smallest integer not greater than a value. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))rsqrt(float3); +extern float3 __attribute__((const, overloadable))floor(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return (1 / sqrt(value)). + * Return the smallest integer not greater than a value. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))rsqrt(float4); +extern float4 __attribute__((const, overloadable))floor(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the square root of a value. + * Return (a * b) + c. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))sqrt(float); +extern float __attribute__((const, overloadable))fma(float a, float b, float c); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the square root of a value. + * Return (a * b) + c. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))sqrt(float2); +extern float2 __attribute__((const, overloadable))fma(float2 a, float2 b, float2 c); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the square root of a value. + * Return (a * b) + c. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))sqrt(float3); +extern float3 __attribute__((const, overloadable))fma(float3 a, float3 b, float3 c); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the square root of a value. + * Return (a * b) + c. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))sqrt(float4); +extern float4 __attribute__((const, overloadable))fma(float4 a, float4 b, float4 c); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sine of a value specified in radians. + * Return (x < y ? y : x) * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))sin(float); +extern float __attribute__((const, overloadable))fmax(float x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sine of a value specified in radians. + * Return (x < y ? y : x) * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))sin(float2); +extern float2 __attribute__((const, overloadable))fmax(float2 x, float2 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sine of a value specified in radians. + * Return (x < y ? y : x) * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))sin(float3); +extern float3 __attribute__((const, overloadable))fmax(float3 x, float3 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sine of a value specified in radians. + * Return (x < y ? y : x) * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))sin(float4); +extern float4 __attribute__((const, overloadable))fmax(float4 x, float4 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sine and cosine of a value. - * - * @return sine - * @param v The incoming value in radians - * @param *cosptr cosptr[0] will be set to the cosine value. + * Return (x < y ? y : x) * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))sincos(float v, float *cosptr); +extern float2 __attribute__((const, overloadable))fmax(float2 x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sine and cosine of a value. - * - * @return sine - * @param v The incoming value in radians - * @param *cosptr cosptr[0] will be set to the cosine value. + * Return (x < y ? y : x) * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))sincos(float2 v, float2 *cosptr); +extern float3 __attribute__((const, overloadable))fmax(float3 x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sine and cosine of a value. - * - * @return sine - * @param v The incoming value in radians - * @param *cosptr cosptr[0] will be set to the cosine value. + * Return (x < y ? y : x) * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))sincos(float3 v, float3 *cosptr); +extern float4 __attribute__((const, overloadable))fmax(float4 x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sine and cosine of a value. - * - * @return sine - * @param v The incoming value in radians - * @param *cosptr cosptr[0] will be set to the cosine value. + * Return (x > y ? y : x) * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))sincos(float4 v, float4 *cosptr); +extern float __attribute__((const, overloadable))fmin(float x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hyperbolic sine of a value specified in radians. + * Return (x > y ? y : x) * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))sinh(float); +extern float2 __attribute__((const, overloadable))fmin(float2 x, float2 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hyperbolic sine of a value specified in radians. + * Return (x > y ? y : x) * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))sinh(float2); +extern float3 __attribute__((const, overloadable))fmin(float3 x, float3 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hyperbolic sine of a value specified in radians. + * Return (x > y ? y : x) * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))sinh(float3); +extern float4 __attribute__((const, overloadable))fmin(float4 x, float4 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hyperbolic sine of a value specified in radians. + * Return (x > y ? y : x) * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))sinh(float4); +extern float2 __attribute__((const, overloadable))fmin(float2 x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sin(v * PI). + * Return (x > y ? y : x) * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))sinpi(float); +extern float3 __attribute__((const, overloadable))fmin(float3 x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sin(v * PI). + * Return (x > y ? y : x) * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))sinpi(float2); +extern float4 __attribute__((const, overloadable))fmin(float4 x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sin(v * PI). + * Return the remainder from x / y * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))sinpi(float3); +extern float __attribute__((const, overloadable))fmod(float x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sin(v * PI). + * Return the remainder from x / y * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))sinpi(float4); +extern float2 __attribute__((const, overloadable))fmod(float2 x, float2 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the tangent of a value. + * Return the remainder from x / y * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))tan(float); +extern float3 __attribute__((const, overloadable))fmod(float3 x, float3 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the tangent of a value. + * Return the remainder from x / y * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))tan(float2); +extern float4 __attribute__((const, overloadable))fmod(float4 x, float4 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the tangent of a value. + * Return fractional part of v + * + * @param floor floor[0] will be set to the floor of the input value. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))tan(float3); +extern float __attribute__((overloadable))fract(float v, float *floor); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the tangent of a value. + * Return fractional part of v + * + * @param floor floor[0] will be set to the floor of the input value. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))tan(float4); +extern float2 __attribute__((overloadable))fract(float2 v, float2 *floor); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hyperbolic tangent of a value. + * Return fractional part of v + * + * @param floor floor[0] will be set to the floor of the input value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))tanh(float); +extern float3 __attribute__((overloadable))fract(float3 v, float3 *floor); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hyperbolic tangent of a value. + * Return fractional part of v + * + * @param floor floor[0] will be set to the floor of the input value. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))tanh(float2); +extern float4 __attribute__((overloadable))fract(float4 v, float4 *floor); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hyperbolic tangent of a value. + * Return fractional part of v * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))tanh(float3); +static float __attribute__((const, overloadable))fract(float v) { + float unused; + return fract(v, &unused); +} #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the hyperbolic tangent of a value. + * Return fractional part of v * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))tanh(float4); +static float2 __attribute__((const, overloadable))fract(float2 v) { + float2 unused; + return fract(v, &unused); +} #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return tan(v * PI) + * Return fractional part of v * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))tanpi(float); +static float3 __attribute__((const, overloadable))fract(float3 v) { + float3 unused; + return fract(v, &unused); +} #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return tan(v * PI) + * Return fractional part of v * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))tanpi(float2); +static float4 __attribute__((const, overloadable))fract(float4 v) { + float4 unused; + return fract(v, &unused); +} #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return tan(v * PI) + * Return the mantissa and place the exponent into iptr[0] + * + * @param v Supports float, float2, float3, float4. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))tanpi(float3); +extern float __attribute__((overloadable))frexp(float v, int *iptr); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return tan(v * PI) + * Return the mantissa and place the exponent into iptr[0] + * + * @param v Supports float, float2, float3, float4. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))tanpi(float4); +extern float2 __attribute__((overloadable))frexp(float2 v, int2 *iptr); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the gamma function of a value. + * Return the mantissa and place the exponent into iptr[0] + * + * @param v Supports float, float2, float3, float4. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))tgamma(float); +extern float3 __attribute__((overloadable))frexp(float3 v, int3 *iptr); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the gamma function of a value. + * Return the mantissa and place the exponent into iptr[0] + * + * @param v Supports float, float2, float3, float4. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))tgamma(float2); +extern float4 __attribute__((overloadable))frexp(float4 v, int4 *iptr); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Compute the gamma function of a value. + * Return the approximate reciprocal of a value. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float3 __attribute__((const, overloadable))tgamma(float3); +extern float __attribute__((const, overloadable))half_recip(float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Compute the gamma function of a value. + * Return the approximate reciprocal of a value. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float4 __attribute__((const, overloadable))tgamma(float4); +extern float2 __attribute__((const, overloadable))half_recip(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * ound to integral using truncation. + * Return the approximate reciprocal of a value. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float __attribute__((const, overloadable))trunc(float); +extern float3 __attribute__((const, overloadable))half_recip(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * ound to integral using truncation. + * Return the approximate reciprocal of a value. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float2 __attribute__((const, overloadable))trunc(float2); +extern float4 __attribute__((const, overloadable))half_recip(float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * ound to integral using truncation. + * Return the approximate value of (1.f / sqrt(value)). * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float3 __attribute__((const, overloadable))trunc(float3); +extern float __attribute__((const, overloadable))half_rsqrt(float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * ound to integral using truncation. + * Return the approximate value of (1.f / sqrt(value)). * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern float4 __attribute__((const, overloadable))trunc(float4); +extern float2 __attribute__((const, overloadable))half_rsqrt(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Return the absolute value of a value. + * Return the approximate value of (1.f / sqrt(value)). * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern uchar __attribute__((const, overloadable))abs(char value); +extern float3 __attribute__((const, overloadable))half_rsqrt(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Return the absolute value of a value. + * Return the approximate value of (1.f / sqrt(value)). * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern uchar2 __attribute__((const, overloadable))abs(char2 value); +extern float4 __attribute__((const, overloadable))half_rsqrt(float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Return the absolute value of a value. + * Return the approximate square root of a value. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern uchar3 __attribute__((const, overloadable))abs(char3 value); +extern float __attribute__((const, overloadable))half_sqrt(float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Return the absolute value of a value. + * Return the approximate square root of a value. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern uchar4 __attribute__((const, overloadable))abs(char4 value); +extern float2 __attribute__((const, overloadable))half_sqrt(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Return the absolute value of a value. + * Return the approximate square root of a value. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern ushort __attribute__((const, overloadable))abs(short value); +extern float3 __attribute__((const, overloadable))half_sqrt(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 17)) /* - * Return the absolute value of a value. + * Return the approximate square root of a value. * - * Supported by API versions 9 and newer. + * Supported by API versions 17 and newer. */ -extern ushort2 __attribute__((const, overloadable))abs(short2 value); +extern float4 __attribute__((const, overloadable))half_sqrt(float4 v); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the absolute value of a value. + * Return sqrt(x*x + y*y) * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))abs(short3 value); +extern float __attribute__((const, overloadable))hypot(float x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the absolute value of a value. + * Return sqrt(x*x + y*y) * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))abs(short4 value); +extern float2 __attribute__((const, overloadable))hypot(float2 x, float2 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the absolute value of a value. + * Return sqrt(x*x + y*y) * * Supported by API versions 9 and newer. */ -extern uint __attribute__((const, overloadable))abs(int value); +extern float3 __attribute__((const, overloadable))hypot(float3 x, float3 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the absolute value of a value. + * Return sqrt(x*x + y*y) * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))abs(int2 value); +extern float4 __attribute__((const, overloadable))hypot(float4 x, float4 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the absolute value of a value. + * Return the integer exponent of a value * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))abs(int3 value); +extern int __attribute__((const, overloadable))ilogb(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the absolute value of a value. + * Return the integer exponent of a value * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))abs(int4 value); +extern int2 __attribute__((const, overloadable))ilogb(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the integer exponent of a value * * Supported by API versions 9 and newer. */ -extern char __attribute__((const, overloadable))clz(char value); +extern int3 __attribute__((const, overloadable))ilogb(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the integer exponent of a value * * Supported by API versions 9 and newer. */ -extern char2 __attribute__((const, overloadable))clz(char2 value); +extern int4 __attribute__((const, overloadable))ilogb(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return (x * 2^y) + * + * @param x Supports 1,2,3,4 components + * @param y Supports single component or matching vector. * * Supported by API versions 9 and newer. */ -extern char3 __attribute__((const, overloadable))clz(char3 value); +extern float __attribute__((const, overloadable))ldexp(float x, int y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return (x * 2^y) + * + * @param x Supports 1,2,3,4 components + * @param y Supports single component or matching vector. * * Supported by API versions 9 and newer. */ -extern char4 __attribute__((const, overloadable))clz(char4 value); +extern float2 __attribute__((const, overloadable))ldexp(float2 x, int2 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return (x * 2^y) + * + * @param x Supports 1,2,3,4 components + * @param y Supports single component or matching vector. * * Supported by API versions 9 and newer. */ -extern uchar __attribute__((const, overloadable))clz(uchar value); +extern float3 __attribute__((const, overloadable))ldexp(float3 x, int3 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return (x * 2^y) + * + * @param x Supports 1,2,3,4 components + * @param y Supports single component or matching vector. * * Supported by API versions 9 and newer. */ -extern uchar2 __attribute__((const, overloadable))clz(uchar2 value); +extern float4 __attribute__((const, overloadable))ldexp(float4 x, int4 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return (x * 2^y) + * + * @param x Supports 1,2,3,4 components + * @param y Supports single component or matching vector. * * Supported by API versions 9 and newer. */ -extern uchar3 __attribute__((const, overloadable))clz(uchar3 value); +extern float2 __attribute__((const, overloadable))ldexp(float2 x, int y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return (x * 2^y) + * + * @param x Supports 1,2,3,4 components + * @param y Supports single component or matching vector. * * Supported by API versions 9 and newer. */ -extern uchar4 __attribute__((const, overloadable))clz(uchar4 value); +extern float3 __attribute__((const, overloadable))ldexp(float3 x, int y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return (x * 2^y) + * + * @param x Supports 1,2,3,4 components + * @param y Supports single component or matching vector. * * Supported by API versions 9 and newer. */ -extern short __attribute__((const, overloadable))clz(short value); +extern float4 __attribute__((const, overloadable))ldexp(float4 x, int y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Compute the length of a vector. * * Supported by API versions 9 and newer. */ -extern short2 __attribute__((const, overloadable))clz(short2 value); +extern float __attribute__((const, overloadable))length(float v); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Compute the length of a vector. * * Supported by API versions 9 and newer. */ -extern short3 __attribute__((const, overloadable))clz(short3 value); +extern float __attribute__((const, overloadable))length(float2 v); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Compute the length of a vector. * * Supported by API versions 9 and newer. */ -extern short4 __attribute__((const, overloadable))clz(short4 value); +extern float __attribute__((const, overloadable))length(float3 v); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Compute the length of a vector. * * Supported by API versions 9 and newer. */ -extern ushort __attribute__((const, overloadable))clz(ushort value); +extern float __attribute__((const, overloadable))length(float4 v); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the log gamma and sign * * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))clz(ushort2 value); +extern float __attribute__((const, overloadable))lgamma(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the log gamma and sign * * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))clz(ushort3 value); +extern float2 __attribute__((const, overloadable))lgamma(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the log gamma and sign * * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))clz(ushort4 value); +extern float3 __attribute__((const, overloadable))lgamma(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the log gamma and sign * * Supported by API versions 9 and newer. */ -extern int __attribute__((const, overloadable))clz(int value); +extern float4 __attribute__((const, overloadable))lgamma(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the log gamma and sign * * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))clz(int2 value); +extern float __attribute__((overloadable))lgamma(float x, int *y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the log gamma and sign * * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))clz(int3 value); +extern float2 __attribute__((overloadable))lgamma(float2 x, int2 *y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the log gamma and sign * * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))clz(int4 value); +extern float3 __attribute__((overloadable))lgamma(float3 x, int3 *y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the log gamma and sign * * Supported by API versions 9 and newer. */ -extern uint __attribute__((const, overloadable))clz(uint value); +extern float4 __attribute__((overloadable))lgamma(float4 x, int4 *y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the natural logarithm. * * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))clz(uint2 value); +extern float __attribute__((const, overloadable))log(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the natural logarithm. * * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))clz(uint3 value); +extern float2 __attribute__((const, overloadable))log(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the number of leading 0-bits in a value. + * Return the natural logarithm. * * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))clz(uint4 value); +extern float3 __attribute__((const, overloadable))log(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the natural logarithm. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))min(float, float); +extern float4 __attribute__((const, overloadable))log(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the base 10 logarithm. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))min(float2, float2); +extern float __attribute__((const, overloadable))log10(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the base 10 logarithm. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))min(float3, float3); +extern float2 __attribute__((const, overloadable))log10(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the base 10 logarithm. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))min(float4, float4); +extern float3 __attribute__((const, overloadable))log10(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the base 10 logarithm. * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static char __attribute__((const, overloadable))min(char v1, char v2) { - return (v1 < v2 ? v1 : v2); -} +extern float4 __attribute__((const, overloadable))log10(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the natural logarithm of (v + 1.0f) * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static uchar __attribute__((const, overloadable))min(uchar v1, uchar v2) { - return (v1 < v2 ? v1 : v2); -} +extern float __attribute__((const, overloadable))log1p(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the natural logarithm of (v + 1.0f) * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static short __attribute__((const, overloadable))min(short v1, short v2) { - return (v1 < v2 ? v1 : v2); -} +extern float2 __attribute__((const, overloadable))log1p(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the natural logarithm of (v + 1.0f) * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static ushort __attribute__((const, overloadable))min(ushort v1, ushort v2) { - return (v1 < v2 ? v1 : v2); -} +extern float3 __attribute__((const, overloadable))log1p(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the natural logarithm of (v + 1.0f) * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static int __attribute__((const, overloadable))min(int v1, int v2) { - return (v1 < v2 ? v1 : v2); -} +extern float4 __attribute__((const, overloadable))log1p(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the base 2 logarithm. * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static uint __attribute__((const, overloadable))min(uint v1, uint v2) { - return (v1 < v2 ? v1 : v2); -} +extern float __attribute__((const, overloadable))log2(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the base 2 logarithm. * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static char2 __attribute__((const, overloadable))min(char2 v1, char2 v2) { - char2 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - return tmp; -} +extern float2 __attribute__((const, overloadable))log2(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the base 2 logarithm. * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static uchar2 __attribute__((const, overloadable))min(uchar2 v1, uchar2 v2) { - uchar2 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - return tmp; -} +extern float3 __attribute__((const, overloadable))log2(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the base 2 logarithm. * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static short2 __attribute__((const, overloadable))min(short2 v1, short2 v2) { - short2 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - return tmp; -} +extern float4 __attribute__((const, overloadable))log2(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Compute the exponent of the value. * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static ushort2 __attribute__((const, overloadable))min(ushort2 v1, ushort2 v2) { - ushort2 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - return tmp; -} +extern float __attribute__((const, overloadable))logb(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Compute the exponent of the value. * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static int2 __attribute__((const, overloadable))min(int2 v1, int2 v2) { - int2 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - return tmp; -} +extern float2 __attribute__((const, overloadable))logb(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Compute the exponent of the value. * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static uint2 __attribute__((const, overloadable))min(uint2 v1, uint2 v2) { - uint2 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - return tmp; -} +extern float3 __attribute__((const, overloadable))logb(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Compute the exponent of the value. * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static char3 __attribute__((const, overloadable))min(char3 v1, char3 v2) { - char3 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - return tmp; -} +extern float4 __attribute__((const, overloadable))logb(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Compute (a * b) + c * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static uchar3 __attribute__((const, overloadable))min(uchar3 v1, uchar3 v2) { - uchar3 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - return tmp; -} +extern float __attribute__((const, overloadable))mad(float a, float b, float c); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Compute (a * b) + c * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static short3 __attribute__((const, overloadable))min(short3 v1, short3 v2) { - short3 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - return tmp; -} +extern float2 __attribute__((const, overloadable))mad(float2 a, float2 b, float2 c); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Compute (a * b) + c * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static ushort3 __attribute__((const, overloadable))min(ushort3 v1, ushort3 v2) { - ushort3 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - return tmp; -} +extern float3 __attribute__((const, overloadable))mad(float3 a, float3 b, float3 c); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Compute (a * b) + c * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static int3 __attribute__((const, overloadable))min(int3 v1, int3 v2) { - int3 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - return tmp; -} +extern float4 __attribute__((const, overloadable))mad(float4 a, float4 b, float4 c); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static uint3 __attribute__((const, overloadable))min(uint3 v1, uint3 v2) { - uint3 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - return tmp; -} +extern float __attribute__((const, overloadable))max(float, float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static char4 __attribute__((const, overloadable))min(char4 v1, char4 v2) { - char4 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - tmp.w = (v1.w < v2.w ? v1.w : v2.w); - return tmp; -} +extern float2 __attribute__((const, overloadable))max(float2, float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static uchar4 __attribute__((const, overloadable))min(uchar4 v1, uchar4 v2) { - uchar4 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - tmp.w = (v1.w < v2.w ? v1.w : v2.w); - return tmp; -} +extern float3 __attribute__((const, overloadable))max(float3, float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 9 and newer. */ -static short4 __attribute__((const, overloadable))min(short4 v1, short4 v2) { - short4 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - tmp.w = (v1.w < v2.w ? v1.w : v2.w); - return tmp; -} +extern float4 __attribute__((const, overloadable))max(float4, float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Suppored by API versions 9 - 19 */ -static ushort4 __attribute__((const, overloadable))min(ushort4 v1, ushort4 v2) { - ushort4 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - tmp.w = (v1.w < v2.w ? v1.w : v2.w); - return tmp; +static char __attribute__((const, overloadable))max(char v1, char v2) { + return (v1 > v2 ? v1 : v2); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Suppored by API versions 9 - 19 */ -static int4 __attribute__((const, overloadable))min(int4 v1, int4 v2) { - int4 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - tmp.w = (v1.w < v2.w ? v1.w : v2.w); - return tmp; +static uchar __attribute__((const, overloadable))max(uchar v1, uchar v2) { + return (v1 > v2 ? v1 : v2); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Suppored by API versions 9 - 19 */ -static uint4 __attribute__((const, overloadable))min(uint4 v1, uint4 v2) { - uint4 tmp; - tmp.x = (v1.x < v2.x ? v1.x : v2.x); - tmp.y = (v1.y < v2.y ? v1.y : v2.y); - tmp.z = (v1.z < v2.z ? v1.z : v2.z); - tmp.w = (v1.w < v2.w ? v1.w : v2.w); - return tmp; +static short __attribute__((const, overloadable))max(short v1, short v2) { + return (v1 > v2 ? v1 : v2); } #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern char __attribute__((const, overloadable))min(char v1, char v2); +static ushort __attribute__((const, overloadable))max(ushort v1, ushort v2) { + return (v1 > v2 ? v1 : v2); +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern char2 __attribute__((const, overloadable))min(char2 v1, char2 v2); +static int __attribute__((const, overloadable))max(int v1, int v2) { + return (v1 > v2 ? v1 : v2); +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern char3 __attribute__((const, overloadable))min(char3 v1, char3 v2); +static uint __attribute__((const, overloadable))max(uint v1, uint v2) { + return (v1 > v2 ? v1 : v2); +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern char4 __attribute__((const, overloadable))min(char4 v1, char4 v2); +static char2 __attribute__((const, overloadable))max(char2 v1, char2 v2) { + char2 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern uchar __attribute__((const, overloadable))min(uchar v1, uchar v2); +static uchar2 __attribute__((const, overloadable))max(uchar2 v1, uchar2 v2) { + uchar2 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern uchar2 __attribute__((const, overloadable))min(uchar2 v1, uchar2 v2); +static short2 __attribute__((const, overloadable))max(short2 v1, short2 v2) { + short2 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern uchar3 __attribute__((const, overloadable))min(uchar3 v1, uchar3 v2); +static ushort2 __attribute__((const, overloadable))max(ushort2 v1, ushort2 v2) { + ushort2 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern uchar4 __attribute__((const, overloadable))min(uchar4 v1, uchar4 v2); +static int2 __attribute__((const, overloadable))max(int2 v1, int2 v2) { + int2 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern short __attribute__((const, overloadable))min(short v1, short v2); +static uint2 __attribute__((const, overloadable))max(uint2 v1, uint2 v2) { + uint2 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern short2 __attribute__((const, overloadable))min(short2 v1, short2 v2); +static char3 __attribute__((const, overloadable))max(char3 v1, char3 v2) { + char3 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern short3 __attribute__((const, overloadable))min(short3 v1, short3 v2); +static uchar3 __attribute__((const, overloadable))max(uchar3 v1, uchar3 v2) { + uchar3 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern short4 __attribute__((const, overloadable))min(short4 v1, short4 v2); +static short3 __attribute__((const, overloadable))max(short3 v1, short3 v2) { + short3 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern ushort __attribute__((const, overloadable))min(ushort v1, ushort v2); +static ushort3 __attribute__((const, overloadable))max(ushort3 v1, ushort3 v2) { + ushort3 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern ushort2 __attribute__((const, overloadable))min(ushort2 v1, ushort2 v2); +static int3 __attribute__((const, overloadable))max(int3 v1, int3 v2) { + int3 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern ushort3 __attribute__((const, overloadable))min(ushort3 v1, ushort3 v2); +static uint3 __attribute__((const, overloadable))max(uint3 v1, uint3 v2) { + uint3 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern ushort4 __attribute__((const, overloadable))min(ushort4 v1, ushort4 v2); +static char4 __attribute__((const, overloadable))max(char4 v1, char4 v2) { + char4 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + tmp.w = (v1.w > v2.w ? v1.w : v2.w); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern int __attribute__((const, overloadable))min(int v1, int v2); +static uchar4 __attribute__((const, overloadable))max(uchar4 v1, uchar4 v2) { + uchar4 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + tmp.w = (v1.w > v2.w ? v1.w : v2.w); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern int2 __attribute__((const, overloadable))min(int2 v1, int2 v2); -#endif - -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) -/* - * Return the minimum value from two arguments +static short4 __attribute__((const, overloadable))max(short4 v1, short4 v2) { + short4 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + tmp.w = (v1.w > v2.w ? v1.w : v2.w); + return tmp; +} +#endif + +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +/* + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern int3 __attribute__((const, overloadable))min(int3 v1, int3 v2); +static ushort4 __attribute__((const, overloadable))max(ushort4 v1, ushort4 v2) { + ushort4 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + tmp.w = (v1.w > v2.w ? v1.w : v2.w); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern int4 __attribute__((const, overloadable))min(int4 v1, int4 v2); +static int4 __attribute__((const, overloadable))max(int4 v1, int4 v2) { + int4 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + tmp.w = (v1.w > v2.w ? v1.w : v2.w); + return tmp; +} +#endif + +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +/* + * Return the maximum value from two arguments + * + * Suppored by API versions 9 - 19 + */ +static uint4 __attribute__((const, overloadable))max(uint4 v1, uint4 v2) { + uint4 tmp; + tmp.x = (v1.x > v2.x ? v1.x : v2.x); + tmp.y = (v1.y > v2.y ? v1.y : v2.y); + tmp.z = (v1.z > v2.z ? v1.z : v2.z); + tmp.w = (v1.w > v2.w ? v1.w : v2.w); + return tmp; +} #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern uint __attribute__((const, overloadable))min(uint v1, uint v2); +extern char __attribute__((const, overloadable))max(char v1, char v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern uint2 __attribute__((const, overloadable))min(uint2 v1, uint2 v2); +extern char2 __attribute__((const, overloadable))max(char2 v1, char2 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern uint3 __attribute__((const, overloadable))min(uint3 v1, uint3 v2); +extern char3 __attribute__((const, overloadable))max(char3 v1, char3 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern uint4 __attribute__((const, overloadable))min(uint4 v1, uint4 v2); +extern char4 __attribute__((const, overloadable))max(char4 v1, char4 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern long __attribute__((const, overloadable))min(long v1, long v2); +extern uchar __attribute__((const, overloadable))max(uchar v1, uchar v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern long2 __attribute__((const, overloadable))min(long2 v1, long2 v2); +extern uchar2 __attribute__((const, overloadable))max(uchar2 v1, uchar2 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern long3 __attribute__((const, overloadable))min(long3 v1, long3 v2); +extern uchar3 __attribute__((const, overloadable))max(uchar3 v1, uchar3 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern long4 __attribute__((const, overloadable))min(long4 v1, long4 v2); +extern uchar4 __attribute__((const, overloadable))max(uchar4 v1, uchar4 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern ulong __attribute__((const, overloadable))min(ulong v1, ulong v2); +extern short __attribute__((const, overloadable))max(short v1, short v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern ulong2 __attribute__((const, overloadable))min(ulong2 v1, ulong2 v2); +extern short2 __attribute__((const, overloadable))max(short2 v1, short2 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern ulong3 __attribute__((const, overloadable))min(ulong3 v1, ulong3 v2); +extern short3 __attribute__((const, overloadable))max(short3 v1, short3 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the minimum value from two arguments + * Return the maximum value from two arguments * * Supported by API versions 20 and newer. */ -extern ulong4 __attribute__((const, overloadable))min(ulong4 v1, ulong4 v2); +extern short4 __attribute__((const, overloadable))max(short4 v1, short4 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Supported by API versions 9 and newer. + * Supported by API versions 20 and newer. */ -extern float __attribute__((const, overloadable))max(float, float); +extern ushort __attribute__((const, overloadable))max(ushort v1, ushort v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Supported by API versions 9 and newer. + * Supported by API versions 20 and newer. */ -extern float2 __attribute__((const, overloadable))max(float2, float2); +extern ushort2 __attribute__((const, overloadable))max(ushort2 v1, ushort2 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Supported by API versions 9 and newer. + * Supported by API versions 20 and newer. */ -extern float3 __attribute__((const, overloadable))max(float3, float3); +extern ushort3 __attribute__((const, overloadable))max(ushort3 v1, ushort3 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Supported by API versions 9 and newer. + * Supported by API versions 20 and newer. */ -extern float4 __attribute__((const, overloadable))max(float4, float4); +extern ushort4 __attribute__((const, overloadable))max(ushort4 v1, ushort4 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static char __attribute__((const, overloadable))max(char v1, char v2) { - return (v1 > v2 ? v1 : v2); -} +extern int __attribute__((const, overloadable))max(int v1, int v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static uchar __attribute__((const, overloadable))max(uchar v1, uchar v2) { - return (v1 > v2 ? v1 : v2); -} +extern int2 __attribute__((const, overloadable))max(int2 v1, int2 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static short __attribute__((const, overloadable))max(short v1, short v2) { - return (v1 > v2 ? v1 : v2); -} +extern int3 __attribute__((const, overloadable))max(int3 v1, int3 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static ushort __attribute__((const, overloadable))max(ushort v1, ushort v2) { - return (v1 > v2 ? v1 : v2); -} +extern int4 __attribute__((const, overloadable))max(int4 v1, int4 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static int __attribute__((const, overloadable))max(int v1, int v2) { - return (v1 > v2 ? v1 : v2); -} +extern uint __attribute__((const, overloadable))max(uint v1, uint v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static uint __attribute__((const, overloadable))max(uint v1, uint v2) { - return (v1 > v2 ? v1 : v2); -} +extern uint2 __attribute__((const, overloadable))max(uint2 v1, uint2 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static char2 __attribute__((const, overloadable))max(char2 v1, char2 v2) { - char2 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - return tmp; -} +extern uint3 __attribute__((const, overloadable))max(uint3 v1, uint3 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static uchar2 __attribute__((const, overloadable))max(uchar2 v1, uchar2 v2) { - uchar2 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - return tmp; -} +extern uint4 __attribute__((const, overloadable))max(uint4 v1, uint4 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static short2 __attribute__((const, overloadable))max(short2 v1, short2 v2) { - short2 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - return tmp; -} +extern long __attribute__((const, overloadable))max(long v1, long v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static ushort2 __attribute__((const, overloadable))max(ushort2 v1, ushort2 v2) { - ushort2 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - return tmp; -} +extern long2 __attribute__((const, overloadable))max(long2 v1, long2 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static int2 __attribute__((const, overloadable))max(int2 v1, int2 v2) { - int2 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - return tmp; -} +extern long3 __attribute__((const, overloadable))max(long3 v1, long3 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static uint2 __attribute__((const, overloadable))max(uint2 v1, uint2 v2) { - uint2 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - return tmp; -} +extern long4 __attribute__((const, overloadable))max(long4 v1, long4 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static char3 __attribute__((const, overloadable))max(char3 v1, char3 v2) { - char3 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - return tmp; -} +extern ulong __attribute__((const, overloadable))max(ulong v1, ulong v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static uchar3 __attribute__((const, overloadable))max(uchar3 v1, uchar3 v2) { - uchar3 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - return tmp; -} +extern ulong2 __attribute__((const, overloadable))max(ulong2 v1, ulong2 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static short3 __attribute__((const, overloadable))max(short3 v1, short3 v2) { - short3 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - return tmp; -} +extern ulong3 __attribute__((const, overloadable))max(ulong3 v1, ulong3 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* * Return the maximum value from two arguments * - * Suppored by API versions 9 - 19 + * Supported by API versions 20 and newer. */ -static ushort3 __attribute__((const, overloadable))max(ushort3 v1, ushort3 v2) { - ushort3 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - return tmp; -} +extern ulong4 __attribute__((const, overloadable))max(ulong4 v1, ulong4 v2); +#endif + +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +/* + * Return the minimum value from two arguments + * + * Supported by API versions 9 and newer. + */ +extern float __attribute__((const, overloadable))min(float, float); +#endif + +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +/* + * Return the minimum value from two arguments + * + * Supported by API versions 9 and newer. + */ +extern float2 __attribute__((const, overloadable))min(float2, float2); +#endif + +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +/* + * Return the minimum value from two arguments + * + * Supported by API versions 9 and newer. + */ +extern float3 __attribute__((const, overloadable))min(float3, float3); +#endif + +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +/* + * Return the minimum value from two arguments + * + * Supported by API versions 9 and newer. + */ +extern float4 __attribute__((const, overloadable))min(float4, float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Suppored by API versions 9 - 19 */ -static int3 __attribute__((const, overloadable))max(int3 v1, int3 v2) { - int3 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - return tmp; +static char __attribute__((const, overloadable))min(char v1, char v2) { + return (v1 < v2 ? v1 : v2); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Suppored by API versions 9 - 19 */ -static uint3 __attribute__((const, overloadable))max(uint3 v1, uint3 v2) { - uint3 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - return tmp; +static uchar __attribute__((const, overloadable))min(uchar v1, uchar v2) { + return (v1 < v2 ? v1 : v2); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Suppored by API versions 9 - 19 */ -static char4 __attribute__((const, overloadable))max(char4 v1, char4 v2) { - char4 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - tmp.w = (v1.w > v2.w ? v1.w : v2.w); - return tmp; +static short __attribute__((const, overloadable))min(short v1, short v2) { + return (v1 < v2 ? v1 : v2); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Suppored by API versions 9 - 19 */ -static uchar4 __attribute__((const, overloadable))max(uchar4 v1, uchar4 v2) { - uchar4 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - tmp.w = (v1.w > v2.w ? v1.w : v2.w); - return tmp; +static ushort __attribute__((const, overloadable))min(ushort v1, ushort v2) { + return (v1 < v2 ? v1 : v2); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Suppored by API versions 9 - 19 */ -static short4 __attribute__((const, overloadable))max(short4 v1, short4 v2) { - short4 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - tmp.w = (v1.w > v2.w ? v1.w : v2.w); - return tmp; +static int __attribute__((const, overloadable))min(int v1, int v2) { + return (v1 < v2 ? v1 : v2); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Suppored by API versions 9 - 19 */ -static ushort4 __attribute__((const, overloadable))max(ushort4 v1, ushort4 v2) { - ushort4 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - tmp.w = (v1.w > v2.w ? v1.w : v2.w); - return tmp; +static uint __attribute__((const, overloadable))min(uint v1, uint v2) { + return (v1 < v2 ? v1 : v2); } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Suppored by API versions 9 - 19 */ -static int4 __attribute__((const, overloadable))max(int4 v1, int4 v2) { - int4 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - tmp.w = (v1.w > v2.w ? v1.w : v2.w); +static char2 __attribute__((const, overloadable))min(char2 v1, char2 v2) { + char2 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); return tmp; } #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Suppored by API versions 9 - 19 */ -static uint4 __attribute__((const, overloadable))max(uint4 v1, uint4 v2) { - uint4 tmp; - tmp.x = (v1.x > v2.x ? v1.x : v2.x); - tmp.y = (v1.y > v2.y ? v1.y : v2.y); - tmp.z = (v1.z > v2.z ? v1.z : v2.z); - tmp.w = (v1.w > v2.w ? v1.w : v2.w); +static uchar2 __attribute__((const, overloadable))min(uchar2 v1, uchar2 v2) { + uchar2 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); return tmp; } #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern char __attribute__((const, overloadable))max(char v1, char v2); +static short2 __attribute__((const, overloadable))min(short2 v1, short2 v2) { + short2 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern char2 __attribute__((const, overloadable))max(char2 v1, char2 v2); +static ushort2 __attribute__((const, overloadable))min(ushort2 v1, ushort2 v2) { + ushort2 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern char3 __attribute__((const, overloadable))max(char3 v1, char3 v2); +static int2 __attribute__((const, overloadable))min(int2 v1, int2 v2) { + int2 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern char4 __attribute__((const, overloadable))max(char4 v1, char4 v2); +static uint2 __attribute__((const, overloadable))min(uint2 v1, uint2 v2) { + uint2 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern uchar __attribute__((const, overloadable))max(uchar v1, uchar v2); +static char3 __attribute__((const, overloadable))min(char3 v1, char3 v2) { + char3 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern uchar2 __attribute__((const, overloadable))max(uchar2 v1, uchar2 v2); +static uchar3 __attribute__((const, overloadable))min(uchar3 v1, uchar3 v2) { + uchar3 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern uchar3 __attribute__((const, overloadable))max(uchar3 v1, uchar3 v2); +static short3 __attribute__((const, overloadable))min(short3 v1, short3 v2) { + short3 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern uchar4 __attribute__((const, overloadable))max(uchar4 v1, uchar4 v2); +static ushort3 __attribute__((const, overloadable))min(ushort3 v1, ushort3 v2) { + ushort3 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern short __attribute__((const, overloadable))max(short v1, short v2); +static int3 __attribute__((const, overloadable))min(int3 v1, int3 v2) { + int3 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern short2 __attribute__((const, overloadable))max(short2 v1, short2 v2); +static uint3 __attribute__((const, overloadable))min(uint3 v1, uint3 v2) { + uint3 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern short3 __attribute__((const, overloadable))max(short3 v1, short3 v2); +static char4 __attribute__((const, overloadable))min(char4 v1, char4 v2) { + char4 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + tmp.w = (v1.w < v2.w ? v1.w : v2.w); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern short4 __attribute__((const, overloadable))max(short4 v1, short4 v2); +static uchar4 __attribute__((const, overloadable))min(uchar4 v1, uchar4 v2) { + uchar4 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + tmp.w = (v1.w < v2.w ? v1.w : v2.w); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern ushort __attribute__((const, overloadable))max(ushort v1, ushort v2); +static short4 __attribute__((const, overloadable))min(short4 v1, short4 v2) { + short4 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + tmp.w = (v1.w < v2.w ? v1.w : v2.w); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern ushort2 __attribute__((const, overloadable))max(ushort2 v1, ushort2 v2); +static ushort4 __attribute__((const, overloadable))min(ushort4 v1, ushort4 v2) { + ushort4 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + tmp.w = (v1.w < v2.w ? v1.w : v2.w); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern ushort3 __attribute__((const, overloadable))max(ushort3 v1, ushort3 v2); +static int4 __attribute__((const, overloadable))min(int4 v1, int4 v2) { + int4 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + tmp.w = (v1.w < v2.w ? v1.w : v2.w); + return tmp; +} #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * - * Supported by API versions 20 and newer. + * Suppored by API versions 9 - 19 */ -extern ushort4 __attribute__((const, overloadable))max(ushort4 v1, ushort4 v2); +static uint4 __attribute__((const, overloadable))min(uint4 v1, uint4 v2) { + uint4 tmp; + tmp.x = (v1.x < v2.x ? v1.x : v2.x); + tmp.y = (v1.y < v2.y ? v1.y : v2.y); + tmp.z = (v1.z < v2.z ? v1.z : v2.z); + tmp.w = (v1.w < v2.w ? v1.w : v2.w); + return tmp; +} #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern int __attribute__((const, overloadable))max(int v1, int v2); +extern char __attribute__((const, overloadable))min(char v1, char v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern int2 __attribute__((const, overloadable))max(int2 v1, int2 v2); +extern char2 __attribute__((const, overloadable))min(char2 v1, char2 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern int3 __attribute__((const, overloadable))max(int3 v1, int3 v2); +extern char3 __attribute__((const, overloadable))min(char3 v1, char3 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern int4 __attribute__((const, overloadable))max(int4 v1, int4 v2); +extern char4 __attribute__((const, overloadable))min(char4 v1, char4 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern uint __attribute__((const, overloadable))max(uint v1, uint v2); +extern uchar __attribute__((const, overloadable))min(uchar v1, uchar v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern uint2 __attribute__((const, overloadable))max(uint2 v1, uint2 v2); +extern uchar2 __attribute__((const, overloadable))min(uchar2 v1, uchar2 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern uint3 __attribute__((const, overloadable))max(uint3 v1, uint3 v2); +extern uchar3 __attribute__((const, overloadable))min(uchar3 v1, uchar3 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern uint4 __attribute__((const, overloadable))max(uint4 v1, uint4 v2); +extern uchar4 __attribute__((const, overloadable))min(uchar4 v1, uchar4 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern long __attribute__((const, overloadable))max(long v1, long v2); +extern short __attribute__((const, overloadable))min(short v1, short v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern long2 __attribute__((const, overloadable))max(long2 v1, long2 v2); +extern short2 __attribute__((const, overloadable))min(short2 v1, short2 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern long3 __attribute__((const, overloadable))max(long3 v1, long3 v2); +extern short3 __attribute__((const, overloadable))min(short3 v1, short3 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern long4 __attribute__((const, overloadable))max(long4 v1, long4 v2); +extern short4 __attribute__((const, overloadable))min(short4 v1, short4 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern ulong __attribute__((const, overloadable))max(ulong v1, ulong v2); +extern ushort __attribute__((const, overloadable))min(ushort v1, ushort v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern ulong2 __attribute__((const, overloadable))max(ulong2 v1, ulong2 v2); +extern ushort2 __attribute__((const, overloadable))min(ushort2 v1, ushort2 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern ulong3 __attribute__((const, overloadable))max(ulong3 v1, ulong3 v2); +extern ushort3 __attribute__((const, overloadable))min(ushort3 v1, ushort3 v2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Return the maximum value from two arguments + * Return the minimum value from two arguments * * Supported by API versions 20 and newer. */ -extern ulong4 __attribute__((const, overloadable))max(ulong4 v1, ulong4 v2); +extern ushort4 __attribute__((const, overloadable))min(ushort4 v1, ushort4 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 9 and newer. + * Supported by API versions 20 and newer. */ -extern float __attribute__((const, overloadable))clamp(float value, float min_value, float max_value); +extern int __attribute__((const, overloadable))min(int v1, int v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 9 and newer. + * Supported by API versions 20 and newer. */ -extern float2 __attribute__((const, overloadable))clamp(float2 value, float2 min_value, float2 max_value); +extern int2 __attribute__((const, overloadable))min(int2 v1, int2 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 9 and newer. + * Supported by API versions 20 and newer. */ -extern float3 __attribute__((const, overloadable))clamp(float3 value, float3 min_value, float3 max_value); +extern int3 __attribute__((const, overloadable))min(int3 v1, int3 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 9 and newer. + * Supported by API versions 20 and newer. */ -extern float4 __attribute__((const, overloadable))clamp(float4 value, float4 min_value, float4 max_value); +extern int4 __attribute__((const, overloadable))min(int4 v1, int4 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 9 and newer. + * Supported by API versions 20 and newer. */ -extern float2 __attribute__((const, overloadable))clamp(float2 value, float min_value, float max_value); +extern uint __attribute__((const, overloadable))min(uint v1, uint v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. + * Return the minimum value from two arguments * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low - * - * Supported by API versions 9 and newer. - */ -extern float3 __attribute__((const, overloadable))clamp(float3 value, float min_value, float max_value); -#endif - -#if (defined(RS_VERSION) && (RS_VERSION >= 9)) -/* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low - * - * Supported by API versions 9 and newer. - */ -extern float4 __attribute__((const, overloadable))clamp(float4 value, float min_value, float max_value); -#endif - -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) -/* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low - * - * Supported by API versions 19 and newer. - */ -extern char __attribute__((const, overloadable))clamp(char value, char min_value, char max_value); -#endif - -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) -/* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low - * - * Supported by API versions 19 and newer. - */ -extern char2 __attribute__((const, overloadable))clamp(char2 value, char2 min_value, char2 max_value); -#endif - -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) -/* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low - * - * Supported by API versions 19 and newer. + * Supported by API versions 20 and newer. */ -extern char3 __attribute__((const, overloadable))clamp(char3 value, char3 min_value, char3 max_value); +extern uint2 __attribute__((const, overloadable))min(uint2 v1, uint2 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 19 and newer. + * Supported by API versions 20 and newer. */ -extern char4 __attribute__((const, overloadable))clamp(char4 value, char4 min_value, char4 max_value); +extern uint3 __attribute__((const, overloadable))min(uint3 v1, uint3 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 19 and newer. + * Supported by API versions 20 and newer. */ -extern uchar __attribute__((const, overloadable))clamp(uchar value, uchar min_value, uchar max_value); +extern uint4 __attribute__((const, overloadable))min(uint4 v1, uint4 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 19 and newer. + * Supported by API versions 20 and newer. */ -extern uchar2 __attribute__((const, overloadable))clamp(uchar2 value, uchar2 min_value, uchar2 max_value); +extern long __attribute__((const, overloadable))min(long v1, long v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 19 and newer. + * Supported by API versions 20 and newer. */ -extern uchar3 __attribute__((const, overloadable))clamp(uchar3 value, uchar3 min_value, uchar3 max_value); +extern long2 __attribute__((const, overloadable))min(long2 v1, long2 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 19 and newer. + * Supported by API versions 20 and newer. */ -extern uchar4 __attribute__((const, overloadable))clamp(uchar4 value, uchar4 min_value, uchar4 max_value); +extern long3 __attribute__((const, overloadable))min(long3 v1, long3 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 19 and newer. + * Supported by API versions 20 and newer. */ -extern short __attribute__((const, overloadable))clamp(short value, short min_value, short max_value); +extern long4 __attribute__((const, overloadable))min(long4 v1, long4 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 19 and newer. + * Supported by API versions 20 and newer. */ -extern short2 __attribute__((const, overloadable))clamp(short2 value, short2 min_value, short2 max_value); +extern ulong __attribute__((const, overloadable))min(ulong v1, ulong v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 19 and newer. + * Supported by API versions 20 and newer. */ -extern short3 __attribute__((const, overloadable))clamp(short3 value, short3 min_value, short3 max_value); +extern ulong2 __attribute__((const, overloadable))min(ulong2 v1, ulong2 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 19 and newer. + * Supported by API versions 20 and newer. */ -extern short4 __attribute__((const, overloadable))clamp(short4 value, short4 min_value, short4 max_value); +extern ulong3 __attribute__((const, overloadable))min(ulong3 v1, ulong3 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the minimum value from two arguments * - * Supported by API versions 19 and newer. + * Supported by API versions 20 and newer. */ -extern ushort __attribute__((const, overloadable))clamp(ushort value, ushort min_value, ushort max_value); +extern ulong4 __attribute__((const, overloadable))min(ulong4 v1, ulong4 v2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * return start + ((stop - start) * amount) * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern ushort2 __attribute__((const, overloadable))clamp(ushort2 value, ushort2 min_value, ushort2 max_value); +extern float __attribute__((const, overloadable))mix(float start, float stop, float amount); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * return start + ((stop - start) * amount) * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern ushort3 __attribute__((const, overloadable))clamp(ushort3 value, ushort3 min_value, ushort3 max_value); +extern float2 __attribute__((const, overloadable))mix(float2 start, float2 stop, float2 amount); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * return start + ((stop - start) * amount) * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern ushort4 __attribute__((const, overloadable))clamp(ushort4 value, ushort4 min_value, ushort4 max_value); +extern float3 __attribute__((const, overloadable))mix(float3 start, float3 stop, float3 amount); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * return start + ((stop - start) * amount) * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern int __attribute__((const, overloadable))clamp(int value, int min_value, int max_value); +extern float4 __attribute__((const, overloadable))mix(float4 start, float4 stop, float4 amount); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * return start + ((stop - start) * amount) * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern int2 __attribute__((const, overloadable))clamp(int2 value, int2 min_value, int2 max_value); +extern float2 __attribute__((const, overloadable))mix(float2 start, float2 stop, float amount); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * return start + ((stop - start) * amount) * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern int3 __attribute__((const, overloadable))clamp(int3 value, int3 min_value, int3 max_value); +extern float3 __attribute__((const, overloadable))mix(float3 start, float3 stop, float amount); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * return start + ((stop - start) * amount) * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern int4 __attribute__((const, overloadable))clamp(int4 value, int4 min_value, int4 max_value); +extern float4 __attribute__((const, overloadable))mix(float4 start, float4 stop, float amount); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. + * Return the integral and fractional components of a number. * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * @param x Source value + * @param iret iret[0] will be set to the integral portion of the number. + * @return The floating point portion of the value. * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern uint __attribute__((const, overloadable))clamp(uint value, uint min_value, uint max_value); +extern float __attribute__((overloadable))modf(float x, float *iret); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. + * Return the integral and fractional components of a number. * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * @param x Source value + * @param iret iret[0] will be set to the integral portion of the number. + * @return The floating point portion of the value. * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern uint2 __attribute__((const, overloadable))clamp(uint2 value, uint2 min_value, uint2 max_value); +extern float2 __attribute__((overloadable))modf(float2 x, float2 *iret); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. + * Return the integral and fractional components of a number. * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * @param x Source value + * @param iret iret[0] will be set to the integral portion of the number. + * @return The floating point portion of the value. * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern uint3 __attribute__((const, overloadable))clamp(uint3 value, uint3 min_value, uint3 max_value); +extern float3 __attribute__((overloadable))modf(float3 x, float3 *iret); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. + * Return the integral and fractional components of a number. * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * @param x Source value + * @param iret iret[0] will be set to the integral portion of the number. + * @return The floating point portion of the value. * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern uint4 __attribute__((const, overloadable))clamp(uint4 value, uint4 min_value, uint4 max_value); +extern float4 __attribute__((overloadable))modf(float4 x, float4 *iret); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * generate a nan * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern long __attribute__((const, overloadable))clamp(long value, long min_value, long max_value); +extern float __attribute__((const, overloadable))nan(uint); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate exp + * valid for inputs -86.f to 86.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern long2 __attribute__((const, overloadable))clamp(long2 value, long2 min_value, long2 max_value); +extern float __attribute__((const, overloadable))native_exp(float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate exp + * valid for inputs -86.f to 86.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern long3 __attribute__((const, overloadable))clamp(long3 value, long3 min_value, long3 max_value); +extern float2 __attribute__((const, overloadable))native_exp(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate exp + * valid for inputs -86.f to 86.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern long4 __attribute__((const, overloadable))clamp(long4 value, long4 min_value, long4 max_value); +extern float3 __attribute__((const, overloadable))native_exp(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate exp + * valid for inputs -86.f to 86.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern ulong __attribute__((const, overloadable))clamp(ulong value, ulong min_value, ulong max_value); +extern float4 __attribute__((const, overloadable))native_exp(float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate exp10 + * valid for inputs -37.f to 37.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern ulong2 __attribute__((const, overloadable))clamp(ulong2 value, ulong2 min_value, ulong2 max_value); +extern float __attribute__((const, overloadable))native_exp10(float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate exp10 + * valid for inputs -37.f to 37.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern ulong3 __attribute__((const, overloadable))clamp(ulong3 value, ulong3 min_value, ulong3 max_value); +extern float2 __attribute__((const, overloadable))native_exp10(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate exp10 + * valid for inputs -37.f to 37.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern ulong4 __attribute__((const, overloadable))clamp(ulong4 value, ulong4 min_value, ulong4 max_value); +extern float3 __attribute__((const, overloadable))native_exp10(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate exp10 + * valid for inputs -37.f to 37.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern char2 __attribute__((const, overloadable))clamp(char2 value, char min_value, char max_value); +extern float4 __attribute__((const, overloadable))native_exp10(float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) -/* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +/* + * Fast approximate exp2 + * valid for inputs -125.f to 125.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern char3 __attribute__((const, overloadable))clamp(char3 value, char min_value, char max_value); +extern float __attribute__((const, overloadable))native_exp2(float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate exp2 + * valid for inputs -125.f to 125.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern char4 __attribute__((const, overloadable))clamp(char4 value, char min_value, char max_value); +extern float2 __attribute__((const, overloadable))native_exp2(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate exp2 + * valid for inputs -125.f to 125.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern uchar2 __attribute__((const, overloadable))clamp(uchar2 value, uchar min_value, uchar max_value); +extern float3 __attribute__((const, overloadable))native_exp2(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate exp2 + * valid for inputs -125.f to 125.f + * Max 8192 ulps of error * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern uchar3 __attribute__((const, overloadable))clamp(uchar3 value, uchar min_value, uchar max_value); +extern float4 __attribute__((const, overloadable))native_exp2(float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern uchar4 __attribute__((const, overloadable))clamp(uchar4 value, uchar min_value, uchar max_value); +extern float __attribute__((const, overloadable))native_log(float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern short2 __attribute__((const, overloadable))clamp(short2 value, short min_value, short max_value); +extern float2 __attribute__((const, overloadable))native_log(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern short3 __attribute__((const, overloadable))clamp(short3 value, short min_value, short max_value); +extern float3 __attribute__((const, overloadable))native_log(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern short4 __attribute__((const, overloadable))clamp(short4 value, short min_value, short max_value); +extern float4 __attribute__((const, overloadable))native_log(float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log10 * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern ushort2 __attribute__((const, overloadable))clamp(ushort2 value, ushort min_value, ushort max_value); +extern float __attribute__((const, overloadable))native_log10(float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log10 * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern ushort3 __attribute__((const, overloadable))clamp(ushort3 value, ushort min_value, ushort max_value); +extern float2 __attribute__((const, overloadable))native_log10(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log10 * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern ushort4 __attribute__((const, overloadable))clamp(ushort4 value, ushort min_value, ushort max_value); +extern float3 __attribute__((const, overloadable))native_log10(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log10 * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern int2 __attribute__((const, overloadable))clamp(int2 value, int min_value, int max_value); +extern float4 __attribute__((const, overloadable))native_log10(float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log2 * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern int3 __attribute__((const, overloadable))clamp(int3 value, int min_value, int max_value); +extern float __attribute__((const, overloadable))native_log2(float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log2 * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern int4 __attribute__((const, overloadable))clamp(int4 value, int min_value, int max_value); +extern float2 __attribute__((const, overloadable))native_log2(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log2 * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern uint2 __attribute__((const, overloadable))clamp(uint2 value, uint min_value, uint max_value); +extern float3 __attribute__((const, overloadable))native_log2(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate log2 * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern uint3 __attribute__((const, overloadable))clamp(uint3 value, uint min_value, uint max_value); +extern float4 __attribute__((const, overloadable))native_log2(float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate v ^ y * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern uint4 __attribute__((const, overloadable))clamp(uint4 value, uint min_value, uint max_value); +extern float __attribute__((const, overloadable))native_powr(float v, float y); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate v ^ y * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern long2 __attribute__((const, overloadable))clamp(long2 value, long min_value, long max_value); +extern float2 __attribute__((const, overloadable))native_powr(float2 v, float2 y); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate v ^ y * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern long3 __attribute__((const, overloadable))clamp(long3 value, long min_value, long max_value); +extern float3 __attribute__((const, overloadable))native_powr(float3 v, float3 y); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 18)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Fast approximate v ^ y * - * Supported by API versions 19 and newer. + * Supported by API versions 18 and newer. */ -extern long4 __attribute__((const, overloadable))clamp(long4 value, long min_value, long max_value); +extern float4 __attribute__((const, overloadable))native_powr(float4 v, float4 y); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the next floating point number from x towards y. * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern ulong2 __attribute__((const, overloadable))clamp(ulong2 value, ulong min_value, ulong max_value); +extern float __attribute__((const, overloadable))nextafter(float x, float y); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the next floating point number from x towards y. * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern ulong3 __attribute__((const, overloadable))clamp(ulong3 value, ulong min_value, ulong max_value); +extern float2 __attribute__((const, overloadable))nextafter(float2 x, float2 y); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 19)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Clamp a value to a specified high and low bound. - * - * @param amount value to be clamped. Supports 1,2,3,4 components - * @param min_value Lower bound, must be scalar or matching vector. - * @param max_value High bound, must match type of low + * Return the next floating point number from x towards y. * - * Supported by API versions 19 and newer. + * Supported by API versions 9 and newer. */ -extern ulong4 __attribute__((const, overloadable))clamp(ulong4 value, ulong min_value, ulong max_value); +extern float3 __attribute__((const, overloadable))nextafter(float3 x, float3 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Convert from radians to degrees. + * Return the next floating point number from x towards y. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))degrees(float value); +extern float4 __attribute__((const, overloadable))nextafter(float4 x, float4 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Convert from radians to degrees. + * Normalize a vector. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))degrees(float2 value); +extern float __attribute__((const, overloadable))normalize(float v); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Convert from radians to degrees. + * Normalize a vector. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))degrees(float3 value); +extern float2 __attribute__((const, overloadable))normalize(float2 v); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Convert from radians to degrees. + * Normalize a vector. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))degrees(float4 value); +extern float3 __attribute__((const, overloadable))normalize(float3 v); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * return start + ((stop - start) * amount) + * Normalize a vector. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))mix(float start, float stop, float amount); +extern float4 __attribute__((const, overloadable))normalize(float4 v); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * return start + ((stop - start) * amount) + * Return x ^ y. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))mix(float2 start, float2 stop, float2 amount); +extern float __attribute__((const, overloadable))pow(float x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * return start + ((stop - start) * amount) + * Return x ^ y. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))mix(float3 start, float3 stop, float3 amount); +extern float2 __attribute__((const, overloadable))pow(float2 x, float2 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * return start + ((stop - start) * amount) + * Return x ^ y. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))mix(float4 start, float4 stop, float4 amount); +extern float3 __attribute__((const, overloadable))pow(float3 x, float3 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * return start + ((stop - start) * amount) + * Return x ^ y. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))mix(float2 start, float2 stop, float amount); +extern float4 __attribute__((const, overloadable))pow(float4 x, float4 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * return start + ((stop - start) * amount) + * Return x ^ y. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))mix(float3 start, float3 stop, float amount); +extern float __attribute__((const, overloadable))pown(float x, int y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * return start + ((stop - start) * amount) + * Return x ^ y. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))mix(float4 start, float4 stop, float amount); +extern float2 __attribute__((const, overloadable))pown(float2 x, int2 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Convert from degrees to radians. + * Return x ^ y. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))radians(float value); +extern float3 __attribute__((const, overloadable))pown(float3 x, int3 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Convert from degrees to radians. + * Return x ^ y. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))radians(float2 value); +extern float4 __attribute__((const, overloadable))pown(float4 x, int4 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Convert from degrees to radians. + * Return x ^ y. + * y must be > 0 * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))radians(float3 value); +extern float __attribute__((const, overloadable))powr(float x, float y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Convert from degrees to radians. + * Return x ^ y. + * y must be > 0 * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))radians(float4 value); +extern float2 __attribute__((const, overloadable))powr(float2 x, float2 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * if (v < edge) - * return 0.f; - * else - * return 1.f; + * Return x ^ y. + * y must be > 0 * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))step(float edge, float v); +extern float3 __attribute__((const, overloadable))powr(float3 x, float3 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * if (v < edge) - * return 0.f; - * else - * return 1.f; + * Return x ^ y. + * y must be > 0 * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))step(float2 edge, float2 v); +extern float4 __attribute__((const, overloadable))powr(float4 x, float4 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * if (v < edge) - * return 0.f; - * else - * return 1.f; + * Convert from degrees to radians. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))step(float3 edge, float3 v); +extern float __attribute__((const, overloadable))radians(float value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * if (v < edge) - * return 0.f; - * else - * return 1.f; + * Convert from degrees to radians. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))step(float4 edge, float4 v); +extern float2 __attribute__((const, overloadable))radians(float2 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * if (v < edge) - * return 0.f; - * else - * return 1.f; + * Convert from degrees to radians. * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))step(float2 edge, float v); +extern float3 __attribute__((const, overloadable))radians(float3 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * if (v < edge) - * return 0.f; - * else - * return 1.f; + * Convert from degrees to radians. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))step(float3 edge, float v); +extern float4 __attribute__((const, overloadable))radians(float4 value); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * if (v < edge) - * return 0.f; - * else - * return 1.f; + * Return round x/y to the nearest integer then compute the remander. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))step(float4 edge, float v); +extern float __attribute__((const, overloadable))remainder(float x, float y); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * if (v < edge) - * return 0.f; - * else - * return 1.f; + * Return round x/y to the nearest integer then compute the remander. * - * Supported by API versions 20 and newer. + * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))step(float edge, float2 v); +extern float2 __attribute__((const, overloadable))remainder(float2 x, float2 y); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * if (v < edge) - * return 0.f; - * else - * return 1.f; + * Return round x/y to the nearest integer then compute the remander. * - * Supported by API versions 20 and newer. + * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))step(float edge, float3 v); +extern float3 __attribute__((const, overloadable))remainder(float3 x, float3 y); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 20)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * if (v < edge) - * return 0.f; - * else - * return 1.f; + * Return round x/y to the nearest integer then compute the remander. * - * Supported by API versions 20 and newer. + * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))step(float edge, float4 v); +extern float4 __attribute__((const, overloadable))remainder(float4 x, float4 y); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sign of a value. - * - * if (v < 0) return -1.f; - * else if (v > 0) return 1.f; - * else return 0.f; + * todo * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))sign(float v); +extern float __attribute__((overloadable))remquo(float b, float c, int *d); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sign of a value. - * - * if (v < 0) return -1.f; - * else if (v > 0) return 1.f; - * else return 0.f; + * todo * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))sign(float2 v); +extern float2 __attribute__((overloadable))remquo(float2 b, float2 c, int2 *d); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sign of a value. - * - * if (v < 0) return -1.f; - * else if (v > 0) return 1.f; - * else return 0.f; + * todo * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))sign(float3 v); +extern float3 __attribute__((overloadable))remquo(float3 b, float3 c, int3 *d); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the sign of a value. - * - * if (v < 0) return -1.f; - * else if (v > 0) return 1.f; - * else return 0.f; + * todo * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))sign(float4 v); +extern float4 __attribute__((overloadable))remquo(float4 b, float4 c, int4 *d); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the cross product of two vectors. + * Round to the nearest integral value. * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))cross(float3 lhs, float3 rhs); +extern float __attribute__((const, overloadable))rint(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the cross product of two vectors. + * Round to the nearest integral value. * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))cross(float4 lhs, float4 rhs); +extern float2 __attribute__((const, overloadable))rint(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the dot product of two vectors. + * Round to the nearest integral value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))dot(float lhs, float rhs); +extern float3 __attribute__((const, overloadable))rint(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the dot product of two vectors. + * Round to the nearest integral value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))dot(float2 lhs, float2 rhs); +extern float4 __attribute__((const, overloadable))rint(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the dot product of two vectors. + * Compute the Nth root of a value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))dot(float3 lhs, float3 rhs); +extern float __attribute__((const, overloadable))rootn(float v, int n); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the dot product of two vectors. + * Compute the Nth root of a value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))dot(float4 lhs, float4 rhs); +extern float2 __attribute__((const, overloadable))rootn(float2 v, int2 n); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the length of a vector. + * Compute the Nth root of a value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))length(float v); +extern float3 __attribute__((const, overloadable))rootn(float3 v, int3 n); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the length of a vector. + * Compute the Nth root of a value. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))length(float2 v); +extern float4 __attribute__((const, overloadable))rootn(float4 v, int4 n); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the length of a vector. + * Round to the nearest integral value. Half values are rounded away from zero. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))length(float3 v); +extern float __attribute__((const, overloadable))round(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the length of a vector. + * Round to the nearest integral value. Half values are rounded away from zero. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))length(float4 v); +extern float2 __attribute__((const, overloadable))round(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the distance between two points. + * Round to the nearest integral value. Half values are rounded away from zero. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))distance(float lhs, float rhs); +extern float3 __attribute__((const, overloadable))round(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the distance between two points. + * Round to the nearest integral value. Half values are rounded away from zero. * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))distance(float2 lhs, float2 rhs); +extern float4 __attribute__((const, overloadable))round(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the distance between two points. + * Return (1 / sqrt(value)). * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))distance(float3 lhs, float3 rhs); +extern float __attribute__((const, overloadable))rsqrt(float); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the distance between two points. + * Return (1 / sqrt(value)). * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))distance(float4 lhs, float4 rhs); +extern float2 __attribute__((const, overloadable))rsqrt(float2); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Normalize a vector. + * Return (1 / sqrt(value)). * * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))normalize(float v); +extern float3 __attribute__((const, overloadable))rsqrt(float3); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Normalize a vector. + * Return (1 / sqrt(value)). * * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))normalize(float2 v); +extern float4 __attribute__((const, overloadable))rsqrt(float4); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Normalize a vector. + * Return the sign of a value. + * + * if (v < 0) return -1.f; + * else if (v > 0) return 1.f; + * else return 0.f; * * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))normalize(float3 v); +extern float __attribute__((const, overloadable))sign(float v); #endif #if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Normalize a vector. + * Return the sign of a value. + * + * if (v < 0) return -1.f; + * else if (v > 0) return 1.f; + * else return 0.f; * * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))normalize(float4 v); +extern float2 __attribute__((const, overloadable))sign(float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate reciprocal of a value. + * Return the sign of a value. * - * Supported by API versions 17 and newer. + * if (v < 0) return -1.f; + * else if (v > 0) return 1.f; + * else return 0.f; + * + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))half_recip(float v); +extern float3 __attribute__((const, overloadable))sign(float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate reciprocal of a value. + * Return the sign of a value. * - * Supported by API versions 17 and newer. + * if (v < 0) return -1.f; + * else if (v > 0) return 1.f; + * else return 0.f; + * + * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))half_recip(float2 v); +extern float4 __attribute__((const, overloadable))sign(float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate reciprocal of a value. + * Return the sine of a value specified in radians. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))half_recip(float3 v); +extern float __attribute__((const, overloadable))sin(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate reciprocal of a value. + * Return the sine of a value specified in radians. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))half_recip(float4 v); +extern float2 __attribute__((const, overloadable))sin(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate square root of a value. + * Return the sine of a value specified in radians. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))half_sqrt(float v); +extern float3 __attribute__((const, overloadable))sin(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate square root of a value. + * Return the sine of a value specified in radians. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))half_sqrt(float2 v); +extern float4 __attribute__((const, overloadable))sin(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate square root of a value. + * Return the sine and cosine of a value. * - * Supported by API versions 17 and newer. + * @return sine + * @param v The incoming value in radians + * @param *cosptr cosptr[0] will be set to the cosine value. + * + * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))half_sqrt(float3 v); +extern float __attribute__((overloadable))sincos(float v, float *cosptr); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate square root of a value. + * Return the sine and cosine of a value. * - * Supported by API versions 17 and newer. + * @return sine + * @param v The incoming value in radians + * @param *cosptr cosptr[0] will be set to the cosine value. + * + * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))half_sqrt(float4 v); +extern float2 __attribute__((overloadable))sincos(float2 v, float2 *cosptr); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate value of (1.f / sqrt(value)). + * Return the sine and cosine of a value. * - * Supported by API versions 17 and newer. + * @return sine + * @param v The incoming value in radians + * @param *cosptr cosptr[0] will be set to the cosine value. + * + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))half_rsqrt(float v); +extern float3 __attribute__((overloadable))sincos(float3 v, float3 *cosptr); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate value of (1.f / sqrt(value)). + * Return the sine and cosine of a value. * - * Supported by API versions 17 and newer. + * @return sine + * @param v The incoming value in radians + * @param *cosptr cosptr[0] will be set to the cosine value. + * + * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))half_rsqrt(float2 v); +extern float4 __attribute__((overloadable))sincos(float4 v, float4 *cosptr); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate value of (1.f / sqrt(value)). + * Return the hyperbolic sine of a value specified in radians. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))half_rsqrt(float3 v); +extern float __attribute__((const, overloadable))sinh(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Return the approximate value of (1.f / sqrt(value)). + * Return the hyperbolic sine of a value specified in radians. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))half_rsqrt(float4 v); +extern float2 __attribute__((const, overloadable))sinh(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the approximate length of a vector. + * Return the hyperbolic sine of a value specified in radians. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fast_length(float v); +extern float3 __attribute__((const, overloadable))sinh(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the approximate length of a vector. + * Return the hyperbolic sine of a value specified in radians. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fast_length(float2 v); +extern float4 __attribute__((const, overloadable))sinh(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the approximate length of a vector. + * Return the sin(v * PI). * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fast_length(float3 v); +extern float __attribute__((const, overloadable))sinpi(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the approximate length of a vector. + * Return the sin(v * PI). * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fast_length(float4 v); +extern float2 __attribute__((const, overloadable))sinpi(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the approximate distance between two points. + * Return the sin(v * PI). * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fast_distance(float lhs, float rhs); +extern float3 __attribute__((const, overloadable))sinpi(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the approximate distance between two points. + * Return the sin(v * PI). * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fast_distance(float2 lhs, float2 rhs); +extern float4 __attribute__((const, overloadable))sinpi(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the approximate distance between two points. + * Return the square root of a value. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fast_distance(float3 lhs, float3 rhs); +extern float __attribute__((const, overloadable))sqrt(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Compute the approximate distance between two points. + * Return the square root of a value. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fast_distance(float4 lhs, float4 rhs); +extern float2 __attribute__((const, overloadable))sqrt(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Approximately normalize a vector. + * Return the square root of a value. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))fast_normalize(float v); +extern float3 __attribute__((const, overloadable))sqrt(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Approximately normalize a vector. + * Return the square root of a value. * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))fast_normalize(float2 v); +extern float4 __attribute__((const, overloadable))sqrt(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Approximately normalize a vector. + * if (v < edge) + * return 0.f; + * else + * return 1.f; * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))fast_normalize(float3 v); +extern float __attribute__((const, overloadable))step(float edge, float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 17)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Approximately normalize a vector. + * if (v < edge) + * return 0.f; + * else + * return 1.f; * - * Supported by API versions 17 and newer. + * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))fast_normalize(float4 v); +extern float2 __attribute__((const, overloadable))step(float2 edge, float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate exp - * valid for inputs -86.f to 86.f - * Max 8192 ulps of error + * if (v < edge) + * return 0.f; + * else + * return 1.f; * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))native_exp(float v); +extern float3 __attribute__((const, overloadable))step(float3 edge, float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) -/* - * Fast approximate exp - * valid for inputs -86.f to 86.f - * Max 8192 ulps of error +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) +/* + * if (v < edge) + * return 0.f; + * else + * return 1.f; * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))native_exp(float2 v); +extern float4 __attribute__((const, overloadable))step(float4 edge, float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate exp - * valid for inputs -86.f to 86.f - * Max 8192 ulps of error + * if (v < edge) + * return 0.f; + * else + * return 1.f; * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))native_exp(float3 v); +extern float2 __attribute__((const, overloadable))step(float2 edge, float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate exp - * valid for inputs -86.f to 86.f - * Max 8192 ulps of error + * if (v < edge) + * return 0.f; + * else + * return 1.f; * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))native_exp(float4 v); +extern float3 __attribute__((const, overloadable))step(float3 edge, float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate exp2 - * valid for inputs -125.f to 125.f - * Max 8192 ulps of error + * if (v < edge) + * return 0.f; + * else + * return 1.f; * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))native_exp2(float v); +extern float4 __attribute__((const, overloadable))step(float4 edge, float v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Fast approximate exp2 - * valid for inputs -125.f to 125.f - * Max 8192 ulps of error + * if (v < edge) + * return 0.f; + * else + * return 1.f; * - * Supported by API versions 18 and newer. + * Supported by API versions 20 and newer. */ -extern float2 __attribute__((const, overloadable))native_exp2(float2 v); +extern float2 __attribute__((const, overloadable))step(float edge, float2 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Fast approximate exp2 - * valid for inputs -125.f to 125.f - * Max 8192 ulps of error + * if (v < edge) + * return 0.f; + * else + * return 1.f; * - * Supported by API versions 18 and newer. + * Supported by API versions 20 and newer. */ -extern float3 __attribute__((const, overloadable))native_exp2(float3 v); +extern float3 __attribute__((const, overloadable))step(float edge, float3 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 20)) /* - * Fast approximate exp2 - * valid for inputs -125.f to 125.f - * Max 8192 ulps of error + * if (v < edge) + * return 0.f; + * else + * return 1.f; * - * Supported by API versions 18 and newer. + * Supported by API versions 20 and newer. */ -extern float4 __attribute__((const, overloadable))native_exp2(float4 v); +extern float4 __attribute__((const, overloadable))step(float edge, float4 v); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate exp10 - * valid for inputs -37.f to 37.f - * Max 8192 ulps of error + * Return the tangent of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))native_exp10(float v); +extern float __attribute__((const, overloadable))tan(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate exp10 - * valid for inputs -37.f to 37.f - * Max 8192 ulps of error + * Return the tangent of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))native_exp10(float2 v); +extern float2 __attribute__((const, overloadable))tan(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate exp10 - * valid for inputs -37.f to 37.f - * Max 8192 ulps of error + * Return the tangent of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))native_exp10(float3 v); +extern float3 __attribute__((const, overloadable))tan(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate exp10 - * valid for inputs -37.f to 37.f - * Max 8192 ulps of error + * Return the tangent of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))native_exp10(float4 v); +extern float4 __attribute__((const, overloadable))tan(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log + * Return the hyperbolic tangent of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))native_log(float v); +extern float __attribute__((const, overloadable))tanh(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log + * Return the hyperbolic tangent of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))native_log(float2 v); +extern float2 __attribute__((const, overloadable))tanh(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log + * Return the hyperbolic tangent of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))native_log(float3 v); +extern float3 __attribute__((const, overloadable))tanh(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log + * Return the hyperbolic tangent of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))native_log(float4 v); +extern float4 __attribute__((const, overloadable))tanh(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log2 + * Return tan(v * PI) * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))native_log2(float v); +extern float __attribute__((const, overloadable))tanpi(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log2 + * Return tan(v * PI) * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))native_log2(float2 v); +extern float2 __attribute__((const, overloadable))tanpi(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log2 + * Return tan(v * PI) * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))native_log2(float3 v); +extern float3 __attribute__((const, overloadable))tanpi(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log2 + * Return tan(v * PI) * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))native_log2(float4 v); +extern float4 __attribute__((const, overloadable))tanpi(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log10 + * Compute the gamma function of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))native_log10(float v); +extern float __attribute__((const, overloadable))tgamma(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log10 + * Compute the gamma function of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))native_log10(float2 v); +extern float2 __attribute__((const, overloadable))tgamma(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log10 + * Compute the gamma function of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))native_log10(float3 v); +extern float3 __attribute__((const, overloadable))tgamma(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate log10 + * Compute the gamma function of a value. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))native_log10(float4 v); +extern float4 __attribute__((const, overloadable))tgamma(float4); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate v ^ y + * ound to integral using truncation. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float __attribute__((const, overloadable))native_powr(float v, float y); +extern float __attribute__((const, overloadable))trunc(float); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate v ^ y + * ound to integral using truncation. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float2 __attribute__((const, overloadable))native_powr(float2 v, float2 y); +extern float2 __attribute__((const, overloadable))trunc(float2); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate v ^ y + * ound to integral using truncation. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float3 __attribute__((const, overloadable))native_powr(float3 v, float3 y); +extern float3 __attribute__((const, overloadable))trunc(float3); #endif -#if (defined(RS_VERSION) && (RS_VERSION >= 18)) +#if (defined(RS_VERSION) && (RS_VERSION >= 9)) /* - * Fast approximate v ^ y + * ound to integral using truncation. * - * Supported by API versions 18 and newer. + * Supported by API versions 9 and newer. */ -extern float4 __attribute__((const, overloadable))native_powr(float4 v, float4 y); +extern float4 __attribute__((const, overloadable))trunc(float4); #endif #endif // __rs_core_math_rsh__ diff --git a/renderscript/include/rs_dct.rsh b/renderscript/include/rs_dct.rsh new file mode 100644 index 0000000..d7289dd --- /dev/null +++ b/renderscript/include/rs_dct.rsh @@ -0,0 +1,14 @@ +#ifndef __RS_DCT_RSH__ +#define __RS_DCT_RSH__ + +#if RS_VERSION > 19 + +extern void rsDct4x4(rs_allocation input, rs_allocation output, int xoff, int yoff); +extern void rsDct8x8(rs_allocation input, rs_allocation output, int xoff, int yoff); +extern void rsDct16x16(rs_allocation input, rs_allocation output, int xoff, int yoff); +extern void rsDct32x32(rs_allocation input, rs_allocation out, int xoff, int yoff); +extern void rsDct32x32_rd(rs_allocation input, rs_allocation out, int xoff, int yoff); + +#endif + +#endif diff --git a/renderscript/include/rs_fadst.rsh b/renderscript/include/rs_fadst.rsh new file mode 100644 index 0000000..1dfe58f --- /dev/null +++ b/renderscript/include/rs_fadst.rsh @@ -0,0 +1,14 @@ +#ifndef __RS_FADST_RSH__ +#define __RS_FADST_RSH__ + +#if RS_VERSION > 19 + +extern void rsFadst4(const rs_allocation input, rs_allocation output, int32_t xoff); + +extern void rsFadst8(const rs_allocation input, rs_allocation output, int32_t xoff); + +extern void rsFadst16(const rs_allocation input, rs_allocation output, int32_t xoff); + +#endif + +#endif \ No newline at end of file diff --git a/renderscript/include/rs_iadst.rsh b/renderscript/include/rs_iadst.rsh new file mode 100644 index 0000000..3208814 --- /dev/null +++ b/renderscript/include/rs_iadst.rsh @@ -0,0 +1,14 @@ +#ifndef __RS_IADST_RSH__ +#define __RS_IADST_RSH__ + +#if RS_VERSION > 19 + +extern void rsIadst4(const rs_allocation input, rs_allocation output, int32_t xoff); + +extern void rsIadst8(const rs_allocation input, rs_allocation output, int32_t xoff); + +extern void rsIadst16(const rs_allocation input, rs_allocation output, int32_t xoff); + +#endif + +#endif \ No newline at end of file diff --git a/renderscript/include/rs_idct.rsh b/renderscript/include/rs_idct.rsh new file mode 100644 index 0000000..d602e34 --- /dev/null +++ b/renderscript/include/rs_idct.rsh @@ -0,0 +1,13 @@ +#ifndef __RS_IDCT_RSH__ +#define __RS_IDCT_RSH__ + +#if RS_VERSION > 19 + +extern void rsIdct4x4(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff); +extern void rsIdct8x8(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff); +extern void rsIdct16x16(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff); +extern void rsIdct32x32(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff); + +#endif + +#endif diff --git a/renderscript/include/rs_vp9.rsh b/renderscript/include/rs_vp9.rsh new file mode 100644 index 0000000..52fbe81 --- /dev/null +++ b/renderscript/include/rs_vp9.rsh @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef __RS_VP9_RSH__ +#define __RS_VP9_RSH__ + + +#include "rs_idct.rsh" +#include "rs_dct.rsh" +#include "rs_iadst.rsh" +#include "rs_fadst.rsh" +#include "rs_walsh.rsh" + +#endif + diff --git a/renderscript/include/rs_walsh.rsh b/renderscript/include/rs_walsh.rsh new file mode 100644 index 0000000..6f7445d --- /dev/null +++ b/renderscript/include/rs_walsh.rsh @@ -0,0 +1,11 @@ +#ifndef __RS_WALSH_RSH__ +#define __RS_WALSH_RSH__ + +#if RS_VERSION > 19 + +extern void rsWalsh4x4(rs_allocation input, rs_allocation dest, int xoff, int yoff); +extern void rsWalsh4x4_1(rs_allocation input, rs_allocation dest, int xoff, int yoff); + +#endif + +#endif diff --git a/renderscript/lib/arm/libRSSupport.so b/renderscript/lib/arm/libRSSupport.so index 7e7bf9f..787cd2f 100755 Binary files a/renderscript/lib/arm/libRSSupport.so and b/renderscript/lib/arm/libRSSupport.so differ diff --git a/renderscript/lib/arm/libc.so b/renderscript/lib/arm/libc.so index 46d46c3..20c5a4a 100755 Binary files a/renderscript/lib/arm/libc.so and b/renderscript/lib/arm/libc.so differ diff --git a/renderscript/lib/arm/libclcore.bc b/renderscript/lib/arm/libclcore.bc index 6a02cec..7ac2f3f 100644 Binary files a/renderscript/lib/arm/libclcore.bc and b/renderscript/lib/arm/libclcore.bc differ diff --git a/renderscript/lib/arm/libm.so b/renderscript/lib/arm/libm.so index 0b9b87a..91e5c14 100755 Binary files a/renderscript/lib/arm/libm.so and b/renderscript/lib/arm/libm.so differ diff --git a/renderscript/lib/arm/librsjni.so b/renderscript/lib/arm/librsjni.so index 96c4d96..e3cbd86 100755 Binary files a/renderscript/lib/arm/librsjni.so and b/renderscript/lib/arm/librsjni.so differ diff --git a/renderscript/lib/arm/librsrt_arm.bc b/renderscript/lib/arm/librsrt_arm.bc index 6a02cec..7ac2f3f 100644 Binary files a/renderscript/lib/arm/librsrt_arm.bc and b/renderscript/lib/arm/librsrt_arm.bc differ diff --git a/renderscript/lib/javalib.jar b/renderscript/lib/javalib.jar index 8983735..c8b1446 100644 Binary files a/renderscript/lib/javalib.jar and b/renderscript/lib/javalib.jar differ diff --git a/renderscript/lib/mips/libRSSupport.so b/renderscript/lib/mips/libRSSupport.so index bb0969f..2427107 100755 Binary files a/renderscript/lib/mips/libRSSupport.so and b/renderscript/lib/mips/libRSSupport.so differ diff --git a/renderscript/lib/mips/libc.so b/renderscript/lib/mips/libc.so index f8d4a8e..70238f6 100755 Binary files a/renderscript/lib/mips/libc.so and b/renderscript/lib/mips/libc.so differ diff --git a/renderscript/lib/mips/libclcore.bc b/renderscript/lib/mips/libclcore.bc index d41677b..7e3c61f 100644 Binary files a/renderscript/lib/mips/libclcore.bc and b/renderscript/lib/mips/libclcore.bc differ diff --git a/renderscript/lib/mips/libm.so b/renderscript/lib/mips/libm.so index aab0670..1f5f29b 100755 Binary files a/renderscript/lib/mips/libm.so and b/renderscript/lib/mips/libm.so differ diff --git a/renderscript/lib/mips/librsjni.so b/renderscript/lib/mips/librsjni.so index 4ed0bbd..c007072 100755 Binary files a/renderscript/lib/mips/librsjni.so and b/renderscript/lib/mips/librsjni.so differ diff --git a/renderscript/lib/mips/librsrt_mips.bc b/renderscript/lib/mips/librsrt_mips.bc index d41677b..7e3c61f 100644 Binary files a/renderscript/lib/mips/librsrt_mips.bc and b/renderscript/lib/mips/librsrt_mips.bc differ diff --git a/renderscript/lib/x86/libRSSupport.so b/renderscript/lib/x86/libRSSupport.so index 32b456f..cf868a7 100755 Binary files a/renderscript/lib/x86/libRSSupport.so and b/renderscript/lib/x86/libRSSupport.so differ diff --git a/renderscript/lib/x86/libc.so b/renderscript/lib/x86/libc.so index 6f6abe0..051cd3b 100755 Binary files a/renderscript/lib/x86/libc.so and b/renderscript/lib/x86/libc.so differ diff --git a/renderscript/lib/x86/libclcore.bc b/renderscript/lib/x86/libclcore.bc index a40a671..a2ecd96 100644 Binary files a/renderscript/lib/x86/libclcore.bc and b/renderscript/lib/x86/libclcore.bc differ diff --git a/renderscript/lib/x86/libm.so b/renderscript/lib/x86/libm.so index db8ac1e..7e1714f 100755 Binary files a/renderscript/lib/x86/libm.so and b/renderscript/lib/x86/libm.so differ diff --git a/renderscript/lib/x86/librsjni.so b/renderscript/lib/x86/librsjni.so index 2777b36..aaf9b0d 100755 Binary files a/renderscript/lib/x86/librsjni.so and b/renderscript/lib/x86/librsjni.so differ diff --git a/renderscript/lib/x86/librsrt_x86.bc b/renderscript/lib/x86/librsrt_x86.bc index 5d089c0..2791542 100644 Binary files a/renderscript/lib/x86/librsrt_x86.bc and b/renderscript/lib/x86/librsrt_x86.bc differ -- cgit v1.1