Skip to content

Commit d5ed83f

Browse files
gmlueckkeryell
authored andcommitted
Some more kernel bundle clarifications
A collection of more clarifications to kernel bundles after a new set of questions from our QA team: * Clarify that `handler::use_kernel_bundle()` requires the bundle's context to match both the primary queue's context **and** the secondary queue's context. * Clarify that an object or executable bundle obtained via `get_kernel_bundle()` has the default values for any specialization constants. * Clarify that the bundle returned from `join()` contains device images that are copies of the device images contained in the input bundles. Since the `device_image` class has the common reference semantics, this means that the device images in the result from `join()` will compare equal to the device images contained in the input bundles.
1 parent 5c6f677 commit d5ed83f

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

adoc/chapters/programming_interface.adoc

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13663,9 +13663,10 @@ this same <<command-group>>.
1366313663

1366413664
_Throws:_
1366513665

13666-
* An [code]#exception# with the [code]#errc::invalid# error code if
13667-
the <<context>> associated with the <<handler>> via its associated
13668-
<<queue>> is different from the <<context>> associated with the
13666+
* An [code]#exception# with the [code]#errc::invalid# error code if the
13667+
<<context>> associated with the <<handler>> via its associated primary
13668+
<<queue>> or the <<context>> associated with the secondary <<queue>> (if
13669+
provided) is different from the <<context>> associated with the
1366913670
<<kernel-bundle>> specified by [code]#execBundle#.
1367013671

1367113672
* An [code]#exception# with the [code]#errc::invalid# error code if
@@ -14392,6 +14393,10 @@ ahead-of-time compiler, or it may call the online compiler or linker to create
1439214393
the bundle's device images in the requested state. A bundle may also contain
1439314394
device images that represent a device's built-in kernels.
1439414395

14396+
When [code]#get_kernel_bundle()# is used to obtain a kernel bundle in
14397+
[code]#bundle_state::object# or [code]#bundle_state::executable#, any
14398+
specialization constants in the bundle will have their default values.
14399+
1439514400
[source]
1439614401
----
1439714402
template<bundle_state State>
@@ -14702,10 +14707,10 @@ template<bundle_state State>
1470214707
kernel_bundle<State> join(const std::vector<kernel_bundle<State>> &bundles);
1470314708
----
1470414709

14705-
_Returns:_ A new kernel bundle that represents the union of all the device
14706-
images in the input [code]#bundles# with duplicates removed. The new bundle
14707-
has the same associated context and the same set of associated devices as
14708-
those in [code]#bundles#.
14710+
_Returns:_ A new kernel bundle that contains a copy of all the device images in
14711+
the input [code]#bundles# with duplicates removed. The new bundle has the same
14712+
associated context and the same set of associated devices as those in
14713+
[code]#bundles#.
1470914714

1471014715
_Throws:_
1471114716

0 commit comments

Comments
 (0)