|
9 | 9 | * University of Stuttgart. All rights reserved. |
10 | 10 | * Copyright (c) 2004-2005 The Regents of the University of California. |
11 | 11 | * All rights reserved. |
| 12 | + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights |
| 13 | + * reserved. |
12 | 14 | * $COPYRIGHT$ |
13 | 15 | * |
14 | 16 | * Additional copyrights may follow |
15 | 17 | * |
16 | 18 | * $HEADER$ |
17 | | - */ |
18 | | -/* |
| 19 | + * |
| 20 | + * |
19 | 21 | * This file is almost a complete re-write for Open MPI compared to the |
20 | 22 | * original mpiJava package. Its license and copyright are listed below. |
21 | 23 | * See <path to ompi/mpi/java/README> for more information. |
22 | | - */ |
23 | | -/* |
24 | | - Licensed under the Apache License, Version 2.0 (the "License"); |
25 | | - you may not use this file except in compliance with the License. |
26 | | - You may obtain a copy of the License at |
27 | | -
|
28 | | - http://www.apache.org/licenses/LICENSE-2.0 |
29 | | -
|
30 | | - Unless required by applicable law or agreed to in writing, software |
31 | | - distributed under the License is distributed on an "AS IS" BASIS, |
32 | | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
33 | | - See the License for the specific language governing permissions and |
34 | | - limitations under the License. |
35 | | -*/ |
36 | | -/* |
| 24 | + * |
| 25 | + * |
| 26 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 27 | + * you may not use this file except in compliance with the License. |
| 28 | + * You may obtain a copy of the License at |
| 29 | + * |
| 30 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 31 | + * |
| 32 | + * Unless required by applicable law or agreed to in writing, software |
| 33 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 34 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 35 | + * See the License for the specific language governing permissions and |
| 36 | + * limitations under the License. |
| 37 | + * |
| 38 | + * |
37 | 39 | * File : CartParms.java |
38 | 40 | * Author : Xinying Li |
39 | 41 | * Created : Thu Apr 9 12:22:15 1998 |
|
50 | 52 | */ |
51 | 53 | public final class CartParms |
52 | 54 | { |
53 | | -/** Number of processes for each cartesian dimension. */ |
54 | | -private final int[] dims; |
| 55 | + /** Number of processes for each cartesian dimension. */ |
| 56 | + private final int[] dims; |
55 | 57 |
|
56 | | -/** Periodicity (true/false) for each cartesian dimension. */ |
57 | | -private final boolean[] periods; |
| 58 | + /** Periodicity (true/false) for each cartesian dimension. */ |
| 59 | + private final boolean[] periods; |
58 | 60 |
|
59 | | -/** Coordinates of calling process in cartesian structure. */ |
60 | | -private final int[] coords; |
| 61 | + /** Coordinates of calling process in cartesian structure. */ |
| 62 | + private final int[] coords; |
61 | 63 |
|
62 | | -/** |
63 | | - * Constructs a cartesian topology information object. |
64 | | - * @param dims number of processes for each cartesian dimension. |
65 | | - * @param periods periodicity (true/false) for each cartesian dimension. |
66 | | - * @param coords coordinates of calling process in cartesian structure. |
67 | | - */ |
68 | | -protected CartParms(int[] dims, boolean[] periods, int[] coords) |
69 | | -{ |
70 | | - this.dims = dims; |
71 | | - this.periods = periods; |
72 | | - this.coords = coords; |
73 | | -} |
| 64 | + /** |
| 65 | + * Constructs a cartesian topology information object. |
| 66 | + * @param dims number of processes for each cartesian dimension. |
| 67 | + * @param periods periodicity (true/false) for each cartesian dimension. |
| 68 | + * @param coords coordinates of calling process in cartesian structure. |
| 69 | + */ |
| 70 | + protected CartParms(int[] dims, boolean[] periods, int[] coords) |
| 71 | + { |
| 72 | + this.dims = dims; |
| 73 | + this.periods = periods; |
| 74 | + this.coords = coords; |
| 75 | + } |
74 | 76 |
|
75 | | -/** |
76 | | - * Returns the number of dimensions. |
77 | | - * @return number of dimensions. |
78 | | - */ |
79 | | -public int getDimCount() |
80 | | -{ |
81 | | - return dims.length; |
82 | | -} |
| 77 | + /** |
| 78 | + * Returns the number of dimensions. |
| 79 | + * @return number of dimensions. |
| 80 | + */ |
| 81 | + public int getDimCount() |
| 82 | + { |
| 83 | + return dims.length; |
| 84 | + } |
83 | 85 |
|
84 | | -/** |
85 | | - * Returns the number of processes for a cartesian dimension. |
86 | | - * @param i cartesian dimension. |
87 | | - * @return number of processes for a cartesian dimension. |
88 | | - */ |
89 | | -public int getDim(int i) |
90 | | -{ |
91 | | - return dims[i]; |
92 | | -} |
| 86 | + /** |
| 87 | + * Returns the number of processes for a cartesian dimension. |
| 88 | + * @param i cartesian dimension. |
| 89 | + * @return number of processes for a cartesian dimension. |
| 90 | + */ |
| 91 | + public int getDim(int i) |
| 92 | + { |
| 93 | + return dims[i]; |
| 94 | + } |
93 | 95 |
|
94 | | -/** |
95 | | - * Returns the periodicity (true/false) for a cartesian dimension. |
96 | | - * @param i cartesian dimension. |
97 | | - * @return periodicity for a cartesian dimension. |
98 | | - */ |
99 | | -public boolean getPeriod(int i) |
100 | | -{ |
101 | | - return periods[i]; |
102 | | -} |
| 96 | + /** |
| 97 | + * Returns the periodicity (true/false) for a cartesian dimension. |
| 98 | + * @param i cartesian dimension. |
| 99 | + * @return periodicity for a cartesian dimension. |
| 100 | + */ |
| 101 | + public boolean getPeriod(int i) |
| 102 | + { |
| 103 | + return periods[i]; |
| 104 | + } |
103 | 105 |
|
104 | | -/** |
105 | | - * Returns the coordinate of calling process for a cartesian dimension. |
106 | | - * @param i cartesian dimension. |
107 | | - * @return coordinate of calling process for a cartesian dimension. |
108 | | - */ |
109 | | -public int getCoord(int i) |
110 | | -{ |
111 | | - return coords[i]; |
112 | | -} |
| 106 | + /** |
| 107 | + * Returns the coordinate of calling process for a cartesian dimension. |
| 108 | + * @param i cartesian dimension. |
| 109 | + * @return coordinate of calling process for a cartesian dimension. |
| 110 | + */ |
| 111 | + public int getCoord(int i) |
| 112 | + { |
| 113 | + return coords[i]; |
| 114 | + } |
113 | 115 |
|
114 | 116 | } // CartParms |
0 commit comments