checker_square_proc Function

public pure function checker_square_proc(row, col, pgrid, row_dist, col_dist) result(process)

Determines the home process for a given logical matrix element.

Note

This routine is a more low-level version of dbcsr_get_stored_coordinate without the setting the row and column to the stored position.

Note

It assumes a square matrix.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: row

logical row logical column

integer, intent(in) :: col

logical row logical column

integer, intent(in), DIMENSION(0:, 0:) :: pgrid

process grid

integer, intent(in), DIMENSION(:) :: row_dist

row distribution column distribution

integer, intent(in), DIMENSION(:) :: col_dist

row distribution column distribution

Return Value integer

home process of the given element


Source Code

   PURE FUNCTION checker_square_proc(row, col, pgrid, &
                                     row_dist, col_dist) RESULT(process)
      !! Determines the home process for a given logical matrix element.
      !! @note This routine is a more low-level version of
      !! dbcsr_get_stored_coordinate without the setting the row and column
      !! to the stored position.
      !! @endnote
      !! @note It assumes a square matrix.

      INTEGER, INTENT(IN)                                :: row, col
         !! logical row
         !! logical column
      INTEGER, DIMENSION(0:, 0:), INTENT(IN)             :: pgrid
         !! process grid
      INTEGER, DIMENSION(:), INTENT(IN)                  :: row_dist, col_dist
         !! row distribution
         !! column distribution
      INTEGER                                            :: process
         !! home process of the given element

      IF (.NOT. checker_tr(row, col)) THEN
         process = pgrid(row_dist(row), col_dist(col))
      ELSE
         process = pgrid(row_dist(col), col_dist(row))
      END IF
   END FUNCTION checker_square_proc