I am quite new to fortran and have some simple questions regarding fortran pointer. The code piece is shown below:
- subroutine pointer_test(p_in)
- Implicit None
- !…Incoming varibale
- real(kind=8), pointer :: p_in
- !…Local variable
- real(kind=8), pointer :: p_local(:,:,:)
- p_local => p_in
- end subroutine
My questions are:
If p_in points to a 3D-array of size 10*20*30, does p_in contain only one (the initial) address of the 3D-array or 6000 addresses for all the floating point numbers?
What's the data movement in p_local => p_in (line 10) ? I am just moving one address from p_in into p_local or I am moving 6000 addresses?