lion03 / thrust

Automatically exported from code.google.com/p/thrust
Apache License 2.0
0 stars 0 forks source link

fill(zip_iterator) fails to compile #217

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
nathan@rabota:~/Desktop/code$ nvcc zip_bug.cu 
/usr/local/cuda/bin/../include/thrust/detail/device/cuda/for_each.inl(71): 
error: no instance of function template 
"thrust::detail::generate_functor<Generator>::operator() [with 
Generator=thrust::detail::fill_functor<thrust::tuple<int, int, 
thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, 
thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>]" 
matches the argument list
            argument types are: (thrust::tuple<int &, int &, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>)
            object type is: thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>
          detected during:
            instantiation of "void thrust::detail::device::cuda::for_each_n_closure<RandomAccessIterator, Size, UnaryFunction>::operator()() [with RandomAccessIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, Size=long, UnaryFunction=thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>]" 
/usr/local/cuda/bin/../include/thrust/detail/device/cuda/launch_closure.inl(50):
 here
            instantiation of "void thrust::detail::device::cuda::detail::launch_closure_by_value(NullaryFunction) [with NullaryFunction=thrust::detail::device::cuda::for_each_n_closure<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, long, thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>>]" 
/usr/local/cuda/bin/../include/thrust/detail/device/cuda/launch_closure.inl(69):
 here
            instantiation of "void thrust::detail::device::cuda::detail::closure_launcher<NullaryFunction, launch_by_value>::launch(NullaryFunction, Size) [with NullaryFunction=thrust::detail::device::cuda::for_each_n_closure<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, long, thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>>, launch_by_value=true, Size=long]" 
/usr/local/cuda/bin/../include/thrust/detail/device/cuda/launch_closure.inl(109)
: here
            instantiation of "void thrust::detail::device::cuda::launch_closure(NullaryFunction, Size) [with NullaryFunction=thrust::detail::device::cuda::for_each_n_closure<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, long, thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>>, Size=long]" 
(102): here
            instantiation of "RandomAccessIterator thrust::detail::device::cuda::for_each_n(RandomAccessIterator, Size, UnaryFunction) [with RandomAccessIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, Size=long, UnaryFunction=thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>]" 
/usr/local/cuda/bin/../include/thrust/detail/device/dispatch/for_each.h(56): 
here
            [ 7 instantiation contexts not shown ]
            instantiation of "OutputIterator thrust::detail::device::dispatch::fill_n(OutputIterator, Size, const T &, thrust::detail::cuda_device_space_tag) [with OutputIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, Size=long, T=thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>]" 
/usr/local/cuda/bin/../include/thrust/detail/device/fill.inl(47): here
            instantiation of "OutputIterator thrust::detail::device::fill_n(OutputIterator, Size, const T &) [with OutputIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, Size=long, T=thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>]" 
/usr/local/cuda/bin/../include/thrust/detail/device/fill.inl(37): here
            instantiation of "void thrust::detail::device::fill(ForwardIterator, ForwardIterator, const T &) [with ForwardIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, T=thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>]" 
/usr/local/cuda/bin/../include/thrust/detail/dispatch/fill.h(67): here
            instantiation of "void thrust::detail::dispatch::fill(ForwardIterator, ForwardIterator, const T &, thrust::device_space_tag) [with ForwardIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, T=thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>]" 
/usr/local/cuda/bin/../include/thrust/detail/fill.inl(36): here
            instantiation of "void thrust::fill(ForwardIterator, ForwardIterator, const T &) [with ForwardIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, T=thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>]" 
zip_bug.cu(12): here

/usr/local/cuda/bin/../include/thrust/detail/device/cuda/for_each.inl(71): 
error: no instance of function template 
"thrust::detail::generate_functor<Generator>::operator() [with 
Generator=thrust::detail::fill_functor<thrust::tuple<int, int, 
thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, 
thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>]" 
matches the argument list
            argument types are: (thrust::tuple<int &, int &, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>)
            object type is: thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>
          detected during:
            instantiation of "void thrust::detail::device::cuda::for_each_n_closure<RandomAccessIterator, Size, UnaryFunction>::operator()() [with RandomAccessIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, Size=unsigned int, UnaryFunction=thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>]" 
/usr/local/cuda/bin/../include/thrust/detail/device/cuda/launch_closure.inl(50):
 here
            instantiation of "void thrust::detail::device::cuda::detail::launch_closure_by_value(NullaryFunction) [with NullaryFunction=thrust::detail::device::cuda::for_each_n_closure<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, unsigned int, thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>>]" 
/usr/local/cuda/bin/../include/thrust/detail/device/cuda/launch_closure.inl(69):
 here
            instantiation of "void thrust::detail::device::cuda::detail::closure_launcher<NullaryFunction, launch_by_value>::launch(NullaryFunction, Size) [with NullaryFunction=thrust::detail::device::cuda::for_each_n_closure<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, unsigned int, thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>>, launch_by_value=true, Size=unsigned int]" 
/usr/local/cuda/bin/../include/thrust/detail/device/cuda/launch_closure.inl(109)
: here
            instantiation of "void thrust::detail::device::cuda::launch_closure(NullaryFunction, Size) [with NullaryFunction=thrust::detail::device::cuda::for_each_n_closure<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, unsigned int, thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>>, Size=unsigned int]" 
(109): here
            instantiation of "RandomAccessIterator thrust::detail::device::cuda::for_each_n(RandomAccessIterator, Size, UnaryFunction) [with RandomAccessIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, Size=long, UnaryFunction=thrust::detail::generate_functor<thrust::detail::fill_functor<thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>>]" 
/usr/local/cuda/bin/../include/thrust/detail/device/dispatch/for_each.h(56): 
here
            [ 7 instantiation contexts not shown ]
            instantiation of "OutputIterator thrust::detail::device::dispatch::fill_n(OutputIterator, Size, const T &, thrust::detail::cuda_device_space_tag) [with OutputIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, Size=long, T=thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>]" 
/usr/local/cuda/bin/../include/thrust/detail/device/fill.inl(47): here
            instantiation of "OutputIterator thrust::detail::device::fill_n(OutputIterator, Size, const T &) [with OutputIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, Size=long, T=thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>]" 
/usr/local/cuda/bin/../include/thrust/detail/device/fill.inl(37): here
            instantiation of "void thrust::detail::device::fill(ForwardIterator, ForwardIterator, const T &) [with ForwardIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, T=thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>]" 
/usr/local/cuda/bin/../include/thrust/detail/dispatch/fill.h(67): here
            instantiation of "void thrust::detail::dispatch::fill(ForwardIterator, ForwardIterator, const T &, thrust::device_space_tag) [with ForwardIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, T=thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>]" 
/usr/local/cuda/bin/../include/thrust/detail/fill.inl(36): here
            instantiation of "void thrust::fill(ForwardIterator, ForwardIterator, const T &) [with ForwardIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::detail::normal_iterator<thrust::device_ptr<int>>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, T=thrust::tuple<int, int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>]" 
zip_bug.cu(12): here

2 errors detected in the compilation of 
"/tmp/tmpxft_00003f40_00000000-4_zip_bug.cpp1.ii".

Original issue reported on code.google.com by wnbell on 13 Sep 2010 at 9:21

Attachments:

GoogleCodeExporter commented 8 years ago
Revision c2639db3b8 adds a unit test for this issue

Original comment by wnbell on 13 Sep 2010 at 10:03

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 9635e8b71f.

Original comment by jaredhoberock on 14 Sep 2010 at 5:50