Skip to content

Commit

Permalink
fix the github issue #157
Browse files Browse the repository at this point in the history
  • Loading branch information
masajiro committed May 13, 2024
1 parent a672f2d commit 6956dfa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if(${UNIX})
include_directories("${PROJECT_SOURCE_DIR}/lib" "${PROJECT_BINARY_DIR}/lib/")
link_directories("${PROJECT_BINARY_DIR}/lib/NGT")
add_subdirectory("${PROJECT_SOURCE_DIR}/bin/ngt")
if(NOT DEFINED NGT_SHARED_MEMORY_ALLOCATOR OR (NOT ${NGT_SHARED_MEMORY_ALLOCATOR}))
if(NOT DEFINED NGT_QBG_DISABLED OR (NOT ${NGT_QBG_DISABLED}))
add_subdirectory("${PROJECT_SOURCE_DIR}/bin/qbg")
endif()
endif()
8 changes: 5 additions & 3 deletions lib/NGT/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ if( ${UNIX} )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/defines.h.in ${CMAKE_CURRENT_BINARY_DIR}/defines.h)
include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/lib" "${PROJECT_BINARY_DIR}/lib/")

file(GLOB NGT_SOURCES *.cpp NGTQ/*.cpp)
if(${NGT_QBG_DISABLED})
file(GLOB NGT_SOURCES *.cpp)
else()
file(GLOB NGT_SOURCES *.cpp NGTQ/*.cpp)
endif()
file(GLOB HEADER_FILES *.h *.hpp)
file(GLOB NGTQ_HEADER_FILES NGTQ/*.h NGTQ/*.hpp)

Expand Down Expand Up @@ -35,8 +39,6 @@ if( ${UNIX} )
add_custom_command(OUTPUT command DEPENDS ${NGT_SOURCES} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND sh ${PROJECT_SOURCE_DIR}/utils/mk_version_defs_h.sh ${PROJECT_SOURCE_DIR} version_defs.h)
add_custom_target(versiondef DEPENDS command)
add_dependencies(ngtstatic versiondef)


install(TARGETS
ngt
ngtstatic
Expand Down
2 changes: 2 additions & 0 deletions lib/NGT/NGTQ/Quantizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2558,6 +2558,7 @@ class QuantizedObjectProcessingStream {
}
}

#ifdef NGTQ_QBG
void restoreToInvertedIndex(NGTQ::InvertedIndexEntry<uint16_t> &invertedIndexObjects) {
#if defined(NGT_SHARED_MEMORY_ALLOCATOR)
std::cerr << "Not implemented." << std::endl;
Expand All @@ -2572,6 +2573,7 @@ class QuantizedObjectProcessingStream {
invertedIndexObjects.resize(numOfObjects);
#endif
}
#endif

uint8_t* getStream() {
auto s = stream;
Expand Down

0 comments on commit 6956dfa

Please sign in to comment.