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

Class Log2

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

Source from the content-addressed store, hash-verified

433};
434
435struct Log2 {
436 template <typename T, typename Arg>
437 static enable_if_floating_value<Arg, T> Call(KernelContext*, Arg arg, Status*) {
438 static_assert(std::is_same<T, Arg>::value, "");
439 if (arg == 0.0) {
440 return -std::numeric_limits<T>::infinity();
441 } else if (arg < 0.0) {
442 return std::numeric_limits<T>::quiet_NaN();
443 }
444 return std::log2(arg);
445 }
446};
447
448struct Log2Checked {
449 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