-
Notifications
You must be signed in to change notification settings - Fork 434
[libcu++] Support complex type mixing in cuda::isclose
#9891
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,20 +21,20 @@ Defined in ``<cuda/numeric>`` header. | |
| [[nodiscard]] __host__ __device__ | ||
| bool isclose(T lhs, T rhs, float relative_tol, T absolute_tol) noexcept; | ||
|
|
||
| template <class Complex> | ||
| template <class T> | ||
| [[nodiscard]] __host__ __device__ | ||
| bool isclose(const Complex& lhs, const Complex& rhs) noexcept; | ||
| bool isclose(const /*complex-type*/<T>& lhs, const /*complex-type*/<T>& rhs) noexcept; | ||
|
|
||
| template <class Complex> | ||
| template <class T> | ||
| [[nodiscard]] __host__ __device__ | ||
| bool isclose(const Complex& lhs, const Complex& rhs, float relative_tol) noexcept; | ||
| bool isclose(const /*complex-type*/<T>& lhs, const /*complex-type*/<T>& rhs, float relative_tol) noexcept; | ||
|
|
||
| template <class Complex, class AbsTol> | ||
| template <class T> | ||
| [[nodiscard]] __host__ __device__ | ||
| bool isclose(const Complex& lhs, | ||
| const Complex& rhs, | ||
| bool isclose(const /*complex-type*/<T>& lhs, | ||
| const /*complex-type*/<T>& rhs, | ||
| float relative_tol, | ||
| AbsTol absolute_tol) noexcept; | ||
| T absolute_tol) noexcept; | ||
|
Comment on lines
+24
to
+37
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win important: Document Also applies to: 70-70 Source: Path instructions |
||
|
|
||
| } // namespace cuda | ||
|
|
||
|
|
@@ -68,7 +68,6 @@ Defined in ``<cuda/numeric>`` header. | |
|
|
||
| - Scalar overloads require ``lhs``, ``rhs``, ``absolute_tol`` to have the same arithmetic type (integer or floating point). | ||
| - Complex overloads accept ``cuda::std::complex<T>`` and ``std::complex<T>`` operands. | ||
| - ``AbsTol`` must be the same type as the complex value type. | ||
|
|
||
| **Special values** | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this functionally any different from the previous form? From your change it seems like what we actually support is