Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for SaturatingAdd (0.1 sec)

  1. src/internal/coverage/cmerge/merge.go

    		for i := 0; i < len(src); i++ {
    			dst[i] = m.SaturatingAdd(dst[i], src[i])
    		}
    	}
    	ovf := m.overflow
    	m.overflow = false
    	return nil, ovf
    }
    
    // Saturating add does a saturating addition of 'dst' and 'src',
    // returning added value or math.MaxUint32 if there is an overflow.
    // Overflows are recorded in case the client needs to track them.
    func (m *Merger) SaturatingAdd(dst, src uint32) uint32 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 12 23:26:34 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  2. src/internal/coverage/cformat/format.go

    	pcount := fm.p.unitTable[ukey]
    	var result uint32
    	if fm.cm == coverage.CtrModeSet {
    		if count != 0 || pcount != 0 {
    			result = 1
    		}
    	} else {
    		// Use saturating arithmetic.
    		result, _ = cmerge.SaturatingAdd(pcount, count)
    	}
    	fm.p.unitTable[ukey] = result
    }
    
    // sortUnits sorts a slice of extcu objects in a package according to
    // source position information (e.g. file and line). Note that we don't
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.7K bytes
    - Viewed (0)
Back to top