FIXME : Add documentation
$ pointer_array: do j = 1, size(shm_info%g_lo_ptr)
$ do i = 0, shm_info%size -1
$ s = shm_info%g_lo_se(1, i)
$ e = shm_info%g_lo_se(2, i)
$ aux => shm_info%g_lo_ptr(j)%p(:,:, s:e)
$ !print*,'get_node_pointer', iproc, i,j,s,e
$ if ( associated(aux, pin)) then
$ get_node_pointer => shm_info%g_lo_ptr(j)%p
$ !print'(a,7(i5,x))','get_node_pointer', iproc, lbound(get_node_pointer), ubound(get_node_pointer)
$ exit pointer_array
$ endif
$ end do
$ enddo pointer_array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | target | :: | pin(*) | ||
integer, | intent(in) | :: | id | |||
complex, | intent(out), | optional, | pointer | :: | a1(:) | |
complex, | intent(out), | optional, | pointer | :: | a2(:,:) | |
complex, | intent(out), | optional, | pointer | :: | a3(:,:,:) | |
integer, | intent(in), | optional | :: | tag |
subroutine shm_get_node_pointer_c(pin, id, a1, a2, a3, tag)
use, intrinsic :: iso_c_binding, only : c_loc, c_associated, c_f_pointer
implicit none
complex, target, intent(in) :: pin(*)
integer, intent(in) :: id ! rank id in node comm
complex, pointer, optional, intent(out) :: a1(:)
complex, pointer, optional, intent(out) :: a2(:,:)
complex, pointer, optional, intent(out) :: a3(:,:,:)
integer, optional, intent(in) :: tag
include "shm_mpi3_get_node_pointer_tmpl.inc"
end subroutine shm_get_node_pointer_c