Hi,

I have this array [1 2 3 4 5 6 7 8 9] and i am performing scan operation on
that.

I have 3 mpi tasks and each task gets 3 elements then each task calculates
its scan and returns result to master task

task 0 - [1 2 3] => [1 3 6]
task 1 - [4 5 6 ] => [4 9 15]
task 2 - [7 8 9] => [7 15 24]

Now task 0 gets all the results [1 3 6] [4 9 15] [7 15 24]

How can I combine these results to produce final scan output?

final scan output of array would be [1 3 6 10 15 21 28 36 45]

can anyone help me please?

Reply via email to