mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-10 22:56:55 +08:00
Improved target_clones logic [skip ci]
This commit is contained in:
@@ -34,7 +34,14 @@
|
|||||||
#define CreateStateDatums(dim) palloc(sizeof(Datum) * (dim + 1))
|
#define CreateStateDatums(dim) palloc(sizeof(Datum) * (dim + 1))
|
||||||
|
|
||||||
/* target_clones requires glibc */
|
/* target_clones requires glibc */
|
||||||
#if defined(__x86_64__) && defined(__gnu_linux__) && defined(__has_attribute) && __has_attribute(target_clones) && !defined(__FMA__)
|
#if defined(__gnu_linux__) && defined(__has_attribute)
|
||||||
|
/* Use separate line for portability */
|
||||||
|
#if __has_attribute(target_clones)
|
||||||
|
#define HAVE_TARGET_CLONES
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__x86_64__) && HAVE_TARGET_CLONES && !defined(__FMA__)
|
||||||
#define VECTOR_DISPATCH __attribute__((target_clones("default", "fma")))
|
#define VECTOR_DISPATCH __attribute__((target_clones("default", "fma")))
|
||||||
#else
|
#else
|
||||||
#define VECTOR_DISPATCH
|
#define VECTOR_DISPATCH
|
||||||
|
|||||||
Reference in New Issue
Block a user