- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for getDivisibleSize (0.12 sec)
-
cmd/endpoint-ellipses.go
} // Supported set sizes this is used to find the optimal // single set size. var setSizes = []uint64{2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16} // getDivisibleSize - returns a greatest common divisor of // 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]
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 14.7K bytes - Viewed (0) -
cmd/endpoint-ellipses_test.go
{[]uint64{32, 8, 4}, 4}, {[]uint64{8, 8, 8}, 8}, {[]uint64{24}, 24}, } for _, testCase := range testCases { testCase := testCase t.Run("", func(t *testing.T) { gotGCD := getDivisibleSize(testCase.totalSizes) if testCase.result != gotGCD { t.Errorf("Expected %v, got %v", testCase.result, gotGCD) } }) } } // Test tests calculating set indexes with ENV override for drive count.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 15.2K bytes - Viewed (0)