dbcsr_count_row_index_inplace Subroutine

private pure subroutine dbcsr_count_row_index_inplace(rows, nrows)

Counts columns-per-row count from row index array, in-place.

Arguments

Type IntentOptional Attributes Name
integer, intent(inout), DIMENSION(1:nrows + 1) :: rows

the row_p index (input); the count of the number of columns per row (output)

integer, intent(in) :: nrows

number of rows


Source Code

   PURE SUBROUTINE dbcsr_count_row_index_inplace(rows, nrows)
      !! Counts columns-per-row count from row index array, in-place.

      INTEGER, INTENT(IN)                                :: nrows
         !! number of rows
      INTEGER, DIMENSION(1:nrows + 1), INTENT(INOUT)     :: rows
         !! the row_p index (input); the count of the number of columns per row (output)

      INTEGER                                            :: row

      DO row = 1, nrows
         rows(row) = rows(row + 1) - rows(row)
      END DO
      rows(nrows + 1) = 0
   END SUBROUTINE dbcsr_count_row_index_inplace