thrust::system::cuda::par stream documentation incorrect
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
(Revised now that I've found the error)
With a `cudaStream_t stream`,
- The [documentation](https://thrust.github.io/doc/group__execution__policies.html#ga64da56b76f487725a99818cd63662dac) says to do `thrust::cuda::par(stream)`.
- The [example](https://github.com/thrust/thrust/blob/8551c97870cd722486ba7834ae9d867f13e299ad/examples/cuda/simple_cuda_streams.cu#L93) says to use `thrust::cuda::par.on(stream)`
The example code works, documentation (the second code block for that method) does not compile.
The compilation error received:
```console
/path/to/sumTest/main.cu(50): error: no instance of function template "thrust::system::cuda::detail::par_t::operator()" matches the argument list
argument types are: (cudaStream_t)
object type is: const thrust::system::cuda::detail::par_t
/path/to/sumTest/main.cu(47): error: no instance of overloaded function "thrust::reduce_by_key" matches the argument list
argument types are: (, thrust::transform_iterator, thrust::counting_iterator, thrust::use_default, thrust::use_default>, thrust::transform_iterator, thrust::counting_iterator, thrust::use_default, thrust::use_default>, thrust::detail::normal_iterator>, thrust::detail::normal_iterator>, thrust::detail::normal_iterator>, thrust::equal_to, thrust::plus)
```
I (quickly) looked around the wiki and did not find any examples that have the same issue, the only mentions of `thrust::cuda::par` are [here](https://github.com/thrust/thrust/wiki/Direct-System-Access#additional-info), but they aren't talking about streams. Anyway, it might be worth somebody else taking a second look :smile:
Contributor guide
Assessment
This issue has not been assessed yet.