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

Function KernelDispatchImpl

cpp/src/arrow/util/bpacking_simd_kernel_internal.h:1057–1078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055// A ``std::enable_if`` that works on MSVC
1056template <typename KerTraits>
1057constexpr auto KernelDispatchImpl() {
1058 constexpr MediumKernelOptions kMedKernelOpts = {.unpacked_per_kernel_limit_ = 32};
1059 if constexpr (KerTraits::kShape.is_medium()) {
1060 if constexpr (kMediumShouldUseUint32<KerTraits>) {
1061 using Kernel32 =
1062 MediumKernel<KernelTraitsWithUnpackUint<KerTraits, uint32_t>, kMedKernelOpts>;
1063 return CastingKernel<KerTraits, Kernel32>{};
1064 } else {
1065 return MediumKernel<KerTraits, kMedKernelOpts>{};
1066 }
1067 } else if constexpr (KerTraits::kShape.is_large()) {
1068 if constexpr (kLargeShouldUseUint16<KerTraits>) {
1069 using Kernel16 =
1070 MediumKernel<KernelTraitsWithUnpackUint<KerTraits, uint16_t>, kMedKernelOpts>;
1071 return CastingKernel<KerTraits, Kernel16>{};
1072 } else {
1073 return LargeKernel<KerTraits>{};
1074 }
1075 } else if constexpr (KerTraits::kShape.is_oversized()) {
1076 return NoOpKernel<KerTraits>{};
1077 }
1078}
1079
1080template <typename Traits>
1081using KernelDispatch = decltype(KernelDispatchImpl<Traits>());

Callers

nothing calls this directly

Calls 3

is_mediumMethod · 0.80
is_largeMethod · 0.80
is_oversizedMethod · 0.80

Tested by

no test coverage detected