mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-12 15:46:54 +08:00
Improved macro [skip ci]
This commit is contained in:
@@ -76,7 +76,7 @@
|
|||||||
#define HnswIsNeighborTuple(tup) ((tup)->type == HNSW_NEIGHBOR_TUPLE_TYPE)
|
#define HnswIsNeighborTuple(tup) ((tup)->type == HNSW_NEIGHBOR_TUPLE_TYPE)
|
||||||
|
|
||||||
/* 2 * M connections for ground layer */
|
/* 2 * M connections for ground layer */
|
||||||
#define HnswGetLayerM(m, layer) (layer == 0 ? m * 2 : m)
|
#define HnswGetLayerM(m, layer) (layer == 0 ? (m) * 2 : (m))
|
||||||
|
|
||||||
/* Optimal ML from paper */
|
/* Optimal ML from paper */
|
||||||
#define HnswGetMl(m) (1 / log(m))
|
#define HnswGetMl(m) (1 / log(m))
|
||||||
|
|||||||
Reference in New Issue
Block a user