You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated the document to use up-to-date extension template.
Added revision 2 of the extension, which adds ability for user to
construct `sub_group_mask` from specific values.
---------
Co-authored-by: John Pennycook <[email protected]>
Copy file name to clipboardExpand all lines: sycl/doc/extensions/supported/sycl_ext_oneapi_sub_group_mask.asciidoc
+86-53Lines changed: 86 additions & 53 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
:toc: left
9
9
:encoding: utf-8
10
10
:lang: en
11
+
:dpcpp: pass:[DPC++]
11
12
12
13
:blank: pass:[ +]
13
14
@@ -16,61 +17,65 @@
16
17
// docbook uses c++ and html5 uses cpp.
17
18
:language: {basebackend@docbook:c++:cpp}
18
19
19
-
== Introduction
20
-
IMPORTANT: This specification is a draft.
21
20
22
-
NOTE: Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by permission by Khronos.
21
+
== Notice
23
22
24
-
This document describes an extension which adds a `sub_group_mask` type. Such a mask can be used to efficiently represent subsets of work-items in a sub-group for which a given Boolean condition holds.
23
+
[%hardbreaks]
24
+
Copyright (C) 2021-2023 Intel Corporation. All rights reserved.
25
25
26
-
== Notice
26
+
Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks
27
+
of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by
28
+
permission by Khronos.
27
29
28
-
Copyright (c) 2021 Intel Corporation. All rights reserved.
29
30
30
-
== Status
31
+
== Contact
31
32
32
-
Working Draft
33
+
To report problems with this extension, please open a new issue at:
33
34
34
-
This is a preview extension specification, intended to provide early access to a feature for review and community feedback. When the feature matures, this specification may be released as a formal extension.
35
+
https://github.com/intel/llvm/issues
35
36
36
-
Because the interfaces defined by this specification are not final and are subject to change they are not intended to be used by shipping software products.
37
37
38
-
== Version
38
+
== Dependencies
39
39
40
-
Revision: 1
40
+
This extension is written against the SYCL 2020 revision 6 specification. All
41
+
references below to the "core SYCL specification" or to section numbers in the
42
+
SYCL specification refer to that revision.
41
43
42
-
== Contact
43
-
John Pennycook, Intel (john 'dot' pennycook 'at' intel 'dot' com)
44
44
45
-
== Dependencies
45
+
== Status
46
+
47
+
This extension is implemented and fully supported by {dpcpp}.
48
+
49
+
== Overview
50
+
51
+
This document describes an extension which adds a `sub_group_mask` type. Such a
52
+
mask can be used to efficiently represent subsets of work-items in a sub-group
53
+
for which a given Boolean condition holds.
54
+
55
+
Group mask functionality is currently limited to groups that are instances of
56
+
the `sub_group` class, but this limitation may be lifted in a future version of
57
+
the specification.
58
+
46
59
47
-
This extension is written against the SYCL 2020 specification, Revision 3.
60
+
== Specification
48
61
49
-
== Feature Test Macro
62
+
=== Feature Test Macro
50
63
51
64
This extension provides a feature-test macro as described in the core SYCL
52
-
specification section 6.3.3 "Feature test macros". Therefore, an
53
-
implementation supporting this extension must predefine the macro
54
-
`SYCL_EXT_ONEAPI_SUB_GROUP_MASK` to one of the values defined in the table
55
-
below. Applications can test for the existence of this macro to determine if
65
+
specification. An implementation supporting this extension must predefine the
66
+
macro `SYCL_EXT_ONEAPI_SUB_GROUP_MASK` to one of the values defined in the table
67
+
below. Applications can test for the existence of this macro to determine if
56
68
the implementation supports this feature, or applications can test the macro's
57
-
value to determine which of the extension's APIs the implementation supports.
69
+
value to determine which of the extension's features the implementation
70
+
supports.
58
71
59
72
[%header,cols="1,5"]
60
73
|===
61
74
|Value |Description
62
75
|1 |Initial extension version. Base features are supported.
76
+
|2 |`sub_group_mask` is user-constructible.
63
77
|===
64
78
65
-
== Overview
66
-
67
-
A group mask is an integral type sized such that each work-item in the group is
68
-
represented by a single bit. Such a mask can be used to efficiently represent
69
-
subsets of work-items in a group for which a given Boolean condition holds.
70
-
71
-
Group mask functionality is currently limited to groups that are instances of
72
-
the `sub_group` class, but this limitation may be lifted in a future version of
73
-
the specification.
74
79
75
80
=== Ballot
76
81
@@ -81,8 +86,10 @@ must be encountered by all work-items in the group in converged control flow.
|Return a `sub_group_mask` with one bit for each work-item in group _g_. A bit is set in this mask if and only if the corresponding work-item's _predicate_ is `true`.
0 commit comments