DPC++ Runtime
Runtime libraries for oneAPI DPC++
bfloat16.hpp File Reference
Include dependency graph for bfloat16.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sycl::_V1::ext::oneapi::bfloat16
 

Namespaces

 sycl
 ---— Error handling, matching OpenCL plugin semantics.
 
 sycl::_V1
 
 sycl::_V1::ext
 
 sycl::_V1::ext::oneapi
 
 sycl::_V1::ext::oneapi::detail
 

Macros

#define OP(op)
 
#define OP(op)
 
#define OP(type, op)
 

Typedefs

using sycl::_V1::ext::oneapi::detail::Bfloat16StorageT = uint16_t
 

Functions

__DPCPP_SYCL_EXTERNAL uint16_t __devicelib_ConvertFToBF16INTEL (const float &) noexcept
 
__DPCPP_SYCL_EXTERNAL float __devicelib_ConvertBF16ToFINTEL (const uint16_t &) noexcept
 
Bfloat16StorageT sycl::_V1::ext::oneapi::detail::bfloat16ToBits (const bfloat16 &Value)
 
bfloat16 sycl::_V1::ext::oneapi::detail::bitsToBfloat16 (const Bfloat16StorageT Value)
 

Macro Definition Documentation

◆ OP [1/3]

#define OP (   op)
Value:
friend bfloat16 &operator op(bfloat16 &lhs) { \
float f = to_float(lhs.value); \
lhs.value = from_float(op f); \
return lhs; \
} \
friend bfloat16 operator op(bfloat16 &lhs, int) { \
bfloat16 old = lhs; \
operator op(lhs); \
return old; \
}

Definition at line 174 of file bfloat16.hpp.

◆ OP [2/3]

#define OP (   op)
Value:
friend bfloat16 &operator op(bfloat16 &lhs, const bfloat16 &rhs) { \
float f = static_cast<float>(lhs); \
f op static_cast<float>(rhs); \
return lhs = f; \
} \
template <typename T> \
friend bfloat16 &operator op(bfloat16 &lhs, const T &rhs) { \
float f = static_cast<float>(lhs); \
f op static_cast<float>(rhs); \
return lhs = f; \
} \
template <typename T> friend T &operator op(T &lhs, const bfloat16 &rhs) { \
float f = static_cast<float>(lhs); \
f op static_cast<float>(rhs); \
return lhs = f; \
}

Definition at line 174 of file bfloat16.hpp.

◆ OP [3/3]

#define OP (   type,
  op 
)
Value:
friend type operator op(const bfloat16 &lhs, const bfloat16 &rhs) { \
return type{static_cast<float>(lhs) op static_cast<float>(rhs)}; \
} \
template <typename T> \
friend type operator op(const bfloat16 &lhs, const T &rhs) { \
return type{static_cast<float>(lhs) op static_cast<float>(rhs)}; \
} \
template <typename T> \
friend type operator op(const T &lhs, const bfloat16 &rhs) { \
return type{static_cast<float>(lhs) op static_cast<float>(rhs)}; \
}

Definition at line 174 of file bfloat16.hpp.

Function Documentation

◆ __devicelib_ConvertBF16ToFINTEL()

__DPCPP_SYCL_EXTERNAL float __devicelib_ConvertBF16ToFINTEL ( const uint16_t &  )
noexcept

◆ __devicelib_ConvertFToBF16INTEL()

__DPCPP_SYCL_EXTERNAL uint16_t __devicelib_ConvertFToBF16INTEL ( const float &  )
noexcept
T