Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify cl_mem_flags to not affect copies #1230

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions api/opencl_runtime_layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,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 @@ -1381,6 +1386,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 @@ -3535,6 +3545,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 @@ -3782,6 +3797,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 @@ -3909,6 +3929,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 @@ -14464,6 +14489,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 @@ -14572,6 +14605,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 @@ -14664,6 +14705,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 @@ -14763,6 +14812,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 @@ -14854,6 +14911,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