Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-7658

Fix SpanPixelIterator for pybind11

    XMLWordPrintable

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: None

      Description

      For some reason the pybind11 wrappers for Span cannot use the standard pybind11::make_iterator function for its iterator. This lead Jim Bosch to find that:

      A different discussion with @pschella led me to look up the iterator category for SpanPixelIterator, and it is indeed incorrectly set to random_access_iterator rather than either input_iterator or forward_iterator (I haven't thought hard enough about this particular case to figure out which it ought to be yet). I'm not certain fixing that will fix the problem; pybind11 would have to have different implementations for different iterator categories (presumably as an optimization) for this to matter, but it could be what's going wrong. In any case, our code should be fixed, and it'd be worth seeing if that allows py::make_iterator to work properly.

      Fix this.

        Attachments

          Issue Links

            Activity

            Hide
            jbosch Jim Bosch added a comment - - edited

            Edit: removed incorrect post (needed to change the iterator to InputItreator, not ForwardIterator, and that's tricker than I have time for now).

            Show
            jbosch Jim Bosch added a comment - - edited Edit: removed incorrect post (needed to change the iterator to InputItreator, not ForwardIterator, and that's tricker than I have time for now).
            Hide
            swinbank John Swinbank added a comment -

            Still unfixed as of 2020-09-21. Low priority.

            Show
            swinbank John Swinbank added a comment - Still unfixed as of 2020-09-21. Low priority.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              pschella Pim Schellart [X] (Inactive)
              Watchers:
              Jim Bosch, John Swinbank, Pim Schellart [X] (Inactive), Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Jenkins

                  No builds found.