mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-15 00:56:54 +08:00
Added separate define for __get_cpuid
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
#ifdef BIT_DISPATCH
|
#ifdef BIT_DISPATCH
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
|
|
||||||
#if defined(HAVE__GET_CPUID)
|
#if defined(USE__GET_CPUID)
|
||||||
#include <cpuid.h>
|
#include <cpuid.h>
|
||||||
#else
|
#else
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
@@ -173,7 +173,7 @@ SupportsAvx512Popcount()
|
|||||||
{
|
{
|
||||||
unsigned int exx[4] = {0, 0, 0, 0};
|
unsigned int exx[4] = {0, 0, 0, 0};
|
||||||
|
|
||||||
#if defined(HAVE__GET_CPUID)
|
#if defined(USE__GET_CPUID)
|
||||||
__get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
|
__get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
|
||||||
#else
|
#else
|
||||||
__cpuid(exx, 1);
|
__cpuid(exx, 1);
|
||||||
@@ -187,7 +187,7 @@ SupportsAvx512Popcount()
|
|||||||
if ((_xgetbv(0) & 0xe6) != 0xe6)
|
if ((_xgetbv(0) & 0xe6) != 0xe6)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#if defined(HAVE__GET_CPUID)
|
#if defined(USE__GET_CPUID)
|
||||||
__get_cpuid_count(7, 0, &exx[0], &exx[1], &exx[2], &exx[3]);
|
__get_cpuid_count(7, 0, &exx[0], &exx[1], &exx[2], &exx[3]);
|
||||||
#else
|
#else
|
||||||
__cpuidex(exx, 7, 0);
|
__cpuidex(exx, 7, 0);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#ifdef HALFVEC_DISPATCH
|
#ifdef HALFVEC_DISPATCH
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
|
|
||||||
#if defined(HAVE__GET_CPUID)
|
#if defined(USE__GET_CPUID)
|
||||||
#include <cpuid.h>
|
#include <cpuid.h>
|
||||||
#else
|
#else
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
@@ -254,7 +254,7 @@ SupportsCpuFeature(unsigned int feature)
|
|||||||
{
|
{
|
||||||
unsigned int exx[4] = {0, 0, 0, 0};
|
unsigned int exx[4] = {0, 0, 0, 0};
|
||||||
|
|
||||||
#if defined(HAVE__GET_CPUID)
|
#if defined(USE__GET_CPUID)
|
||||||
__get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
|
__get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
|
||||||
#else
|
#else
|
||||||
__cpuid(exx, 1);
|
__cpuid(exx, 1);
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Needed for cross-compiling / universal binaries on Mac */
|
/* Needed for cross-compiling / universal binaries on Mac */
|
||||||
#if defined(USE_DISPATCH) && !defined(HAVE__GET_CPUID) && defined(__APPLE_CC__)
|
#if defined(USE_DISPATCH) && (defined(HAVE__GET_CPUID) || defined(__APPLE_CC__))
|
||||||
#define HAVE__GET_CPUID
|
#define USE__GET_CPUID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_DISPATCH)
|
#if defined(USE_DISPATCH)
|
||||||
|
|||||||
Reference in New Issue
Block a user