Skip to content

Commit 17d17d4

Browse files
Fix offset_iterator tests (#6436) (#6446)
(cherry picked from commit 79060c8) Co-authored-by: Bernhard Manfred Gruber <[email protected]>
1 parent 471db1d commit 17d17d4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

thrust/testing/cuda/offset_iterator.cu

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ struct device_only_iterator
5656
return *this;
5757
}
5858

59-
_CCCL_DEVICE friend bool operator-(const device_only_iterator& a, const device_only_iterator& b)
59+
_CCCL_DEVICE friend device_only_iterator operator+(device_only_iterator it, difference_type d)
60+
{
61+
return it += d;
62+
}
63+
64+
_CCCL_DEVICE friend difference_type operator-(const device_only_iterator& a, const device_only_iterator& b)
6065
{
6166
return a.m_ptr - b.m_ptr;
6267
}

0 commit comments

Comments
 (0)