Skip to content

Commit

Permalink
fix the issue #154
Browse files Browse the repository at this point in the history
  • Loading branch information
masajiro committed Dec 6, 2023
1 parent 75d12fb commit 441aa19
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
14 changes: 6 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,16 @@ if(${UNIX})
if(${NGT_MARCH_NATIVE_DISABLED})
message(STATUS "Compile option -march=native is disabled.")
add_compile_options(-O2 -DNDEBUG)
elseif(${NGT_AVX2})
add_compile_options(-Ofast -march=haswell -DNDEBUG)
elseif(${NGT_AVX_DISABLED})
message(STATUS "AVX will not be used to compute distances.")
add_compile_options(-Ofast -march=x86-64 -DNDEBUG)
else()
if(${NGT_AVX2})
add_compile_options(-Ofast -march=haswell -DNDEBUG)
else()
add_compile_options(-Ofast -march=native -DNDEBUG)
endif()
add_compile_options(-Ofast -march=native -DNDEBUG)
endif()
endif()
add_compile_options(-Wall)
if(${NGT_AVX_DISABLED})
message(STATUS "AVX will not be used to compute distances.")
endif()
if(${NGT_OPENMP_DISABLED})
message(STATUS "OpenMP is disabled.")
else()
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.5
2.1.6
2 changes: 1 addition & 1 deletion lib/NGT/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ namespace NGT {
"avx512vbmi2", "avx512vnni"};
std::string types;
int size = sizeof(simdTypes) / sizeof(simdTypes[0]);
for (int i = 0; i <= size; i++) {
for (int i = 0; i < size; i++) {
if (is(static_cast<SimdType>(i))) {
types += simdTypes[i];
}
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
'include_dirs': ['/usr/local/include',
pybind11.get_include(True),
pybind11.get_include(False)],
'extra_compile_args': ['-std=c++11', '-Ofast', '-DNDEBUG'],
'extra_compile_args': ['-std=c++11', '-Ofast', '-march=x86-64', '-DNDEBUG'],
'sources': ['src/ngtpy.cpp']
}
elif static_library_avx2 or shared_library_avx2:
Expand Down

0 comments on commit 441aa19

Please sign in to comment.