Calculates explicit sizes for all data blocks.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out), | DIMENSION(*) | :: | sizes |
sizes of all data blocks |
|
integer, | intent(in), | DIMENSION(:) | :: | row_p |
index structure |
|
integer, | intent(in), | DIMENSION(*) | :: | col_i |
index structure row block sizes column block sizes |
|
integer, | intent(in), | DIMENSION(*) | :: | rbs |
index structure row block sizes column block sizes |
|
integer, | intent(in), | DIMENSION(*) | :: | cbs |
index structure row block sizes column block sizes |
SUBROUTINE dbcsr_calc_block_sizes(sizes, row_p, col_i, rbs, cbs)
!! Calculates explicit sizes for all data blocks.
INTEGER, DIMENSION(*), INTENT(OUT) :: sizes
!! sizes of all data blocks
INTEGER, DIMENSION(:), INTENT(IN) :: row_p
!! index structure
INTEGER, DIMENSION(*), INTENT(IN) :: col_i, rbs, cbs
!! index structure
!! row block sizes
!! column block sizes
INTEGER :: blk, nrows, row, row_size
nrows = SIZE(row_p) - 1
!$OMP DO
DO row = 1, nrows
row_size = rbs(row)
DO blk = row_p(row) + 1, row_p(row + 1)
sizes(blk) = row_size*cbs(col_i(blk))
END DO
END DO
!$OMP END DO
END SUBROUTINE dbcsr_calc_block_sizes