public Mpi Separate(int color) { IntPtr comm; UNM.CommSplit(Communicator, color, Rank, &comm); return(new Mpi(comm)); }
public void Gather(Complex[] dst, Complex src) { if (_mpiexists) { fixed(Complex *dstPtr = &dst[0]) UNM.Gather(&src, 1, dstPtr, 1, Master, Communicator); } else { dst [0] = src; } }
public string GetProcessorName() { var name = new byte[GetMaxProcessorName()]; int length = 0; fixed(byte *namePtr = &name[0]) { int err = UNM.GetProcessorName(namePtr, ref length); } return(Encoding.ASCII.GetString(name, 0, length)); }
public Mpi Dup() { IntPtr comm; if (_mpiexists) { UNM.CommDup(this.Communicator, &comm); return(new Mpi(comm)); } else { return(new Mpi()); } }
public void Gather(Complex *dst, Complex *src, int dstSize, int srcSize) { if (_mpiexists) { UNM.Gather(src, srcSize, dst, dstSize, Master, Communicator); } else { if (src != dst) { for (int i = 0; i < srcSize; i++) { dst [i] = src [i]; } } } }
public static string GetErrorString(int error) => UNM.GetErrorString(error);
public int Recv(void *data, int count, IntPtr datatype, int source, int tag, out int actualSource) => UNM.Recv(data, count, datatype, source, tag, Communicator, out actualSource);
public int Send(void *data, int count, IntPtr datatype, int dest, int tag) => UNM.Send(data, count, datatype, dest, tag, Communicator);