From b14d8c9bf452cb903420a25e3cde10f9ce98b85f Mon Sep 17 00:00:00 2001 From: Jefferson Le Quellec Date: Wed, 7 Feb 2024 16:09:56 +0100 Subject: [PATCH 1/3] Update the 'constraints' for the complex specification --- .../experimental/sycl_ext_oneapi_complex.asciidoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc index 41700a898fecb..49dc46f640914 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc @@ -101,8 +101,8 @@ available only in host code as noted below. The complex type is trivially copyable and type trait `is_device_copyable` should resolve to `std::true_type`. -The `T` template parameter must be one of the types float, double, or -sycl::half. +Constraints: The `T` template parameter must be one of the types `float`, +`double`, or `sycl::half`. Note: When performing operations between complex numbers and decimals, the decimal is treated as a complex number with a real component equal to @@ -335,6 +335,12 @@ Additionally, this extension introduces support for the `real` and `imag` free functions, which returns the real and imaginary component of a number, respectively. +Note: The overload of the functions `real(T)` and `imag(T)` matches the +behavior in ISO C++ where `T` would be treated as a complex number with a zero +imaginary component. This is subject to the constraint that `T` must be one of +the types `float`, `double`, `sycl::half`, or evaluate to `true` for +`std::is_integral`. + These functions are available in both host and device code, and each math function should follow the C++ standard for handling `NaN` and `Inf` values. From 476e02140d9c13cfe47fb1eead8e86872dfddae8 Mon Sep 17 00:00:00 2001 From: Jefferson Le Quellec Date: Wed, 7 Feb 2024 17:30:48 +0100 Subject: [PATCH 2/3] Change font-style for "Constraints" Co-authored-by: John Pennycook --- .../extensions/experimental/sycl_ext_oneapi_complex.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc index 49dc46f640914..db72fe1574590 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc @@ -101,7 +101,7 @@ available only in host code as noted below. The complex type is trivially copyable and type trait `is_device_copyable` should resolve to `std::true_type`. -Constraints: The `T` template parameter must be one of the types `float`, +_Constraints_: The `T` template parameter must be one of the types `float`, `double`, or `sycl::half`. Note: When performing operations between complex numbers and decimals, From 768b400dd195cd3301cb72971b07ceb5a9fd6b19 Mon Sep 17 00:00:00 2001 From: Jefferson Le Quellec Date: Wed, 7 Feb 2024 17:47:03 +0100 Subject: [PATCH 3/3] Change font-style for "Note" --- .../extensions/experimental/sycl_ext_oneapi_complex.asciidoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc index db72fe1574590..e4eb444f1ed60 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_complex.asciidoc @@ -10,6 +10,7 @@ :encoding: utf-8 :lang: en :dpcpp: pass:[DPC++] +:endnote: —{nbsp}end{nbsp}note // Set the default source code type in this document to C++, // for syntax highlighting purposes. This is needed because @@ -335,11 +336,12 @@ Additionally, this extension introduces support for the `real` and `imag` free functions, which returns the real and imaginary component of a number, respectively. -Note: The overload of the functions `real(T)` and `imag(T)` matches the +[_Note:_ The overloads of the functions `real(T)` and `imag(T)` match the behavior in ISO C++ where `T` would be treated as a complex number with a zero imaginary component. This is subject to the constraint that `T` must be one of the types `float`, `double`, `sycl::half`, or evaluate to `true` for `std::is_integral`. +_{endnote}_] These functions are available in both host and device code, and each math function should follow the C++ standard for handling `NaN` and `Inf` values.