示例#1
0
        public NetworkConfig(int numMachines,
                             int rank,
                             ReduceScatterFunction reduce,
                             AllGatherFunction gather)
        {
            if (numMachines < 1)
            {
                throw new ArgumentOutOfRangeException("numMachines");
            }

            PInvokeException.Check(PInvoke.NetworkInitWithFunctions(numMachines, rank, reduce, gather),
                                   nameof(PInvoke.NetworkInitWithFunctions));
        }
示例#2
0
 public static extern int NetworkInitWithFunctions(int numMachines, int rank, ReduceScatterFunction reduceScatterFuncPtr, AllgatherFunction allgatherFuncPtr);