more F16 tests
This commit is contained in:
parent
6e6530290b
commit
6b15089e24
2 changed files with 203 additions and 40 deletions
|
|
@ -467,11 +467,12 @@ namespace Crafter {
|
|||
}
|
||||
}
|
||||
|
||||
constexpr static _Float16 Dot(VectorF16<Len, 1> a, VectorF16<Len, 1> b) {
|
||||
constexpr static _Float16 Dot(VectorF16<Len, Packing> a, VectorF16<Len, Packing> b) requires(Packing == 1) {
|
||||
if constexpr(std::is_same_v<VectorType, __m128h>) {
|
||||
__m128h mul = _mm_mul_ph(a.v, b.v);
|
||||
return _mm_reduce_add_ph(mul);
|
||||
} else if constexpr(std::is_same_v<VectorType, __m256h>) {
|
||||
static_assert(std::is_same_v<decltype(a.v), VectorType>, "a.v is NOT VectorType");
|
||||
__m256h mul = _mm256_mul_ph(a.v, b.v);
|
||||
return _mm256_reduce_add_ph(mul);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue