Skip to content

Commit

Permalink
Update AVX512 threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Jun 26, 2024
1 parent 45f223b commit a1d2fa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ int main(int argc, char* argv[])

#if defined(LIBPOPCNT_HAVE_CPUID)
int cpuid = get_cpuid();
if ((cpuid & LIBPOPCNT_BIT_AVX512_VPOPCNTDQ) && bytes >= 32)
if ((cpuid & LIBPOPCNT_BIT_AVX512_VPOPCNTDQ) && bytes >= 48)
algo = "AVX512";
else if ((cpuid & LIBPOPCNT_BIT_AVX2) && bytes >= 512)
algo = "AVX2";
else if (cpuid & LIBPOPCNT_BIT_POPCNT)
algo = "POPCNT";
#else
#if defined(LIBPOPCNT_HAVE_AVX512) && (defined(__AVX512__) || (defined(__AVX512F__) && defined(__AVX512VPOPCNTDQ__)))
if (algo.empty() && bytes >= 1024)
if (algo.empty() && bytes >= 48)
algo = "AVX512";
#endif
#if defined(LIBPOPCNT_HAVE_AVX2) && defined(__AVX2__)
Expand Down

0 comments on commit a1d2fa1

Please sign in to comment.