IntTryLog2
Description
Try to compute floor(log2(value)).
Returns
true on success, false when value is zero.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Int.c:281:
}
bool IntTryLog2(Int *value, u64 *out) {
if (!value || !out) {
LOG_ERROR("Invalid arguments");- In
Int.c:300:
u64 IntLog2WithError(Int *value, bool *error) {
u64 out = 0;
bool ok = IntTryLog2(value, &out);
if (error) {- In
Int.c:1406:
u64 max_degree = 0;
if (!IntTryLog2(value, &max_degree)) {
return false;
}
Last updated on