MCPcopy Create free account
hub / github.com/apache/impala / DecodeFixed32

Function DecodeFixed32

be/src/kudu/util/coding.h:67–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65// without any bounds checking.
66
67inline uint32_t DecodeFixed32(const uint8_t *ptr) {
68#if __BYTE_ORDER == __LITTLE_ENDIAN
69 // Load the raw bytes
70 uint32_t result;
71 memcpy(&result, ptr, sizeof(result)); // gcc optimizes this to a plain load
72 return result;
73#else
74 return ((static_cast<uint32_t>(static_cast<unsigned char>(ptr[0])))
75 | (static_cast<uint32_t>(static_cast<unsigned char>(ptr[1])) << 8)
76 | (static_cast<uint32_t>(static_cast<unsigned char>(ptr[2])) << 16)
77 | (static_cast<uint32_t>(static_cast<unsigned char>(ptr[3])) << 24));
78#endif
79}
80
81inline uint64_t DecodeFixed64(const uint8_t *ptr) {
82#if __BYTE_ORDER == __LITTLE_ENDIAN

Callers 6

DecodeFixed64Function · 0.85
ParseAndCompareChecksumFunction · 0.85
ReadPBStartingAtFunction · 0.85
ParsePBFileHeaderFunction · 0.85
DecodeIntFunction · 0.85
DecodeIntFunction · 0.85

Calls

no outgoing calls

Tested by 2

DecodeIntFunction · 0.68
DecodeIntFunction · 0.68