Improved code [skip ci]

This commit is contained in:
Andrew Kane
2024-01-08 17:54:49 -08:00
parent 65d060ac86
commit 108fb09d7b

View File

@@ -625,13 +625,12 @@ AddToVisited(visited_hash v, HnswCandidate * hc, Relation index, bool *found)
List * List *
HnswSearchLayer(Datum q, List *ep, int ef, int lc, Relation index, FmgrInfo *procinfo, Oid collation, int m, bool inserting, HnswElement skipElement) HnswSearchLayer(Datum q, List *ep, int ef, int lc, Relation index, FmgrInfo *procinfo, Oid collation, int m, bool inserting, HnswElement skipElement)
{ {
ListCell *lc2;
List *w = NIL; List *w = NIL;
pairingheap *C = pairingheap_allocate(CompareNearestCandidates, NULL); pairingheap *C = pairingheap_allocate(CompareNearestCandidates, NULL);
pairingheap *W = pairingheap_allocate(CompareFurthestCandidates, NULL); pairingheap *W = pairingheap_allocate(CompareFurthestCandidates, NULL);
int wlen = 0; int wlen = 0;
visited_hash v; visited_hash v;
ListCell *lc2;
/* Create hash table */ /* Create hash table */
if (index == NULL) if (index == NULL)