Bit shifting functions
Reference issue
What does this implement/fix?
Working on a feature that requires better bit shifting utilities. Rather than merging it all at once, I am splitting it up so its easier to review.
- Adds scalar bit shift operators to
numext:logical_shift_left,logical_shift_right,arithmetic_shift_right. Currently, these are limited to integer types, though I could lift that restriction since I usebit_castto force the arithmetic shift on unsigned types, and vice-versa with logical shift on signed. - Generalize the scalar implementation of
plogical_shift_leftand friends so they can be used in scalar code
Additional information
Edited by Charles Schlosser