mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-29 17:21:16 +08:00
Removed vector-specific code from IVFFlat [skip ci]
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user