Finds the block that has the given column. If the block having the queried column is found, the blk parameter is set to this block number and the found parameter is true. Otherwise found is false and the block number is invalid.
Index validity The blk_p array of block pointers is a required parameter to enable the detection of deleted blocks.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | find_col |
column to find first block number in row last block number in row |
||
integer, | intent(in) | :: | frst_blk |
column to find first block number in row last block number in row |
||
integer, | intent(in) | :: | last_blk |
column to find first block number in row last block number in row |
||
integer, | intent(in), | DIMENSION(:) | :: | col_i |
col indices block pointers |
|
integer, | intent(in), | DIMENSION(:) | :: | blk_p |
col indices block pointers |
|
integer, | intent(out) | :: | blk |
block number with searched-for column |
||
logical, | intent(out) | :: | found |
flag specified whether a block that has the correct column was found |
PURE SUBROUTINE dbcsr_find_column(find_col, frst_blk, last_blk, col_i, blk_p, & blk, found) !! Finds the block that has the given column. !! If the block having the queried column is found, the blk parameter !! is set to this block number and the found parameter is true. !! Otherwise found is false and the block number is invalid. !! !! Index validity !! The blk_p array of block pointers is a required parameter to enable !! the detection of deleted blocks. INTEGER, INTENT(IN) :: find_col, frst_blk, last_blk !! column to find !! first block number in row !! last block number in row INTEGER, DIMENSION(:), INTENT(IN) :: col_i, blk_p !! col indices !! block pointers INTEGER, INTENT(OUT) :: blk !! block number with searched-for column LOGICAL, INTENT(OUT) :: found !! flag specified whether a block that has the correct column was found CALL ordered_search(col_i, find_col, blk, found, frst_blk, last_blk) IF (found) THEN found = blk_p(blk) .NE. 0 END IF END SUBROUTINE dbcsr_find_column