Template Function Rose::BitOps::shiftLeftLsb#
Defined in File BitOps.h
Function Documentation#
-
template<typename Unsigned>
inline Unsigned Rose::BitOps::shiftLeftLsb(Unsigned src, size_t w, size_t n, bool b = false)# Left shift part of a value without affecting the rest.
The value
srchas its low-orderwbits shiftednplaces toward higher order. The
highest bits are discarded and the
nnew lower order bits are either set or cleared depending on the value ofb. Ifnis greater than or equal towthen all affected bits are set or cleared, depending onb. The bits not in the affected range are not affected and are returned.