@@ -880,34 +880,24 @@ float4 degrees(float4);
880880// / \param X The X input value.
881881// / \param Y The Y input value.
882882
883- template <typename T>
884- constexpr __detail::enable_if_t <
885- __detail::is_same<float , T>::value || __detail::is_same<half, T>::value, T>
886- distance_impl (T X, T Y) {
887- return __builtin_elementwise_abs (X - Y);
888- }
889-
890- template <typename T, int N>
891- constexpr __detail::enable_if_t <
892- __detail::is_same<float , T>::value || __detail::is_same<half, T>::value, T>
893- distance_vec_impl (vector<T, N> X, vector<T, N> Y) {
894- return __builtin_hlsl_length (X - Y);
895- }
896-
897883_HLSL_16BIT_AVAILABILITY (shadermodel, 6.2 )
898- const inline half distance(half X, half Y) { return distance_impl (X, Y); }
884+ const inline half distance(half X, half Y) {
885+ return __detail::distance_impl (X, Y);
886+ }
899887
900888template <int N>
901889_HLSL_16BIT_AVAILABILITY (shadermodel, 6.2 )
902890const inline half distance(vector<half, N> X, vector<half, N> Y) {
903- return distance_vec_impl (X, Y);
891+ return __detail:: distance_vec_impl (X, Y);
904892}
905893
906- const inline float distance (float X, float Y) { return distance_impl (X, Y); }
894+ const inline float distance (float X, float Y) {
895+ return __detail::distance_impl (X, Y);
896+ }
907897
908898template <int N>
909899const inline float distance (vector<float , N> X, vector<float , N> Y) {
910- return distance_vec_impl (X, Y);
900+ return __detail:: distance_vec_impl (X, Y);
911901}
912902
913903// ===----------------------------------------------------------------------===//
0 commit comments