Skip to content

[SYCL][ESIMD] Allow implicit conversion from std::experimental::simd_mask to ESIMD::simd_mask #9830

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

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

sarnex
Copy link
Contributor

@sarnex sarnex commented Jun 12, 2023

Users of invoke_simd need to use std::experimental::simd_mask for masks as per the spec, but once they enter ESIMD code they will likely want to use the ESIMD classes. Provide an implicit conversion from std::experimental::simd_mask to esimd::simd_mask

Without this change, you need to use a manual loop, as all you can do is access std::experimental::simd_mask element-by-element.

@sarnex sarnex temporarily deployed to aws June 12, 2023 22:13 — with GitHub Actions Inactive
…mask to ESIMD simd_mask

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@sarnex sarnex temporarily deployed to aws June 13, 2023 15:27 — with GitHub Actions Inactive
@sarnex sarnex temporarily deployed to aws June 13, 2023 16:52 — with GitHub Actions Inactive
@sarnex sarnex changed the title [SYCL][ESIMD] Allow implicit conversion from std::experimental::simd_mask to ESIMD simd_mask [SYCL][ESIMD] Allow implicit conversion from std::experimental::simd_mask to ESIMD::simd_mask Jun 13, 2023
@sarnex sarnex marked this pull request as ready for review June 13, 2023 19:54
@sarnex sarnex requested review from a team and rolandschulz as code owners June 13, 2023 19:54
@sarnex sarnex requested a review from cperkinsintel June 13, 2023 19:54
@sarnex
Copy link
Contributor Author

sarnex commented Jun 13, 2023

Let me know if anyone has suggestions on the std/experimental/simd.hpp changes. Once std::simd is finalized, we will need to completely change invoke_simd including this anyway though.

@dm-vodopyanov dm-vodopyanov merged commit de5b479 into intel:sycl Jun 14, 2023
fineg74 pushed a commit to fineg74/llvm that referenced this pull request Jun 15, 2023
…mask to ESIMD::simd_mask (intel#9830)

Users of `invoke_simd` need to use `std::experimental::simd_mask` for
masks as per the spec, but once they enter ESIMD code they will likely
want to use the ESIMD classes. Provide an implicit conversion from
`std::experimental::simd_mask` to `esimd::simd_mask`

Without this change, you need to use a manual loop, as all you can do is
access `std::experimental::simd_mask` element-by-element.

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants