MCPcopy Create free account
hub / github.com/antlr/codebuff / ceilToPowerOfTwo

Method ceilToPowerOfTwo

output/java_guava/1.4.19/Striped.java:492–494  ·  view source on GitHub ↗
(int x)

Source from the content-addressed store, hash-verified

490
491 private static final int ALL_SET = ~0;
492 private static int ceilToPowerOfTwo(int x) {
493 return 1 << IntMath.log2(x, RoundingMode.CEILING);
494 }
495
496 /*
497 * This method was written by Doug Lea with assistance from members of JCP JSR-166 Expert Group

Callers 1

PowerOfTwoStripedMethod · 0.45

Calls 1

log2Method · 0.95

Tested by

no test coverage detected