@@ -174,13 +174,13 @@ class device_contiguous_iterator : public device_iterator<T,typename ecuda::add_
174174 }
175175 #endif
176176
177- __HOST__ __DEVICE__ inline device_contiguous_iterator operator +( int x ) const { return device_contiguous_iterator ( base_type::ptr + x ); }
178- __HOST__ __DEVICE__ inline device_contiguous_iterator operator -( int x ) const { return device_contiguous_iterator ( base_type::ptr - x ); }
177+ __HOST__ __DEVICE__ inline device_contiguous_iterator operator +( difference_type x ) const { return device_contiguous_iterator ( base_type::ptr + x ); }
178+ __HOST__ __DEVICE__ inline device_contiguous_iterator operator -( difference_type x ) const { return device_contiguous_iterator ( base_type::ptr - x ); }
179179
180- __HOST__ __DEVICE__ inline device_contiguous_iterator& operator +=( int x ) { base_type::ptr += x; return *this ; }
181- __HOST__ __DEVICE__ inline device_contiguous_iterator& operator -=( int x ) { base_type::ptr -= x; return *this ; }
180+ __HOST__ __DEVICE__ inline device_contiguous_iterator& operator +=( difference_type x ) { base_type::ptr += x; return *this ; }
181+ __HOST__ __DEVICE__ inline device_contiguous_iterator& operator -=( difference_type x ) { base_type::ptr -= x; return *this ; }
182182
183- __DEVICE__ inline reference operator []( int x ) const { return *(base_type::ptr+x); }
183+ __DEVICE__ inline reference operator []( difference_type x ) const { return *(base_type::ptr+x); }
184184
185185 __HOST__ __DEVICE__ inline difference_type operator -( const device_contiguous_iterator& other ) { return base_type::ptr - other.ptr ; }
186186
@@ -278,16 +278,16 @@ class device_contiguous_block_iterator : public device_iterator<T,padded_ptr<T,P
278278 return tmp;
279279 }
280280
281- __HOST__ __DEVICE__ device_contiguous_block_iterator operator +( int x ) const
281+ __HOST__ __DEVICE__ device_contiguous_block_iterator operator +( difference_type x ) const
282282 {
283283 device_contiguous_block_iterator tmp ( *this );
284284 tmp += x;
285285 return tmp;
286286 }
287287
288- __HOST__ __DEVICE__ inline device_contiguous_block_iterator operator -( int x ) const { return operator +(-x); }
288+ __HOST__ __DEVICE__ inline device_contiguous_block_iterator operator -( difference_type x ) const { return operator +(-x); }
289289
290- __HOST__ __DEVICE__ device_contiguous_block_iterator& operator +=( int x )
290+ __HOST__ __DEVICE__ device_contiguous_block_iterator& operator +=( difference_type x )
291291 {
292292 const int rows = x / width;
293293 base_type::ptr.skip_bytes ( rows * base_type::ptr.get_pitch () );
@@ -298,9 +298,9 @@ class device_contiguous_block_iterator : public device_iterator<T,padded_ptr<T,P
298298 if ( offset < 0 ) { base_type::ptr.skip_bytes ( width*sizeof (value_type) - base_type::ptr.get_pitch () ); offset += width; }
299299 return *this ;
300300 }
301- __HOST__ __DEVICE__ inline device_contiguous_block_iterator& operator -=( int x ) { operator +=(-x); return *this ; }
301+ __HOST__ __DEVICE__ inline device_contiguous_block_iterator& operator -=( difference_type x ) { operator +=(-x); return *this ; }
302302
303- __DEVICE__ inline reference operator []( int x ) const { return *operator +(x); }
303+ __DEVICE__ inline reference operator []( difference_type x ) const { return *operator +(x); }
304304
305305 __HOST__ __DEVICE__ inline difference_type operator -( const device_contiguous_block_iterator& other ) const
306306 {
@@ -399,18 +399,18 @@ class reverse_device_iterator //: public std::iterator<device_iterator_tag,typen
399399
400400 __HOST__ __DEVICE__ inline difference_type operator -( const reverse_device_iterator& other ) { return parentIterator - other.parentIterator ; }
401401
402- __HOST__ __DEVICE__ inline reverse_device_iterator operator +( int x ) const { return reverse_device_iterator ( parentIterator-x ); }
403- __HOST__ __DEVICE__ inline reverse_device_iterator operator -( int x ) const { return reverse_device_iterator ( parentIterator+x ); }
402+ __HOST__ __DEVICE__ inline reverse_device_iterator operator +( difference_type x ) const { return reverse_device_iterator ( parentIterator-x ); }
403+ __HOST__ __DEVICE__ inline reverse_device_iterator operator -( difference_type x ) const { return reverse_device_iterator ( parentIterator+x ); }
404404
405405 __HOST__ __DEVICE__ inline bool operator <( const reverse_device_iterator& other ) const { return parentIterator < other.parentIterator ; }
406406 __HOST__ __DEVICE__ inline bool operator >( const reverse_device_iterator& other ) const { return parentIterator > other.parentIterator ; }
407407 __HOST__ __DEVICE__ inline bool operator <=( const reverse_device_iterator& other ) const { return operator <(other) || operator ==(other); }
408408 __HOST__ __DEVICE__ inline bool operator >=( const reverse_device_iterator& other ) const { return operator >(other) || operator ==(other); }
409409
410- __HOST__ __DEVICE__ inline reverse_device_iterator& operator +=( int x ) { parentIterator -= x; return *this ; }
411- __HOST__ __DEVICE__ inline reverse_device_iterator& operator -=( int x ) { parentIterator += x; return *this ; }
410+ __HOST__ __DEVICE__ inline reverse_device_iterator& operator +=( difference_type x ) { parentIterator -= x; return *this ; }
411+ __HOST__ __DEVICE__ inline reverse_device_iterator& operator -=( difference_type x ) { parentIterator += x; return *this ; }
412412
413- __DEVICE__ reference operator []( int x ) const { return parentIterator.operator []( -x-1 ); }
413+ __DEVICE__ reference operator []( difference_type x ) const { return parentIterator.operator []( -x-1 ); }
414414
415415 __HOST__ __DEVICE__ reverse_device_iterator& operator =( const reverse_device_iterator& other )
416416 {
0 commit comments