clang 23.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

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)
template<typename T>
constexpr enable_if_t< is_same< float, T >::value||is_same< half, T >::value, 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_impl (vector< T, N > X)
constexpr float dot2add_impl (half2 a, half2 b, float c)
template<typename T, int N>
constexpr enable_if_t<!is_same< double, T >::value, T > mul_vec_impl (vector< T, N > x, vector< T, N > y)
template<typename T, int N>
enable_if_t< is_same< double, T >::value, T > mul_vec_impl (vector< T, N > x, vector< T, N > y)
template<typename T>
constexpr enable_if_t< is_same< float, T >::value||is_same< half, T >::value, T > reflect_impl (T I, T N)
template<typename T, int L>
constexpr vector< T, L > reflect_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>
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 K, typename T, int BitWidth>
constexpr K firstbithigh_impl (T X)
template<typename T>
constexpr T ddx_impl (T input)
template<typename T>
constexpr T ddy_impl (T input)
template<typename T>
constexpr T fwidth_impl (T input)

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.

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().

◆ ddx_impl()

template<typename T>
T hlsl::__detail::ddx_impl ( T input)
constexpr

Definition at line 139 of file hlsl_intrinsic_helpers.h.

◆ ddy_impl()

template<typename T>
T hlsl::__detail::ddy_impl ( T input)
constexpr

Definition at line 147 of file hlsl_intrinsic_helpers.h.

◆ dot2add_impl()

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

Definition at line 31 of file hlsl_intrinsic_helpers.h.

References b, c, and dot().

◆ faceforward_impl()

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

Definition at line 123 of file hlsl_intrinsic_helpers.h.

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

◆ firstbithigh_impl()

template<typename K, typename T, int BitWidth>
K hlsl::__detail::firstbithigh_impl ( T X)
constexpr

Definition at line 128 of file hlsl_intrinsic_helpers.h.

References hlsl::select(), and X.

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

◆ fmod_impl()

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

Definition at line 79 of file hlsl_intrinsic_helpers.h.

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

◆ 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 91 of file hlsl_intrinsic_helpers.h.

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

◆ fwidth_impl()

template<typename T>
T hlsl::__detail::fwidth_impl ( T input)
constexpr

Definition at line 155 of file hlsl_intrinsic_helpers.h.

References abs().

◆ length_impl() [1/2]

template<typename T>
enable_if_t< is_same< float, T >::value||is_same< half, T >::value, T > hlsl::__detail::length_impl ( T X)
constexpr

Definition at line 17 of file hlsl_intrinsic_helpers.h.

References abs(), and X.

◆ length_impl() [2/2]

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

Definition at line 23 of file hlsl_intrinsic_helpers.h.

References dot(), sqrt, and X.

◆ lit_impl()

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

Definition at line 111 of file hlsl_intrinsic_helpers.h.

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

◆ mul_vec_impl() [1/2]

template<typename T, int N>
enable_if_t<!is_same< double, T >::value, T > hlsl::__detail::mul_vec_impl ( vector< T, N > x,
vector< T, N > y )
constexpr

Definition at line 41 of file hlsl_intrinsic_helpers.h.

References dot().

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

◆ mul_vec_impl() [2/2]

template<typename T, int N>
enable_if_t< is_same< double, T >::value, T > hlsl::__detail::mul_vec_impl ( vector< T, N > x,
vector< T, N > y )

Definition at line 47 of file hlsl_intrinsic_helpers.h.

References mad().

◆ reflect_impl() [1/2]

template<typename T>
enable_if_t< is_same< float, T >::value||is_same< half, T >::value, T > hlsl::__detail::reflect_impl ( T I,
T N )
constexpr

Definition at line 56 of file hlsl_intrinsic_helpers.h.

◆ reflect_impl() [2/2]

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

Definition at line 61 of file hlsl_intrinsic_helpers.h.

References dot().

◆ refract_impl()

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

Definition at line 69 of file hlsl_intrinsic_helpers.h.

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

◆ smoothstep_impl()

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

Definition at line 102 of file hlsl_intrinsic_helpers.h.

References X.