Gets the index information of the next block, no data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_iterator), | intent(inout) | :: | iterator |
the iterator |
||
integer, | intent(out) | :: | row |
row of the data block column of the data block block number |
||
integer, | intent(out) | :: | column |
row of the data block column of the data block block number |
||
integer, | intent(out) | :: | blk |
row of the data block column of the data block block number |
||
logical, | intent(out), | optional | :: | transposed |
whether block is transposed |
|
integer, | intent(out), | optional | :: | blk_p |
index into block data array logical row size of block logical column size of block logical row offset of block logical column offset of block |
|
integer, | intent(out), | optional | :: | row_size |
index into block data array logical row size of block logical column size of block logical row offset of block logical column offset of block |
|
integer, | intent(out), | optional | :: | col_size |
index into block data array logical row size of block logical column size of block logical row offset of block logical column offset of block |
|
integer, | intent(out), | optional | :: | row_offset |
index into block data array logical row size of block logical column size of block logical row offset of block logical column offset of block |
|
integer, | intent(out), | optional | :: | col_offset |
index into block data array logical row size of block logical column size of block logical row offset of block logical column offset of block |
SUBROUTINE iterator_next_block_index(iterator, row, column, blk, & transposed, blk_p, row_size, col_size, row_offset, col_offset) !! Gets the index information of the next block, no data. TYPE(dbcsr_iterator), INTENT(INOUT) :: iterator !! the iterator INTEGER, INTENT(OUT) :: row, column, blk !! row of the data block !! column of the data block !! block number LOGICAL, INTENT(OUT), OPTIONAL :: transposed !! whether block is transposed INTEGER, INTENT(OUT), OPTIONAL :: blk_p, row_size, col_size, row_offset, & col_offset !! index into block data array !! logical row size of block !! logical column size of block !! logical row offset of block !! logical column offset of block CHARACTER(len=*), PARAMETER :: routineN = 'iterator_next_block_index' INTEGER :: bp, error_handle ! --------------------------------------------------------------------------- IF (careful_mod) CALL timeset(routineN, error_handle) IF (iterator%pos .LE. iterator%nblks & .AND. iterator%pos .NE. 0) THEN row = iterator%row column = iterator%col_i(iterator%pos) IF (iterator%transpose) CALL swap(row, column) blk = iterator%pos IF (PRESENT(row_size)) row_size = iterator%row_size IF (PRESENT(col_size)) col_size = iterator%cbs(column) IF (PRESENT(row_offset)) row_offset = iterator%row_offset IF (PRESENT(col_offset)) col_offset = iterator%coff(column) IF (PRESENT(blk_p) .OR. PRESENT(transposed)) THEN bp = iterator%blk_p(iterator%pos) IF (PRESENT(blk_p)) blk_p = bp IF (PRESENT(transposed)) transposed = bp .LT. 0 END IF CALL iterator_advance(iterator) CALL update_row_info(iterator) ELSE row = 0 column = 0 END IF IF (careful_mod) CALL timestop(error_handle) END SUBROUTINE iterator_next_block_index