================
@@ -58,21 +58,6 @@ constexpr float dot2add_impl(half2 a, half2 b, float c) {
#endif
}
-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) {
- return dot(x, y);
-}
-
-// Double vectors do not have a dot intrinsic, so expand manually.
-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) {
- T sum = x[0] * y[0];
- [unroll] for (int i = 1; i < N; ++i) sum += x[i] * y[i];
- return sum;
----------------
Icohedron wrote:
Yes but I can't invoke `llvm.spv.fdot` for double vectors despite SPIRV having
support for it.
1. A `dot` call from HLSL has no double overload
2. There isn't a way (AFAIK) to generically condition code in HLSL on whether
or not the HLSL is being compiled for SPIRV or DXIL
https://github.com/llvm/llvm-project/pull/184882
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits