// This file is auto-generated by clang-tblgen from HLSLIntrinsics.td.
// Do not edit this file directly.

/// \fn T abs(T Val)
/// \brief Returns the absolute value of the input value, \a Val.
/// \param Val The input value.
// abs overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
half abs(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
half2 abs(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
half3 abs(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
half4 abs(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int16_t abs(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int16_t2 abs(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int16_t3 abs(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int16_t4 abs(int16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int abs(int);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int2 abs(int2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int3 abs(int3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int4 abs(int4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int64_t abs(int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int64_t2 abs(int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int64_t3 abs(int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
int64_t4 abs(int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
float abs(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
float2 abs(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
float3 abs(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
float4 abs(float4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
double abs(double);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
double2 abs(double2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
double3 abs(double3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_abs)
double4 abs(double4);

/// \fn T acos(T Val)
/// \brief Returns the arccosine of the input value, \a Val.
/// \param Val The input value.
// acos overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_acos)
half acos(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_acos)
half2 acos(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_acos)
half3 acos(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_acos)
half4 acos(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_acos)
float acos(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_acos)
float2 acos(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_acos)
float3 acos(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_acos)
float4 acos(float4);

/// \fn T AddUint64(T a, T b)
/// \brief Implements unsigned 64-bit integer addition using pairs of unsigned
/// 32-bit integers.
/// \param x [in] The first unsigned 32-bit integer pair(s)
/// \param y [in] The second unsigned 32-bit integer pair(s)
///
/// This function takes one or two pairs (low, high) of unsigned 32-bit integer
/// values and returns pairs (low, high) of unsigned 32-bit integer
/// values representing the result of unsigned 64-bit integer addition.
// AddUint64 overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_adduint64)
uint2 AddUint64(uint2, uint2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_adduint64)
uint4 AddUint64(uint4, uint4);

/// \fn bool all(T x)
/// \brief Returns True if all components of the \a x parameter are non-zero;
/// otherwise, false.
/// \param x The input value.
// all overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(bool);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(bool2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(bool3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(bool4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(uint64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(float4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(double);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(double2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(double3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_all)
bool all(double4);

/// \fn bool and(bool x, bool y)
/// \brief Logically ands two boolean vectors or matrices elementwise and
/// produces a bool vector or matrix output.
// and overloads
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool and(bool, bool);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool2 and(bool2, bool2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool3 and(bool3, bool3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool4 and(bool4, bool4);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool1x2 and(bool1x2, bool1x2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool1x3 and(bool1x3, bool1x3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool1x4 and(bool1x4, bool1x4);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool2x1 and(bool2x1, bool2x1);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool2x2 and(bool2x2, bool2x2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool2x3 and(bool2x3, bool2x3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool2x4 and(bool2x4, bool2x4);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool3x1 and(bool3x1, bool3x1);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool3x2 and(bool3x2, bool3x2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool3x3 and(bool3x3, bool3x3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool3x4 and(bool3x4, bool3x4);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool4x1 and(bool4x1, bool4x1);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool4x2 and(bool4x2, bool4x2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool4x3 and(bool4x3, bool4x3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
bool4x4 and(bool4x4, bool4x4);

/// \fn bool any(T x)
/// \brief Returns True if any components of the \a x parameter are non-zero;
/// otherwise, false.
/// \param x The input value.
// any overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(bool);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(bool2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(bool3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(bool4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(uint64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(float4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(double);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(double2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(double3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_any)
bool any(double4);

/// \fn double asdouble(uint LowBits, uint HighBits)
/// \brief Reinterprets a cast value (two 32-bit values) into a double.
/// \param LowBits The low 32-bit pattern of the input value.
/// \param HighBits The high 32-bit pattern of the input value.
// asdouble overloads
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_asdouble)
double asdouble(uint, uint);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_asdouble)
double2 asdouble(uint2, uint2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_asdouble)
double3 asdouble(uint3, uint3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_asdouble)
double4 asdouble(uint4, uint4);

/// \fn T asin(T Val)
/// \brief Returns the arcsine of the input value, \a Val.
/// \param Val The input value.
// asin overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
half asin(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
half2 asin(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
half3 asin(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
half4 asin(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
float asin(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
float2 asin(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
float3 asin(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
float4 asin(float4);

/// \fn T atan(T Val)
/// \brief Returns the arctangent of the input value, \a Val.
/// \param Val The input value.
// atan overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan)
half atan(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan)
half2 atan(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan)
half3 atan(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan)
half4 atan(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan)
float atan(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan)
float2 atan(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan)
float3 atan(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan)
float4 atan(float4);

/// \fn T atan2(T y, T x)
/// \brief Returns the arctangent of y/x, using the signs of the arguments to
/// determine the correct quadrant.
/// \param y The y-coordinate.
/// \param x The x-coordinate.
// atan2 overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan2)
half atan2(half, half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan2)
half2 atan2(half2, half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan2)
half3 atan2(half3, half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan2)
half4 atan2(half4, half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan2)
float atan2(float, float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan2)
float2 atan2(float2, float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan2)
float3 atan2(float3, float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_atan2)
float4 atan2(float4, float4);

/// \fn T ceil(T Val)
/// \brief Returns the smallest integer value that is greater than or equal to
/// the input value, \a Val.
/// \param Val The input value.
// ceil overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_ceil)
half ceil(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_ceil)
half2 ceil(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_ceil)
half3 ceil(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_ceil)
half4 ceil(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_ceil)
float ceil(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_ceil)
float2 ceil(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_ceil)
float3 ceil(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_ceil)
float4 ceil(float4);

/// \fn T clamp(T X, T Min, T Max)
/// \brief Clamps the specified value \a X to the specified
/// minimum ( \a Min) and maximum ( \a Max) range.
/// \param X A value to clamp.
/// \param Min The specified minimum range.
/// \param Max The specified maximum range.
///
/// Returns The clamped value for the \a X parameter.
/// For values of -INF or INF, clamp will behave as expected.
/// However for values of NaN, the results are undefined.
// clamp overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
half clamp(half, half, half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
half2 clamp(half2, half2, half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
half3 clamp(half3, half3, half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
half4 clamp(half4, half4, half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int16_t clamp(int16_t, int16_t, int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int16_t2 clamp(int16_t2, int16_t2, int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int16_t3 clamp(int16_t3, int16_t3, int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int16_t4 clamp(int16_t4, int16_t4, int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint16_t clamp(uint16_t, uint16_t, uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint16_t2 clamp(uint16_t2, uint16_t2, uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint16_t3 clamp(uint16_t3, uint16_t3, uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint16_t4 clamp(uint16_t4, uint16_t4, uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int clamp(int, int, int);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int2 clamp(int2, int2, int2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int3 clamp(int3, int3, int3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int4 clamp(int4, int4, int4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint clamp(uint, uint, uint);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint2 clamp(uint2, uint2, uint2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint3 clamp(uint3, uint3, uint3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint4 clamp(uint4, uint4, uint4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int64_t clamp(int64_t, int64_t, int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int64_t2 clamp(int64_t2, int64_t2, int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int64_t3 clamp(int64_t3, int64_t3, int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
int64_t4 clamp(int64_t4, int64_t4, int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint64_t clamp(uint64_t, uint64_t, uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint64_t2 clamp(uint64_t2, uint64_t2, uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint64_t3 clamp(uint64_t3, uint64_t3, uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
uint64_t4 clamp(uint64_t4, uint64_t4, uint64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
float clamp(float, float, float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
float2 clamp(float2, float2, float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
float3 clamp(float3, float3, float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
float4 clamp(float4, float4, float4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
double clamp(double, double, double);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
double2 clamp(double2, double2, double2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
double3 clamp(double3, double3, double3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clamp)
double4 clamp(double4, double4, double4);

/// \fn void clip(T Val)
/// \brief Discards the current pixel if the specified value is less than zero.
/// \param Val The input value.
// clip overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clip)
void clip(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clip)
void clip(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clip)
void clip(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clip)
void clip(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clip)
void clip(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clip)
void clip(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clip)
void clip(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_clip)
void clip(float4);

/// \fn T cos(T Val)
/// \brief Returns the cosine of the input value, \a Val.
/// \param Val The input value.
// cos overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos)
half cos(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos)
half2 cos(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos)
half3 cos(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos)
half4 cos(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos)
float cos(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos)
float2 cos(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos)
float3 cos(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos)
float4 cos(float4);

/// \fn T cosh(T Val)
/// \brief Returns the hyperbolic cosine of the input value, \a Val.
/// \param Val The input value.
// cosh overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cosh)
half cosh(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cosh)
half2 cosh(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cosh)
half3 cosh(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cosh)
half4 cosh(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cosh)
float cosh(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cosh)
float2 cosh(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cosh)
float3 cosh(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_cosh)
float4 cosh(float4);

// cross overloads
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_crossf32)
float3 cross(float3, float3);

/// \fn T cross(T x, T y)
/// \brief Returns the cross product of two floating-point, 3D vectors.
/// \param x [in] The first floating-point, 3D vector.
/// \param y [in] The second floating-point, 3D vector.
///
/// Result is the cross product of x and y, i.e., the resulting
/// components are, in order :
/// x[1] * y[2] - y[1] * x[2]
/// x[2] * y[0] - y[2] * x[0]
/// x[0] * y[1] - y[0] * x[1]
// cross overloads
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_crossf16)
half3 cross(half3, half3);

/// \fn T ddx_coarse(T value)
/// \brief Computes a low precision partial derivative with respect to the
/// screen-space x-coordinate.
/// \param value The input value.
///
/// The return value is a floating point scalar or vector containing the low
/// prevision partial derivative of the input value.
// ddx_coarse overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_coarse)
half ddx_coarse(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_coarse)
half2 ddx_coarse(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_coarse)
half3 ddx_coarse(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_coarse)
half4 ddx_coarse(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_coarse)
float ddx_coarse(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_coarse)
float2 ddx_coarse(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_coarse)
float3 ddx_coarse(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_coarse)
float4 ddx_coarse(float4);

/// \fn T ddx_fine(T value)
/// \brief Computes a high precision partial derivative with respect to the
/// screen-space x-coordinate.
/// \param value The input value.
///
/// The return value is a floating point scalar or vector containing the high
/// prevision partial derivative of the input value.
// ddx_fine overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_fine)
half ddx_fine(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_fine)
half2 ddx_fine(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_fine)
half3 ddx_fine(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_fine)
half4 ddx_fine(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_fine)
float ddx_fine(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_fine)
float2 ddx_fine(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_fine)
float3 ddx_fine(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddx_fine)
float4 ddx_fine(float4);

/// \fn T ddy_coarse(T value)
/// \brief Computes a low precision partial derivative with respect to the
/// screen-space y-coordinate.
/// \param value The input value.
///
/// The return value is a floating point scalar or vector containing the low
/// prevision partial derivative of the input value.
// ddy_coarse overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_coarse)
half ddy_coarse(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_coarse)
half2 ddy_coarse(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_coarse)
half3 ddy_coarse(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_coarse)
half4 ddy_coarse(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_coarse)
float ddy_coarse(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_coarse)
float2 ddy_coarse(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_coarse)
float3 ddy_coarse(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_coarse)
float4 ddy_coarse(float4);

/// \fn T ddy_fine(T value)
/// \brief Computes a high precision partial derivative with respect to the
/// screen-space y-coordinate.
/// \param value The input value.
///
/// The return value is a floating point scalar or vector containing the high
/// prevision partial derivative of the input value.
// ddy_fine overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_fine)
half ddy_fine(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_fine)
half2 ddy_fine(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_fine)
half3 ddy_fine(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_fine)
half4 ddy_fine(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_fine)
float ddy_fine(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_fine)
float2 ddy_fine(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_fine)
float3 ddy_fine(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_ddy_fine)
float4 ddy_fine(float4);

/// \fn T degrees(T x)
/// \brief Converts the specified value from radians to degrees.
/// \param x The specified input value.
// degrees overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
half degrees(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
half2 degrees(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
half3 degrees(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
half4 degrees(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
float degrees(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
float2 degrees(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
float3 degrees(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
float4 degrees(float4);

/// \fn K dot(T X, T Y)
/// \brief Return the dot product (a scalar value) of \a X and \a Y.
/// \param X The X input value.
/// \param Y The Y input value.
// dot overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
half dot(half, half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
half dot(half2, half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
half dot(half3, half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
half dot(half4, half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int16_t dot(int16_t, int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int16_t dot(int16_t2, int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int16_t dot(int16_t3, int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int16_t dot(int16_t4, int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint16_t dot(uint16_t, uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint16_t dot(uint16_t2, uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint16_t dot(uint16_t3, uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint16_t dot(uint16_t4, uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int dot(int, int);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int dot(int2, int2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int dot(int3, int3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int dot(int4, int4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint dot(uint, uint);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint dot(uint2, uint2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint dot(uint3, uint3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint dot(uint4, uint4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int64_t dot(int64_t, int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int64_t dot(int64_t2, int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int64_t dot(int64_t3, int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
int64_t dot(int64_t4, int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint64_t dot(uint64_t, uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint64_t dot(uint64_t2, uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint64_t dot(uint64_t3, uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
uint64_t dot(uint64_t4, uint64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
float dot(float, float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
float dot(float2, float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
float dot(float3, float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
float dot(float4, float4);

/// \fn int dot4add_i8packed(uint A, uint B, int C)
/// \brief Dot product of two packed 8-bit signed integer vectors, accumulated
/// with a 32-bit signed integer.
// dot4add_i8packed overloads
_HLSL_AVAILABILITY(shadermodel, 6.4)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot4add_i8packed)
int dot4add_i8packed(uint, uint, int);

/// \fn uint dot4add_u8packed(uint A, uint B, uint C)
/// \brief Dot product of two packed 8-bit unsigned integer vectors, accumulated
/// with a 32-bit unsigned integer.
// dot4add_u8packed overloads
_HLSL_AVAILABILITY(shadermodel, 6.4)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot4add_u8packed)
uint dot4add_u8packed(uint, uint, uint);

// dot overloads
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot)
double dot(double, double);

/// \fn T exp(T x)
/// \brief Returns the base-e exponential, or \a e**x, of the specified value.
/// \param x The specified input value.
///
/// The return value is the base-e exponential of the \a x parameter.
// exp overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp)
half exp(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp)
half2 exp(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp)
half3 exp(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp)
half4 exp(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp)
float exp(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp)
float2 exp(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp)
float3 exp(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp)
float4 exp(float4);

/// \fn T exp2(T x)
/// \brief Returns the base 2 exponential, or \a 2**x, of the specified value.
/// \param x The specified input value.
///
/// The base 2 exponential of the \a x parameter.
// exp2 overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp2)
half exp2(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp2)
half2 exp2(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp2)
half3 exp2(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp2)
half4 exp2(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp2)
float exp2(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp2)
float2 exp2(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp2)
float3 exp2(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp2)
float4 exp2(float4);

/// \fn float f16tof32(uint x)
/// \brief Returns the half value stored in the low 16 bits of the uint arg
/// converted to a float.
/// \param x The uint containing two half values.
///
/// The float value of the half value found in the low 16 bits of the \a x
/// parameter.
// f16tof32 overloads
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_f16tof32)
float f16tof32(uint);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_f16tof32)
float2 f16tof32(uint2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_f16tof32)
float3 f16tof32(uint3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_f16tof32)
float4 f16tof32(uint4);

/// \fn uint f32tof16(float x)
/// \brief Returns the float arg value converted to half in the low 16 bits of
/// the uint return value.
/// \param x The float to be converted to half.
///
/// The return value is a uint containing the converted half value in the low
/// 16 bits.
// f32tof16 overloads
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_f32tof16)
uint f32tof16(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_f32tof16)
uint2 f32tof16(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_f32tof16)
uint3 f32tof16(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_f32tof16)
uint4 f32tof16(float4);

/// \fn T firstbitlow(T Val)
/// \brief Returns the location of the first set bit starting from the lowest
/// order bit and working upward, per component.
/// \param Val the input value.
// firstbitlow overloads
#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint firstbitlow(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint2 firstbitlow(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint3 firstbitlow(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint4 firstbitlow(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint firstbitlow(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint2 firstbitlow(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint3 firstbitlow(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint4 firstbitlow(uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint firstbitlow(int);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint2 firstbitlow(int2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint3 firstbitlow(int3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint4 firstbitlow(int4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint firstbitlow(uint);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint2 firstbitlow(uint2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint3 firstbitlow(uint3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint4 firstbitlow(uint4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint firstbitlow(int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint2 firstbitlow(int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint3 firstbitlow(int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint4 firstbitlow(int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint firstbitlow(uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint2 firstbitlow(uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint3 firstbitlow(uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_firstbitlow)
uint4 firstbitlow(uint64_t4);

/// \fn T floor(T Val)
/// \brief Returns the largest integer that is less than or equal to the input
/// value, \a Val.
/// \param Val The input value.
// floor overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_floor)
half floor(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_floor)
half2 floor(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_floor)
half3 floor(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_floor)
half4 floor(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_floor)
float floor(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_floor)
float2 floor(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_floor)
float3 floor(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_floor)
float4 floor(float4);

/// \fn double fma(double a, double b, double c)
/// \brief Returns the double-precision fused multiply-addition of a * b + c.
/// \param a The first value in the fused multiply-addition.
/// \param b The second value in the fused multiply-addition.
/// \param c The third value in the fused multiply-addition.
// fma overloads
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double fma(double, double, double);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double2 fma(double2, double2, double2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double3 fma(double3, double3, double3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double4 fma(double4, double4, double4);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double1x2 fma(double1x2, double1x2, double1x2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double1x3 fma(double1x3, double1x3, double1x3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double1x4 fma(double1x4, double1x4, double1x4);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double2x1 fma(double2x1, double2x1, double2x1);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double2x2 fma(double2x2, double2x2, double2x2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double2x3 fma(double2x3, double2x3, double2x3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double2x4 fma(double2x4, double2x4, double2x4);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double3x1 fma(double3x1, double3x1, double3x1);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double3x2 fma(double3x2, double3x2, double3x2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double3x3 fma(double3x3, double3x3, double3x3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double3x4 fma(double3x4, double3x4, double3x4);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double4x1 fma(double4x1, double4x1, double4x1);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double4x2 fma(double4x2, double4x2, double4x2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double4x3 fma(double4x3, double4x3, double4x3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_fma)
double4x4 fma(double4x4, double4x4, double4x4);

/// \fn T frac(T x)
/// \brief Returns the fractional (or decimal) part of x. \a x parameter.
/// \param x The specified input value.
///
/// If \a the return value is greater than or equal to 0 and less than 1.
// frac overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_frac)
half frac(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_frac)
half2 frac(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_frac)
half3 frac(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_frac)
half4 frac(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_frac)
float frac(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_frac)
float2 frac(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_frac)
float3 frac(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_frac)
float4 frac(float4);

/// \fn void GroupMemoryBarrier(void)
/// \brief Blocks execution of all threads in a group until all group shared
/// accesses have been completed.
// GroupMemoryBarrier overloads
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_group_memory_barrier)
__attribute__((convergent)) void GroupMemoryBarrier();

/// \fn void GroupMemoryBarrierWithGroupSync(void)
/// \brief Blocks execution of all threads in a group until all group shared
/// accesses have been completed and all threads in the group have reached this
/// call.
// GroupMemoryBarrierWithGroupSync overloads
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_group_memory_barrier_with_group_sync)
__attribute__((convergent)) void GroupMemoryBarrierWithGroupSync();

/// \fn T isinf(T x)
/// \brief Determines if the specified value \a x  is infinite.
/// \param x The specified input value.
///
/// Returns a value of the same size as the input, with a value set
/// to True if the x parameter is +INF or -INF. Otherwise, False.
// isinf overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isinf)
bool isinf(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isinf)
bool2 isinf(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isinf)
bool3 isinf(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isinf)
bool4 isinf(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isinf)
bool isinf(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isinf)
bool2 isinf(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isinf)
bool3 isinf(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isinf)
bool4 isinf(float4);

/// \fn T isnan(T x)
/// \brief Determines if the specified value \a x  is Not a Number.
/// \param x The specified input value.
///
/// Returns a value of the same size as the input, with a value set
/// to True if the x parameter is NaN or QNaN. Otherwise, False.
// isnan overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isnan)
bool isnan(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isnan)
bool2 isnan(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isnan)
bool3 isnan(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isnan)
bool4 isnan(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isnan)
bool isnan(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isnan)
bool2 isnan(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isnan)
bool3 isnan(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_isnan)
bool4 isnan(float4);

/// \fn T lerp(T x, T y, T s)
/// \brief Returns the linear interpolation of x to y by s.
/// \param x [in] The first-floating point value.
/// \param y [in] The second-floating point value.
/// \param s [in] A value that linearly interpolates between the x parameter and
/// the y parameter.
///
/// Linear interpolation is based on the following formula: x*(1-s) + y*s which
/// can equivalently be written as x + s(y-x).
// lerp overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_lerp)
half lerp(half, half, half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_lerp)
half2 lerp(half2, half2, half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_lerp)
half3 lerp(half3, half3, half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_lerp)
half4 lerp(half4, half4, half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_lerp)
float lerp(float, float, float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_lerp)
float2 lerp(float2, float2, float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_lerp)
float3 lerp(float3, float3, float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_lerp)
float4 lerp(float4, float4, float4);

/// \fn T log(T Val)
/// \brief The base-e logarithm of the input value, \a Val parameter.
/// \param Val The input value.
///
/// If \a Val is negative, this result is undefined. If \a Val is 0, this
/// function returns negative infinity.
// log overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log)
half log(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log)
half2 log(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log)
half3 log(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log)
half4 log(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log)
float log(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log)
float2 log(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log)
float3 log(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log)
float4 log(float4);

/// \fn T log2(T Val)
/// \brief The base-2 logarithm of the input value, \a Val parameter.
/// \param Val The input value.
///
/// If \a Val is negative, this result is undefined. If \a Val is 0, this
/// function returns negative infinity.
// log2 overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log2)
half log2(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log2)
half2 log2(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log2)
half3 log2(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log2)
half4 log2(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log2)
float log2(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log2)
float2 log2(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log2)
float3 log2(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log2)
float4 log2(float4);

/// \fn T log10(T Val)
/// \brief The base-10 logarithm of the input value, \a Val parameter.
/// \param Val The input value.
///
/// If \a Val is negative, this result is undefined. If \a Val is 0, this
/// function returns negative infinity.
// log10 overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log10)
half log10(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log10)
half2 log10(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log10)
half3 log10(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log10)
half4 log10(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log10)
float log10(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log10)
float2 log10(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log10)
float3 log10(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_log10)
float4 log10(float4);

/// \fn T mad(T M, T A, T B)
/// \brief The result of \a M * \a A + \a B.
/// \param M The multiplication value.
/// \param A The first addition value.
/// \param B The second addition value.
// mad overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
half mad(half, half, half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
half2 mad(half2, half2, half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
half3 mad(half3, half3, half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
half4 mad(half4, half4, half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int16_t mad(int16_t, int16_t, int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int16_t2 mad(int16_t2, int16_t2, int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int16_t3 mad(int16_t3, int16_t3, int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int16_t4 mad(int16_t4, int16_t4, int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint16_t mad(uint16_t, uint16_t, uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint16_t2 mad(uint16_t2, uint16_t2, uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint16_t3 mad(uint16_t3, uint16_t3, uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint16_t4 mad(uint16_t4, uint16_t4, uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int mad(int, int, int);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int2 mad(int2, int2, int2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int3 mad(int3, int3, int3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int4 mad(int4, int4, int4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint mad(uint, uint, uint);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint2 mad(uint2, uint2, uint2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint3 mad(uint3, uint3, uint3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint4 mad(uint4, uint4, uint4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int64_t mad(int64_t, int64_t, int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int64_t2 mad(int64_t2, int64_t2, int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int64_t3 mad(int64_t3, int64_t3, int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
int64_t4 mad(int64_t4, int64_t4, int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint64_t mad(uint64_t, uint64_t, uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint64_t2 mad(uint64_t2, uint64_t2, uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint64_t3 mad(uint64_t3, uint64_t3, uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
uint64_t4 mad(uint64_t4, uint64_t4, uint64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
float mad(float, float, float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
float2 mad(float2, float2, float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
float3 mad(float3, float3, float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
float4 mad(float4, float4, float4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
double mad(double, double, double);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
double2 mad(double2, double2, double2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
double3 mad(double3, double3, double3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_mad)
double4 mad(double4, double4, double4);

/// \fn T max(T X, T Y)
/// \brief Return the greater of \a X and \a Y.
/// \param X The X input value.
/// \param Y The Y input value.
// max overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
half max(half, half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
half2 max(half2, half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
half3 max(half3, half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
half4 max(half4, half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int16_t max(int16_t, int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int16_t2 max(int16_t2, int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int16_t3 max(int16_t3, int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int16_t4 max(int16_t4, int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint16_t max(uint16_t, uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint16_t2 max(uint16_t2, uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint16_t3 max(uint16_t3, uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint16_t4 max(uint16_t4, uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int max(int, int);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int2 max(int2, int2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int3 max(int3, int3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int4 max(int4, int4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint max(uint, uint);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint2 max(uint2, uint2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint3 max(uint3, uint3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint4 max(uint4, uint4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int64_t max(int64_t, int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int64_t2 max(int64_t2, int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int64_t3 max(int64_t3, int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
int64_t4 max(int64_t4, int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint64_t max(uint64_t, uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint64_t2 max(uint64_t2, uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint64_t3 max(uint64_t3, uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
uint64_t4 max(uint64_t4, uint64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
float max(float, float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
float2 max(float2, float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
float3 max(float3, float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
float4 max(float4, float4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
double max(double, double);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
double2 max(double2, double2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
double3 max(double3, double3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_max)
double4 max(double4, double4);

/// \fn T min(T X, T Y)
/// \brief Return the lesser of \a X and \a Y.
/// \param X The X input value.
/// \param Y The Y input value.
// min overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
half min(half, half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
half2 min(half2, half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
half3 min(half3, half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
half4 min(half4, half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int16_t min(int16_t, int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int16_t2 min(int16_t2, int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int16_t3 min(int16_t3, int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int16_t4 min(int16_t4, int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint16_t min(uint16_t, uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint16_t2 min(uint16_t2, uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint16_t3 min(uint16_t3, uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint16_t4 min(uint16_t4, uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int min(int, int);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int2 min(int2, int2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int3 min(int3, int3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int4 min(int4, int4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint min(uint, uint);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint2 min(uint2, uint2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint3 min(uint3, uint3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint4 min(uint4, uint4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int64_t min(int64_t, int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int64_t2 min(int64_t2, int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int64_t3 min(int64_t3, int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
int64_t4 min(int64_t4, int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint64_t min(uint64_t, uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint64_t2 min(uint64_t2, uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint64_t3 min(uint64_t3, uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
uint64_t4 min(uint64_t4, uint64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
float min(float, float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
float2 min(float2, float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
float3 min(float3, float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
float4 min(float4, float4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
double min(double, double);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
double2 min(double2, double2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
double3 min(double3, double3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_min)
double4 min(double4, double4);

/// \fn uint NonUniformResourceIndex(uint I)
/// \brief A compiler hint to indicate that a resource index varies across
/// threads within a wave (i.e., it is non-uniform).
/// \param I [in] Resource array index
///
/// The return value is the \a I parameter.
// NonUniformResourceIndex overloads
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_resource_nonuniformindex)
uint NonUniformResourceIndex(uint);

/// \fn T normalize(T x)
/// \brief Returns the normalized unit vector of the specified floating-point
/// vector.
/// \param x [in] The vector of floats.
///
/// Normalize is based on the following formula: x / length(x).
// normalize overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_normalize)
half normalize(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_normalize)
half2 normalize(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_normalize)
half3 normalize(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_normalize)
half4 normalize(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_normalize)
float normalize(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_normalize)
float2 normalize(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_normalize)
float3 normalize(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_normalize)
float4 normalize(float4);

/// \fn bool or(bool x, bool y)
/// \brief Logically ors two boolean vectors or matrices elementwise and
///  produces a bool vector or matrix output.
// or overloads
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool or(bool, bool);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool2 or(bool2, bool2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool3 or(bool3, bool3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool4 or(bool4, bool4);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool1x2 or(bool1x2, bool1x2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool1x3 or(bool1x3, bool1x3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool1x4 or(bool1x4, bool1x4);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool2x1 or(bool2x1, bool2x1);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool2x2 or(bool2x2, bool2x2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool2x3 or(bool2x3, bool2x3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool2x4 or(bool2x4, bool2x4);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool3x1 or(bool3x1, bool3x1);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool3x2 or(bool3x2, bool3x2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool3x3 or(bool3x3, bool3x3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool3x4 or(bool3x4, bool3x4);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool4x1 or(bool4x1, bool4x1);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool4x2 or(bool4x2, bool4x2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool4x3 or(bool4x3, bool4x3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_or)
bool4x4 or(bool4x4, bool4x4);

/// \fn T pow(T Val, T Pow)
/// \brief Return the value \a Val, raised to the power \a Pow.
/// \param Val The input value.
/// \param Pow The specified power.
// pow overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
half pow(half, half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
half2 pow(half2, half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
half3 pow(half3, half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
half4 pow(half4, half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
float pow(float, float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
float2 pow(float2, float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
float3 pow(float3, float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_pow)
float4 pow(float4, float4);

/// \brief Reads the value from the lane across the X axis of the quad.
/// \param Val The input value.
// QuadReadAcrossX overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) half QuadReadAcrossX(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) half2 QuadReadAcrossX(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) half3 QuadReadAcrossX(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) half4 QuadReadAcrossX(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int16_t QuadReadAcrossX(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int16_t2 QuadReadAcrossX(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int16_t3 QuadReadAcrossX(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int16_t4 QuadReadAcrossX(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint16_t QuadReadAcrossX(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint16_t2 QuadReadAcrossX(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint16_t3 QuadReadAcrossX(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint16_t4 QuadReadAcrossX(uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int QuadReadAcrossX(int);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int2 QuadReadAcrossX(int2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int3 QuadReadAcrossX(int3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int4 QuadReadAcrossX(int4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint QuadReadAcrossX(uint);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint2 QuadReadAcrossX(uint2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint3 QuadReadAcrossX(uint3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint4 QuadReadAcrossX(uint4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int64_t QuadReadAcrossX(int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int64_t2 QuadReadAcrossX(int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int64_t3 QuadReadAcrossX(int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) int64_t4 QuadReadAcrossX(int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint64_t QuadReadAcrossX(uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint64_t2 QuadReadAcrossX(uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint64_t3 QuadReadAcrossX(uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) uint64_t4 QuadReadAcrossX(uint64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) float QuadReadAcrossX(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) float2 QuadReadAcrossX(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) float3 QuadReadAcrossX(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) float4 QuadReadAcrossX(float4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) double QuadReadAcrossX(double);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) double2 QuadReadAcrossX(double2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) double3 QuadReadAcrossX(double3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_x)
__attribute__((convergent)) double4 QuadReadAcrossX(double4);

/// \brief Reads the value from the lane across the Y axis of the quad.
/// \param Val The input value.
// QuadReadAcrossY overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) half QuadReadAcrossY(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) half2 QuadReadAcrossY(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) half3 QuadReadAcrossY(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) half4 QuadReadAcrossY(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int16_t QuadReadAcrossY(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int16_t2 QuadReadAcrossY(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int16_t3 QuadReadAcrossY(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int16_t4 QuadReadAcrossY(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint16_t QuadReadAcrossY(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint16_t2 QuadReadAcrossY(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint16_t3 QuadReadAcrossY(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint16_t4 QuadReadAcrossY(uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int QuadReadAcrossY(int);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int2 QuadReadAcrossY(int2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int3 QuadReadAcrossY(int3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int4 QuadReadAcrossY(int4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint QuadReadAcrossY(uint);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint2 QuadReadAcrossY(uint2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint3 QuadReadAcrossY(uint3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint4 QuadReadAcrossY(uint4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int64_t QuadReadAcrossY(int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int64_t2 QuadReadAcrossY(int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int64_t3 QuadReadAcrossY(int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) int64_t4 QuadReadAcrossY(int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint64_t QuadReadAcrossY(uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint64_t2 QuadReadAcrossY(uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint64_t3 QuadReadAcrossY(uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) uint64_t4 QuadReadAcrossY(uint64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) float QuadReadAcrossY(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) float2 QuadReadAcrossY(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) float3 QuadReadAcrossY(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) float4 QuadReadAcrossY(float4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) double QuadReadAcrossY(double);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) double2 QuadReadAcrossY(double2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) double3 QuadReadAcrossY(double3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_quad_read_across_y)
__attribute__((convergent)) double4 QuadReadAcrossY(double4);

/// \fn T radians(T Val)
/// \brief Converts the specified value from degrees to radians.
// radians overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_radians)
half radians(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_radians)
half2 radians(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_radians)
half3 radians(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_radians)
half4 radians(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_radians)
float radians(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_radians)
float2 radians(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_radians)
float3 radians(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_radians)
float4 radians(float4);

/// \fn T rcp(T x)
/// \brief Calculates a fast, approximate, per-component reciprocal ie 1 / \a x.
/// \param x The specified input value.
///
/// The return value is the reciprocal of the \a x parameter.
// rcp overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
half rcp(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
half2 rcp(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
half3 rcp(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
half4 rcp(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
float rcp(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
float2 rcp(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
float3 rcp(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
float4 rcp(float4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
double rcp(double);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
double2 rcp(double2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
double3 rcp(double3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rcp)
double4 rcp(double4);

/// \fn T reversebits(T Val)
/// \brief Return the value \a Val with the bit order reversed.
/// \param Val The input value.
// reversebits overloads
#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int16_t reversebits(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int16_t2 reversebits(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int16_t3 reversebits(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int16_t4 reversebits(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint16_t reversebits(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint16_t2 reversebits(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint16_t3 reversebits(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint16_t4 reversebits(uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int reversebits(int);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int2 reversebits(int2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int3 reversebits(int3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int4 reversebits(int4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint reversebits(uint);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint2 reversebits(uint2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint3 reversebits(uint3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint4 reversebits(uint4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int64_t reversebits(int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int64_t2 reversebits(int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int64_t3 reversebits(int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
int64_t4 reversebits(int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint64_t reversebits(uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint64_t2 reversebits(uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint64_t3 reversebits(uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse)
uint64_t4 reversebits(uint64_t4);

/// \fn T round(T x)
/// \brief Rounds the specified value \a x to the nearest integer.
/// \param x The specified input value.
///
/// The return value is the \a x parameter, rounded to the nearest integer
/// within a floating-point type. Halfway cases are
/// rounded to the nearest even value.
// round overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_roundeven)
half round(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_roundeven)
half2 round(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_roundeven)
half3 round(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_roundeven)
half4 round(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_roundeven)
float round(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_roundeven)
float2 round(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_roundeven)
float3 round(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_roundeven)
float4 round(float4);

/// \fn T rsqrt(T x)
/// \brief Returns the reciprocal of the square root of the specified value.
/// ie 1 / sqrt( \a x).
/// \param x The specified input value.
///
/// This function uses the following formula: 1 / sqrt(x).
// rsqrt overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rsqrt)
half rsqrt(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rsqrt)
half2 rsqrt(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rsqrt)
half3 rsqrt(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rsqrt)
half4 rsqrt(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rsqrt)
float rsqrt(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rsqrt)
float2 rsqrt(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rsqrt)
float3 rsqrt(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_rsqrt)
float4 rsqrt(float4);

/// \fn T saturate(T Val)
/// \brief Returns input value, \a Val, clamped within the range of 0.0f
/// to 1.0f.
/// \param Val The input value.
// saturate overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
half saturate(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
half2 saturate(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
half3 saturate(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
half4 saturate(half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
float saturate(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
float2 saturate(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
float3 saturate(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
float4 saturate(float4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
double saturate(double);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
double2 saturate(double2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
double3 saturate(double3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
double4 saturate(double4);

/// \fn T sign(T Val)
/// \brief Returns -1 if \a Val is less than zero; 0 if \a Val equals zero; and
/// 1 if \a Val is greater than zero.
/// \param Val The input value.
// sign overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int sign(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int2 sign(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int3 sign(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int4 sign(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int sign(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int2 sign(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int3 sign(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int4 sign(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int sign(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int2 sign(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int3 sign(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int4 sign(uint16_t4);
#endif

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int sign(int);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int2 sign(int2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int3 sign(int3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int4 sign(int4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int sign(uint);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int2 sign(uint2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int3 sign(uint3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int4 sign(uint4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int sign(int64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int2 sign(int64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int3 sign(int64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int4 sign(int64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int sign(uint64_t);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int2 sign(uint64_t2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int3 sign(uint64_t3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int4 sign(uint64_t4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int sign(float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int2 sign(float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int3 sign(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int4 sign(float4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int sign(double);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int2 sign(double2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int3 sign(double3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_sign)
int4 sign(double4);

/// \fn T sin(T Val)
/// \brief Returns the sine of the input value, \a Val.
/// \param Val The input value.
// sin overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sin)
half sin(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sin)
half2 sin(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sin)
half3 sin(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sin)
half4 sin(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sin)
float sin(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sin)
float2 sin(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sin)
float3 sin(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sin)
float4 sin(float4);

/// \fn T sinh(T Val)
/// \brief Returns the hyperbolic sine of the input value, \a Val.
/// \param Val The input value.
// sinh overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sinh)
half sinh(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sinh)
half2 sinh(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sinh)
half3 sinh(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sinh)
half4 sinh(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sinh)
float sinh(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sinh)
float2 sinh(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sinh)
float3 sinh(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sinh)
float4 sinh(float4);

/// \fn T sqrt(T Val)
/// \brief Returns the square root of the input value, \a Val.
/// \param Val The input value.
// sqrt overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sqrt)
half sqrt(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sqrt)
half2 sqrt(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sqrt)
half3 sqrt(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sqrt)
half4 sqrt(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sqrt)
float sqrt(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sqrt)
float2 sqrt(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sqrt)
float3 sqrt(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_sqrt)
float4 sqrt(float4);

/// \fn T step(T y, T x)
/// \brief Returns 1 if the x parameter is greater than or equal to the y
/// parameter; otherwise, 0.
/// \param y [in] The first floating-point value to compare.
/// \param x [in] The second floating-point value to compare.
///
/// Step is based on the following formula: (x >= y) ? 1 : 0
// step overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_step)
half step(half, half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_step)
half2 step(half2, half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_step)
half3 step(half3, half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_step)
half4 step(half4, half4);

_HLSL_BUILTIN_ALIAS(__builtin_hlsl_step)
float step(float, float);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_step)
float2 step(float2, float2);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_step)
float3 step(float3, float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_step)
float4 step(float4, float4);

/// \fn T tan(T Val)
/// \brief Returns the tangent of the input value, \a Val.
/// \param Val The input value.
// tan overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tan)
half tan(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tan)
half2 tan(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tan)
half3 tan(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tan)
half4 tan(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tan)
float tan(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tan)
float2 tan(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tan)
float3 tan(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tan)
float4 tan(float4);

/// \fn T tanh(T Val)
/// \brief Returns the hyperbolic tangent of the input value, \a Val.
/// \param Val The input value.
// tanh overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tanh)
half tanh(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tanh)
half2 tanh(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tanh)
half3 tanh(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tanh)
half4 tanh(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tanh)
float tanh(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tanh)
float2 tanh(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tanh)
float3 tanh(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_tanh)
float4 tanh(float4);

/// \fn T trunc(T Val)
/// \brief Returns the truncated integer value of the input value, \a Val.
/// \param Val The input value.
// trunc overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_trunc)
half trunc(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_trunc)
half2 trunc(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_trunc)
half3 trunc(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_trunc)
half4 trunc(half4);

_HLSL_BUILTIN_ALIAS(__builtin_elementwise_trunc)
float trunc(float);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_trunc)
float2 trunc(float2);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_trunc)
float3 trunc(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_trunc)
float4 trunc(float4);

/// \brief Evaluates a value for all active invocations in the group. The
/// result is true if Value is equal for all active invocations in the
/// group. Otherwise, the result is false.
/// \param Value The value to compare with
/// \return True if all values across all lanes are equal, false otherwise
// WaveActiveAllEqual overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool WaveActiveAllEqual(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool2 WaveActiveAllEqual(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool3 WaveActiveAllEqual(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool4 WaveActiveAllEqual(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool WaveActiveAllEqual(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool2 WaveActiveAllEqual(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool3 WaveActiveAllEqual(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool4 WaveActiveAllEqual(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool WaveActiveAllEqual(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool2 WaveActiveAllEqual(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool3 WaveActiveAllEqual(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool4 WaveActiveAllEqual(uint16_t4);
#endif

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool WaveActiveAllEqual(int);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool2 WaveActiveAllEqual(int2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool3 WaveActiveAllEqual(int3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool4 WaveActiveAllEqual(int4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool WaveActiveAllEqual(uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool2 WaveActiveAllEqual(uint2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool3 WaveActiveAllEqual(uint3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool4 WaveActiveAllEqual(uint4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool WaveActiveAllEqual(int64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool2 WaveActiveAllEqual(int64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool3 WaveActiveAllEqual(int64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool4 WaveActiveAllEqual(int64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool WaveActiveAllEqual(uint64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool2 WaveActiveAllEqual(uint64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool3 WaveActiveAllEqual(uint64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool4 WaveActiveAllEqual(uint64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool WaveActiveAllEqual(float);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool2 WaveActiveAllEqual(float2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool3 WaveActiveAllEqual(float3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool4 WaveActiveAllEqual(float4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool WaveActiveAllEqual(double);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool2 WaveActiveAllEqual(double2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool3 WaveActiveAllEqual(double3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_equal)
__attribute__((convergent)) bool4 WaveActiveAllEqual(double4);

/// \brief Returns true if the expression is true in all active lanes in the
/// current wave.
/// \param Val The boolean expression to evaluate.
/// \return True if the expression is true in all lanes.
// WaveActiveAllTrue overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_all_true)
__attribute__((convergent)) bool WaveActiveAllTrue(bool);

/// \brief Returns true if the expression is true in any active lane in the
/// current wave.
/// \param Val The boolean expression to evaluate.
/// \return True if the expression is true in any lane.
// WaveActiveAnyTrue overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_any_true)
__attribute__((convergent)) bool WaveActiveAnyTrue(bool);

/// \brief Returns a uint4 containing a bitmask of the evaluation of the
/// boolean expression for all active lanes in the current wave.
/// The least-significant bit corresponds to the lane with index zero.
/// The bits corresponding to inactive lanes will be zero. The bits that
/// are greater than or equal to WaveGetLaneCount will be zero.
/// \param Val The boolean expression to evaluate.
/// \return uint4 bitmask
// WaveActiveBallot overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_ballot)
__attribute__((convergent)) uint4 WaveActiveBallot(bool);

// WaveActiveBitAnd overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_and)
__attribute__((convergent)) uint WaveActiveBitAnd(uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_and)
__attribute__((convergent)) uint2 WaveActiveBitAnd(uint2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_and)
__attribute__((convergent)) uint3 WaveActiveBitAnd(uint3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_and)
__attribute__((convergent)) uint4 WaveActiveBitAnd(uint4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_and)
__attribute__((convergent)) uint64_t WaveActiveBitAnd(uint64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_and)
__attribute__((convergent)) uint64_t2 WaveActiveBitAnd(uint64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_and)
__attribute__((convergent)) uint64_t3 WaveActiveBitAnd(uint64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_and)
__attribute__((convergent)) uint64_t4 WaveActiveBitAnd(uint64_t4);

/// \brief Returns the bitwise OR of all the values of <expr> across all active
/// non-helper lanes in the current wave, and replicates it back to
/// all active non-helper lanes.
// WaveActiveBitOr overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_or)
__attribute__((convergent)) uint WaveActiveBitOr(uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_or)
__attribute__((convergent)) uint2 WaveActiveBitOr(uint2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_or)
__attribute__((convergent)) uint3 WaveActiveBitOr(uint3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_or)
__attribute__((convergent)) uint4 WaveActiveBitOr(uint4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_or)
__attribute__((convergent)) uint64_t WaveActiveBitOr(uint64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_or)
__attribute__((convergent)) uint64_t2 WaveActiveBitOr(uint64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_or)
__attribute__((convergent)) uint64_t3 WaveActiveBitOr(uint64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_or)
__attribute__((convergent)) uint64_t4 WaveActiveBitOr(uint64_t4);

// WaveActiveBitXor overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_xor)
__attribute__((convergent)) uint WaveActiveBitXor(uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_xor)
__attribute__((convergent)) uint2 WaveActiveBitXor(uint2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_xor)
__attribute__((convergent)) uint3 WaveActiveBitXor(uint3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_xor)
__attribute__((convergent)) uint4 WaveActiveBitXor(uint4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_xor)
__attribute__((convergent)) uint64_t WaveActiveBitXor(uint64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_xor)
__attribute__((convergent)) uint64_t2 WaveActiveBitXor(uint64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_xor)
__attribute__((convergent)) uint64_t3 WaveActiveBitXor(uint64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_bit_xor)
__attribute__((convergent)) uint64_t4 WaveActiveBitXor(uint64_t4);

/// \brief Counts the number of boolean variables which evaluate to true across
/// all active lanes in the current wave.
/// \param Val The input boolean value.
/// \return The number of lanes for which the boolean variable evaluates to
/// true, across all active lanes in the current wave.
// WaveActiveCountBits overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_count_bits)
__attribute__((convergent)) uint WaveActiveCountBits(bool);

/// \brief Returns the maximum value across all active lanes in the wave.
/// \param Val The input value.
// WaveActiveMax overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) half WaveActiveMax(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) half2 WaveActiveMax(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) half3 WaveActiveMax(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) half4 WaveActiveMax(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int16_t WaveActiveMax(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int16_t2 WaveActiveMax(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int16_t3 WaveActiveMax(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int16_t4 WaveActiveMax(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint16_t WaveActiveMax(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint16_t2 WaveActiveMax(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint16_t3 WaveActiveMax(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint16_t4 WaveActiveMax(uint16_t4);
#endif

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int WaveActiveMax(int);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int2 WaveActiveMax(int2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int3 WaveActiveMax(int3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int4 WaveActiveMax(int4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint WaveActiveMax(uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint2 WaveActiveMax(uint2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint3 WaveActiveMax(uint3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint4 WaveActiveMax(uint4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int64_t WaveActiveMax(int64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int64_t2 WaveActiveMax(int64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int64_t3 WaveActiveMax(int64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) int64_t4 WaveActiveMax(int64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint64_t WaveActiveMax(uint64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint64_t2 WaveActiveMax(uint64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint64_t3 WaveActiveMax(uint64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) uint64_t4 WaveActiveMax(uint64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) float WaveActiveMax(float);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) float2 WaveActiveMax(float2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) float3 WaveActiveMax(float3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) float4 WaveActiveMax(float4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) double WaveActiveMax(double);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) double2 WaveActiveMax(double2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) double3 WaveActiveMax(double3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_max)
__attribute__((convergent)) double4 WaveActiveMax(double4);

/// \brief Returns the minimum value across all active lanes in the wave.
/// \param Val The input value.
// WaveActiveMin overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) half WaveActiveMin(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) half2 WaveActiveMin(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) half3 WaveActiveMin(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) half4 WaveActiveMin(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int16_t WaveActiveMin(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int16_t2 WaveActiveMin(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int16_t3 WaveActiveMin(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int16_t4 WaveActiveMin(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint16_t WaveActiveMin(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint16_t2 WaveActiveMin(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint16_t3 WaveActiveMin(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint16_t4 WaveActiveMin(uint16_t4);
#endif

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int WaveActiveMin(int);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int2 WaveActiveMin(int2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int3 WaveActiveMin(int3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int4 WaveActiveMin(int4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint WaveActiveMin(uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint2 WaveActiveMin(uint2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint3 WaveActiveMin(uint3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint4 WaveActiveMin(uint4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int64_t WaveActiveMin(int64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int64_t2 WaveActiveMin(int64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int64_t3 WaveActiveMin(int64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) int64_t4 WaveActiveMin(int64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint64_t WaveActiveMin(uint64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint64_t2 WaveActiveMin(uint64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint64_t3 WaveActiveMin(uint64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) uint64_t4 WaveActiveMin(uint64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) float WaveActiveMin(float);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) float2 WaveActiveMin(float2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) float3 WaveActiveMin(float3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) float4 WaveActiveMin(float4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) double WaveActiveMin(double);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) double2 WaveActiveMin(double2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) double3 WaveActiveMin(double3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_min)
__attribute__((convergent)) double4 WaveActiveMin(double4);

/// \brief Returns the product of values across all active lanes in the wave.
/// \param Val The input value.
// WaveActiveProduct overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) half WaveActiveProduct(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) half2 WaveActiveProduct(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) half3 WaveActiveProduct(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) half4 WaveActiveProduct(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int16_t WaveActiveProduct(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int16_t2 WaveActiveProduct(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int16_t3 WaveActiveProduct(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int16_t4 WaveActiveProduct(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint16_t WaveActiveProduct(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint16_t2 WaveActiveProduct(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint16_t3 WaveActiveProduct(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint16_t4 WaveActiveProduct(uint16_t4);
#endif

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int WaveActiveProduct(int);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int2 WaveActiveProduct(int2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int3 WaveActiveProduct(int3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int4 WaveActiveProduct(int4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint WaveActiveProduct(uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint2 WaveActiveProduct(uint2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint3 WaveActiveProduct(uint3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint4 WaveActiveProduct(uint4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int64_t WaveActiveProduct(int64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int64_t2 WaveActiveProduct(int64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int64_t3 WaveActiveProduct(int64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) int64_t4 WaveActiveProduct(int64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint64_t WaveActiveProduct(uint64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint64_t2 WaveActiveProduct(uint64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint64_t3 WaveActiveProduct(uint64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) uint64_t4 WaveActiveProduct(uint64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) float WaveActiveProduct(float);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) float2 WaveActiveProduct(float2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) float3 WaveActiveProduct(float3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) float4 WaveActiveProduct(float4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) double WaveActiveProduct(double);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) double2 WaveActiveProduct(double2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) double3 WaveActiveProduct(double3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_product)
__attribute__((convergent)) double4 WaveActiveProduct(double4);

/// \brief Returns the sum of values across all active lanes in the wave.
/// \param Val The input value.
// WaveActiveSum overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) half WaveActiveSum(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) half2 WaveActiveSum(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) half3 WaveActiveSum(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) half4 WaveActiveSum(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int16_t WaveActiveSum(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int16_t2 WaveActiveSum(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int16_t3 WaveActiveSum(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int16_t4 WaveActiveSum(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint16_t WaveActiveSum(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint16_t2 WaveActiveSum(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint16_t3 WaveActiveSum(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint16_t4 WaveActiveSum(uint16_t4);
#endif

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int WaveActiveSum(int);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int2 WaveActiveSum(int2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int3 WaveActiveSum(int3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int4 WaveActiveSum(int4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint WaveActiveSum(uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint2 WaveActiveSum(uint2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint3 WaveActiveSum(uint3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint4 WaveActiveSum(uint4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int64_t WaveActiveSum(int64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int64_t2 WaveActiveSum(int64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int64_t3 WaveActiveSum(int64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) int64_t4 WaveActiveSum(int64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint64_t WaveActiveSum(uint64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint64_t2 WaveActiveSum(uint64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint64_t3 WaveActiveSum(uint64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) uint64_t4 WaveActiveSum(uint64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) float WaveActiveSum(float);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) float2 WaveActiveSum(float2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) float3 WaveActiveSum(float3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) float4 WaveActiveSum(float4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) double WaveActiveSum(double);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) double2 WaveActiveSum(double2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) double3 WaveActiveSum(double3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_sum)
__attribute__((convergent)) double4 WaveActiveSum(double4);

/// \brief Returns the number of lanes in the current wave.
// WaveGetLaneCount overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_get_lane_count)
__attribute__((convergent)) uint WaveGetLaneCount();

/// \brief Returns the index of the current lane within the current wave.
// WaveGetLaneIndex overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_get_lane_index)
__attribute__((convergent)) uint WaveGetLaneIndex();

/// \brief Returns true if the current lane is the first active lane in the wave.
// WaveIsFirstLane overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_is_first_lane)
__attribute__((convergent)) bool WaveIsFirstLane();

/// \brief Returns the count of bits of Expr set to 1 on prior lanes.
/// \param Expr The boolean expression to evaluate.
/// \return the count of bits set to 1 on prior lanes.
// WavePrefixCountBits overloads
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_count_bits)
__attribute__((convergent)) uint WavePrefixCountBits(bool);

/// \brief Returns the product of values across lanes with smaller indices in the wave.
/// \param Val The input value.
// WavePrefixProduct overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) half WavePrefixProduct(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) half2 WavePrefixProduct(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) half3 WavePrefixProduct(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) half4 WavePrefixProduct(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int16_t WavePrefixProduct(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int16_t2 WavePrefixProduct(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int16_t3 WavePrefixProduct(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int16_t4 WavePrefixProduct(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint16_t WavePrefixProduct(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint16_t2 WavePrefixProduct(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint16_t3 WavePrefixProduct(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint16_t4 WavePrefixProduct(uint16_t4);
#endif

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int WavePrefixProduct(int);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int2 WavePrefixProduct(int2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int3 WavePrefixProduct(int3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int4 WavePrefixProduct(int4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint WavePrefixProduct(uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint2 WavePrefixProduct(uint2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint3 WavePrefixProduct(uint3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint4 WavePrefixProduct(uint4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int64_t WavePrefixProduct(int64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int64_t2 WavePrefixProduct(int64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int64_t3 WavePrefixProduct(int64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) int64_t4 WavePrefixProduct(int64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint64_t WavePrefixProduct(uint64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint64_t2 WavePrefixProduct(uint64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint64_t3 WavePrefixProduct(uint64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) uint64_t4 WavePrefixProduct(uint64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) float WavePrefixProduct(float);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) float2 WavePrefixProduct(float2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) float3 WavePrefixProduct(float3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) float4 WavePrefixProduct(float4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) double WavePrefixProduct(double);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) double2 WavePrefixProduct(double2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) double3 WavePrefixProduct(double3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_product)
__attribute__((convergent)) double4 WavePrefixProduct(double4);

/// \brief Returns the sum of values across lanes with smaller indices in the wave.
/// \param Val The input value.
// WavePrefixSum overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) half WavePrefixSum(half);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) half2 WavePrefixSum(half2);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) half3 WavePrefixSum(half3);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) half4 WavePrefixSum(half4);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int16_t WavePrefixSum(int16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int16_t2 WavePrefixSum(int16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int16_t3 WavePrefixSum(int16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int16_t4 WavePrefixSum(int16_t4);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint16_t WavePrefixSum(uint16_t);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint16_t2 WavePrefixSum(uint16_t2);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint16_t3 WavePrefixSum(uint16_t3);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint16_t4 WavePrefixSum(uint16_t4);
#endif

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int WavePrefixSum(int);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int2 WavePrefixSum(int2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int3 WavePrefixSum(int3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int4 WavePrefixSum(int4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint WavePrefixSum(uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint2 WavePrefixSum(uint2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint3 WavePrefixSum(uint3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint4 WavePrefixSum(uint4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int64_t WavePrefixSum(int64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int64_t2 WavePrefixSum(int64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int64_t3 WavePrefixSum(int64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) int64_t4 WavePrefixSum(int64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint64_t WavePrefixSum(uint64_t);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint64_t2 WavePrefixSum(uint64_t2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint64_t3 WavePrefixSum(uint64_t3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) uint64_t4 WavePrefixSum(uint64_t4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) float WavePrefixSum(float);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) float2 WavePrefixSum(float2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) float3 WavePrefixSum(float3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) float4 WavePrefixSum(float4);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) double WavePrefixSum(double);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) double2 WavePrefixSum(double2);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) double3 WavePrefixSum(double3);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_prefix_sum)
__attribute__((convergent)) double4 WavePrefixSum(double4);

/// \brief Returns the value of the expression for the given lane index within
/// the specified wave.
/// \param Val The value to read.
/// \param Index The lane index.
// WaveReadLaneAt overloads
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) half WaveReadLaneAt(half, uint);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) half2 WaveReadLaneAt(half2, uint);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) half3 WaveReadLaneAt(half3, uint);
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) half4 WaveReadLaneAt(half4, uint);

#ifdef __HLSL_ENABLE_16_BIT
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int16_t WaveReadLaneAt(int16_t, uint);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int16_t2 WaveReadLaneAt(int16_t2, uint);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int16_t3 WaveReadLaneAt(int16_t3, uint);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int16_t4 WaveReadLaneAt(int16_t4, uint);

_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint16_t WaveReadLaneAt(uint16_t, uint);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint16_t2 WaveReadLaneAt(uint16_t2, uint);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint16_t3 WaveReadLaneAt(uint16_t3, uint);
_HLSL_AVAILABILITY(shadermodel, 6.2)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint16_t4 WaveReadLaneAt(uint16_t4, uint);
#endif

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) bool WaveReadLaneAt(bool, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) bool2 WaveReadLaneAt(bool2, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) bool3 WaveReadLaneAt(bool3, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) bool4 WaveReadLaneAt(bool4, uint);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int WaveReadLaneAt(int, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int2 WaveReadLaneAt(int2, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int3 WaveReadLaneAt(int3, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int4 WaveReadLaneAt(int4, uint);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint WaveReadLaneAt(uint, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint2 WaveReadLaneAt(uint2, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint3 WaveReadLaneAt(uint3, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint4 WaveReadLaneAt(uint4, uint);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int64_t WaveReadLaneAt(int64_t, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int64_t2 WaveReadLaneAt(int64_t2, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int64_t3 WaveReadLaneAt(int64_t3, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) int64_t4 WaveReadLaneAt(int64_t4, uint);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint64_t WaveReadLaneAt(uint64_t, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint64_t2 WaveReadLaneAt(uint64_t2, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint64_t3 WaveReadLaneAt(uint64_t3, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) uint64_t4 WaveReadLaneAt(uint64_t4, uint);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) float WaveReadLaneAt(float, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) float2 WaveReadLaneAt(float2, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) float3 WaveReadLaneAt(float3, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) float4 WaveReadLaneAt(float4, uint);

_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) double WaveReadLaneAt(double, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) double2 WaveReadLaneAt(double2, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) double3 WaveReadLaneAt(double3, uint);
_HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_read_lane_at)
__attribute__((convergent)) double4 WaveReadLaneAt(double4, uint);

