diff --git a/thrust/iterator/detail/zip_iterator.inl b/thrust/iterator/detail/zip_iterator.inl index 7eb35b091b..c5742315e9 100644 --- a/thrust/iterator/detail/zip_iterator.inl +++ b/thrust/iterator/detail/zip_iterator.inl @@ -131,11 +131,19 @@ template } // end zip_iterator::distance_to() -template +template +__host__ __device__ + zip_iterator> make_zip_iterator(thrust::tuple t) +{ + return zip_iterator>(t); +} // end make_zip_iterator() + + +template __host__ __device__ - zip_iterator make_zip_iterator(IteratorTuple t) + zip_iterator> make_zip_iterator(Iterators... its) { - return zip_iterator(t); + return make_zip_iterator(thrust::make_tuple(its...)); } // end make_zip_iterator() diff --git a/thrust/iterator/zip_iterator.h b/thrust/iterator/zip_iterator.h index 7b86d06d51..14f7e873ac 100644 --- a/thrust/iterator/zip_iterator.h +++ b/thrust/iterator/zip_iterator.h @@ -229,9 +229,23 @@ template * * \see zip_iterator */ -template +template inline __host__ __device__ -zip_iterator make_zip_iterator(IteratorTuple t); +zip_iterator> make_zip_iterator(thrust::tuple t); + + +/*! \p make_zip_iterator creates a \p zip_iterator from + * iterators. + * + * \param its The iterators to copy. + * \return A newly created \p zip_iterator which zips the iterators. + * + * \see zip_iterator + */ +template +inline __host__ __device__ +zip_iterator> make_zip_iterator(Iterators... its); + /*! \} // end fancyiterators */