1616
1717// ================================================================================
1818// this file has been auto-generated, do not modify its contents!
19- // date: 2025-07-17 14:58:12.821069
20- // git hash: cb04a8f36c97ea0e0ff0648316f82b6125214c83
19+ // date: 2025-08-12 09:36:07.217735
20+ // git hash: 15a92ee9e96aef3147fdcfc3dcb3bd4ce501d063
2121// ================================================================================
2222
2323#ifndef KERNEL_FLOAT_MACROS_H
@@ -340,6 +340,8 @@ struct is_implicit_convertible_impl {
340340 static constexpr bool value = false ;
341341};
342342
343+ // This has to be done using SFINAE since `promote_type<From, To>` might actually be undefined if `From` is not
344+ // implicitly convertible to `To`.
343345template <typename From, typename To>
344346struct is_implicit_convertible_impl <From, To, typename promote_type<From, To>::type> {
345347 static constexpr bool value = true ;
@@ -358,9 +360,6 @@ KERNEL_FLOAT_INLINE T& declval() {
358360}
359361} // namespace detail
360362
361- template <typename F, typename ... Args>
362- using result_t = decltype ((detail::declval<F>())(detail::declval<Args>()...));
363-
364363namespace detail {
365364template <bool , typename T>
366365struct enable_if_impl {};
@@ -834,9 +833,9 @@ using default_policy = accurate_policy;
834833
835834namespace detail {
836835
837- template <typename F, typename Output, typename ... Args>
836+ template <typename F, typename ... Args>
838837struct invoke_impl {
839- KERNEL_FLOAT_INLINE static Output call (F fun, Args... args) {
838+ KERNEL_FLOAT_INLINE static auto call (F fun, Args... args) {
840839 return fun (args...);
841840 }
842841};
@@ -856,7 +855,7 @@ struct apply_impl<accurate_policy, F, N, Output, Args...> {
856855 KERNEL_FLOAT_INLINE static void call (F fun, Output* output, const Args*... args) {
857856#pragma unroll
858857 for (size_t i = 0 ; i < N; i++) {
859- output[i] = invoke_impl<F, Output, Args...>::call (fun, args[i]...);
858+ output[i] = invoke_impl<F, Args...>::call (fun, args[i]...);
860859 }
861860 }
862861};
@@ -891,6 +890,10 @@ using default_map_impl = map_impl<default_policy, F, N, Output, Args...>;
891890
892891} // namespace detail
893892
893+ template <typename F, typename ... Args>
894+ using result_t = decltype (
895+ detail::invoke_impl<F, Args...>::call(detail::declval<F>(), detail::declval<Args>()...));
896+
894897template <typename F, typename ... Args>
895898using map_type =
896899 vector<result_t <F, vector_value_type<Args>...>, broadcast_vector_extent_type<Args...>>;
0 commit comments