PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ pack_float()

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

Definition at line 1323 of file gserialized_gist_nd.c.

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

Referenced by gserialized_gist_penalty().

1324 {
1325  union {
1326  float f;
1327  struct { unsigned value:31, sign:1; } vbits;
1328  struct { unsigned value:29, realm:2, sign:1; } rbits;
1329  } a;
1330 
1331  a.f = value;
1332  a.rbits.value = a.vbits.value >> 2;
1333  a.rbits.realm = realm;
1334 
1335  return a.f;
1336 }
int value
Definition: genraster.py:61
Here is the call graph for this function:
Here is the caller graph for this function: