mpiu_object_add_ref.tex

来自「刚才是说明 现在是安装程序在 LINUX环境下进行编程的MPICH安装文件」· TEX 代码 · 共 50 行

TEX
50
字号
\startmanpage\mantitle{MPIU{\tt \char`\_}Object{\tt \char`\_}add{\tt \char`\_}ref}{tex}{10/7/2002}\manname{MPIU{\tt \char`\_}Object{\tt \char`\_}add{\tt \char`\_}ref}--- Increment the reference count for an MPI object \subhead{Synopsis}\startvb\begin{verbatim}void MPIU_Object_add_ref( MPIU_Object_head *ptr )\end{verbatim}\endvb\subhead{Input Parameter}\startarg{ptr }{Pointer to the object.}\par\subhead{Notes}In an unthreaded implementation, this function will usually be implementedas a single-statement macro.  In an {\tt MPI{\tt \char`\_}THREAD{\tt \char`\_}MULTIPLE} implementation,this routine must implement an atomic increment operation, using, forexample, a lock on datatypes or special assembly code such as\begin{verbatim}   try-again:      load-link          refcount-address to r2      add                1 to r2      store-conditional  r2 to refcount-address      if failed branch to try-again:\end{verbatim}on RISC architectures or\begin{verbatim}   lock   inc                   refcount-address or\end{verbatim}on IA32; "lock" is a special opcode prefix that forces atomicity.  Thisis not a separate instruction; however, the GNU assembler expects opcodeprefixes on a separate line.\par\subhead{Module}MPID{\tt \char`\_}CORE\par\subhead{Question}This accesses the {\tt ref{\tt \char`\_}count} member of all MPID objects.  Currently,that member is typed as {\tt volatile int}.  However, for a purely polling,thread-funnelled application, the {\tt volatile} is unnecessary.  ShouldMPID objects use a {\tt typedef} for the {\tt ref{\tt \char`\_}count} that can be definedas {\tt volatile} only when needed?  For now, the answer is no; there isn'tenough to be gained in that case.\endmanpage

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?