Skip to content

Commit 0e36da3

Browse files
[C++ for OpenCL] Added references section. (#518)
* [C++ for OpenCL] Added references section. The document is updated to cite the references where needed.
1 parent d353c7c commit 0e36da3

4 files changed

Lines changed: 38 additions & 13 deletions

File tree

CXX_for_OpenCL.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,9 @@ include::cxx4opencl/address_spaces.txt[]
4848

4949
<<<
5050

51+
include::cxx4opencl/references.txt[]
52+
53+
<<<
54+
5155
include::cxx4opencl/acknowledgements.txt[]
5256

cxx4opencl/address_spaces.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
This section only documents behavior related to {cpp} features. For example
1111
conversion rules are extended from the qualification conversion {cpp}17
1212
`[conv.qual]` but the compatibility is determined using notation of sets and
13-
overlapping of address spaces from Embedded C
14-
(`ISO/IEC JTC1 SC22 WG14 N1021 s3.1.3`). For OpenCL it means that implicit
13+
overlapping of address spaces from `section 5.1.3` of <<embedded-c-spec,
14+
The Embedded C Specification>>. For OpenCL it means that implicit
1515
conversions are allowed from a named address space (except for `+__constant+`)
1616
to generic (`OpenCL C v2.0 6.5.5`). The reverse conversion is only allowed
1717
explicitly. The `+__constant+` address space does not overlap with any other
@@ -60,7 +60,7 @@ rules from address space pointer conversion (`OpenCL v2.0 s6.5.5`).
6060

6161
This section details what happens if address spaces for types are not
6262
provided in the source code explicitly. Most of the logic for address space
63-
deduction (i.e. default address space) follows rules from `OpenCL 2.0 s6.5`.
63+
deduction (i.e. default address space) follows rules from `OpenCL v2.0 s6.5`.
6464

6565
References inherit rules from pointers and therefore refer to generic
6666
address space objects by default (see <<references, _References_>>).

cxx4opencl/intro.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,31 @@ most of regular {cpp} features in OpenCL kernel code. Most functionality
1010
from {cpp} and OpenCL C is inherited. Since both OpenCL C and {cpp} are
1111
derived from C and moreover {cpp} is almost fully backward compatible with C,
1212
the main design principle of {cpp} for OpenCL is to reapply existing OpenCL
13-
concepts to {cpp}. Therefore, it is important to refer to OpenCL v2.0 section
14-
3.2 and section 3.3 detailing fundamental differences of OpenCL execution and
15-
memory models from the conventional C and {cpp} view.
13+
concepts to {cpp}. Therefore, it is important to refer to
14+
<<opencl-spec, The OpenCL Specification, Version 2.0>> `section
15+
3.2` and `section 3.3` detailing fundamental differences of OpenCL execution
16+
and memory models from the conventional C and {cpp} view.
1617

1718
This document describes the programming language in details. It is not
18-
structured as a standalone document, but rather as an addition to `OpenCL C
19-
v2.0 s6` and {cpp}17 (`ISO/IEC 14882:2017`). Where necessary this document
20-
refers to the specifications of those languages accordingly. A full
21-
understanding of {cpp} for OpenCL requires familiarity with the
19+
structured as a standalone document, but rather as an addition to OpenCL C
20+
v2.0 defined in <<openclc-spec, The OpenCL C Specification, Version 2.0>>
21+
and {cpp}17 defined in <<cpp17-spec, The C++17 Specification>>. Where necessary
22+
this document refers to the specifications of those languages accordingly.
23+
A full understanding of {cpp} for OpenCL requires familiarity with the
2224
specifications or other documentation of both languages that {cpp} for OpenCL
2325
is built upon.
2426

2527
The description of {cpp} for OpenCL starts from highlighting <<diff2openclc,
2628
_the differences to OpenCL C_>> and <<diff2cxx, _the differences to {cpp}_>>.
2729

2830
The majority of content covers the behavior that is not documented in
29-
the OpenCL C v2.0 section 6 and {cpp}17 specifications. This is mainly
31+
the OpenCL C v2.0 `section 6` and {cpp}17 specifications. This is mainly
3032
related to interactions between OpenCL and {cpp} language features.
3133

3234
== The {cpp} for OpenCL Programming Language
3335

34-
This programming language inherits features from `OpenCL C v2.0 s6` as well
35-
as {cpp}17 (`ISO/IEC 14882:2017`). Detailed aspects of OpenCL and {cpp} are not
36+
This programming language inherits features from `OpenCL C v2.0,
37+
s6` as well as {cpp}17. Detailed aspects of OpenCL and {cpp} are not
3638
described in this document as they can be found in their official
3739
specifications.
3840

cxx4opencl/references.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2019-2020 The Khronos Group. This work is licensed under a
2+
// Creative Commons Attribution 4.0 International License; see
3+
// http://creativecommons.org/licenses/by/4.0/
4+
5+
== Normative References
6+
7+
. [[opencl-spec]] "`The OpenCL Specification, Version 2.0`",
8+
https://www.khronos.org/registry/OpenCL/.
9+
. [[openclc-spec]] "`The OpenCL C Specification, Version 2.0`",
10+
https://www.khronos.org/registry/OpenCL/.
11+
. [[cpp17-spec]] "`ISO/IEC 14882:2017 - Programming languages — {CPP}`",
12+
https://www.iso.org/standard/68564.html.
13+
References are to sections of this specific version, referred to as the
14+
"`The C++17 Specification`", although other versions exist.
15+
. [[embedded-c-spec]] "`ISO/IEC TR 18037:2008 Programming languages -
16+
C - Extensions to support embedded processors`",
17+
https://www.iso.org/standard/51126.html.
18+
References are to sections of this specific version, referred to as the
19+
"`The Embedded C Specification`", although other versions exist.

0 commit comments

Comments
 (0)