Commit acf2ca8
authored
[SYCL][Doc] Add indeterminate to work_group_memory (intel#15933)
We decided that it was too easy to mistakenly use the default
constructor like this, with the expectation that it statically allocates
work-group local memory:
```
void device_code() {
syclex::work_group_memory<int> mem;
}
```
To make this error less likely, we add a parameter to the constructor
named `indeterminate`:
```
void device_code() {
syclex::work_group_memory<int> mem{syclex::indeterminate};
}
```
We hope this will make it more apparent that `mem` is just a dummy
object, and it needs to be assigned to some other `work_group_memory`
object before it can be used.1 parent 4444135 commit acf2ca8
File tree
1 file changed
+11
-3
lines changed- sycl/doc/extensions/proposed
1 file changed
+11
-3
lines changedLines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
114 | | - | |
| 117 | + | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
| |||
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
135 | | - | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
| |||
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
196 | | - | |
| 199 | + | |
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
| |||
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
210 | 218 | | |
211 | 219 | | |
212 | 220 | | |
| |||
0 commit comments