MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / readFloat32At

Function readFloat32At

pj_scene3D/core/src/pointcloud_convert.cpp:19–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17using PJ::sdk::PointField;
18
19float readFloat32At(const uint8_t* data) {
20 const uint32_t bits = static_cast<uint32_t>(data[0]) | (static_cast<uint32_t>(data[1]) << 8) |
21 (static_cast<uint32_t>(data[2]) << 16) | (static_cast<uint32_t>(data[3]) << 24);
22 return std::bit_cast<float>(bits);
23}
24
25// Hot-path float read for the bounds scan. On a little-endian host (every PJ target) a memcpy
26// is a single (possibly unaligned) load the compiler vectorizes — ~10x cheaper than

Callers 4

readFloat32HostFunction · 0.85
readScalarAtFunction · 0.85
convertCanonicalFunction · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68