MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DecodeFixed16

Function DecodeFixed16

tensorflow/core/lib/core/raw_coding.h:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27// without any bounds checking.
28
29inline uint16 DecodeFixed16(const char* ptr) {
30 if (port::kLittleEndian) {
31 // Load the raw bytes
32 uint16 result;
33 memcpy(&result, ptr, sizeof(result)); // gcc optimizes this to a plain load
34 return result;
35 } else {
36 return ((static_cast<uint16>(static_cast<unsigned char>(ptr[0]))) |
37 (static_cast<uint16>(static_cast<unsigned char>(ptr[1])) << 8));
38 }
39}
40
41inline uint32 DecodeFixed32(const char* ptr) {
42 if (port::kLittleEndian) {

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68