edu.rit.pj.cluster
Class CommPattern
- java.lang.Object
-
- edu.rit.pj.cluster.CommPattern
-
public class CommPattern extends java.lang.ObjectClass CommPattern provides static methods for calculating communication patterns for collective communication operations.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static int[]broadcastPattern(int size, int rank, int root)Calculate the communication pattern for a parallel broadcast tree.
-
-
-
Method Detail
-
broadcastPattern
public static int[] broadcastPattern(int size, int rank, int root)Calculate the communication pattern for a parallel broadcast tree. This is also used in reverse for a parallel reduction tree.- Parameters:
size- Size of the communicator. Must be >= 1.rank- Rank of this process in the communicator. Must be in the range 0 .. size-1.root- Rank of the root process for the broadcast. Must be in the range 0 .. size-1.- Returns:
- Array of process ranks for the parallel broadcast pattern. The element at index 0 is the parent process rank, or -1 if there is no parent process. The elements at indexes 1 and above, if any, are the child process ranks.
- Throws:
java.lang.IllegalArgumentException- (unchecked exception) Thrown if any argument is illegal.
-
-
DMelt 3.0 © DataMelt by jWork.ORG