MCPcopy Create free account
hub / github.com/apache/arrow / Call

Method Call

cpp/src/arrow/compute/kernels/scalar_arithmetic.cc:95–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93struct ShiftLeft {
94 template <typename T, typename Arg0, typename Arg1>
95 static T Call(KernelContext*, Arg0 lhs, Arg1 rhs, Status*) {
96 using Unsigned = typename std::make_unsigned<Arg0>::type;
97 static_assert(std::is_same<T, Arg0>::value, "");
98 if (ARROW_PREDICT_FALSE(rhs < 0 || rhs >= std::numeric_limits<Arg0>::digits)) {
99 return lhs;
100 }
101 return static_cast<T>(static_cast<Unsigned>(lhs) << static_cast<Unsigned>(rhs));
102 }
103};
104
105// See SEI CERT C Coding Standard rule INT34-C

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected