PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ gserialized_gist_cmp_full_2d()

static int gserialized_gist_cmp_full_2d ( Datum  a,
Datum  b,
SortSupport  ssup 
)
static

Definition at line 1386 of file gserialized_gist_2d.c.

1387{
1388 BOX2DF *b1 = (BOX2DF *)a;
1389 BOX2DF *b2 = (BOX2DF *)b;
1390 uint64_t hash1, hash2;
1391 int cmp;
1392
1393 cmp = memcmp(b1, b2, sizeof(BOX2DF));
1394 if (cmp == 0)
1395 return 0;
1396
1397 hash1 = box2df_get_sortable_hash(b1);
1398 hash2 = box2df_get_sortable_hash(b2);
1399 if (hash1 > hash2)
1400 return 1;
1401 else if (hash1 < hash2)
1402 return -1;
1403
1404 return cmp > 0 ? 1 : -1;
1405}
static uint64_t box2df_get_sortable_hash(const BOX2DF *b)

References box2df_get_sortable_hash().

Referenced by gserialized_gist_sortsupport_2d().

Here is the call graph for this function:
Here is the caller graph for this function: