We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19c5425 commit 6e80584Copy full SHA for 6e80584
src/main/java/water/MRTask.java
@@ -10,13 +10,10 @@ public abstract class MRTask extends DRemoteTask {
10
11
public long memOverheadPerChunk(){return 0;}
12
13
- static final long log2(long x){
14
- long y = x >> 1;
15
- while(y > 0){
16
- x = y;
17
- y = x >> 1;
18
- }
19
- return x > 0?y+1:y;
+ static final long log2(long a){
+ long x = a, y = 0;
+ while((x = x >> 1) > 0)++y;
+ return (a > 1 << y)?y+1:y;
20
}
21
22
@Override public void init() {
0 commit comments