Skip to content

[Enhancement] Implement ParallelIterator trait for Windows #1322

Answered by bluss
rkshthrmsh asked this question in Q&A
Discussion options

You must be logged in to vote

Also possible I think:

let a = Zip::from(arr.windows((3, 3)))
  .par_map_collect(|(w, )| (&w * &corner_kernel).sum());

But par_map_collect makes an array the same size as the producer coming in. Maybe not what you want, but interesting to know about..

I'm a bit concerned about the into par iter collect since it does not have any guarantee about what order the elements end up.

But yes, is Zip enough or should it be a parallel iterator by itself? Try and see

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@rkshthrmsh
Comment options

@rkshthrmsh
Comment options

@bluss
Comment options

Answer selected by rkshthrmsh
@rkshthrmsh
Comment options

@bluss
Comment options

@bluss
Comment options

@nilgoyette
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1321 on August 07, 2023 21:25.