Skip to content

Commit

Permalink
Merge pull request #408 from alxvth/fix/cpu_x86_include
Browse files Browse the repository at this point in the history
Set USE_SSE with msvc compilers and fix unknown header inclusion
  • Loading branch information
dyashuni committed Sep 6, 2022
2 parents 5c14e05 + c481fd4 commit 1f49ffe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hnswlib/hnswlib.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#ifndef NO_MANUAL_VECTORIZATION
#ifdef __SSE__
#if (defined(__SSE__) || _M_IX86_FP > 0 || defined(_M_AMD64) || defined(_M_X64))
#define USE_SSE
#ifdef __AVX__
#define USE_AVX
Expand All @@ -15,8 +15,7 @@
#ifdef _MSC_VER
#include <intrin.h>
#include <stdexcept>
#include "cpu_x86.h"
static void cpu_x86::cpuid(int32_t out[4], int32_t eax, int32_t ecx) {
void cpuid(int32_t out[4], int32_t eax, int32_t ecx) {
__cpuidex(out, eax, ecx);
}
static __int64 xgetbv(unsigned int x) {
Expand Down

0 comments on commit 1f49ffe

Please sign in to comment.