-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blocked_range<set<size_t>::const_iterator>
template argument 1 is invalid
#1628
Comments
block_range<set<size_t>::const_iterator>
template argument 1 is invalidblocked_range<set<size_t>::const_iterator>
template argument 1 is invalid
Hi @khteh, thanks for your question. |
How can I use |
The only way I see to use Another proposal is to consider using TBB associative containers instead - using set_type = tbb::concurrent_set<size_t>;
using range_type = typename set_type::range_type;
set_type uset1 = {/*data in the set*/};
tbb::parallel_reduce(uset1.range(), /*identity = */1,
[&modulo](range_type const& r, size_t running_total) {
for (auto it = r.begin(); it != r.end(); it++)
running_total = ((running_total % modulo) * (*it % modulo)) % modulo;
return running_total;
},
[&modulo](size_t x, size_t y) -> size_t {
return ((x % modulo) * (y % modulo) % modulo);
}); |
How to use
blocked_range
withset
andmap
?Errors:
The text was updated successfully, but these errors were encountered: