MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / bit_ceil

Function bit_ceil

external/dfdutils/interpretdfd.c:20–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18#include "dfd.h"
19
20static uint32_t bit_ceil(uint32_t x) {
21 x -= 1;
22 for (uint32_t i = 0; i < sizeof(x) * 8; ++i)
23 if (1u << i > x)
24 return 1u << i;
25 return 0;
26}
27
28/**
29 * @~English

Callers 1

interpretDFDFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected