Skip to content

DPC++ daily 2022-05-09

Pre-release
Pre-release
Compare
Choose a tag to compare
@bb-sycl bb-sycl released this 09 May 20:47
· 139987 commits to sycl since this release
059efbc
[SYCL] Add half non-assign math operators (#6061)

This PR adds missing half operations +-*/.

There are existing operations for the legacy class host_half_impl, however these were not extended to the half class. These operations were being performed as floating point operations via the implicit floating conversion. This results in the output being a float not half type.

The template is limited to arithmetic types to prevent ambiguous templating.
A minor change to built-in __fract is needed to ensure fmin is not ambiguous.

llvm-test-suite PR: intel/llvm-test-suite#1012
Fixes: #6028