📄 mpid_user_function.tex
字号:
\startmanpage\mantitle{MPID{\tt \char`\_}User{\tt \char`\_}function}{tex}{10/7/2002}\manname{MPID{\tt \char`\_}User{\tt \char`\_}function}--- Definition of a user function for MPI{\tt \char`\_}Op types. \subhead{Synopsis}\startvb\begin{verbatim}typedef union { void (*c_function) ( const void restrict *, void restrict *, const int *, const MPI_Datatype * ); void (f77_function) ( const void restrict *, void restrict *, const MPI_Fint *, const MPI_Fint * );} MPID_User_function;\end{verbatim}\endvb\subhead{Notes}This includes a {\tt const} to make clear which is the {\tt in} argument andwhich the {\tt inout} argument, and to indicate that the {\tt count} and {\tt datatype}arguments are unchanged (they are addresses in an attempt to allowinteroperation with Fortran). It includes {\tt restrict} to emphasize thatno overlapping operations are allowed.\parWe need to include a Fortran version, since those arguments willhave type {\tt MPI{\tt \char`\_}Fint *} instead. We also need to add a test to thetest suite for this case; in fact, we need tests for each of the handletypes to ensure that the transfered handle works correctly.\parThis is part of the collective module because user-defined operationsare valid only for the collective computation routines and not forRMA accumulate.\parYes, the {\tt restrict} is in the correct location. C compilers thatsupport {\tt restrict} should be able to generate code that is as good as aFortran compiler would for these functions.\parWe should note on the manual pages for user-defined operations that{\tt restrict} should be used when available, and that a cast may berequired when passing such a function to {\tt MPI{\tt \char`\_}Op{\tt \char`\_}create}.\par\subhead{Question}Should each of these function types have an associated typedef?\parShould there be a C++ function here?\par\subhead{Module}Collective-DS\endmanpage
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -