|
10 | 10 | :encoding: utf-8
|
11 | 11 | :lang: en
|
12 | 12 | :dpcpp: pass:[DPC++]
|
| 13 | +:endnote: —{nbsp}end{nbsp}note |
13 | 14 |
|
14 | 15 | // Set the default source code type in this document to C++,
|
15 | 16 | // for syntax highlighting purposes. This is needed because
|
@@ -101,8 +102,8 @@ available only in host code as noted below.
|
101 | 102 | The complex type is trivially copyable and type trait `is_device_copyable`
|
102 | 103 | should resolve to `std::true_type`.
|
103 | 104 |
|
104 |
| -The `T` template parameter must be one of the types float, double, or |
105 |
| -sycl::half. |
| 105 | +_Constraints_: The `T` template parameter must be one of the types `float`, |
| 106 | +`double`, or `sycl::half`. |
106 | 107 |
|
107 | 108 | Note: When performing operations between complex numbers and decimals,
|
108 | 109 | the decimal is treated as a complex number with a real component equal to
|
@@ -335,6 +336,13 @@ Additionally, this extension introduces support for the `real` and `imag` free
|
335 | 336 | functions, which returns the real and imaginary component of a number,
|
336 | 337 | respectively.
|
337 | 338 |
|
| 339 | +[_Note:_ The overloads of the functions `real(T)` and `imag(T)` match the |
| 340 | +behavior in ISO C++ where `T` would be treated as a complex number with a zero |
| 341 | +imaginary component. This is subject to the constraint that `T` must be one of |
| 342 | +the types `float`, `double`, `sycl::half`, or evaluate to `true` for |
| 343 | +`std::is_integral`. |
| 344 | +_{endnote}_] |
| 345 | + |
338 | 346 | These functions are available in both host and device code, and each math
|
339 | 347 | function should follow the C++ standard for handling `NaN` and `Inf` values.
|
340 | 348 |
|
|
0 commit comments