-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Fix return type of the accessor::get_pointer and local_accessor::get_pointer. #8493
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 all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
2503a62
Diagnostic for const qualified DataT with non read-only accessor
mmoadeli 862b688
Merge branch 'sycl' of https://github.com/mmoadeli/llvm into sycl
mmoadeli 1edb94f
Add test for const qualified DataT with non readonly accessor.
mmoadeli 7ba64c6
Assign valid access mode for local accessor, depending on the type of…
mmoadeli ef0038e
Minor test update.
mmoadeli 36971f8
- Rename AccessMode to AccessModeFromConstness
mmoadeli 29e3036
- Revert test to be without -Xclang -verify.
mmoadeli 92debe8
Refactors implementation of diagnostic to avoid compiler errors due t…
mmoadeli 7eac372
Updates the test to use -Xclang -verify
mmoadeli dcac706
Fix style-checl
mmoadeli 9d4b313
Merge branch 'intel:sycl' into sycl
mmoadeli ad92330
Merge branch 'intel:sycl' into sycl
mmoadeli ce1cbe8
Merge branch 'intel:sycl' into sycl
mmoadeli dc33cc4
Merge branch 'intel:sycl' into sycl
mmoadeli 44b1f9e
Merge branch 'sycl' of https://github.com/mmoadeli/llvm into sycl
mmoadeli 2803f25
Merge branch 'sycl' of https://github.com/mmoadeli/llvm into sycl
mmoadeli 0b358a5
Merge branch 'sycl' of https://github.com/mmoadeli/llvm into sycl
mmoadeli 00c9329
Fix rerurn type of the accessor::get_pointer and local_accessor::get_…
mmoadeli beabf81
Add get_pointer for accessor with target::local according to the spec…
mmoadeli 29fadf4
Remove commented out code.
mmoadeli 103f35a
Merge branch 'sycl' of https://github.com/mmoadeli/llvm into sycl
mmoadeli 7fa63a4
Merge branch 'sycl' of https://github.com/mmoadeli/llvm into sycl
mmoadeli 502f94c
Merge branch 'sycl' into get_pointer
mmoadeli 1456887
Merge branch 'sycl' of https://github.com/mmoadeli/llvm into sycl
mmoadeli 5060fcf
Merge branch 'sycl' into get_pointer
mmoadeli 2939b5d
Merge branch 'sycl' of https://github.com/mmoadeli/llvm into sycl
mmoadeli 47f59fa
Merge branch 'sycl' of https://github.com/mmoadeli/llvm into sycl
mmoadeli 94c6219
Remove get_pointer from target::local specialization of accessor.
mmoadeli 1642661
Merge branch 'sycl' of https://github.com/mmoadeli/llvm into sycl
mmoadeli f98cdad
Merge branch 'sycl' into get_pointer
mmoadeli 34d4abc
-Re-Add old get_pointer implementation to target::local specialized a…
mmoadeli c2ac5e2
Remove definition of decorated_type in decorated::legacy specialized …
mmoadeli 627a270
Merge branch 'sycl' into get_pointer
mmoadeli e5cf267
Update sycl/include/sycl/multi_ptr.hpp
mmoadeli 4463651
Update sycl/include/sycl/multi_ptr.hpp
mmoadeli abafe2e
Update sycl/include/sycl/multi_ptr.hpp
mmoadeli 4621dc4
Update sycl/include/sycl/multi_ptr.hpp
mmoadeli 057528a
Add test for get_pointer and reverts earlier change to get_multi_ptr
mmoadeli 166b652
Fix a minor style.
mmoadeli 8d595bc
Remove unused alias definition
mmoadeli 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 | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,27 @@ | ||||||||
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -fsyntax-only | ||||||||
|
||||||||
#include <cassert> | ||||||||
#include <sycl/sycl.hpp> | ||||||||
#include <type_traits> | ||||||||
|
||||||||
using namespace sycl; | ||||||||
|
||||||||
constexpr static int size = 1; | ||||||||
|
||||||||
void test_get_multi_ptr(handler &cgh, buffer<int, size> &buffer) { | ||||||||
using target_local_accessor_t = | ||||||||
accessor<int, size, access::mode::read_write, access::target::local>; | ||||||||
using local_accessor_t = local_accessor<int, size>; | ||||||||
|
||||||||
auto acc = buffer.get_access<access_mode::read_write, target::host_task>(cgh); | ||||||||
auto target_local_acc = target_local_accessor_t({size}, cgh); | ||||||||
auto local_acc = local_accessor_t({size}, cgh); | ||||||||
|
||||||||
auto acc_ptr = acc.get_pointer(); | ||||||||
auto target_local_ptr = target_local_acc.get_pointer(); | ||||||||
auto local_pointer = local_acc.get_pointer(); | ||||||||
static_assert(std::is_same_v<decltype(acc_ptr), std::add_pointer_t<int>>); | ||||||||
static_assert(std::is_same_v<decltype(target_local_ptr), local_ptr<int>>); | ||||||||
static_assert( | ||||||||
std::is_same_v<decltype(local_pointer), std::add_pointer_t<int>>); | ||||||||
} | ||||||||
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.
Suggested change
|
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.