| Index: net/quic/congestion_control/cube_root.cc
|
| diff --git a/net/quic/congestion_control/cube_root.cc b/net/quic/congestion_control/cube_root.cc
|
| index c563ad9cf5e2c916265f9903355306c0634ef9b8..1bca0c2dc95c78dc5d26c6e9d5a629a861f04f57 100644
|
| --- a/net/quic/congestion_control/cube_root.cc
|
| +++ b/net/quic/congestion_control/cube_root.cc
|
| @@ -46,12 +46,11 @@ int FindMostSignificantBit(uint64 x) {
|
|
|
| // 6 bits table [0..63]
|
| const uint32 cube_root_table[] = {
|
| - 0, 54, 54, 54, 118, 118, 118, 118, 123, 129, 134, 138, 143, 147, 151,
|
| - 156, 157, 161, 164, 168, 170, 173, 176, 179, 181, 185, 187, 190, 192, 194,
|
| - 197, 199, 200, 202, 204, 206, 209, 211, 213, 215, 217, 219, 221, 222, 224,
|
| - 225, 227, 229, 231, 232, 234, 236, 237, 239, 240, 242, 244, 245, 246, 248,
|
| - 250, 251, 252, 254
|
| -};
|
| + 0, 54, 54, 54, 118, 118, 118, 118, 123, 129, 134, 138, 143,
|
| + 147, 151, 156, 157, 161, 164, 168, 170, 173, 176, 179, 181, 185,
|
| + 187, 190, 192, 194, 197, 199, 200, 202, 204, 206, 209, 211, 213,
|
| + 215, 217, 219, 221, 222, 224, 225, 227, 229, 231, 232, 234, 236,
|
| + 237, 239, 240, 242, 244, 245, 246, 248, 250, 251, 252, 254};
|
| } // namespace
|
|
|
| namespace net {
|
| @@ -73,8 +72,8 @@ uint32 CubeRoot::Root(uint64 a) {
|
|
|
| // 4 to 6 bits accuracy depending on MSB.
|
| uint32 down_shifted_to_6bit = (a >> (cubic_shift * 3));
|
| - uint64 root = ((cube_root_table[down_shifted_to_6bit] + 10) << cubic_shift)
|
| - >> 6;
|
| + uint64 root =
|
| + ((cube_root_table[down_shifted_to_6bit] + 10) << cubic_shift) >> 6;
|
|
|
| // Make one Newton-Raphson iteration.
|
| // Since x has an error (inaccuracy due to the use of fix point) we get a
|
|
|