MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / nextpow2

Function nextpow2

src/backend/common/dispatch.cpp:12–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include "dispatch.hpp"
11
12unsigned nextpow2(unsigned x) {
13 x = x - 1U;
14 x = x | (x >> 1U);
15 x = x | (x >> 2U);
16 x = x | (x >> 4U);
17 x = x | (x >> 8U);
18 x = x | (x >> 16U);
19 return x + 1U;
20}

Callers 15

calcPackedSizeFunction · 0.85
unwrapFunction · 0.85
reduce_first_defaultFunction · 0.85
mean_dimFunction · 0.85
mean_firstFunction · 0.85
mean_all_weightedFunction · 0.85
mean_allFunction · 0.85
scan_dimFunction · 0.85
whereFunction · 0.85
scan_firstFunction · 0.85
reduce_dim_defaultFunction · 0.85
ireduce_dimFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected