CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
bits.h File Reference

Bit manipulation utilities. More...

#include <concepts>

Go to the source code of this file.

Functions

template<typename T>
ds::bits::isolate_least (T v)
 Isolate the least significant set bit.
template<typename T>
ds::bits::above_or_least (T v)
 Mask of all bits above and including the least significant set bit.
template<typename T>
ds::bits::above_least (T v)
 Mask of all bits above the least significant set bit.

Detailed Description

Bit manipulation utilities.

Definition in file bits.h.

Function Documentation

◆ above_least()

template<typename T>
T ds::bits::above_least ( T v)

Mask of all bits above the least significant set bit.

Definition at line 39 of file bits.h.

◆ above_or_least()

template<typename T>
T ds::bits::above_or_least ( T v)

Mask of all bits above and including the least significant set bit.

Definition at line 30 of file bits.h.

◆ isolate_least()

template<typename T>
T ds::bits::isolate_least ( T v)

Isolate the least significant set bit.

That is, clear all bits to the left of the first set bit.

Definition at line 21 of file bits.h.