mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-02 18:50:56 +08:00
Always use inline pg_popcount64 for Postgres 19+ - #985
This commit is contained in:
@@ -31,8 +31,10 @@
|
||||
#define BIT_TARGET_CLONES
|
||||
#endif
|
||||
|
||||
/* Use built-ins when possible for inlining */
|
||||
#if defined(HAVE__BUILTIN_POPCOUNT) && (defined(HAVE_LONG_INT_64) || SIZEOF_LONG == 8)
|
||||
/* Use built-ins when possible for Postgres < 19 for inlining */
|
||||
#if PG_VERSION_NUM >= 190000
|
||||
#define popcount64(x) pg_popcount64(x)
|
||||
#elif defined(HAVE__BUILTIN_POPCOUNT) && (defined(HAVE_LONG_INT_64) || SIZEOF_LONG == 8)
|
||||
#define popcount64(x) __builtin_popcountl(x)
|
||||
#elif defined(HAVE__BUILTIN_POPCOUNT) && (defined(HAVE_LONG_LONG_INT_64) || SIZEOF_LONG_LONG == 8)
|
||||
#define popcount64(x) __builtin_popcountll(x)
|
||||
|
||||
Reference in New Issue
Block a user