Skip to content

Commit 41b8929

Browse files
steffenlarsenbb-sycl
authored andcommitted
[SYCL] Add test for stream property list (intel#549)
1 parent 30fee1a commit 41b8929

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

SYCL/Basic/stream/stream.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,19 @@ int main() {
2424
{
2525
default_selector Selector;
2626
queue Queue(Selector);
27+
context Context = Queue.get_context();
2728

2829
// Check constructor and getters
2930
Queue.submit([&](handler &CGH) {
30-
stream Out(1024, 80, CGH);
31+
stream Out(1024, 80, CGH,
32+
property_list{property::buffer::context_bound{Context}});
3133
assert(Out.get_size() == 1024);
3234
assert(Out.get_max_statement_size() == 80);
35+
assert(Out.has_property<property::buffer::context_bound>());
36+
assert(!Out.has_property<property::queue::in_order>());
37+
assert(
38+
Out.get_property<property::buffer::context_bound>().get_context() ==
39+
Context);
3340

3441
CGH.single_task<class DummyTask1>([=]() {});
3542
});

0 commit comments

Comments
 (0)