PostGIS  2.4.9dev-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.

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

Referenced by gbox_get_sortable_hash(), and gserialized_cmp().

229 {
230  uint64_t x = u1;
231  uint64_t y = u2;
232  int i;
233 
234  static uint64_t B[5] =
235  {
236  0x5555555555555555,
237  0x3333333333333333,
238  0x0F0F0F0F0F0F0F0F,
239  0x00FF00FF00FF00FF,
240  0x0000FFFF0000FFFF
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 }
Here is the caller graph for this function: