thrust::retag#

template<typename Tag, typename Iterator>
unspecified_iterator_type thrust::retag(
Iterator iter
)#

retag returns a copy of an iterator and changes the type of the result’s system tag.

Added in version 2.2.0.

See also

reinterpret_tag

Note

Unlike reinterpret_tag, retag enforces that the converted-to system tag be related to the converted-from system tag.

Template Parameters:
  • TagTag shall be convertible to thrust::iterator_system<Iterator>::type, or thrust::iterator_system<Iterator>::type is a base type of Tag.

  • Iterator – Any iterator type.

Parameters:

iter – The iterator of interest.

Returns:

An iterator of unspecified type whose system tag is Tag and whose behavior is otherwise equivalent to iter.