Counts columns-per-row count from row index array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | DIMENSION(1:nrows + 1) | :: | rows |
the row_p index (input) |
|
integer, | intent(out), | DIMENSION(1:nrows) | :: | counts |
the count of the number of columns per row |
|
integer, | intent(in) | :: | nrows |
number of rows |
PURE SUBROUTINE dbcsr_count_row_index_copy(rows, counts, nrows)
!! Counts columns-per-row count from row index array.
INTEGER, INTENT(IN) :: nrows
!! number of rows
INTEGER, DIMENSION(1:nrows), INTENT(OUT) :: counts
!! the count of the number of columns per row
INTEGER, DIMENSION(1:nrows + 1), INTENT(IN) :: rows
!! the row_p index (input)
INTEGER :: row
DO row = 1, nrows
counts(row) = rows(row + 1) - rows(row)
END DO
END SUBROUTINE dbcsr_count_row_index_copy