Fixed segmentation fault with index creation when lists > 6500 - fixes #42

This commit is contained in:
Andrew Kane
2022-10-30 11:14:58 -07:00
parent 379a76098e
commit b3cad93f3a
2 changed files with 7 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
## 0.3.1 (unreleased)
- Fixed segmentation fault with index creation when lists > 6500
## 0.3.0 (2022-10-15) ## 0.3.0 (2022-10-15)
- Added support for Postgres 15 - Added support for Postgres 15

View File

@@ -26,7 +26,7 @@ InitCenters(Relation index, VectorArray samples, VectorArray centers, float *low
FmgrInfo *procinfo; FmgrInfo *procinfo;
Oid collation; Oid collation;
int i; int i;
int j; int64 j;
double distance; double distance;
double sum; double sum;
double choice; double choice;
@@ -182,8 +182,8 @@ ElkanKmeans(Relation index, VectorArray samples, VectorArray centers)
Vector *vec; Vector *vec;
Vector *newCenter; Vector *newCenter;
int iteration; int iteration;
int j; int64 j;
int k; int64 k;
int dimensions = centers->dim; int dimensions = centers->dim;
int numCenters = centers->maxlen; int numCenters = centers->maxlen;
int numSamples = samples->length; int numSamples = samples->length;