Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for gcd (0.15 sec)

  1. cmd/endpoint-ellipses.go

    // all the ellipses sizes.
    func getDivisibleSize(totalSizes []uint64) (result uint64) {
    	gcd := func(x, y uint64) uint64 {
    		for y != 0 {
    			x, y = y, x%y
    		}
    		return x
    	}
    	result = totalSizes[0]
    	for i := 1; i < len(totalSizes); i++ {
    		result = gcd(result, totalSizes[i])
    	}
    	return result
    }
    
    // isValidSetSize - checks whether given count is a valid set size for erasure coding.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 11 21:22:47 GMT 2024
    - 14.8K bytes
    - Viewed (0)
Back to top