thrust::exclusive_scan
deduces value type from identity value
#836
Labels
thrust
For all items related to Thrust.
I ran into a particularly hard-to-spot issue that I would consider a bug
in Thrustin the C++ standard 😄 :I would expect this to output 0, LONG_MAX - 1 and LONG_MAX, instead it outputs 0, -2, -1.
EDIT: I checked with std::exclusive_scan, and I get the same behavior, but TBH this seems like a really bug-prone specification to me. I would expect the computational type to be derived based on the return type of the associative operation or the iterator types.
The text was updated successfully, but these errors were encountered: