lineid.java

来自「mpi并行计算的c++代码 可用vc或gcc编译通过 可以用来搭建并行计算试验环」· Java 代码 · 共 35 行

JAVA
35
字号
/* *  (C) 2001 by Argonne National Laboratory *      See COPYRIGHT in top-level directory. *//* *  @author  Anthony Chan */package logformat.clog2;import java.io.*;import java.util.*;public class LineID{    private static int CommWorldSize = 0;    public static void setCommRank2LineIDxForm( int comm_world_size )    {        CommWorldSize  = comm_world_size;    }    /*       The lineIDs generated with this formula are distinguishable from       each other as long as CommWorldSize is max number of ranks within       MPI_COMM_WORLD, true for MPI-1.    */    public static int compute( int icomm, int rank )    {        return icomm * CommWorldSize + rank;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?