-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphcomm.java
More file actions
81 lines (69 loc) · 2.32 KB
/
Copy pathGraphcomm.java
File metadata and controls
81 lines (69 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* File : Graphcomm.java
* Author : Xinying Li
* Created : Thu Apr 9 12:22:15 1998
* Revision : $Revision: 1.5 $
* Updated : $Date: 2001/10/22 21:07:55 $
* Copyright: Northeast Parallel Architectures Center
* at Syracuse University 1998
*/
package mpi;
public class Graphcomm extends Intracomm {
protected Graphcomm(long handle) throws MPIException {
super(handle) ;
}
public Object clone() {
try {
return new Graphcomm(super.dup()) ;
}
catch (MPIException e) {
throw new RuntimeException(e.getMessage()) ;
}
}
/**
* Returns graph topology information.
* <p>
* <table>
* <tr><td><em> returns: </em></td><td> object defining node degress and
* edges of graph </tr>
* </table>
* <p>
* Java binding of the MPI operation <tt>MPI_GRAPHDIMS_GET</tt>.
* <p>
* The number of nodes and number of edges can be extracted
* from the sizes of the <tt>index</tt> and <tt>edges</tt> fields
* of the returned object.
*/
public native GraphParms Get() throws MPIException ;
/**
* Provides adjacency information for general graph topology.
* <p>
* <table>
* <tr><td><tt> rank </tt></td><td> rank of a process in the group
* of this communicator </tr>
* <tr><td><em> returns: </em></td><td> array of ranks of neighbouring
* processes to one specified </tr>
* </table>
* <p>
* Java binding of the MPI operations <tt>MPI_GRAPH_NEIGHBOURS_COUNT</tt>
* and <tt>MPI_GRAPH_NEIGHBOURS</tt>.
* <p>
* The number of neighbours can be extracted from the size of the result.
*/
public native int [] Neighbours(int rank) throws MPIException ;
/**
* Compute an optimal placement.
* <p>
* <table>
* <tr><td><tt> index </tt></td><td> node degrees </tr>
* <tr><td><tt> edges </tt></td><td> graph edges </tr>
* <tr><td><em> returns: </em></td><td> reordered rank of calling
* process </tr>
* </table>
* <p>
* Java binding of the MPI operation <tt>MPI_GRAPH_MAP</tt>.
* <p>
* The number of nodes is taken to be size of the <tt>index</tt> argument.
*/
public native int Map(int [] index, int [] edges) throws MPIException ;
}