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

Method hash

dlib/lz77_buffer/lz77_buffer_kernel_2.h:131–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 private:
130
131 inline unsigned long hash (
132 unsigned char a,
133 unsigned char b,
134 unsigned char c,
135 unsigned char d
136 ) const
137 /*!
138 ensures
139 - returns a hash of the 4 arguments and the hash is in the range
140 !*/
141 {
142 unsigned long B = b << 3;
143 unsigned long C = c << 6;
144 unsigned long D = d << 9;
145
146 unsigned long temp = a + B;
147 temp += C;
148 temp += D;
149
150 return (temp&mask); /**/
151 }
152
153 void shift_buffer (
154 unsigned long N

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected