Skip to content

Commit 65dea23

Browse files
committed
moving inline definition
1 parent 1dad258 commit 65dea23

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

include/sqlite-vec-cpp/index/hnsw_threading.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class SpinLock {
2626
/// Thread-local random number generator for parallel operations
2727
/// Avoids contention on shared RNG during parallel layer assignment
2828
class ThreadLocalRNG {
29-
static thread_local std::mt19937 rng_;
29+
static inline thread_local std::mt19937 rng_{std::random_device{}()};
3030
std::uniform_real_distribution<float> dist_{0.0f, 1.0f};
3131

3232
public:
@@ -49,8 +49,6 @@ class ThreadLocalRNG {
4949
}
5050
};
5151

52-
inline thread_local std::mt19937 ThreadLocalRNG::rng_{std::random_device{}()};
53-
5452
/// Per-node lock array using pointer-based storage to avoid move issues
5553
class NodeLocks {
5654
std::vector<std::unique_ptr<SpinLock>> locks_;

0 commit comments

Comments
 (0)