Skip to content

Commit 33d34a9

Browse files
committed
Address spec comments
Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 31aa6a3 commit 33d34a9

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_inter_process_communication.asciidoc

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ handle_data_t get(void *ptr, const sycl::context &ctx)
159159
----
160160
!====
161161

162-
_Preconditions:_ `ptr` is a pointer to USM device memory on some device _D_ in
163-
context `ctx`. `ctx` is the same context as `ptr` was allocated against, using
164-
the USM device memory allocation routines.
162+
_Preconditions:_ `ptr` is a pointer to USM device memory on some device _D_, and
163+
`ctx` is the same context as `ptr` was allocated against, using the USM device
164+
memory allocation routines.
165165

166166
_Returns:_ An IPC "handle" to this USM memory allocation. The bytes of this
167167
handle can be transferred to another process on the same system, and the other
@@ -236,9 +236,10 @@ other process on the same system. That USM device memory is accessible on device
236236
`dev`.
237237

238238
_Returns:_ A pointer to the same USM device memory represented by `handle_data`.
239-
This pointer can be used in any API taking a USM device memory pointer, except
240-
it cannot be passed to `sycl::free`. Instead, use the `close` function to free
241-
this memory pointer.
239+
The returned pointer is associated with context `ctx`. It can be used wherever a
240+
USM device pointer for device `dev` and context `ctx` is expected, except it
241+
cannot be passed to `sycl::free`. Instead, use the `close` function to free this
242+
memory pointer.
242243

243244
_Throws:_
244245

@@ -289,6 +290,10 @@ static void close(void *ptr, const sycl::context &ctx)
289290
----
290291
!====
291292

293+
_Precondition:_ `ptr` was previously returned from a call to the `open` function
294+
in this same process, where `ctx` was passed as the context. This `ptr` value
295+
has not yet been closed by calling the `close` function.
296+
292297
_Effects:_ Closes a device USM pointer previously returned by a call to
293298
the `open` function.
294299

0 commit comments

Comments
 (0)