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

Function Mask

tensorflow/core/lib/hash/crc32c.h:50–53  ·  view source on GitHub ↗

Return a masked representation of crc. Motivation: it is problematic to compute the CRC of a string that contains embedded CRCs. Therefore we recommend that CRCs stored somewhere (e.g., in files) should be masked before being stored.

Source from the content-addressed store, hash-verified

48// contains embedded CRCs. Therefore we recommend that CRCs stored
49// somewhere (e.g., in files) should be masked before being stored.
50inline uint32 Mask(uint32 crc) {
51 // Rotate right by 15 bits and add a constant.
52 return ((crc >> 15) | (crc << 17)) + kMaskDelta;
53}
54
55// Return the crc whose masked representation is masked_crc.
56inline uint32 Unmask(uint32 masked_crc) {

Callers 12

getMethod · 0.85
setMethod · 0.85
clearMethod · 0.85
WriteRawBlockMethod · 0.85
FixChecksumMethod · 0.85
MaskedCrcMethod · 0.85
TESTFunction · 0.85
WriteStringTensorFunction · 0.85
WriteVariantTensorFunction · 0.85
AddMethod · 0.85
AddCompeleteDataMethod · 0.85
EndSegmentDataMethod · 0.85

Calls

no outgoing calls

Tested by 2

FixChecksumMethod · 0.68
TESTFunction · 0.68