Skip to content

Use parallel implementations for CPU execution policies #831

@gevtushenko

Description

@gevtushenko

Execution policies like TBB and OMP are currently using serial implementation for some algorithms. For instance:

#define THRUST_HOST_SYSTEM THRUST_HOST_SYSTEM_OMP
#include <thrust/execution_policy.h>
#include <thrust/host_vector.h>
#include <thrust/scan.h>

int main() {
  thrust::host_vector<int> keys(1 << 20, 1);
  thrust::host_vector<int> vals(1 << 20, 1);
  thrust::exclusive_scan_by_key(keys.begin(), keys.end(), vals.begin(),
                                vals.begin(), 0, thrust::plus<int>(),
                                thrust::equal_to<int>());
}

We have generic parallel implementation of this algorithm, that's unused.

Tasks

  • Use generic implementation of *scan_by_key for TBB and OMP execution policies
  • Implement parallel version of *scan for OMP execution policy

Metadata

Metadata

Assignees

No one assigned

    Labels

    thrustFor all items related to Thrust.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions