@@ -134,6 +134,7 @@ template<typename T> AUTO_SPECIALIZE_TRIVIAL_CASE_HELPER(find_lsb_helper, findIL
134134#undef FIND_MSB_LSB_RETURN_TYPE
135135
136136template<typename T> AUTO_SPECIALIZE_TRIVIAL_CASE_HELPER (bitReverse_helper, bitReverse, (T), (T), T)
137+ template<typename T> AUTO_SPECIALIZE_TRIVIAL_CASE_HELPER (dot_helper, dot, (T), (T)(T), typename vector_traits<T>::scalar_type)
137138template<typename T> AUTO_SPECIALIZE_TRIVIAL_CASE_HELPER (transpose_helper, transpose, (T), (T), T)
138139template<typename T> AUTO_SPECIALIZE_TRIVIAL_CASE_HELPER (length_helper, length, (T), (T), typename vector_traits<T>::scalar_type)
139140template<typename T> AUTO_SPECIALIZE_TRIVIAL_CASE_HELPER (normalize_helper, normalize, (T), (T), T)
@@ -599,20 +600,6 @@ struct nClamp_helper<T>
599600 }
600601};
601602
602- #endif // C++ only specializations
603-
604- // C++ and HLSL specializations
605-
606- template<typename T>
607- NBL_PARTIAL_REQ_TOP (concepts::UnsignedIntegralScalar<T>)
608- struct bitReverseAs_helper<T NBL_PARTIAL_REQ_BOT (concepts::UnsignedIntegralScalar<T>) >
609- {
610- static T __call (NBL_CONST_REF_ARG (T) val, uint16_t bits)
611- {
612- return bitReverse_helper<T>::__call (val) >> promote<T, scalar_type_t<T> >(scalar_type_t <T>(sizeof (T) * 8 - bits));
613- }
614- };
615-
616603template<typename Vectorial>
617604NBL_PARTIAL_REQ_TOP (concepts::Vectorial<Vectorial>)
618605struct dot_helper<Vectorial NBL_PARTIAL_REQ_BOT (concepts::Vectorial<Vectorial>) >
@@ -632,6 +619,20 @@ struct dot_helper<Vectorial NBL_PARTIAL_REQ_BOT(concepts::Vectorial<Vectorial>)
632619 }
633620};
634621
622+ #endif // C++ only specializations
623+
624+ // C++ and HLSL specializations
625+
626+ template<typename T>
627+ NBL_PARTIAL_REQ_TOP (concepts::UnsignedIntegralScalar<T>)
628+ struct bitReverseAs_helper<T NBL_PARTIAL_REQ_BOT (concepts::UnsignedIntegralScalar<T>) >
629+ {
630+ static T __call (NBL_CONST_REF_ARG (T) val, uint16_t bits)
631+ {
632+ return bitReverse_helper<T>::__call (val) >> promote<T, scalar_type_t<T> >(scalar_type_t <T>(sizeof (T) * 8 - bits));
633+ }
634+ };
635+
635636#ifdef __HLSL_VERSION
636637// SPIR-V already defines specializations for builtin vector types
637638#define VECTOR_SPECIALIZATION_CONCEPT concepts::Vectorial<T> && !is_vector_v<T>
0 commit comments