Skip to content

Commit be5003d

Browse files
authored
api spec editorial fixes (#531)
* fix memory regions table * format CLK enums * unify table widths for clGetXXXInfo APIs * minor grammar fix * tidy up device partitioning property lists * remove the cl_image_desc ifdef from the XML file The ifdef is currently rendering poorly in the generated spec snippet, and what is in the XML file does not match what is in the headers currently anyhow. We will need to resolve this if and only if we decide to generate actual headers for cl_image_desc from the XML file. * fix indentation in preprocessor option descriptions * move the "uniform work group size" and "no subgroup IFP" options They are not options that control floating-point arithmetic. * properly format -cl-std= build option and refer to the unified OpenCL C spec * remove unnecessary phrase for debug option * tidy up events section * adjust table column widths one more time For the PDF spec it's better to use a slightly wider first column. * unify column headers for get info APIs * remove the space for pointer "get info" return types This causes at least one table cell to break better in the PDF spec.
1 parent e5cf9be commit be5003d

6 files changed

Lines changed: 151 additions & 156 deletions

api/embedded_profile.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Device Queries>> table.
151151

152152
[[embedded-device-queries-table]]
153153
.List of supported param_names by <<clGetDeviceInfo>> for embedded profile
154-
[options="header"]
154+
[width="100%",cols="<33%,<17%,<50%",options="header"]
155155
|====
156156
| Device Info | Return Type | Description
157157
| {CL_DEVICE_MAX_READ_IMAGE_ARGS}

api/footnotes.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ To create an image object from another image object that share the data store be
7070
]
7171

7272
:fn-image-mem-fence: pass:n[ \
73-
This value for memory_scope can only be used with atomic_work_item_fence with flags set to CLK_IMAGE_MEM_FENCE. \
73+
This value for memory_scope can only be used with atomic_work_item_fence with flags set to `CLK_IMAGE_MEM_FENCE`. \
7474
]
7575

7676
:fn-int64-performance: pass:n[ \

api/opencl_architecture.asciidoc

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -897,41 +897,40 @@ or the host can read and/or write to a memory region).
897897

898898
[[memory-regions-table]]
899899
.Memory Regions
900-
[width="80%",options="header"]
900+
[cols="2,2,3,3,3,3",options="header"]
901901
|====
902-
| | Global | Constant | Local | Private
903-
.2+| Host
904-
| Dynamic Allocation
905-
| Dynamic Allocation
906-
| Dynamic Allocation
907-
| No Allocation
908-
| Read/Write access to buffers and images but not pipes
909-
| Read/Write access
910-
| No access
911-
| No access
912-
.2+| Kernel
913-
| Static Allocation for program scope variables
914-
| Static Allocation
915-
| Static Allocation.
916-
917-
Dynamic allocation for child kernel
918-
| Static Allocation
919-
| Read/Write access
920-
| Read-only access
921-
| Read/Write access.
922-
923-
No access to child's local memory.
924-
| Read/Write access
902+
| | | Global | Constant | Local | Private
903+
.2+| *Host*
904+
| Allocation
905+
| Dynamic
906+
| Dynamic
907+
| Dynamic
908+
| None
909+
| Access
910+
| Read/Write to Buffers and Images, but not Pipes
911+
| Read/Write
912+
| None
913+
| None
914+
.2+| *Kernel*
915+
| Allocation
916+
| Static (program scope variables)
917+
| Static (program scope variables)
918+
| Static for parent kernel,
919+
Dynamic for child kernels
920+
| Static
921+
| Access
922+
| Read/Write
923+
| Read-only
924+
| Read/Write,
925+
No access to child kernel memory
926+
| Read/Write
925927
|====
926928

927-
.Caption
928-
****
929929
The <<memory-regions-table, Memory Regions>> table shows the different
930930
memory regions in OpenCL and how memory objects are allocated and accessed
931931
by the host and by an executing instance of a kernel.
932-
For the case of kernels, we distinguish between the behavior of local memory
933-
with respect to a kernel (self) and its child kernels.
934-
****
932+
For kernels, we distinguish between the behavior of local memory
933+
for a parent kernel and its child kernels.
935934

936935
Once allocated, a memory object is made available to kernel-instances
937936
running on one or more devices.
@@ -1290,11 +1289,11 @@ Depending on the memory_order argument, this operation:
12901289
* is a sequentially-consistent fence with both acquire and release
12911290
semantics, if *memory_order_seq_cst*.
12921291

1293-
If specified, the cl_mem_fence_flags argument must be CLK_IMAGE_MEM_FENCE,
1294-
CLK_GLOBAL_MEM_FENCE, CLK_LOCAL_MEM_FENCE, or CLK_GLOBAL_MEM_FENCE |
1295-
CLK_LOCAL_MEM_FENCE.
1292+
If specified, the cl_mem_fence_flags argument must be `CLK_IMAGE_MEM_FENCE`,
1293+
`CLK_GLOBAL_MEM_FENCE`, `CLK_LOCAL_MEM_FENCE`, or `CLK_GLOBAL_MEM_FENCE |
1294+
CLK_LOCAL_MEM_FENCE`.
12961295

1297-
The atomic_work_item_fence(CLK_IMAGE_MEM_FENCE) built-in function must be
1296+
The `atomic_work_item_fence(CLK_IMAGE_MEM_FENCE, ...)` built-in function must be
12981297
used to make sure that sampler-less writes are visible to later reads by the
12991298
same work-item.
13001299
Without use of the atomic_work_item_fence function, write-read coherence on
@@ -1733,7 +1732,7 @@ release sequence headed by *A*, and the scopes of *A* and *B* are inclusive.
17331732
<<iso-c11,[C11 standard, Section 7.17.4, paragraph 4, modified.]>>
17341733

17351734
Let *X* and *Y* be two work-item fences that each have both the
1736-
CLK_GLOBAL_MEM_FENCE and CLK_LOCAL_MEM_FENCE flags set.
1735+
`CLK_GLOBAL_MEM_FENCE` and `CLK_LOCAL_MEM_FENCE` flags set.
17371736
*X* global-synchronizes-with *Y* and *X* local synchronizes with *Y* if the
17381737
conditions required for *X* to global-synchronize with *Y* are met, the
17391738
conditions required for *X* to local-synchronize-with *Y* are met, or both
@@ -1773,10 +1772,10 @@ chapter as well as the following:
17731772
* The exit fence is an acquire fence with the same flags and scope as
17741773
requested for the barrier.
17751774
* For each work-item the entry fence is sequenced before the exit fence.
1776-
* If the flags have CLK_GLOBAL_MEM_FENCE set then for each work-item the
1775+
* If the flags have `CLK_GLOBAL_MEM_FENCE` set then for each work-item the
17771776
entry fence global-synchronizes-with the exit fence of all other
17781777
work-items in the same work-group.
1779-
* If the flags have CLK_LOCAL_MEM_FENCE set then for each work-item the
1778+
* If the flags have `CLK_LOCAL_MEM_FENCE` set then for each work-item the
17801779
entry fence local-synchronizes-with the exit fence of all other
17811780
work-items in the same work-group.
17821781

@@ -1828,10 +1827,10 @@ chapter as well as the following:
18281827
* The exit fence is an acquire fence with the same flags and scope as
18291828
requested for the barrier.
18301829
* For each work-item the entry fence is sequenced before the exit fence.
1831-
* If the flags have CLK_GLOBAL_MEM_FENCE set then for each work-item the
1830+
* If the flags have `CLK_GLOBAL_MEM_FENCE` set then for each work-item the
18321831
entry fence global-synchronizes-with the exit fence of all other
18331832
work-items in the same sub-group.
1834-
* If the flags have CLK_LOCAL_MEM_FENCE set then for each work-item the
1833+
* If the flags have `CLK_LOCAL_MEM_FENCE` set then for each work-item the
18351834
entry fence local-synchronizes-with the exit fence of all other
18361835
work-items in the same sub-group.
18371836

@@ -1947,10 +1946,10 @@ following:
19471946
{CL_COMPLETE} (for example, from a host thread using a
19481947
{clSetUserEventStatus} function), then *X* global-synchronizes-with *C*.
19491948
. If a device enqueues a command *C* with the
1950-
CLK_ENQUEUE_FLAGS_WAIT_KERNEL flag, then the end state of the parent
1949+
`CLK_ENQUEUE_FLAGS_WAIT_KERNEL` flag, then the end state of the parent
19511950
kernel instance global-synchronizes with *C*.
19521951
. If a work-group enqueues a command *C* with the
1953-
CLK_ENQUEUE_FLAGS_WAIT_WORK_GROUP flag, then the end state of the
1952+
`CLK_ENQUEUE_FLAGS_WAIT_WORK_GROUP` flag, then the end state of the
19541953
work-group global-synchronizes with *C*.
19551954

19561955
When using an out-of-order command queue, a wait on an event or a marker or

api/opencl_platform_layer.asciidoc

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ in the <<platform-queries-table, Platform Queries>> table.
7676

7777
[[platform-queries-table]]
7878
.List of supported param_names by <<clGetPlatformInfo>>
79-
[width="100%",cols="<50%,<10%,<40%",options="header"]
79+
[width="100%",cols="<33%,<17%,<50%",options="header"]
8080
|====
8181
| Platform Info | Return Type | Description
8282
| {CL_PLATFORM_PROFILE_anchor} footnote:[{fn-platform-profile}]
@@ -332,7 +332,7 @@ device except for the following queries:
332332

333333
[[device-queries-table]]
334334
.List of supported param_names by <<clGetDeviceInfo>>
335-
[width="100%",cols="<30%,<20%,<50%",options="header"]
335+
[width="100%",cols="<33%,<17%,<50%",options="header"]
336336
|====
337337
| Device Info | Return Type | Description
338338
| {CL_DEVICE_TYPE_anchor}
@@ -1149,7 +1149,7 @@ include::{generated}/api/version-notes/CL_DEVICE_EXTENSIONS.asciidoc[]
11491149

11501150
Additionally, the following Khronos extension names must be returned
11511151
by all devices that support OpenCL 2.0, OpenCL 2.1, or OpenCL 2.2.
1152-
For devices that support OpenCL 3.0, these extension names must only
1152+
For devices that support OpenCL 3.0, these extension names must
11531153
be returned when and only when the optional feature is supported:
11541154

11551155
*cl_khr_3d_image_writes* +
@@ -1607,7 +1607,7 @@ on the queue are executed only on the sub-device.
16071607

16081608
[[subdevice-partition-table]]
16091609
.List of supported partition schemes by <<clCreateSubDevices>>
1610-
[width="100%",cols="<30%,<20%,<50%",options="header"]
1610+
[width="100%",cols="<33%,<17%,<50%",options="header"]
16111611
|====
16121612
| Partition Property | Partition Value | Description
16131613
| {CL_DEVICE_PARTITION_EQUALLY_anchor}
@@ -1709,7 +1709,8 @@ containing 8 compute units, pass the following in _properties_:
17091709

17101710
[source,c]
17111711
----
1712-
{ CL_DEVICE_PARTITION_EQUALLY, 8, 0 }
1712+
{ CL_DEVICE_PARTITION_EQUALLY, 8,
1713+
0 } // 0 terminates the property list
17131714
----
17141715

17151716
To partition a device with four compute units into two sub-devices with one
@@ -1719,7 +1720,8 @@ unit, pass the following in properties argument:
17191720
[source,c]
17201721
----
17211722
{ CL_DEVICE_PARTITION_BY_COUNTS,
1722-
3, 1, CL_DEVICE_PARTITION_BY_COUNTS_LIST_END, 0 }
1723+
3, 1, CL_DEVICE_PARTITION_BY_COUNTS_LIST_END,
1724+
0 } // 0 terminates the property list
17231725
----
17241726

17251727
To split a device along the outermost cache line (if any), pass the
@@ -1728,8 +1730,8 @@ following in properties argument:
17281730
[source,c]
17291731
----
17301732
{ CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN,
1731-
CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE,
1732-
0 }
1733+
CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE,
1734+
0 } // 0 terminates the property list
17331735
----
17341736
--
17351737

@@ -1846,7 +1848,7 @@ on one or more devices specified in the context.
18461848

18471849
[[context-properties-table]]
18481850
.List of supported context creation properties by <<clCreateContext>>
1849-
[width="100%",cols="<34%,<33%,<33%",options="header"]
1851+
[width="100%",cols="<33%,<17%,<50%",options="header"]
18501852
|====
18511853
| Context Property | Property Value | Description
18521854
| {CL_CONTEXT_PLATFORM_anchor}
@@ -2057,9 +2059,9 @@ _param_value_ by {clGetContextInfo} is described in the
20572059

20582060
[[context-info-table]]
20592061
.List of supported param_names by <<clGetContextInfo>>
2060-
[width="100%",cols="<34%,<33%,<33%",options="header"]
2062+
[width="100%",cols="<33%,<17%,<50%",options="header"]
20612063
|====
2062-
| Context Info | Return Type | Information returned in param_value
2064+
| Context Info | Return Type | Description
20632065
| {CL_CONTEXT_REFERENCE_COUNT_anchor} footnote:[{fn-reference-count-usage}]
20642066

20652067
include::{generated}/api/version-notes/CL_CONTEXT_REFERENCE_COUNT.asciidoc[]

0 commit comments

Comments
 (0)