16
16
17
17
// ================================================================================
18
18
// 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
21
21
// ================================================================================
22
22
23
23
#ifndef KERNEL_FLOAT_MACROS_H
@@ -340,6 +340,8 @@ struct is_implicit_convertible_impl {
340
340
static constexpr bool value = false ;
341
341
};
342
342
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`.
343
345
template <typename From, typename To>
344
346
struct is_implicit_convertible_impl <From, To, typename promote_type<From, To>::type> {
345
347
static constexpr bool value = true ;
@@ -358,9 +360,6 @@ KERNEL_FLOAT_INLINE T& declval() {
358
360
}
359
361
} // namespace detail
360
362
361
- template <typename F, typename ... Args>
362
- using result_t = decltype ((detail::declval<F>())(detail::declval<Args>()...));
363
-
364
363
namespace detail {
365
364
template <bool , typename T>
366
365
struct enable_if_impl {};
@@ -834,9 +833,9 @@ using default_policy = accurate_policy;
834
833
835
834
namespace detail {
836
835
837
- template <typename F, typename Output, typename ... Args>
836
+ template <typename F, typename ... Args>
838
837
struct invoke_impl {
839
- KERNEL_FLOAT_INLINE static Output call (F fun, Args... args) {
838
+ KERNEL_FLOAT_INLINE static auto call (F fun, Args... args) {
840
839
return fun (args...);
841
840
}
842
841
};
@@ -856,7 +855,7 @@ struct apply_impl<accurate_policy, F, N, Output, Args...> {
856
855
KERNEL_FLOAT_INLINE static void call (F fun, Output* output, const Args*... args) {
857
856
#pragma unroll
858
857
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]...);
860
859
}
861
860
}
862
861
};
@@ -891,6 +890,10 @@ using default_map_impl = map_impl<default_policy, F, N, Output, Args...>;
891
890
892
891
} // namespace detail
893
892
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
+
894
897
template <typename F, typename ... Args>
895
898
using map_type =
896
899
vector<result_t <F, vector_value_type<Args>...>, broadcast_vector_extent_type<Args...>>;
0 commit comments