Skip to content

Commit cbb1d29

Browse files
gpsheadclaude
andcommitted
Rename HAVE_BUILTIN_SHUFFLEVECTOR to HAVE_EFFICIENT_BUILTIN_SHUFFLEVECTOR
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dfc295f commit cbb1d29

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Python/pystrhex.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ _Py_hexlify_scalar(const unsigned char *src, Py_UCS1 *dst, Py_ssize_t len)
3636
adds a ton of complication. Who ever really hexes huge data?
3737
The 16-64 byte boosts align nicely with md5 - sha512 hexdigests.
3838
*/
39-
#ifdef HAVE_BUILTIN_SHUFFLEVECTOR_AND_IT_IS_WORTH_USING
39+
#ifdef HAVE_EFFICIENT_BUILTIN_SHUFFLEVECTOR
4040

4141
/* 128-bit vector of 16 unsigned bytes */
4242
typedef unsigned char v16u8 __attribute__((vector_size(16)));
@@ -109,7 +109,7 @@ _Py_hexlify_simd(const unsigned char *src, Py_UCS1 *dst, Py_ssize_t len)
109109
_Py_hexlify_scalar(src + i, dst, len - i);
110110
}
111111

112-
#endif /* HAVE_BUILTIN_SHUFFLEVECTOR_AND_IT_IS_WORTH_USING */
112+
#endif /* HAVE_EFFICIENT_BUILTIN_SHUFFLEVECTOR */
113113

114114
static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen,
115115
PyObject* sep, int bytes_per_sep_group,
@@ -189,7 +189,7 @@ static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen,
189189
unsigned char c;
190190

191191
if (bytes_per_sep_group == 0) {
192-
#ifdef HAVE_BUILTIN_SHUFFLEVECTOR_AND_IT_IS_WORTH_USING
192+
#ifdef HAVE_EFFICIENT_BUILTIN_SHUFFLEVECTOR
193193
if (arglen >= 16) {
194194
// little vector units go brrrr...
195195
_Py_hexlify_simd((const unsigned char *)argbuf, retbuf, arglen);

configure

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5043,7 +5043,7 @@ AC_LINK_IFELSE([
50435043
])
50445044

50455045
AS_VAR_IF([ac_cv_builtin_shufflevector], [yes], [
5046-
AC_DEFINE([HAVE_BUILTIN_SHUFFLEVECTOR_AND_IT_IS_WORTH_USING], [1],
5046+
AC_DEFINE([HAVE_EFFICIENT_BUILTIN_SHUFFLEVECTOR], [1],
50475047
[Define if compiler supports __builtin_shufflevector with
50485048
128-bit vectors on an architecture with native SIMD])
50495049
])

pyconfig.h.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@
126126
/* Has builtin __atomic_load_n() and __atomic_store_n() functions */
127127
#undef HAVE_BUILTIN_ATOMIC
128128

129-
/* Define if compiler supports __builtin_shufflevector with 128-bit vectors on
130-
an architecture with native SIMD */
131-
#undef HAVE_BUILTIN_SHUFFLEVECTOR_AND_IT_IS_WORTH_USING
129+
/* Define if compiler supports __builtin_shufflevector with 128-bit vectors
130+
AND the target architecture has native SIMD (not just API availability) */
131+
#undef HAVE_EFFICIENT_BUILTIN_SHUFFLEVECTOR
132132

133133
/* Define to 1 if you have the <bzlib.h> header file. */
134134
#undef HAVE_BZLIB_H

0 commit comments

Comments
 (0)