You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Krisztian Szucs (Jira)" <ji...@apache.org> on 2020/04/15 18:51:00 UTC

[jira] [Assigned] (ARROW-8299) [C++] Reusable "optional ParallelFor" function for optional use of multithreading

     [ https://issues.apache.org/jira/browse/ARROW-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Krisztian Szucs reassigned ARROW-8299:
--------------------------------------

    Assignee: Liya Fan

> [C++] Reusable "optional ParallelFor" function for optional use of multithreading
> ---------------------------------------------------------------------------------
>
>                 Key: ARROW-8299
>                 URL: https://issues.apache.org/jira/browse/ARROW-8299
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++
>            Reporter: Wes McKinney
>            Assignee: Liya Fan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.17.0
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> We often see code like
> {code}
>     if (use_threads) {
>       return ::arrow::internal::ParallelFor(n, Func);
>     } else {
>       for (size_t i = 0; i < n; ++i) {
>         RETURN_NOT_OK(Func(i));
>       }
>       return Status::OK();
> {code}
> It might be nice to have a helper function to do this. It doesn't even need to be an inline template, it could be a precompiled function accepting {{std::function<Status(int)>}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)