// Reset resets the count of all buckets.
1517
func (w *window) Reset() {
	w.bucketLock.Lock()

	w.buckets.Do(func(x interface{}) {
		x.(*bucket).Reset()
	})
	w.bucketLock.Unlock()
}
941266
func (c *CountMinSketch) Reset() *CountMinSketch {
	matrix := make([][]uint64, c.depth)
	for i := uint(0); i < c.depth; i++ {
		matrix[i] = make([]uint64, c.width)
	}

	c.matrix = matrix
	c.count = 0
	return c
}
1176704
func (c *BigCache) Reset() error {
	for _, shard := range c.shards {
		shard.reset(c.config)
	}
	return nil
}
951833
func (l *L) Reset() *L {
	l.line, l.value = make(chan struct{}), 0
	return l
}
365272
func (d *RabinKarp64) Reset() {
	d.tables = nil
	d.value = 0
	d.window = d.window[:0]
	d.oldest = 0
	d.updateTables()
}
1263729
func (s *Storage) Reset() {
	setLevelDB(storage.TotalCountKey, 0)
	setLevelDB(storage.IosSuccessKey, 0)
	setLevelDB(storage.IosErrorKey, 0)
	setLevelDB(storage.AndroidSuccessKey, 0)
	setLevelDB(storage.AndroidErrorKey, 0)
}
29176
func (r *SimulationRep) Reset() error {
	r.lock.Lock()
	defer r.lock.Unlock()

	r.lrps = map[string]rep.LRP{}
	r.tasks = map[string]rep.Task{}
	r.startingContainerCount = 0
	return nil
}
1174057
func (out *RAMOutputStream) Reset() {
	out.currentBuffer = nil
	out.currentBufferIndex = -1
	out.bufferPosition = 0
	out.bufferStart = 0
	out.bufferLength = 0
	out.file.SetLength(0)
	if out.crc != nil {
		out.crc.Reset()
	}
}
462392
func (pool *IntBlockPool) Reset(zeroFillBuffers, reuseFirst bool) {
	if pool.bufferUpto != -1 {
		// We allocated at least one buffer
		if zeroFillBuffers {
			panic("not implemented yet")
		}

		if pool.bufferUpto > 0 || !reuseFirst {
			offset := 0
			if reuseFirst {
				offset = 1
			}
			// Recycle all but the first buffer
			pool.allocator.Recycle(pool.Buffers[offset : 1+pool.bufferUpto])
			for i := offset; i <= pool.bufferUpto; i++ {
				pool.Buffers[i] = nil
			}
		}
		if reuseFirst {
			panic("not implemented yet")
		} else {
			pool.bufferUpto = -1
			pool.IntUpto = INT_BLOCK_SIZE
			pool.IntOffset = -INT_BLOCK_SIZE
			pool.Buffer = nil
		}
	}
}
343261
func (t *Mutable) Reset() {
	t.count = 0
	t.totalSize = 0
	t.root = nil
}
1115085
func (it *Count) Reset() {
	it.done = false
	it.result = nil
	it.it.Reset()
}
1161631
func (bpr *bpRequester) reset() {
	bpr.mtx.Lock()
	defer bpr.mtx.Unlock()

	if bpr.block != nil {
		atomic.AddInt32(&bpr.pool.numPending, 1)
	}

	bpr.peerID = ""
	bpr.block = nil
}
311815
func (z *Writer) Reset(w io.Writer) {
	z.init(w, z.level)
}
875076
func (b *BloomTrieIndexerBackend) Reset(ctx context.Context, section uint64, lastSectionHead common.Hash) error {
	var root common.Hash
	if section > 0 {
		root = GetBloomTrieRoot(b.diskdb, section-1, lastSectionHead)
	}
	var err error
	b.trie, err = trie.New(root, b.triedb)
	if err != nil && b.odr != nil {
		err = b.fetchMissingNodes(ctx, section, root)
		if err == nil {
			b.trie, err = trie.New(root, b.triedb)
		}
	}
	b.section = section
	return err
}
41298
func (b *Batch) Reset() {
	b.data = b.data[:0]
	b.index = b.index[:0]
	b.internalLen = 0
}
1145542
func (p *partition) reset() {
	p.mu.RLock()
	sz := len(p.store)
	p.mu.RUnlock()

	newStore := make(map[string]*entry, sz)
	p.mu.Lock()
	p.store = newStore
	p.mu.Unlock()
}
871362
func (m *Map) Reset() {
	for hash, entry := range m.lookup {
		m.removeMapKey(hash, entry.key)
	}
}