KhronosGroup / KhronosGroup/SYCL-Docs

What should `local_accessor().max_size()` return?

Open
#332 6 comments 1 reaction 0 assignees View on GitHub
Agenda clarification
Dominant language
JavaScript
Stars
158
Forks
80
Avg merge
7d 6h
Merged PRs (30d)
5

Description

On the one hand, according to Table 77, `local_accessor()`
```
Constructs an empty local accessor which fulfills the following post-conditions:
- (empty() == true)
- All size queries return 0.
- The return values of get_pointer() and get_multi_ptr() are unspecified.
- Trying to access the underlying memory is undefined behavior.
```

On the other hand, according to Table 80, `max_size()`
```
Returns the maximum number of elements any accessor of this type would be able to access.
```

So, should `local_accessor().max_size()` return 0, following Table 77 (considering that `max_size()` is one of `All size queries`), or should it return `the maximum number of elements any accessor of this type would be able to access` following Table 80?

For the record, _my_ understanding is that `All size queries` refer to the queries related to the instance, while `max_size()` is a generic query not actually related to the instance, so `max_size()` should **not** return 0.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the local_accessor() requirements in Table 77 with the max_size() definition in Table 80, then inspect the surrounding accessor specification for related size-query wording. Resolve the interpretation with the specification context and update the relevant normative text so the behavior and distinction between instance and type queries are unambiguous.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.