-
Notifications
You must be signed in to change notification settings - Fork 795
[ESIMD] Allow constructing simd_view from simd #4514
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
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ca60c5b
[ESIMD] Allow constructing simd_view from simd
DenisBakhvalov d58dbd2
fixed code review comments
DenisBakhvalov 6d40bc6
Merge branch 'sycl' into simd_view_ctor
kbobrovs c50f9c0
Merge remote-tracking branch 'intel_llvm/sycl' into simd_view_ctor
v-klochkov 7a99aa0
Fix the LIT test; fix clang-format
v-klochkov 8dfa127
Merge remote-tracking branch 'intel_llvm/sycl' into simd_view_ctor
v-klochkov 33eede7
Also support simd_view constructor from 1 element simd
v-klochkov b4d1d4e
Address reviewer's comment - convert a comment to doxygen style
v-klochkov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,19 @@ SYCL_ESIMD_FUNCTION void test_simd_view_copy_ctor() { | |
auto v0_view_copy(v0_view); | ||
} | ||
|
||
// test construction from vector. | ||
SYCL_ESIMD_FUNCTION void test_simd_view_from_vector() { | ||
simd<int, 16> s = 0; | ||
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. please a test case for length 1 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. Added here: 33eede7 |
||
simd_view v1 = s; | ||
simd_view v2(s); | ||
// expected-error@+4 {{no matching constructor for initialization of 'simd_view}} | ||
// expected-note@sycl/ext/intel/experimental/esimd/simd_view.hpp:* {{candidate constructor not viable: expects an lvalue for 1st argument}} | ||
// expected-note@sycl/ext/intel/experimental/esimd/simd_view.hpp:* 4+ {{candidate constructor not viable:}} | ||
// expected-note@sycl/ext/intel/experimental/esimd/simd.hpp:* {{candidate template ignored:}} | ||
simd_view<simd<int, 16>, region_base<false, int, 1, 0, 16, 1>> v3( | ||
(simd<int, 16>())); | ||
} | ||
|
||
// move constructor transfers the same view of the underlying data. | ||
SYCL_ESIMD_FUNCTION void test_simd_view_move_ctor() { | ||
simd<int, 16> v0 = 1; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.