Home / Function/ findNextPositivePowerOfTwo() — netty Function Reference

findNextPositivePowerOfTwo() — netty Function Reference

Architecture documentation for the findNextPositivePowerOfTwo() function in MathUtil.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  31bf06c7_7aeb_d997_7524_7d7b339c18a5["findNextPositivePowerOfTwo()"]
  5b445184_30a8_2bb4_c4a5_5d15a9e41b3e["MathUtil"]
  31bf06c7_7aeb_d997_7524_7d7b339c18a5 -->|defined in| 5b445184_30a8_2bb4_c4a5_5d15a9e41b3e
  62492001_6c05_14e4_4f1c_6a2393eb5d70["safeFindNextPositivePowerOfTwo()"]
  62492001_6c05_14e4_4f1c_6a2393eb5d70 -->|calls| 31bf06c7_7aeb_d997_7524_7d7b339c18a5
  style 31bf06c7_7aeb_d997_7524_7d7b339c18a5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/internal/MathUtil.java lines 34–37

    public static int findNextPositivePowerOfTwo(final int value) {
        assert value > Integer.MIN_VALUE && value < 0x40000000;
        return 1 << (32 - Integer.numberOfLeadingZeros(value - 1));
    }

Domain

Subdomains

Frequently Asked Questions

What does findNextPositivePowerOfTwo() do?
findNextPositivePowerOfTwo() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/MathUtil.java.
Where is findNextPositivePowerOfTwo() defined?
findNextPositivePowerOfTwo() is defined in common/src/main/java/io/netty/util/internal/MathUtil.java at line 34.
What calls findNextPositivePowerOfTwo()?
findNextPositivePowerOfTwo() is called by 1 function(s): safeFindNextPositivePowerOfTwo.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free