Skip to content

Commit 76c94be

Browse files
committed
Add extension doc for platform contexts
Signed-off-by: James Brodman <[email protected]>
1 parent 5e55c1c commit 76c94be

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
= SYCL(TM) Proposals: Platform Default Contexts
2+
James Brodman <james[email protected]>
3+
v0.1
4+
:source-highlighter: pygments
5+
:icons: font
6+
:y: icon:check[role="green"]
7+
:n: icon:times[role="red"]
8+
9+
== Platform Default Contexts
10+
11+
This extension adds the notion of a default SYCL context per SYCL platform. The default context for each platform contains all devices in the platform.
12+
13+
The platform class gains three new methods: `get_default_context`, `push_default_context`, and `pop_default_context`.
14+
15+
These methods may be used to query and modify a platform's default context. Pushing a new default context replaces the existing one. Popping a default context returns either the previous context or throws a `runtime_error` if popping would result in no context.
16+
17+
This extension also modifies the behavior of `queue` constructors. Queues will no longer create a new `context` upon consruction. Instead, they will use the default context from the device's platform.

0 commit comments

Comments
 (0)