Handle non const operator in fill and tabulate
MODIFY
thrust/system/hip/detail/fill.h
thrust/system/hip/detail/fill.h
@@ -48,7 +48,7 @@ fill_n(execution_policy<Derived>& policy,
thrust::make_counting_iterator<Size>(0),
thrust::make_counting_iterator<Size>(count),
first,
- [value](Size) { return value; });
+ [value](Size) mutable { return value; });
} // func fill_n
template <class Derived, class ForwardIterator, class T>

MODIFY
thrust/system/hip/detail/tabulate.h
thrust/system/hip/detail/tabulate.h
@@ -52,7 +52,7 @@ tabulate(execution_policy<Derived>& policy,
thrust::make_counting_iterator<size_type>(0),
thrust::make_counting_iterator<size_type>(thrust::distance(first, last)),
first,
- [tabulate_op](size_type i) { return tabulate_op(i); });
+ [tabulate_op](size_type i) mutable { return tabulate_op(i); });
}
} // namespace hip_rocprim

Handle non const operator in fill and tabulate