Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::Math::internal Namespace Reference

Functions

template<typename T , int size>
std::enable_if< size==1, T >::type nextPower2 (T x)
 
template<typename T , int size>
std::enable_if< size!=1, T >::type nextPower2 (T x)
 Efficiently computes the next power of 2 without branching. See "Hacker's Delight" 2nd Edition, by Henry S. Warren, Fig. 3.3.
 

Function Documentation

◆ nextPower2() [1/2]

template<typename T , int size>
std::enable_if< size==1, T >::type ogdf::Math::internal::nextPower2 ( x)
inline

Definition at line 44 of file Math.h.

◆ nextPower2() [2/2]

template<typename T , int size>
std::enable_if< size!=1, T >::type ogdf::Math::internal::nextPower2 ( x)
inline

Efficiently computes the next power of 2 without branching. See "Hacker's Delight" 2nd Edition, by Henry S. Warren, Fig. 3.3.

Definition at line 51 of file Math.h.