Home | History | Annotate | Download | only in src

Lines Matching refs:window_size

92 // window_size must be >= 2.
93 template<int window_size>
117 // Compute a hash of the window "ptr[0, window_size - 1]".
120 for (int i = 2; i < window_size; ++i) {
128 // UpdateHash takes the hash value of buffer[0] ... buffer[window_size -1]
130 // and the value of buffer[window_size] (the "new_last_byte" argument).
131 // It quickly computes the hash value of buffer[1] ... buffer[window_size]
135 // (which runs in time independent of window_size) instead of Hash().
136 // Each time window_size doubles, the time to execute Hash() also doubles,
147 // Given a full hash value for buffer[0] ... buffer[window_size -1], plus the
149 // value for buffer[1] ... buffer[window_size -1]. See the comments in
159 // (- b * pow(kMult, window_size - 1)) % kBase
163 // For each window_size, fill a 256-entry table such that
164 // the hash value of buffer[0] ... buffer[window_size - 1]
166 // == the hash value of buffer[1] ... buffer[window_size - 1]
169 template<int window_size>
170 const uint32_t* RollingHash<window_size>::remove_table_ = NULL;
175 // the same window_size.
177 template<int window_size>
178 bool RollingHash<window_size>::Init() {
179 if (window_size < 2) {
180 LOG(ERROR) << "RollingHash window size " << window_size
197 // pow(kMult, (window_size - 1)) % kBase,
200 for (int i = 0; i < window_size - 1; ++i) {
206 // (- (removed_byte * pow(kMult, (window_size - 1)))) % kBase
210 // buffer[0] ... buffer[window_size - 1]
213 // buffer[1] ... buffer[window_size - 1]
216 // The following byte at buffer[window_size] can then be merged with this
219 // buffer[1] ... buffer[window_size]