PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ pack_float()

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

Definition at line 1293 of file gserialized_gist_2d.c.

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

Referenced by gserialized_gist_penalty_2d().

1294 {
1295  union {
1296  float f;
1297  struct { unsigned value:31, sign:1; } vbits;
1298  struct { unsigned value:29, realm:2, sign:1; } rbits;
1299  } a;
1300 
1301  a.f = value;
1302  a.rbits.value = a.vbits.value >> 2;
1303  a.rbits.realm = realm;
1304 
1305  return a.f;
1306 }
int value
Definition: genraster.py:61
Here is the call graph for this function:
Here is the caller graph for this function: