Skip to content

Commit

Permalink
Reword as suggested by Thomas
Browse files Browse the repository at this point in the history
  • Loading branch information
gmlueck committed Sep 26, 2024
1 parent 5f812f7 commit 9075baa
Showing 1 changed file with 34 additions and 23 deletions.
57 changes: 34 additions & 23 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,9 @@ The [code]#platform# class also provides constructors, but constructing a new
[code]#platform# instance merely creates a new object that is a copy of one of
the objects returned by [api]#platform::get_platforms#.

Each platform has a single context object which is used as its default context.
That context object contains all of the devices in the platform.

The [code]#platform# class provides the common reference semantics as defined in
<<sec:reference-semantics>>.

Expand Down Expand Up @@ -2936,16 +2939,6 @@ passing <<async-error,asynchronous errors>> at specific times to an
The application can wait for all <<command-group,command groups>> submitted to a
queue calling [api]#queue::wait# or [api]#queue::wait_and_throw#.

All [code]#queue# objects have an associated device, platform, and context which
are determined by the constructor.
The description of each constructor below tells how the device is chosen, and
the platform is always the platform that contains this device.
The description of each constructor also tells how the context is chosen.
When the constructor does not take a context object as a parameter, the queue
uses the platform's default context.
Each platform has a single context object which is used as its default context,
and that context object contains all of the devices in the platform.

A queue may be destroyed even when there are uncompleted <<command, commands>>
that have been submitted to the queue.
Doing so does not block.
Expand Down Expand Up @@ -2985,7 +2978,9 @@ explicit queue(const property_list& propList = {})

_Effects:_ Constructs a [code]#queue# object using the device selected by
[code]#default_selector_v#.
The queue has the default context of the platform that contains this device.
The queue's platform is the platform that contains this device.
The queue's context is this platform's default context as described in
<<sec:platform-class>>.

'''

Expand All @@ -2998,7 +2993,9 @@ explicit queue(const async_handler& asyncHandler,

_Effects:_ Constructs a [code]#queue# object using the device selected by
[code]#default_selector_v#.
The queue has the default context of the platform that contains this device.
The queue's platform is the platform that contains this device.
The queue's context is this platform's default context as described in
<<sec:platform-class>>.
The queue has the asynchronous error handler [code]#asyncHandler#.

'''
Expand All @@ -3018,7 +3015,9 @@ satisfies the requirements of a <<device-selector>> as defined in
_Effects:_ The [code]#deviceSelector# is called for every <<root-device>> as
described in <<sec:device-selector>>, and a [code]#queue# object is constructed
using the device it selects.
The queue has the default context of the platform that contains this device.
The queue's platform is the platform that contains this device.
The queue's context is this platform's default context as described in
<<sec:platform-class>>.

'''

Expand All @@ -3038,7 +3037,9 @@ satisfies the requirements of a <<device-selector>> as defined in
_Effects:_ The [code]#deviceSelector# is called for every <<root-device>> as
described in <<sec:device-selector>>, and a [code]#queue# object is constructed
using the device it selects.
The queue has the default context of the platform that contains this device.
The queue's platform is the platform that contains this device.
The queue's context is this platform's default context as described in
<<sec:platform-class>>.
The queue has the asynchronous error handler [code]#asyncHandler#.

'''
Expand All @@ -3051,7 +3052,9 @@ explicit queue(const device& syclDevice, const property_list& propList = {})

_Effects:_ Constructs a [code]#queue# object using the device
[code]#syclDevice#.
The queue has the default context of the platform that contains this device.
The queue's platform is the platform that contains this device.
The queue's context is this platform's default context as described in
<<sec:platform-class>>.

'''

Expand All @@ -3064,7 +3067,9 @@ explicit queue(const device& syclDevice, const async_handler& asyncHandler,

_Effects:_ Constructs a [code]#queue# object using the device
[code]#syclDevice#.
The queue has the default context of the platform that contains this device.
The queue's platform is the platform that contains this device.
The queue's context is this platform's default context as described in
<<sec:platform-class>>.
The queue has the asynchronous error handler [code]#asyncHandler#.

'''
Expand All @@ -3084,7 +3089,8 @@ satisfies the requirements of a <<device-selector>> as defined in
_Effects:_ The [code]#deviceSelector# is called for every <<root-device>> as
described in <<sec:device-selector>>, and a [code]#queue# object is constructed
using the device it selects.
The queue has the context [code]#syclContext#.
The queue's platform is the platform that contains this device.
The queue's context is [code]#syclContext#.

_Throws:_ An [code]#exception# with the [code]#errc::invalid# error code if
[code]#syclContext# does not contain the device selected by
Expand All @@ -3108,8 +3114,9 @@ satisfies the requirements of a <<device-selector>> as defined in
_Effects:_ The [code]#deviceSelector# is called for every <<root-device>> as
described in <<sec:device-selector>>, and a [code]#queue# object is constructed
using the device it selects.
The queue has the context [code]#syclContext# and the asynchronous error handler
[code]#asyncHandler#.
The queue's platform is the platform that contains this device.
The queue's context is [code]#syclContext#.
The queue has the asynchronous error handler [code]#asyncHandler#.

_Throws:_ An [code]#exception# with the [code]#errc::invalid# error code if
[code]#syclContext# does not contain the device selected by
Expand All @@ -3124,8 +3131,10 @@ explicit queue(const context& syclContext, const device& syclDevice,
const property_list& propList = {})
----

_Effects:_ Constructs a [code]#queue# object using the device [code]#syclDevice#
and the context [code]#syclContext#.
_Effects:_ Constructs a [code]#queue# object using the device
[code]#syclDevice#.
The queue's platform is the platform that contains this device.
The queue's context is [code]#syclContext#.

_Throws:_ An [code]#exception# with the [code]#errc::invalid# error code unless
[code]#syclDevice# is contained by [code]#syclContext# or is a
Expand All @@ -3141,8 +3150,10 @@ explicit queue(const context& syclContext, const device& syclDevice,
const property_list& propList = {})
----

_Effects:_ Constructs a [code]#queue# object using the device [code]#syclDevice#
and the context [code]#syclContext#.
_Effects:_ Constructs a [code]#queue# object using the device
[code]#syclDevice#.
The queue's platform is the platform that contains this device.
The queue's context is [code]#syclContext#.
The queue has the asynchronous error handler [code]#asyncHandler#.

_Throws:_ An [code]#exception# with the [code]#errc::invalid# error code unless
Expand Down

0 comments on commit 9075baa

Please sign in to comment.