Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-73240

QtConcurrent reduce should accept initial value

    XMLWordPrintable

Details

    • User Story
    • Resolution: Done
    • P2: Important
    • 6.0
    • 5.12.0
    • Core: QtConcurrent
    • None
    • All
    • 13
    • Qt6_Foundation_ Sprint 4
    • d57adfe5f375121c3e233465526ee5d9df03e1e9

    Description

      When using map-reduce or filter-reduce, it is sometimes desirable to provide an initial state for the output object (i.e. the object to which the reduce step will be applied). This may be because the desired output object has no default constructor, or because the default constructor produces an initial state which is not appropriate for the operation.

      Although it is possible to work around this by binding the object to a stateful reduce functor, this can be awkward since it requires the reduce functor to take a dummy parameter, and the actual result is no longer returned from the QtConcurrent call. It would be much more convenient if QtConcurrent simply accepted an initial state.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            manordheim MÃ¥rten Nordheim
            matthew.woehlke Matthew Woehlke
            Maurice Kalinowski Maurice Kalinowski
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes