ScaLAPACKFX
|
List of the local blocks of a distributed matrix. More...
Private Member Functions | |
procedure | init => blocklist_init |
Initializes the instance. | |
procedure | getsize => blocklist_getsize |
Returns the size of the blocklist. | |
procedure | getblock => blocklist_getblock |
Returns the indices (local and global) of a local block. | |
List of the local blocks of a distributed matrix.
This structure can be helpful when modifying a distributed matrix directly on the local nodes. For example, in order to multiply every column of a distributed matrix by a column dependent factor, you could use the blocklist the following way:
type(blocklist) :: blocks integer :: ii, jj, jglob, jloc, bsize : call blocks%init(mygrid, descaa, "c") do ii = 1, size(blocks) call blocks%getblock(ii, jglob, jloc, bsize) do jj = 0, bsize - 1 aa(:,jloc + jj) = aa(:,jloc + jj) * ff(jglob + jj) end do end do