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

Function GenerateNumeric

cpp/src/arrow/compute/kernels/codegen_internal.h:1058–1085  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1056// GD for numeric types (integer and floating point)
1057template <template <typename...> class Generator, typename Type0, typename... Args>
1058auto GenerateNumeric(detail::GetTypeId get_id) {
1059 using KernelType = decltype(&Generator<Type0, Int8Type, Args...>::Exec);
1060 switch (get_id.id) {
1061 case Type::INT8:
1062 return Generator<Type0, Int8Type, Args...>::Exec;
1063 case Type::UINT8:
1064 return Generator<Type0, UInt8Type, Args...>::Exec;
1065 case Type::INT16:
1066 return Generator<Type0, Int16Type, Args...>::Exec;
1067 case Type::UINT16:
1068 return Generator<Type0, UInt16Type, Args...>::Exec;
1069 case Type::INT32:
1070 return Generator<Type0, Int32Type, Args...>::Exec;
1071 case Type::UINT32:
1072 return Generator<Type0, UInt32Type, Args...>::Exec;
1073 case Type::INT64:
1074 return Generator<Type0, Int64Type, Args...>::Exec;
1075 case Type::UINT64:
1076 return Generator<Type0, UInt64Type, Args...>::Exec;
1077 case Type::FLOAT:
1078 return Generator<Type0, FloatType, Args...>::Exec;
1079 case Type::DOUBLE:
1080 return Generator<Type0, DoubleType, Args...>::Exec;
1081 default:
1082 ARROW_DCHECK(false);
1083 return FailFunctor<KernelType>::Exec;
1084 }
1085}
1086
1087// Generate a kernel given a templated functor for floating point types
1088//

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected