Compute rank from process grid coordinates (row-major)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | px |
Process grid size in x |
||
| integer, | intent(in) | :: | rx |
x-coordinate (0-based) |
||
| integer, | intent(in) | :: | ry |
y-coordinate (0-based) |
pure function decomp_rank_from_coords(px, rx, ry) result(rank) !! Compute rank from process grid coordinates (row-major) integer, intent(in) :: px !! Process grid size in x integer, intent(in) :: rx !! x-coordinate (0-based) integer, intent(in) :: ry !! y-coordinate (0-based) integer :: rank rank = ry*px + rx end function decomp_rank_from_coords