PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ gserialized_gist_cmp_full_2d()

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

Definition at line 1365 of file gserialized_gist_2d.c.

1366 {
1367  BOX2DF *b1 = (BOX2DF *)a;
1368  BOX2DF *b2 = (BOX2DF *)b;
1369  uint64_t hash1, hash2;
1370  int cmp;
1371 
1372  cmp = memcmp(b1, b2, sizeof(BOX2DF));
1373  if (cmp == 0)
1374  return 0;
1375 
1376  hash1 = box2df_get_sortable_hash(b1);
1377  hash2 = box2df_get_sortable_hash(b2);
1378  if (hash1 > hash2)
1379  return 1;
1380  else if (hash1 < hash2)
1381  return -1;
1382 
1383  return cmp > 0 ? 1 : -1;
1384 }
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: