Skip to content

Commit

Permalink
fix the issue #156
Browse files Browse the repository at this point in the history
  • Loading branch information
masajiro committed Apr 15, 2024
1 parent 6237d1d commit 74fed61
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.0
2.2.1
6 changes: 4 additions & 2 deletions lib/NGT/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,15 @@ namespace NGT {
static int getProcessVmPeak() { return strtol(getProcessStatus("VmPeak")); }
static int getProcessVmRSS() { return strtol(getProcessStatus("VmRSS")); }
static int getProcessVmHWM() { return strtol(getProcessStatus("VmHWM")); }
#if __linux__
static int getSystemHWM() {
#if __linux__
struct sysinfo info;
sysinfo(&info);
return info.totalram / 1024;
}
#else
return 0;
#endif
}
static std::string sizeToString(float size) {
char unit = 'K';
if (size > 1024) {
Expand Down
9 changes: 6 additions & 3 deletions lib/NGT/defines.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#cmakedefine NGTQG_ZERO_GLOBAL
#cmakedefine NGTQG_NO_ROTATION
#cmakedefine NGT_BFLOAT_DISABLED // not use bfloat
#cmakedefine NGT_BFLOAT_ENABLED
// End of cmake defines

//////////////////////////////////////////////////////////////////////////
Expand All @@ -44,11 +45,13 @@
#define NGT_COMPACT_VECTOR
#define NGT_GRAPH_READ_ONLY_GRAPH
#define NGT_HALF_FLOAT
#ifndef NGT_BFLOAT_DISABLED

#ifdef NGT_BFLOAT_ENABLED
#define NGT_BFLOAT
#endif
//#define NGT_EXPERIMENTAL_QUINT8
#define NGT_EXPERIMENTAL_SQINT8
#ifdef NGT_BFLOAT_DISABLED
#undef NGT_BFLOAT
#endif

#ifdef NGT_LARGE_DATASET
#define NGT_GRAPH_CHECK_HASH_BASED_BOOLEAN_SET
Expand Down

0 comments on commit 74fed61

Please sign in to comment.