| 151 | struct ShiftRightChecked { |
| 152 | template <typename T, typename Arg0, typename Arg1> |
| 153 | static T Call(KernelContext*, Arg0 lhs, Arg1 rhs, Status* st) { |
| 154 | static_assert(std::is_same<T, Arg0>::value, ""); |
| 155 | if (ARROW_PREDICT_FALSE(rhs < 0 || rhs >= std::numeric_limits<Arg0>::digits)) { |
| 156 | *st = Status::Invalid("shift amount must be >= 0 and less than precision of type"); |
| 157 | return lhs; |
| 158 | } |
| 159 | return lhs >> rhs; |
| 160 | } |
| 161 | }; |
| 162 | |
| 163 | struct Sin { |