Skip to content

Commit

Permalink
clarify cl_mem_flags to not affect copies (#1230)
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug authored Oct 29, 2024
1 parent 503dbce commit 97adb9a
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions api/opencl_runtime_layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,11 @@ include::{generated}/api/version-notes/clEnqueueCopyBuffer.asciidoc[]
If _event_wait_list_ and _event_ are not `NULL`, _event_ must not refer
to an element of the _event_wait_list_ array.

The usage information which indicates whether the memory object can be read
or written by a kernel and/or the host and is given by the {cl_mem_flags_TYPE}
argument value specified when _src_buffer_ or _dst_buffer is created is ignored by
{clEnqueueCopyBuffer}.

// refError

{clEnqueueCopyBuffer} returns {CL_SUCCESS} if the function is executed
Expand Down Expand Up @@ -1383,6 +1388,11 @@ must equal _dst_row_pitch_ and _src_slice_pitch_ must equal
_dst_slice_pitch_.
====

The usage information which indicates whether the memory object can be read
or written by a kernel and/or the host and is given by the {cl_mem_flags_TYPE}
argument value specified when _src_buffer_ or _dst_buffer_ is created is ignored by
{clEnqueueCopyBufferRect}.

// refError

{clEnqueueCopyBufferRect} returns {CL_SUCCESS} if the function is executed
Expand Down Expand Up @@ -3553,6 +3563,11 @@ memory objects for {clEnqueueCopyImage} must have the exact same image
format (i.e. the {cl_image_format_TYPE} descriptor specified when _src_image_ and
_dst_image_ are created must match).

The usage information which indicates whether the memory object can be read
or written by a kernel and/or the host and is given by the {cl_mem_flags_TYPE}
argument value specified when _src_image_ or _dst_image_ is created is ignored by
{clEnqueueCopyImage}.

// refError

{clEnqueueCopyImage} returns {CL_SUCCESS} if the function is executed
Expand Down Expand Up @@ -3800,6 +3815,11 @@ endif::cl_khr_mipmap_image[]
If _event_wait_list_ and _event_ are not `NULL`, _event_ must not refer
to an element of the _event_wait_list_ array.

The usage information which indicates whether the memory object can be read
or written by a kernel and/or the host and is given by the {cl_mem_flags_TYPE}
argument value specified when _src_image_ or _dst_buffer_ is created is ignored by
{clEnqueueCopyImageToBuffer}.

// refError

{clEnqueueCopyImageToBuffer} returns {CL_SUCCESS} if the function is executed
Expand Down Expand Up @@ -3927,6 +3947,11 @@ image or 1D image buffer object and is computed as _width_ {times}
_arraysize_ {times} _bytes/image element_ if _dst_image_ is a 1D image array
object.

The usage information which indicates whether the memory object can be read
or written by a kernel and/or the host and is given by the {cl_mem_flags_TYPE}
argument value specified when _src_buffer_ or _dst_image_ is created is ignored by
{clEnqueueCopyBufferToImage}.

// refError

{clEnqueueCopyBufferToImage} returns {CL_SUCCESS} if the function is executed
Expand Down Expand Up @@ -14529,6 +14554,14 @@ after the function returns.
* _mutable_handle_ returns a handle to the command.
This parameter is unused, and **must** be `NULL`.

[NOTE]
====
The usage information which indicates whether the memory object can be read or
written by a kernel and/or the host and is given by the {cl_mem_flags_TYPE} argument
value specified when _src_buffer_ or _dst_buffer_ is created is ignored by
{clCommandCopyBufferKHR}.
====

// refError

{clCommandCopyBufferKHR} returns {CL_SUCCESS} if the function is executed
Expand Down Expand Up @@ -14643,6 +14676,14 @@ After copying each 2D rectangle, the source and destination offsets are
incremented by their respective source and destination slice pitches.
====

[NOTE]
====
The usage information which indicates whether the memory object can be read or
written by a kernel and/or the host and is given by the {cl_mem_flags_TYPE} argument
value specified when _src_buffer_ or _dst_buffer_ is created is ignored by
{clCommandCopyBufferRectKHR}.
====

// refError

{clCommandCopyBufferRectKHR} returns {CL_SUCCESS} if the function is
Expand Down Expand Up @@ -14741,6 +14782,14 @@ after the function returns.
* _mutable_handle_ returns a handle to the command.
This parameter is unused, and **must** be `NULL`.

[NOTE]
====
The usage information which indicates whether the memory object can be read or
written by a kernel and/or the host and is given by the {cl_mem_flags_TYPE} argument
value specified when _src_buffer_ or _dst_image_ is created is ignored by
{clCommandCopyBufferToImageKHR}.
====

// refError

{clCommandCopyBufferToImageKHR} returns {CL_SUCCESS} if the function is executed
Expand Down Expand Up @@ -14846,6 +14895,14 @@ format, i.e. the {cl_image_format_TYPE} descriptor specified when
_src_image_ and _dst_image_ are created must match.
====

[NOTE]
====
The usage information which indicates whether the memory object can be read or
written by a kernel and/or the host and is given by the {cl_mem_flags_TYPE} argument
value specified when _src_image_ or _dst_image_ is created is ignored by
{clCommandCopyImageKHR}.
====

// refError

{clCommandCopyImageKHR} returns {CL_SUCCESS} if the function is executed
Expand Down Expand Up @@ -14943,6 +15000,14 @@ after the function returns.
* _mutable_handle_ returns a handle to the command.
This parameter is unused, and **must** be `NULL`.

[NOTE]
====
The usage information which indicates whether the memory object can be read or
written by a kernel and/or the host and is given by the {cl_mem_flags_TYPE} argument
value specified when _src_image_ or _dst_buffer_ is created is ignored by
{clCommandCopyImageToBufferKHR}.
====

// refError

{clCommandCopyImageToBufferKHR} returns {CL_SUCCESS} if the function is
Expand Down

0 comments on commit 97adb9a

Please sign in to comment.