Progress on 128-bit indices

This commit is contained in:
Erica Fischer
2024-03-29 21:55:25 -07:00
parent 054becc58f
commit 2abbcc7099
12 changed files with 91 additions and 67 deletions
+5 -5
View File
@@ -283,7 +283,7 @@ static void insert(struct mergelist *m, struct mergelist **head, unsigned char *
struct drop_state {
double gap;
unsigned long long previndex;
__uint128_t previndex;
double interval;
double seq; // floating point because interval is
};
@@ -822,7 +822,7 @@ void radix1(int *geomfds_in, int *indexfds_in, int inputs, int prefix, int split
for (size_t a = 0; a < indexst.st_size / sizeof(struct index); a++) {
struct index ix = indexmap[a];
unsigned long long which = (ix.ix << prefix) >> (64 - splitbits);
unsigned long long which = (ix.ix << prefix) >> (64 - splitbits); // XX 128
long long pos = sub_geompos[which];
fwrite_check(geommap + ix.start, ix.end - ix.start, 1, geomfiles[which], &sub_geompos[which], "geom");
@@ -2487,7 +2487,7 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
long long count;
long long fullcount;
double gap;
unsigned long long previndex;
__uint128_t previndex;
} tile[MAX_ZOOM + 1], max[MAX_ZOOM + 1];
{
@@ -2502,7 +2502,7 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
long long ip;
for (ip = 0; ip < indices; ip++) {
unsigned xx, yy;
unsigned long long xx, yy;
decode_index(map[ip].ix, &xx, &yy);
long long gxx = decoded_to_coordinate(xx);
@@ -2687,7 +2687,7 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
if (drop_denser > 0) {
std::vector<drop_densest> ddv;
unsigned long long previndex = 0;
__uint128_t previndex = 0;
for (long long ip = 0; ip < indices; ip++) {
if (map[ip].t == VT_POINT ||