File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ class HierarchicalNSW : public AlgorithmInterface<dist_t> {
105105 if ( M <= 10000 ) {
106106 M_ = M;
107107 } else {
108- std::cerr << " warning: M parameter exceeds 10000 which may lead to adverse effects." << std::endl;
109- std::cerr << " Cap to 10000 will be applied for the rest of the processing." << std::endl;
108+ HNSWERR << " warning: M parameter exceeds 10000 which may lead to adverse effects." << std::endl;
109+ HNSWERR << " Cap to 10000 will be applied for the rest of the processing." << std::endl;
110110 M_ = 10000 ;
111111 }
112112 maxM_ = M_;
Original file line number Diff line number Diff line change 11#pragma once
2+
3+ // https://github.com/nmslib/hnswlib/pull/508
4+ // This allows others to provide their own error stream (e.g. RcppHNSW)
5+ #ifndef HNSWLIB_ERR_OVERRIDE
6+ #define HNSWERR std::cerr
7+ #else
8+ #define HNSWERR HNSWLIB_ERR_OVERRIDE
9+ #endif
10+
211#ifndef NO_MANUAL_VECTORIZATION
312#if (defined(__SSE__) || _M_IX86_FP > 0 || defined(_M_AMD64) || defined(_M_X64))
413#define USE_SSE
You can’t perform that action at this time.
0 commit comments