asherliu / thrust

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

swap_ranges on forced_iterators is broken #350

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
$ nvcc -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP -Xcompiler -fopenmp 
bug.cu -lgomp
$ ./a.out 
inital data
A
>>> [0] = 0
>>> [1] = 0
>>> [2] = 0
B
>>> [0] = 1
>>> [1] = 1
>>> [2] = 1

swap ranges using normal iterators
A
>>> [0] = 1
>>> [1] = 1
>>> [2] = 1
B
>>> [0] = 0
>>> [1] = 0
>>> [2] = 0

swap ranges using forced iterators
A
>>> [0] = 0
>>> [1] = 0
>>> [2] = 0
B
>>> [0] = 0
>>> [1] = 0
>>> [2] = 0

Original issue reported on code.google.com by wnbell on 20 Jul 2011 at 10:15

Attachments:

GoogleCodeExporter commented 8 years ago
Revision 36e4327f339e adds the test TestSwapRangesForcedIterator

================================================================
FAILURE: TestSwapRangesForcedIterator
[swap_ranges.cu:68] values are not equal: 1 0 
[type='thrust::device_reference<int>']
================================================================

Original comment by wnbell on 21 Jul 2011 at 12:19

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

Original comment by jaredhoberock on 21 Jul 2011 at 6:51