mirror of
https://github.com/vllm-project/vllm.git
synced 2026-08-13 01:08:14 +00:00
Co-authored-by: Faraz Shahsavan <[email protected]> Co-authored-by: ilmarkov <[email protected]> Co-authored-by: Rahul Tuli <[email protected]> Co-authored-by: [email protected] <[email protected]>
7 lines
183 B
C++
7 lines
183 B
C++
#include <climits>
|
|
#include <iostream>
|
|
|
|
inline uint32_t next_pow_2(uint32_t const num) {
|
|
if (num <= 1) return num;
|
|
return 1 << (CHAR_BIT * sizeof(num) - __builtin_clz(num - 1));
|
|
} |