12 namespace ext::oneapi {
17 static constexpr
int value =
false;
21 static constexpr
int value =
true;
25 static constexpr
int value =
true;
29 static constexpr
int value =
true;
33 static constexpr
int value =
true;
39 std::enable_if_t<detail::is_bf16_storage_type<T>::value, T>
fabs(T x) {
40 #ifdef __SYCL_DEVICE_ONLY__
44 throw runtime_error(
"bf16 is not supported on host device.",
45 PI_ERROR_INVALID_DEVICE);
49 std::enable_if_t<detail::is_bf16_storage_type<T>::value, T>
fmin(T x, T y) {
50 #ifdef __SYCL_DEVICE_ONLY__
51 return __clc_fmin(x, y);
55 throw runtime_error(
"bf16 is not supported on host device.",
56 PI_ERROR_INVALID_DEVICE);
60 std::enable_if_t<detail::is_bf16_storage_type<T>::value, T>
fmax(T x, T y) {
61 #ifdef __SYCL_DEVICE_ONLY__
62 return __clc_fmax(x, y);
66 throw runtime_error(
"bf16 is not supported on host device.",
67 PI_ERROR_INVALID_DEVICE);
71 std::enable_if_t<detail::is_bf16_storage_type<T>::value, T>
fma(T x, T y, T z) {
72 #ifdef __SYCL_DEVICE_ONLY__
73 return __clc_fma(x, y, z);
78 throw runtime_error(
"bf16 is not supported on host device.",
79 PI_ERROR_INVALID_DEVICE);
Provides a cross-patform vector class template that works efficiently on SYCL devices as well as in h...
#define __SYCL_INLINE_VER_NAMESPACE(X)
std::enable_if_t< detail::is_bf16_storage_type< T >::value, T > fma(T x, T y, T z)
std::enable_if_t< detail::is_bf16_storage_type< T >::value, T > fmax(T x, T y)
std::enable_if_t< detail::is_bf16_storage_type< T >::value, T > fmin(T x, T y)
std::enable_if_t< detail::is_bf16_storage_type< T >::value, T > fabs(T x)
---— Error handling, matching OpenCL plugin semantics.