From e9a96d341f9ee8a14838d9a7e653fc4700718e68 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Mon, 22 Jan 2024 17:58:42 -0800 Subject: [PATCH] Removed prefix for static functions --- src/hnswbuild.c | 16 ++++++++-------- src/hnswinsert.c | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/hnswbuild.c b/src/hnswbuild.c index 4a593a6..ef08d5d 100644 --- a/src/hnswbuild.c +++ b/src/hnswbuild.c @@ -331,7 +331,7 @@ FlushPages(HnswBuildState * buildstate) * Add a heap TID to an existing element */ static bool -HnswAddDuplicateInMemory(HnswElement element, HnswElement dup) +AddDuplicateInMemory(HnswElement element, HnswElement dup) { LWLockAcquire(&dup->lock, LW_EXCLUSIVE); @@ -352,7 +352,7 @@ HnswAddDuplicateInMemory(HnswElement element, HnswElement dup) * Find duplicate element */ static bool -HnswFindDuplicateInMemory(char *base, HnswElement element) +FindDuplicateInMemory(char *base, HnswElement element) { HnswNeighborArray *neighbors = HnswGetNeighbors(base, element, 0); Datum value = HnswGetValue(base, element); @@ -368,7 +368,7 @@ HnswFindDuplicateInMemory(char *base, HnswElement element) return false; /* Check for space */ - if (HnswAddDuplicateInMemory(element, neighborElement)) + if (AddDuplicateInMemory(element, neighborElement)) return true; } @@ -379,7 +379,7 @@ HnswFindDuplicateInMemory(char *base, HnswElement element) * Add to element list */ static void -HnswAddElementInMemory(char *base, HnswGraph * graph, HnswElement element) +AddElementInMemory(char *base, HnswGraph * graph, HnswElement element) { SpinLockAcquire(&graph->lock); element->next = graph->head; @@ -391,7 +391,7 @@ HnswAddElementInMemory(char *base, HnswGraph * graph, HnswElement element) * Update neighbors */ static void -HnswUpdateNeighborsInMemory(char *base, FmgrInfo *procinfo, Oid collation, HnswElement e, int m) +UpdateNeighborsInMemory(char *base, FmgrInfo *procinfo, Oid collation, HnswElement e, int m) { for (int lc = e->level; lc >= 0; lc--) { @@ -424,14 +424,14 @@ UpdateGraphInMemory(FmgrInfo *procinfo, Oid collation, HnswElement element, int char *base = buildstate->hnswarea; /* Look for duplicate */ - if (HnswFindDuplicateInMemory(base, element)) + if (FindDuplicateInMemory(base, element)) return; /* Add element */ - HnswAddElementInMemory(base, graph, element); + AddElementInMemory(base, graph, element); /* Update neighbors */ - HnswUpdateNeighborsInMemory(base, procinfo, collation, element, m); + UpdateNeighborsInMemory(base, procinfo, collation, element, m); /* Update entry point if needed (already have lock) */ if (entryPoint == NULL || element->level > entryPoint->level) diff --git a/src/hnswinsert.c b/src/hnswinsert.c index e8efeec..7d43230 100644 --- a/src/hnswinsert.c +++ b/src/hnswinsert.c @@ -451,7 +451,7 @@ HnswUpdateNeighborsOnDisk(Relation index, FmgrInfo *procinfo, Oid collation, Hns * Add a heap TID to an existing element */ static bool -HnswAddDuplicateOnDisk(Relation index, HnswElement element, HnswElement dup, bool building) +AddDuplicateOnDisk(Relation index, HnswElement element, HnswElement dup, bool building) { Buffer buf; Page page; @@ -515,7 +515,7 @@ HnswAddDuplicateOnDisk(Relation index, HnswElement element, HnswElement dup, boo * Find duplicate element */ static bool -HnswFindDuplicateOnDisk(Relation index, HnswElement element, bool building) +FindDuplicateOnDisk(Relation index, HnswElement element, bool building) { char *base = NULL; HnswNeighborArray *neighbors = HnswGetNeighbors(base, element, 0); @@ -531,7 +531,7 @@ HnswFindDuplicateOnDisk(Relation index, HnswElement element, bool building) if (!datumIsEqual(value, neighborValue, false, -1)) return false; - if (HnswAddDuplicateOnDisk(index, element, neighborElement, building)) + if (AddDuplicateOnDisk(index, element, neighborElement, building)) return true; } @@ -547,7 +547,7 @@ UpdateGraphOnDisk(Relation index, FmgrInfo *procinfo, Oid collation, HnswElement BlockNumber newInsertPage = InvalidBlockNumber; /* Look for duplicate */ - if (HnswFindDuplicateOnDisk(index, element, building)) + if (FindDuplicateOnDisk(index, element, building)) return; /* Add element */