Skip to content

Commit

Permalink
change literals from float 1.0f to half 1.0h
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug authored and alycm committed Jun 30, 2020
1 parent 913ec7f commit 7733ca5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/cl_khr_fp16.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1827,12 +1827,12 @@ These conversions are performed as follows:
`CL_SNORM_INT8` (8-bit signed integer) {rightarrow} `half`

[none]
* normalized `half` value = `max(-1.0f, round_to_half(c / 127))`
* normalized `half` value = `max(-1.0h, round_to_half(c / 127))`

`CL_SNORM_INT16` (16-bit signed integer) {rightarrow} `half`

[none]
* normalized `half` value = `max(-1.0f, round_to_half(c / 32767))`
* normalized `half` value = `max(-1.0h, round_to_half(c / 32767))`

The accuracy of the above conversions must be \<= 1.5 ulp except for the
following cases.
Expand All @@ -1858,7 +1858,7 @@ For `CL_UNORM_INT16`
For `CL_SNORM_INT8`

[none]
* -128 and -127 must convert to `-1.0j`,
* -128 and -127 must convert to `-1.0h`,
* 0 must convert to `0.0h` and
* 127 must convert to `1.0h`

Expand Down

0 comments on commit 7733ca5

Please sign in to comment.