Skip to content

[SYCL][Doc] Add isnan to bfloat16 math doc #7958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ specification.

== Overview

This extension adds `bfloat16` support to the `fma`, `fmin`, `fmax` and
`fabs` SYCL floating point math functions. These functions can be used as
This extension adds `bfloat16` support to the `fma`, `fmin`, `fmax`, `fabs`
and `isnan` SYCL floating point math functions. These functions can be used as
element wise operations on matrices, supplementing the `bfloat16` support
in the sycl_ext_oneapi_matrix extension.

The descriptions of the `fma`, `fmin`, `fmax` and `fabs` SYCL floating point
math functions can be found in the SYCL specification:
The descriptions of the `fma`, `fmin`, `fmax`, `fabs` and `isnan` SYCL floating
point math functions can be found in the SYCL specification:
https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_math_functions.

== Specification
Expand Down Expand Up @@ -104,6 +104,22 @@ The following functions are only available when `T` is `bfloat16` or
`sycl::marray<bfloat16, {N}>`, where `{N}` means any positive value of
`size_t` type.

==== isnan

```c++
namespace sycl::ext::oneapi::experimental {

bool isnan(bfloat16 x);

template <size_t N>
sycl::marray<bool, N> isnan(sycl::marray<bfloat16, N> x);
} // namespace sycl::ext::oneapi::experimental
```

===== Description

Returns true if x is NAN value, otherwise returns false.

==== fma

```c++
Expand Down