Skip to content

[execution.senders.adaptors.bulk] wording should indicate that f is called with i = [0, ..., shape-1] #102

Open
@ericniebler

Description

@ericniebler

Issue by lewissbaker
Tuesday Dec 28, 2021 at 07:04 GMT
Originally opened as NVIDIA/stdexec#340


The current wording says:

If the function selected above does not return a sender which invokes f(i, args...) for each i of type Shape from 0 to shape when the input sender sends values args..., or does not propagate the values of the signals sent by the input sender to a connected receiver, the program is ill-formed with no diagnostic required.

and

When execution::set_value(r, args...) is called, calls f(i, args...) for each i of type Shape from 0 to shape, then calls execution::set_value(out_r, args...). If any of these throws an exception, it catches it and calls execution::set_error(out_r, current_exception()).

The wording here seems to imply that f is called once for each i in range 0 to shape inclusive, but this would result in shape + 1 calls to f. Whereas I assume that the intent is that f should be called shape times. i.e. for i from 0 to shape - 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0bugSomething isn't workingpending-wg21A paper or an LWG issue exitsprocessedprocessed in a meetingwording

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions