#pragma once #include #include #include #include #include #include namespace DB { template concept has_find_extreme_implementation = (is_any_of); template std::optional findExtremeMin(const T * __restrict ptr, size_t start, size_t end); template std::optional findExtremeMinNotNull(const T * __restrict ptr, const UInt8 * __restrict condition_map, size_t start, size_t end); template std::optional findExtremeMinIf(const T * __restrict ptr, const UInt8 * __restrict condition_map, size_t start, size_t end); template std::optional findExtremeMax(const T * __restrict ptr, size_t start, size_t end); template std::optional findExtremeMaxNotNull(const T * __restrict ptr, const UInt8 * __restrict condition_map, size_t start, size_t end); template std::optional findExtremeMaxIf(const T * __restrict ptr, const UInt8 * __restrict condition_map, size_t start, size_t end); template std::optional findExtremeMinIndex(const T * __restrict ptr, size_t start, size_t end); template std::optional findExtremeMaxIndex(const T * __restrict ptr, size_t start, size_t end); #define EXTERN_INSTANTIATION(T) \ extern template std::optional findExtremeMin(const T * __restrict ptr, size_t start, size_t end); \ extern template std::optional findExtremeMinNotNull( \ const T * __restrict ptr, const UInt8 * __restrict condition_map, size_t start, size_t end); \ extern template std::optional findExtremeMinIf( \ const T * __restrict ptr, const UInt8 * __restrict condition_map, size_t start, size_t end); \ extern template std::optional findExtremeMax(const T * __restrict ptr, size_t start, size_t end); \ extern template std::optional findExtremeMaxNotNull( \ const T * __restrict ptr, const UInt8 * __restrict condition_map, size_t start, size_t end); \ extern template std::optional findExtremeMaxIf( \ const T * __restrict ptr, const UInt8 * __restrict condition_map, size_t start, size_t end); \ extern template std::optional findExtremeMinIndex(const T * __restrict ptr, size_t start, size_t end); \ extern template std::optional findExtremeMaxIndex(const T * __restrict ptr, size_t start, size_t end); FOR_BASIC_NUMERIC_TYPES(EXTERN_INSTANTIATION) #undef EXTERN_INSTANTIATION }