PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ uint32_interleave_2()

static uint64_t uint32_interleave_2 ( uint32_t  u1,
uint32_t  u2 
)
static

Definition at line 228 of file g_serialized.c.

229 {
230  uint64_t x = u1;
231  uint64_t y = u2;
232  int i;
233 
234  static uint64_t B[5] =
235  {
236  0x5555555555555555ULL,
237  0x3333333333333333ULL,
238  0x0F0F0F0F0F0F0F0FULL,
239  0x00FF00FF00FF00FFULL,
240  0x0000FFFF0000FFFFULL
241  };
242  static uint64_t S[5] = { 1, 2, 4, 8, 16 };
243 
244  for ( i = 4; i >= 0; i-- )
245  {
246  x = (x | (x << S[i])) & B[i];
247  y = (y | (y << S[i])) & B[i];
248  }
249 
250  return x | (y << 1);
251 }

References pixval::x, and pixval::y.

Referenced by gbox_get_sortable_hash(), and gserialized_cmp().

Here is the caller graph for this function: