Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion include/xsimd/types/xsimd_avxvnni_register.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define XSIMD_AVXVNNI_REGISTER_HPP

#include "./xsimd_avx2_register.hpp"
#include "./xsimd_fma3_avx2_register.hpp"

namespace xsimd
{
Expand All @@ -21,7 +22,12 @@ namespace xsimd
*
* AVXVNNI instructions
*/
struct avxvnni : avx2
// Derive from fma3<avx2> rather than avx2 so the FMA3 kernels (fnma/fnms ->
// vfnmadd) are in avxvnni's dispatch chain instead of the generic neg(x*y)+z
// fallback. fma3<avx2> always derives from avx2 and its kernels are only
// registered when XSIMD_WITH_FMA3_AVX2, so when FMA is disabled this base is
// transparent (dispatch falls straight through to avx2).
struct avxvnni : fma3<avx2>
{
static constexpr bool supported() noexcept { return XSIMD_WITH_AVXVNNI; }
static constexpr bool available() noexcept { return true; }
Expand Down
Loading