Skip to content

Commit 7e83a40

Browse files
authored
document implementation requirements for invalid object checking (#842)
1 parent f1489b4 commit 7e83a40

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

api/appendix_f.asciidoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ include::{generated}/api/version-notes/CL_INVALID_BUILD_OPTIONS.asciidoc[]
9898
| {CL_INVALID_COMMAND_QUEUE_anchor}
9999

100100
include::{generated}/api/version-notes/CL_INVALID_COMMAND_QUEUE.asciidoc[]
101-
| Returned when the specified command queue is not a valid command queue.
101+
| Returned when the specified command queue is not a <<valid-object-definition,valid command queue>>.
102102

103103
| {CL_INVALID_COMPILER_OPTIONS_anchor}
104104

@@ -108,12 +108,12 @@ include::{generated}/api/version-notes/CL_INVALID_COMPILER_OPTIONS.asciidoc[]
108108
| {CL_INVALID_CONTEXT_anchor}
109109

110110
include::{generated}/api/version-notes/CL_INVALID_CONTEXT.asciidoc[]
111-
| Returned when a specified context is not a valid context, or when mixing objects from multiple contexts.
111+
| Returned when a specified context is not a <<valid-object-definition,valid context>>, or when mixing objects from multiple contexts.
112112

113113
| {CL_INVALID_DEVICE_anchor}
114114

115115
include::{generated}/api/version-notes/CL_INVALID_DEVICE.asciidoc[]
116-
| Returned when a specified device is not valid.
116+
| Returned when a specified device is not a <<valid-object-definition,valid device>>.
117117

118118
| {CL_INVALID_DEVICE_PARTITION_COUNT_anchor}
119119

@@ -133,7 +133,7 @@ include::{generated}/api/version-notes/CL_INVALID_DEVICE_TYPE.asciidoc[]
133133
| {CL_INVALID_EVENT_anchor}
134134

135135
include::{generated}/api/version-notes/CL_INVALID_EVENT.asciidoc[]
136-
| Returned when a specified event object is not a valid event object.
136+
| Returned when a specified event object is not a <<valid-object-definition,valid event object>>.
137137

138138
| {CL_INVALID_EVENT_WAIT_LIST_anchor}
139139

@@ -179,7 +179,7 @@ include::{generated}/api/version-notes/CL_INVALID_IMAGE_SIZE.asciidoc[]
179179
| {CL_INVALID_KERNEL_anchor}
180180

181181
include::{generated}/api/version-notes/CL_INVALID_KERNEL.asciidoc[]
182-
| Returned when the specified kernel is not a valid kernel.
182+
| Returned when the specified kernel is not a <<valid-object-definition,valid kernel object>>.
183183

184184
| {CL_INVALID_KERNEL_ARGS_anchor}
185185

@@ -204,7 +204,7 @@ include::{generated}/api/version-notes/CL_INVALID_LINKER_OPTIONS.asciidoc[]
204204
| {CL_INVALID_MEM_OBJECT_anchor}
205205

206206
include::{generated}/api/version-notes/CL_INVALID_MEM_OBJECT.asciidoc[]
207-
| Returned when a specified memory object is not a valid memory object.
207+
| Returned when a specified memory object is not a <<valid-object-definition,valid memory object>>.
208208

209209
// This currently defined in cl.h, but it's not a core API error code.
210210
//| {CL_INVALID_MIP_LEVEL_anchor}
@@ -225,12 +225,12 @@ include::{generated}/api/version-notes/CL_INVALID_PIPE_SIZE.asciidoc[]
225225
| {CL_INVALID_PLATFORM_anchor}
226226

227227
include::{generated}/api/version-notes/CL_INVALID_PLATFORM.asciidoc[]
228-
| Returned when the specified platform is not a valid platform.
228+
| Returned when the specified platform is not a <<valid-object-definition,valid platform>>.
229229

230230
| {CL_INVALID_PROGRAM_anchor}
231231

232232
include::{generated}/api/version-notes/CL_INVALID_PROGRAM.asciidoc[]
233-
| Returned when a specified program is not a valid program object.
233+
| Returned when a specified program is not a <<valid-object-definition,valid program object>>.
234234

235235
| {CL_INVALID_PROGRAM_EXECUTABLE_anchor}
236236

@@ -250,7 +250,7 @@ include::{generated}/api/version-notes/CL_INVALID_QUEUE_PROPERTIES.asciidoc[]
250250
| {CL_INVALID_SAMPLER_anchor}
251251

252252
include::{generated}/api/version-notes/CL_INVALID_SAMPLER.asciidoc[]
253-
| Returned when a specified sampler is not a valid sampler object.
253+
| Returned when a specified sampler is not a <<valid-object-definition,valid sampler object>>.
254254

255255
| {CL_INVALID_SPEC_ID_anchor}
256256

api/glossary.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,7 @@ Unit of execution ::
799799
host-thread), kernel-instance, host program, work-item or any other
800800
executable agent that advances the work associated with a program.
801801

802+
[[valid-object-definition]]
802803
Valid Object ::
803804
An OpenCL object is considered valid if it meets all of the following
804805
criteria:
@@ -812,6 +813,10 @@ Valid Object ::
812813
access the object's backing memory).
813814

814815
An object is only valid in the platform where it was created.
816+
817+
An OpenCL implementation must check for a `NULL` object to determine if an
818+
object is valid. The behavior for all other invalid objects is
819+
implementation-defined.
815820
--
816821

817822
Work-group ::

0 commit comments

Comments
 (0)