I want to be able to set or clear (multiple) bits uintX_t t.
iis the runtime variable ( uintX_t).
bis a runtime variable ( uintX_t) that is limited by 0or 1.
mask - constant compilation time.
Is there a better way:
i = b ? (i | mask) : (i & ~mask)
I want to avoid branching if possible. The goal is ARM, if that matters.
source
share