clang 22.0.0git
hlsl::__detail Namespace Reference

Classes

struct  enable_if
struct  enable_if< true, T >
struct  is_arithmetic
struct  is_same
struct  is_same< T, T >

Typedefs

template<bool B, class T = void>
using enable_if_t = typename enable_if<B, T>::Type
template<typename T, int N>
using HLSL_FIXED_VECTOR

Functions

template<typename U, typename T, int N>
constexpr enable_if_t< sizeof(U)==sizeof(T), vector< U, N > > bit_cast (vector< T, N > V)
template<typename U, typename T>
constexpr enable_if_t< sizeof(U)==sizeof(T), Ubit_cast (T F)
constexpr int4 d3d_color_to_ubyte4_impl (float4 V)
template<typename T>
constexpr T length_impl (T X)
template<typename T, int N>
constexpr enable_if_t< is_same< float, T >::value||is_same< half, T >::value, T > length_vec_impl (vector< T, N > X)
template<typename T>
constexpr vector< T, 4 > dst_impl (vector< T, 4 > Src0, vector< T, 4 > Src1)
template<typename T>
constexpr T distance_impl (T X, T Y)
template<typename T, int N>
constexpr enable_if_t< is_same< float, T >::value||is_same< half, T >::value, T > distance_vec_impl (vector< T, N > X, vector< T, N > Y)
constexpr float dot2add_impl (half2 a, half2 b, float c)
template<typename T>
constexpr T reflect_impl (T I, T N)
template<typename T, int L>
constexpr vector< T, L > reflect_vec_impl (vector< T, L > I, vector< T, L > N)
template<typename T, typename U>
constexpr T refract_impl (T I, T N, U Eta)
template<typename T>
constexpr T fmod_impl (T X, T Y)
template<typename T, int N>
constexpr vector< T, N > fmod_vec_impl (vector< T, N > X, vector< T, N > Y)
template<typename T>
constexpr T smoothstep_impl (T Min, T Max, T X)
template<typename T, int N>
constexpr vector< T, N > smoothstep_vec_impl (vector< T, N > Min, vector< T, N > Max, vector< T, N > X)
template<typename T>
constexpr vector< T, 4 > lit_impl (T NDotL, T NDotH, T M)
template<typename T>
constexpr T faceforward_impl (T N, T I, T Ng)
template<typename T>
constexpr T ldexp_impl (T X, T Exp)

Typedef Documentation

◆ enable_if_t

template<bool B, class T = void>
using hlsl::__detail::enable_if_t = typename enable_if<B, T>::Type

Definition at line 31 of file hlsl_detail.h.

◆ HLSL_FIXED_VECTOR

template<typename T, int N>
using hlsl::__detail::HLSL_FIXED_VECTOR
Initial value:
vector<__detail::enable_if_t<(N > 1 && N <= 4), T>, N>
typename enable_if< B, T >::Type enable_if_t
Definition hlsl_detail.h:31

Definition at line 49 of file hlsl_detail.h.

Function Documentation

◆ bit_cast() [1/2]

template<typename U, typename T>
enable_if_t< sizeof(U)==sizeof(T), U > hlsl::__detail::bit_cast ( T F)
constexpr

Definition at line 40 of file hlsl_detail.h.

◆ bit_cast() [2/2]

template<typename U, typename T, int N>
enable_if_t< sizeof(U)==sizeof(T), vector< U, N > > hlsl::__detail::bit_cast ( vector< T, N > V)
constexpr

Definition at line 35 of file hlsl_detail.h.

References V.

Referenced by hlsl::asfloat(), hlsl::asfloat(), hlsl::asint(), hlsl::asint(), hlsl::asuint(), hlsl::asuint(), and hlsl::asuint().

◆ d3d_color_to_ubyte4_impl()

int4 hlsl::__detail::d3d_color_to_ubyte4_impl ( float4 V)
constexpr

Definition at line 15 of file hlsl_intrinsic_helpers.h.

References V.

Referenced by hlsl::D3DCOLORtoUBYTE4().

◆ distance_impl()

template<typename T>
T hlsl::__detail::distance_impl ( T X,
T Y )
constexpr

Definition at line 43 of file hlsl_intrinsic_helpers.h.

References length_impl(), and X.

Referenced by hlsl::distance().

◆ distance_vec_impl()

template<typename T, int N>
enable_if_t< is_same< float, T >::value||is_same< half, T >::value, T > hlsl::__detail::distance_vec_impl ( vector< T, N > X,
vector< T, N > Y )
constexpr

Definition at line 49 of file hlsl_intrinsic_helpers.h.

References length_vec_impl(), and X.

Referenced by hlsl::distance(), and hlsl::distance().

◆ dot2add_impl()

float hlsl::__detail::dot2add_impl ( half2 a,
half2 b,
float c )
constexpr

Definition at line 53 of file hlsl_intrinsic_helpers.h.

References b, c, and hlsl::dot().

Referenced by hlsl::dot2add().

◆ dst_impl()

template<typename T>
vector< T, 4 > hlsl::__detail::dst_impl ( vector< T, 4 > Src0,
vector< T, 4 > Src1 )
constexpr

Definition at line 39 of file hlsl_intrinsic_helpers.h.

Referenced by hlsl::dst(), hlsl::dst(), and hlsl::dst().

◆ faceforward_impl()

template<typename T>
T hlsl::__detail::faceforward_impl ( T N,
T I,
T Ng )
constexpr

Definition at line 139 of file hlsl_intrinsic_helpers.h.

References hlsl::dot(), and hlsl::select().

Referenced by hlsl::faceforward(), hlsl::faceforward(), and hlsl::faceforward().

◆ fmod_impl()

template<typename T>
T hlsl::__detail::fmod_impl ( T X,
T Y )
constexpr

Definition at line 84 of file hlsl_intrinsic_helpers.h.

References hlsl::abs(), hlsl::frac(), hlsl::select(), and X.

Referenced by hlsl::fmod().

◆ fmod_vec_impl()

template<typename T, int N>
vector< T, N > hlsl::__detail::fmod_vec_impl ( vector< T, N > X,
vector< T, N > Y )
constexpr

Definition at line 96 of file hlsl_intrinsic_helpers.h.

References hlsl::abs(), hlsl::frac(), hlsl::select(), and X.

Referenced by hlsl::fmod(), and hlsl::fmod().

◆ ldexp_impl()

template<typename T>
T hlsl::__detail::ldexp_impl ( T X,
T Exp )
constexpr

Definition at line 147 of file hlsl_intrinsic_helpers.h.

References exp2, and X.

Referenced by hlsl::ldexp(), hlsl::ldexp(), and hlsl::ldexp().

◆ length_impl()

template<typename T>
T hlsl::__detail::length_impl ( T X)
constexpr

Definition at line 26 of file hlsl_intrinsic_helpers.h.

References hlsl::abs(), and X.

Referenced by distance_impl(), and hlsl::length().

◆ length_vec_impl()

template<typename T, int N>
enable_if_t< is_same< float, T >::value||is_same< half, T >::value, T > hlsl::__detail::length_vec_impl ( vector< T, N > X)
constexpr

Definition at line 30 of file hlsl_intrinsic_helpers.h.

References hlsl::dot(), sqrt, and X.

Referenced by distance_vec_impl(), hlsl::length(), and hlsl::length().

◆ lit_impl()

template<typename T>
vector< T, 4 > hlsl::__detail::lit_impl ( T NDotL,
T NDotH,
T M )
constexpr

Definition at line 127 of file hlsl_intrinsic_helpers.h.

References exp, log, or, and hlsl::select().

Referenced by hlsl::lit(), and hlsl::lit().

◆ reflect_impl()

template<typename T>
T hlsl::__detail::reflect_impl ( T I,
T N )
constexpr

Definition at line 61 of file hlsl_intrinsic_helpers.h.

Referenced by hlsl::reflect().

◆ reflect_vec_impl()

template<typename T, int L>
vector< T, L > hlsl::__detail::reflect_vec_impl ( vector< T, L > I,
vector< T, L > N )
constexpr

Definition at line 66 of file hlsl_intrinsic_helpers.h.

References hlsl::dot().

Referenced by hlsl::reflect(), and hlsl::reflect().

◆ refract_impl()

template<typename T, typename U>
T hlsl::__detail::refract_impl ( T I,
T N,
U Eta )
constexpr

Definition at line 74 of file hlsl_intrinsic_helpers.h.

References hlsl::dot(), hlsl::select(), and sqrt.

Referenced by hlsl::refract(), hlsl::refract(), and hlsl::refract().

◆ smoothstep_impl()

template<typename T>
T hlsl::__detail::smoothstep_impl ( T Min,
T Max,
T X )
constexpr

Definition at line 107 of file hlsl_intrinsic_helpers.h.

References hlsl::saturate(), and X.

Referenced by hlsl::smoothstep().

◆ smoothstep_vec_impl()

template<typename T, int N>
vector< T, N > hlsl::__detail::smoothstep_vec_impl ( vector< T, N > Min,
vector< T, N > Max,
vector< T, N > X )
constexpr

Definition at line 117 of file hlsl_intrinsic_helpers.h.

References hlsl::saturate(), and X.

Referenced by hlsl::smoothstep(), and hlsl::smoothstep().