Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Revert "Change the position counting type for constant_iterator to in…
Browse files Browse the repository at this point in the history
…tmax_t."

temporarily, because it was mistakenly not integrated into the 10.1 branch.

This reverts commit a30c62b.
  • Loading branch information
brycelelbach committed Jan 29, 2019
1 parent 395f62b commit d1e53ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions testing/constant_iterator.cu
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ void TestConstantIteratorIncrement(void)
}
DECLARE_UNITTEST(TestConstantIteratorIncrement);

void TestConstantIteratorIncrementBig(void)
{
long long int n = 10000000000ULL;

thrust::constant_iterator<long long int> begin(1);
thrust::constant_iterator<long long int> end = begin + n;

ASSERT_EQUAL(thrust::distance(begin, end), n);
}
DECLARE_UNITTEST(TestConstantIteratorIncrementBig);

void TestConstantIteratorComparison(void)
{
using namespace thrust;
Expand Down Expand Up @@ -96,7 +85,7 @@ void TestMakeConstantIterator(void)
ASSERT_EQUAL(13, *iter0);

// test two argument version
constant_iterator<int,thrust::detail::intmax_t> iter1 = make_constant_iterator<int,thrust::detail::intmax_t>(13, 7);
constant_iterator<int,int> iter1 = make_constant_iterator<int,int>(13, 7);

ASSERT_EQUAL(13, *iter1);
ASSERT_EQUAL(7, iter1 - iter0);
Expand Down
2 changes: 1 addition & 1 deletion thrust/iterator/detail/constant_iterator_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ template<typename Value,
// the incrementable type is int unless otherwise specified
typedef typename thrust::detail::ia_dflt_help<
Incrementable,
thrust::detail::identity_<thrust::detail::intmax_t>
thrust::detail::identity_<int>
>::type incrementable;

typedef typename thrust::counting_iterator<
Expand Down

0 comments on commit d1e53ce

Please sign in to comment.