PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ pack_float()

static float pack_float ( const float  value,
const int  realm 
)
static

Definition at line 1348 of file gserialized_gist_2d.c.

References gserialized_gist_penalty_2d(), PG_FUNCTION_INFO_V1(), and genraster::value.

Referenced by gserialized_gist_penalty_2d().

1349 {
1350  union {
1351  float f;
1352  struct { unsigned value:31, sign:1; } vbits;
1353  struct { unsigned value:29, realm:2, sign:1; } rbits;
1354  } a;
1355 
1356  a.f = value;
1357  a.rbits.value = a.vbits.value >> 2;
1358  a.rbits.realm = realm;
1359 
1360  return a.f;
1361 }
int value
Definition: genraster.py:61
Here is the call graph for this function:
Here is the caller graph for this function: