I have n-sets (distributed over n-rows) of data that represent grid nodes, and I would like to know an efficient parallel algorithm to find the intersection of these sets, i.e. common nodes. An intersection is defined as soon as any 2 sets share a node.
For instance:
Input:
Rank 0: Set 1 - [0, 1, 2, 3, 4] Rank 1: Set 2 - [2, 4, 5, 6] Rank 2: Set 3 - [0, 5, 6, 7, 8]
Implement a parallel algorithm → Result: (after finding the intersections)
Rank 0: [0, 2, 4] Rank 1: [2, 4, 5, 6] Rank 2: [0, 5, 6]
The algorithm should be executed on n-rows with 1 set per rank.
source share