asherliu / thrust

Automatically exported from code.google.com/p/thrust
Apache License 2.0
0 stars 0 forks source link

thrust::detail::device::generic::scalar::binary_search does not use dereference. #414

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In thrust::detail::device::generic::scalar::binary_search, iterator is 
dereferenced by using operator*.

thrust/detail/device/generic/scalar/binary_search.inl, line 126
return iter != last && !comp(value, *iter);

But I think it shall be wrote as:
return iter != last && !comp(value, dereference(iter));

Thanks

Original issue reported on code.google.com by tosh...@gmail.com on 22 Nov 2011 at 3:41

GoogleCodeExporter commented 8 years ago

Original comment by jaredhoberock on 22 Nov 2011 at 3:44

GoogleCodeExporter commented 8 years ago
You are right. Thanks for the report

Original comment by jaredhoberock on 22 Nov 2011 at 3:49

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 7228ab353983.

Original comment by jaredhoberock on 21 Jan 2012 at 1:25