PostGIS  3.4.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 1346 of file gserialized_gist_2d.c.

1347 {
1348  BOX2DF *b1 = (BOX2DF *)a;
1349  BOX2DF *b2 = (BOX2DF *)b;
1350  uint64_t hash1, hash2;
1351  int cmp;
1352 
1353  cmp = memcmp(b1, b2, sizeof(BOX2DF));
1354  if (cmp == 0)
1355  return 0;
1356 
1357  hash1 = box2df_get_sortable_hash(b1);
1358  hash2 = box2df_get_sortable_hash(b2);
1359  if (hash1 > hash2)
1360  return 1;
1361  else if (hash1 < hash2)
1362  return -1;
1363 
1364  return cmp > 0 ? 1 : -1;
1365 }
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: