Skip to content

Commit

Permalink
cpu: x64: cpu_isa_traits: fix dispatch for avx
Browse files Browse the repository at this point in the history
  • Loading branch information
dzarukin committed Apr 11, 2024
1 parent f81a2a8 commit f47e44c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cpu/x64/cpu_isa_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ static inline bool isa_has_masks(cpu_isa_t isa) {
static inline int isa_max_vlen(cpu_isa_t isa) {
if (is_superset(isa, avx512_core))
return cpu_isa_traits<avx512_core>::vlen;
else if (is_superset(isa, avx2))
return cpu_isa_traits<avx2>::vlen;
else if (is_superset(isa, avx))
return cpu_isa_traits<avx>::vlen;
else if (is_superset(isa, sse41))
return cpu_isa_traits<sse41>::vlen;
assert(!"ISA Error");
Expand All @@ -434,8 +434,8 @@ static inline int isa_max_vlen(cpu_isa_t isa) {
static inline int isa_num_vregs(cpu_isa_t isa) {
if (is_superset(isa, avx512_core))
return cpu_isa_traits<avx512_core>::n_vregs;
else if (is_superset(isa, avx2))
return cpu_isa_traits<avx2>::n_vregs;
else if (is_superset(isa, avx))
return cpu_isa_traits<avx>::n_vregs;
else if (is_superset(isa, sse41))
return cpu_isa_traits<sse41>::n_vregs;
assert(!"ISA Error");
Expand Down

0 comments on commit f47e44c

Please sign in to comment.