Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4225276

Browse files
Move check for USE_AVX512_POPCNT_WITH_RUNTIME_CHECK.
Unlike TRY_POPCNT_FAST, which is defined in pg_bitutils.h, thismacro is defined in c.h (via pg_config.h), so we can check for itearlier and avoid some unnecessary #includes on systems that lackAVX-512 support.Oversight in commitf78667b.Discussion:https://postgr.es/m/Zy5K5Qmlb3Z4dsd4%40nathan
1 parentb8df690 commit4225276

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/port/pg_popcount_avx512.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
*/
1313
#include"c.h"
1414

15+
#ifdefUSE_AVX512_POPCNT_WITH_RUNTIME_CHECK
16+
1517
#if defined(HAVE__GET_CPUID)|| defined(HAVE__GET_CPUID_COUNT)
1618
#include<cpuid.h>
1719
#endif
1820

19-
#ifdefUSE_AVX512_POPCNT_WITH_RUNTIME_CHECK
2021
#include<immintrin.h>
21-
#endif
2222

2323
#if defined(HAVE__CPUID)|| defined(HAVE__CPUIDEX)
2424
#include<intrin.h>
@@ -31,7 +31,7 @@
3131
* use AVX-512 intrinsics, but we check it anyway to be sure. We piggy-back on
3232
* the function pointers that are only used when TRY_POPCNT_FAST is set.
3333
*/
34-
#if defined(TRY_POPCNT_FAST)&& defined(USE_AVX512_POPCNT_WITH_RUNTIME_CHECK)
34+
#ifdefTRY_POPCNT_FAST
3535

3636
/*
3737
* Does CPUID say there's support for XSAVE instructions?
@@ -219,5 +219,5 @@ pg_popcount_masked_avx512(const char *buf, int bytes, bits8 mask)
219219
return_mm512_reduce_add_epi64(accum);
220220
}
221221

222-
#endif/* TRY_POPCNT_FAST&&
223-
* USE_AVX512_POPCNT_WITH_RUNTIME_CHECK */
222+
#endif/* TRY_POPCNT_FAST*/
223+
#endif/* USE_AVX512_POPCNT_WITH_RUNTIME_CHECK */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp