If you use for_each operation with fancy iterators (eg. Counting Iterator)
theres no default device dispatch. Compilation error:
more than one instance of overloaded function
"thrust::detail::device::dispatch::for_each" matches the argument list:
1> function template "void
thrust::detail::device::dispatch::for_each(InputIterator, InputIterator,
UnaryFunction, thrust::detail::omp_device_space_tag)"
1> function template "void
thrust::detail::device::dispatch::for_each(InputIterator, InputIterator,
UnaryFunction, thrust::detail::cuda_device_space_tag)"
There is issing code in detail/device/dispatch/for_each.h:
template<typename InputIterator,
typename UnaryFunction>
void for_each(InputIterator first,
InputIterator last,
UnaryFunction f,
thrust::any_space_tag)
{
// Use default backend
thrust::detail::device::dispatch::for_each(first, last, f, thrust::detail::default_device_space_tag());
}
Original issue reported on code.google.com by sirpiot...@gmail.com on 14 Aug 2010 at 3:46
Original issue reported on code.google.com by
sirpiot...@gmail.com
on 14 Aug 2010 at 3:46