Skip to content
Permalink
Browse files

Fixed iterator diff for thrust iterator adapter

  • Loading branch information
JPenuchot committed Nov 18, 2019
1 parent 4618370 commit 35ca5ec599a777b7af5312bd6630c831099290d9
Showing with 5 additions and 1 deletion.
  1. +5 −1 blaze_cuda/util/algorithms/CUDATransform.h
@@ -85,12 +85,16 @@ class ThrustInputIteratorAdapter
BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE auto
operator-( ThrustInputIteratorAdapter const& other ) const noexcept
{
return ThrustInputIteratorAdapter( it - other.it );
return it - other.it;
}

BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE auto operator+( ptrdiff_t inc ) const noexcept {
return ThrustInputIteratorAdapter( IteratorType( it + inc ) );
}

BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE auto operator-( ptrdiff_t dec ) const noexcept {
return ThrustInputIteratorAdapter( IteratorType( it - dec ) );
}
};

template< typename IteratorType >

0 comments on commit 35ca5ec

Please sign in to comment.
You can’t perform that action at this time.