-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL] Set address space to accessors-related kernel arguments
in accordance with accessors targets. Signed-off-by: Vladimir Lazarev <vladimir.lazarev@intel.com>
- Loading branch information
1 parent
94c1d56
commit 9e3fcc9
Showing
2 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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,28 @@ | ||
// RUN: %clang -S --sycl -Xclang -ast-dump %s | FileCheck %s | ||
// XFAIL: * | ||
#include <CL/sycl.hpp> | ||
|
||
using namespace cl::sycl; | ||
|
||
int main() { | ||
|
||
queue myQueue; | ||
const int size = 64; | ||
int data[size]; | ||
buffer<int, 1> buf(data, range<1>(size)); | ||
|
||
myQueue.submit([&](handler &cgh) { | ||
auto ptr = buf.get_access<access::mode::read_write>(cgh); | ||
|
||
accessor<int, 1, access::mode::read_write, | ||
access::target::local> | ||
tile(range<1>(2), cgh); | ||
cgh.single_task<class kernel_function>([=]() { | ||
tile[0] = 0; | ||
ptr[0] = 0; | ||
}); | ||
}); | ||
|
||
myQueue.wait(); | ||
} | ||
// CHECK: kernel_function 'void (__local int *__local, __global int *__global)' |