// Sum returns the sum of the values in the sample.
197074
func (s *UniformSample) Sum() int64 {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	return SampleSum(s.values)
}
413575
func (a512srv *Avx512Server) Sum(uid uint64, p []byte) [32]byte {
	sumCh := make(chan [32]byte)
	a512srv.blocksCh <- blockInput{uid: uid, msg: p, final: true, sumCh: sumCh}
	return <-sumCh
}
1101933
func (s *Sum32) Sum(in []byte) []byte {
	v := s.Sum32()
	return append(in, byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
}
1042718
func Sum(out *[TagSize]byte, msg []byte, key *[16]byte) {
	(*[1]uint64)(unsafe.Pointer(&out[0]))[0] = Sum64(msg, key)
}
719138
func (m *MockMath) Sum(arg0, arg1 int) int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Sum", arg0, arg1)
	ret0, _ := ret[0].(int)
	return ret0
}
174975
func (d *digest) Sum(in []byte) []byte {
	// Make a copy of the original hash so that caller can keep writing and summing.
	dup := *d
	dup.finalize()
	return dup.squeeze(in, dup.outputSize)
}
315042
func (s *State232) Sum(b []byte) []byte {
	s.hash = Hash232(s.tail, s.seed)
	h := s.hash
	return append(b, byte(h>>24), byte(h>>16), byte(h>>8), byte(h))
}
1048969
func sum(h hash.Hash, data ...[]byte) []byte {
	h.Reset()
	for _, d := range data {
		// the Hash interface specifies that Write never returns an error
		_, _ = h.Write(d)
	}
	return h.Sum(nil)
}
931411
func (h *Hash) Sum(b []byte) []byte {
	b = h.hash.Sum(b)
	h.done = true
	return b
}
43217
func sumSquares(s metrics.Sample) float64 {
	count := float64(s.Count())
	sumSquared := math.Pow(count*s.Mean(), 2)
	sumSquares := math.Pow(count*s.StdDev(), 2) + sumSquared/count
	if math.IsNaN(sumSquares) {
		return 0.0
	}
	return sumSquares
}
1263142
func SumInt(s []int) (sum int) {
	for _, v := range s {
		sum += v
	}
	return
}
635158
func (c *ChecksumWriter) Sum() ChecksumInfo {
	c.sum.MD5 = fmt.Sprintf("%x", c.hashes[0].Sum(nil))
	c.sum.SHA1 = fmt.Sprintf("%x", c.hashes[1].Sum(nil))
	c.sum.SHA256 = fmt.Sprintf("%x", c.hashes[2].Sum(nil))

	return c.sum
}
249055
func (sizes Sizes) Sum() int64 {
	var sum int64
	for _, size := range sizes {
		sum += size
	}
	return sum
}
1171162
func Sum(msg []byte, hashsize int, conf *Config) ([]byte, error) {
	h, err := New(hashsize, conf)
	if err != nil {
		return nil, err
	}

	h.Write(msg)

	return h.Sum(nil), nil
}
171142
func Sum(h hash.Hash) HexDigest {
	return HexDigest(hex.EncodeToString(h.Sum(nil)))
}
422404
func Sum(msg []byte, hashsize int, conf *Config) []byte {
	s := New(hashsize, conf)
	s.Write(msg)
	return s.Sum(nil)
}
1045852
func (a *AggregateSample) Mean() float64 {
	if a.Count == 0 {
		return 0
	}
	return a.Sum / float64(a.Count)
}