Template Function Rose::BitOps::select

Template Function Rose::BitOps::select#

Function Documentation#

template<typename Unsigned>
inline Unsigned Rose::BitOps::select(Unsigned cond, Unsigned a, Unsigned b)#

Combine two values based on a bit mask.

The return value has bits from a and b depending on the mask cond. If the mask bit i is set, then the return value bit i comes from a, otherwise it comes from b.