@@ -95,9 +95,13 @@ namespace native {
9595// sycl::native::tanh is only implemented on nvptx backend so far. For other
9696// backends we revert to the sycl::tanh impl.
9797template <typename T>
98- inline __SYCL_ALWAYS_INLINE std::enable_if_t <
99- sycl::detail::is_svgenfloatf_v<T> || sycl::detail::is_svgenfloath_v<T>, T>
100- tanh (T x) __NOEXC {
98+ inline __SYCL_ALWAYS_INLINE
99+ std::enable_if_t <std::is_same_v<T, float > || std::is_same_v<T, half> ||
100+ (detail::is_vec_v<T> &&
101+ (std::is_same_v<detail::element_type_t <T>, float > ||
102+ std::is_same_v<detail::element_type_t <T>, half>)),
103+ T>
104+ tanh (T x) __NOEXC {
101105#if defined(__NVPTX__)
102106 return sycl::detail::convertFromOpenCLTypeFor<T>(
103107 __clc_native_tanh (sycl::detail::convertToOpenCLType (x)));
@@ -144,7 +148,10 @@ inline __SYCL_ALWAYS_INLINE
144148// For other backends we revert to the sycl::exp2 impl.
145149template <typename T>
146150inline __SYCL_ALWAYS_INLINE
147- std::enable_if_t <sycl::detail::is_svgenfloath_v<T>, T>
151+ std::enable_if_t <std::is_same_v<T, half> ||
152+ (detail::is_vec_v<T> &&
153+ std::is_same_v<detail::element_type_t <T>, half>),
154+ T>
148155 exp2 (T x) __NOEXC {
149156#if defined(__NVPTX__)
150157 return sycl::detail::convertFromOpenCLTypeFor<T>(
0 commit comments