문제

The MPI standard declares the dummy argument buf as follows:

<type> buf(*)

I know as a whole it declares buf as an array with certain type. But I never saw <type> is used in a declaration in Fortran before. Can anyone explain it to me or refer me to the Fortran standard that shows the grammar?

도움이 되었습니까?

해결책

This is explained in the MPI Standard itself in section 2.5.5 on page 16 lines 17 to 22:

MPI functions sometimes use arguments with a choice (or union) data type. Distinct calls to the same routine may pass by reference actual arguments of different types. The mechanism for providing such arguments will differ from language to language. For Fortran with the include file mpif.h or the mpi module, the document uses <type> to represent a choice variable

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top