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

Class Log2

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

Source from the content-addressed store, hash-verified

425};
426
427struct Log2 {
428 template <typename T, typename Arg>
429 static enable_if_floating_value<Arg, T> Call(KernelContext*, Arg arg, Status*) {
430 static_assert(std::is_same<T, Arg>::value, "");
431 if (arg == 0.0) {
432 return -std::numeric_limits<T>::infinity();
433 } else if (arg < 0.0) {
434 return std::numeric_limits<T>::quiet_NaN();
435 }
436 return std::log2(arg);
437 }
438};
439
440struct Log2Checked {
441 template <typename T, typename Arg>

Callers 2

TYPED_TESTFunction · 0.70
SumArrayFunction · 0.70

Calls

no outgoing calls

Tested by 1

TYPED_TESTFunction · 0.56