| 1055 | // A ``std::enable_if`` that works on MSVC |
| 1056 | template <typename KerTraits> |
| 1057 | constexpr 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 | |
| 1080 | template <typename Traits> |
| 1081 | using KernelDispatch = decltype(KernelDispatchImpl<Traits>()); |
nothing calls this directly
no test coverage detected