Use placeholder expression in thrust::count
MODIFY
thrust/system/detail/generic/count.inl
thrust/system/detail/generic/count.inl
@@ -54,8 +54,9 @@ __host__ __device__
typename thrust::iterator_traits<InputIterator>::difference_type
count(thrust::execution_policy<DerivedPolicy> &exec, InputIterator first, InputIterator last, const EqualityComparable& value)
{
- // XXX use placeholder expression here
- return thrust::count_if(exec, first, last, thrust::detail::equal_to_value<EqualityComparable>(value));
+ using thrust::placeholders::_1;
+
+ return thrust::count_if(exec, first, last, _1 == value);
} // end count()

Use placeholder expression in thrust::count