From 29d12f1fc3ab10a41a6edab054ee884b9c57e6ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Tue, 14 Feb 2023 12:09:44 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-doc:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=BE=20=D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D1=87?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BA=20=D0=BE=D0=BF=D1=86=D0=B8?= =?UTF-8?q?=D0=B8=20`MDBX=5FHAVE=5FBUILTIN=5FCPU=5FSUPPORTS`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core.c | 2 +- src/options.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core.c b/src/core.c index 1f2b7adb..c4681f7e 100644 --- a/src/core.c +++ b/src/core.c @@ -6786,7 +6786,7 @@ __hot static pgno_t *scan4seq_neon(pgno_t *range, const size_t len, #ifdef scan4seq_impl /* The scan4seq_impl() is the best or no alternatives */ #elif !MDBX_HAVE_BUILTIN_CPU_SUPPORTS -/* The scan4seq_default() will be used since no cpu-features detection support +/* The scan4seq_default() will be used since no cpu-features detection support * from compiler. Please don't ask to implement cpuid-based detection and don't * make such PRs. */ #define scan4seq_impl scan4seq_default diff --git a/src/options.h b/src/options.h index 596efdc0..0ef27e6f 100644 --- a/src/options.h +++ b/src/options.h @@ -220,7 +220,11 @@ #endif /* MDBX_HAVE_C11ATOMICS */ /** If defined then enables use the GCC's `__builtin_cpu_supports()` - * for runtime dispatching depending on the CPU's capabilities. */ + * for runtime dispatching depending on the CPU's capabilities. + * \note Defining `MDBX_HAVE_BUILTIN_CPU_SUPPORTS` to `0` should avoided unless + * build for particular single-target platform, since on AMD64/x86 this disables + * dynamic choice (at runtime) of SSE2 / AVX2 / AVX512 instructions + * with fallback to non-accelerated baseline code. */ #ifndef MDBX_HAVE_BUILTIN_CPU_SUPPORTS #if defined(__APPLE__) || defined(BIONIC) /* Never use any modern features on Apple's or Google's OSes