KhronosGroup / KhronosGroup/SYCL-Docs
Missing `operator bool()` for marray
- Dominant language
- JavaScript
- Stars
- 158
- Forks
- 80
- Avg merge
- 7d 6h
- Merged PRs (30d)
- 5
Description
I think we forgot to defined the `operator bool()` for marray.
Indeed it's not present in [4.14.3.1. Math array interface](https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#_math_array_interface). ( marray doesn't follow the [4.5.2. Common reference semantics](https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:reference-semantics) neither, but I guess that doesn't matter as common reference semantics doesn't define `operator bool`)
I think that `bool(marray)` should be equal to True if all elements of the array evaluate to `True` and `False` otherwise.
(found by @nscottnichols)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with section 4.14.3.1, Math array interface, and compare its documented operators with the common reference semantics in section 4.5.2. Confirm the intended conversion behavior from the issue, then update the specification so the operator and its all-elements semantics are explicitly documented; done means the marray interface describes this behavior unambiguously.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100