pgvector.git / summary / log / commit / refs
commit d84fc303ee54ea5fe45ddf3195e9cc5083b532ff
Author: Andrew Kane <andrew@ankane.org>
Date: Thu Apr 11 20:49:28 2024 +0000
Removed vector-specific code from IVFFlat [skip ci]
src/ivfbuild.c | 8 ++++----
src/ivfflat.h | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/ivfbuild.c b/src/ivfbuild.c
index 34af5803..5073de20 100644
--- a/src/ivfbuild.c
+++ b/src/ivfbuild.c
@@ -600,7 +600,7 @@ ParallelHeapScan(IvfflatBuildState * buildstate)
* Perform a worker's portion of a parallel sort
*/
static void
-IvfflatParallelScanAndSort(IvfflatSpool * ivfspool, IvfflatShared * ivfshared, Sharedsort *sharedsort, Vector * ivfcenters, int sortmem, bool progress)
+IvfflatParallelScanAndSort(IvfflatSpool * ivfspool, IvfflatShared * ivfshared, Sharedsort *sharedsort, char *ivfcenters, int sortmem, bool progress)
{
SortCoordinate coordinate;
IvfflatBuildState buildstate;
@@ -672,7 +672,7 @@ IvfflatParallelBuildMain(dsm_segment *seg, shm_toc *toc)
IvfflatSpool *ivfspool;
IvfflatShared *ivfshared;
Sharedsort *sharedsort;
- Vector *ivfcenters;
+ char *ivfcenters;
Relation heapRel;
Relation indexRel;
LOCKMODE heapLockmode;
@@ -786,7 +786,7 @@ IvfflatBeginParallel(IvfflatBuildState * buildstate, bool isconcurrent, int requ
Size estcenters;
IvfflatShared *ivfshared;
Sharedsort *sharedsort;
- Vector *ivfcenters;
+ char *ivfcenters;
IvfflatLeader *ivfleader = (IvfflatLeader *) palloc0(sizeof(IvfflatLeader));
bool leaderparticipates = true;
int querylen;
@@ -865,7 +865,7 @@ IvfflatBeginParallel(IvfflatBuildState * buildstate, bool isconcurrent, int requ
tuplesort_initialize_shared(sharedsort, scantuplesortstates,
pcxt->seg);
- ivfcenters = (Vector *) shm_toc_allocate(pcxt->toc, estcenters);
+ ivfcenters = shm_toc_allocate(pcxt->toc, estcenters);
memcpy(ivfcenters, buildstate->centers->items, estcenters);
shm_toc_insert(pcxt->toc, PARALLEL_KEY_IVFFLAT_SHARED, ivfshared);
diff --git a/src/ivfflat.h b/src/ivfflat.h
index ce364b43..a92dee02 100644
--- a/src/ivfflat.h
+++ b/src/ivfflat.h
@@ -91,7 +91,7 @@ typedef struct VectorArrayData
int maxlen;
int dim;
Size itemsize;
- Vector *items;
+ char *items;
} VectorArrayData;
typedef VectorArrayData * VectorArray;
@@ -150,7 +150,7 @@ typedef struct IvfflatLeader
IvfflatShared *ivfshared;
Sharedsort *sharedsort;
Snapshot snapshot;
- Vector *ivfcenters;
+ char *ivfcenters;
} IvfflatLeader;
typedef struct IvfflatBuildState
[parent: 4ff36af67eae]