Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Variables
Type
Visibility
Attributes
Name
Initial
integer(kind=default_int),
private
::
cols
integer(kind=default_int),
private
::
i
integer(kind=default_int),
private
::
ii
integer(kind=default_int),
private
::
j
integer(kind=default_int),
private
::
jj
integer(kind=default_int),
private
::
rows
logical,
private
::
use_threads
Source Code
function sum_matrix_int32(matrix,threaded)result(res)integer(int32),intent(in)::matrix(:,:)logical,intent(in),optional::threadedlogical::use_threadsinteger(int32)::resinteger(default_int)::cols,rows,i,j,ii,jjrows=size(matrix,1)cols=size(matrix,2)if(present(threaded))thenuse_threads=threadedelseuse_threads=use_threaded_defaultend ifres=0_int32if(use_threads)then!$omp parallel do collapse(2) private(i,j,ii,jj) reduction(+: res)do jj=1,cols,block_sizedo ii=1,rows,block_sizedo j=jj,min(jj+block_size-1,cols)do i=ii,min(ii+block_size-1,rows)res=res+matrix(i,j)end do end do end do end do!$omp end parallel doelseres=sum(matrix)end if end function sum_matrix_int32