Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit eac2a81

Browse files
[SYCL] Add test for stream property list (#549)
1 parent e581541 commit eac2a81

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)