- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I am a PhD student. I have been trying to understand any differences in the efficiency of the working of the programme between these three cases in (FORTRAN) programming:
1. Using a pointer linked to a whole array.
2. A pointer which is linked to the first element of an array, and the pointer link is changed in a loop in calculations so that the pointer is following the each element of the same array.
3. Only using an array.
As far as I know, in Fortran a value is passed by its reference. I think a pointer is used for the same purpose. So, why do we use pointers in Fortran?
Thank you very much for your time.
Umit Keskin
링크가 복사됨
1 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
You appear to be confusing legacy Cray pointers with Fortran 90 pointers, both of which ifort supports. A good article on the latter is at the top of my browser search:
http://www.personal.psu.edu/jhm/f90/lectures/42.html
While many Fortran compilers to use pass by reference, portable source code must not be dependent on that implementation, even if you solve the common problem of differing pointer sizes among common CPU modes.
http://www.personal.psu.edu/jhm/f90/lectures/42.html
While many Fortran compilers to use pass by reference, portable source code must not be dependent on that implementation, even if you solve the common problem of differing pointer sizes among common CPU modes.