-
Notifications
You must be signed in to change notification settings - Fork 130
[SYCL] Test reduction for complex numbers. #1609
Conversation
/Verify with intel/llvm#8425 |
/verify with intel/llvm#8425 |
This PR proposes to augment sycl::has_known_identity to return true for std::complex and std::plus operator. This will have two benefits: 1. It enables support for complex numbers in sycl::reduction without the user having to explicitly pass identity. 2. sycl::known_identity can now be used to simplify the implementation of group algorithms (See PR #5394). Also, this PR addresses the Github issue #5477. Test Case PR: intel/llvm-test-suite#1609
@steffenlarsen The PR is ready, please merge it. The failures in Jenkins CI are unrelated. |
Test seems to be failing on Windows. I believe you need |
@steffenlarsen the test case is passing now for both Windows and Linux. There was a bug in the test case before: The problem was in the test case, precisely in the following statement: I was using this statement to initialize the buffer. However, the order of evaluation of the expression <n, ++n + 1> is undefined and that's why for different compilers on Linux and Windows, it was initializing the buffer differently. |
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.
Good find! Looks good. 🚀
This PR adds test case for testing identityless reduction for complex numbers. Corresponding intel/llvm PR: intel#8425
This PR adds test case for testing identityless reduction for complex numbers.
Corresponding intel/llvm PR: intel/llvm#8425