Honor output range distribution in dash::transform#398
Honor output range distribution in dash::transform#398devreal wants to merge 5 commits intodevelopmentfrom
Conversation
| auto out_it = out_first; | ||
| auto in_it = in_first; | ||
| while (towrite > 0) { | ||
| auto lpos = out_it.lpos(); |
There was a problem hiding this comment.
Doesn't the local_size covers the total number of elements in the that unit? What if the unit has multiple local blocks?
There was a problem hiding this comment.
That is what I already mentioned multiple times. This approach only works for a single continuous index range. Hence it would be better to use the new range based views interface by @fuchsto . There should be something like dash::chunks(dash::local(...)). Unfortunately I do not have detailed knowledge in this API either.
There was a problem hiding this comment.
@fmoessbauer @bertwesarg
Yes, almost, it's
dash::blocks(dash::local(view_or_range_expr))
or
dash::local(dash::blocks(view_or_range_expr)).
Containers are valid range expressions, iterators can be converted to ranges using
dash::make_range(it_begin, it_end).
The term chunks was intended for any ad-hoc user-specified decomposition like dash::chunks(dash::stride(10, array)), blocks depend on the pattern. But actually there is no reason to differentiate between those.
| dash::for_each_with_index(global_v.begin() + 1, global_v.end(), | ||
| [](value_t val, size_t idx){ | ||
| ASSERT_EQ_U(val, (dash::size() - 1) * 1000 + (idx - 1)); | ||
| ++idx; |
| dart_gptr_t dest_gptr = out_first.dart_gptr(); | ||
| // Send accumulate message: | ||
| trace.enter_state("transform_blocking"); | ||
| dash::internal::transform_blocking_impl( |
|
Perfect, thanks a lot! |
dash::copy, needed fordash::transformthat honors the distribution of the output range for local input ranges, whichstd::vectorFixes #386