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
[SYCL][Doc] Add indeterminate to work_group_memory (#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.
0 commit comments