MCPcopy Create free account
hub / github.com/davisking/dlib / hash

Method hash

dlib/lzp_buffer/lzp_buffer_kernel_1.h:75–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73 private:
74
75 inline unsigned long hash (
76 ) const
77 /*!
78 ensures
79 - returns a hash computed from the current context. This hash
80 is always in the range for table.
81 !*/
82 {
83 unsigned long temp = buffer[0];
84 temp <<= 16;
85 unsigned long temp2 = buffer[1];
86 temp2 <<= 8;
87 unsigned long temp3 = buffer[2];
88 temp = temp|temp2|temp3;
89
90 temp = ((temp>>11)^temp)&0xFFFF;
91
92 return temp;
93 }
94
95 sbuf buffer;
96 const unsigned long table_size;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected