================
@@ -89,23 +89,31 @@ void asuint(double4, out uint4, out uint4);
 /// \param X The X input value.
 /// \param Y The Y input value.
 
+template <typename T>
 _HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
-const inline half distance(half X, half Y) {
+const inline __detail::enable_if_t<__detail::is_arithmetic<T>::Value &&
----------------
farzonl wrote:

I didn't want to do that. Since 6.9 is going to add "long" vectors as part of 
cooperative vectors spec I figured we needed  to do something like this long 
term

```hlsl
template <int N>
_HLSL_AVAILABILITY(shadermodel, 6.9)
const inline float distance(__detail::HLSL_LONG_VECTOR<float, N> X,
                            __detail::HLSL_LONG_VECTOR<float, N> Y) {...}
```

https://github.com/llvm/llvm-project/pull/130724
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to