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  cl::sycl::ext::oneapi::experimental::bfloat16
 

Namespaces

 cl
 We provide new interfaces for matrix muliply in this patch:
 
 cl::sycl
 
 cl::sycl::ext
 
 cl::sycl::ext::oneapi
 
 cl::sycl::ext::oneapi::experimental
 

Macros

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

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 140 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 140 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 140 of file bfloat16.hpp.

T