⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpid_segment_pack.tex

📁 刚才是说明 现在是安装程序在 LINUX环境下进行编程的MPICH安装文件
💻 TEX
字号:
\startmanpage\mantitle{MPID{\tt \char`\_}Segment{\tt \char`\_}pack}{tex}{10/7/2002}\manname{MPID{\tt \char`\_}Segment{\tt \char`\_}pack}--- Pack up the designated buffer with a range of bytes. \subhead{Synopsis}\startvb\begin{verbatim}void *MPID_Segment_pack( MPID_Segment *segment, int *first, int *last,                        void *send_buffer ) \end{verbatim}\endvb\subhead{Input Parameters}\startarg{segment }{Segment descriptor (initialized with {\tt MPID{\tt \char`\_}Segment{\tt \char`\_}init{\tt \char`\_}pack})}\startarg{send{\tt \char`\_}buffer }{Pointer to buffer to place data in.  May be {\tt NULL}, in which case {\tt MPID{\tt \char`\_}Segment{\tt \char`\_}pack} uses an internal buffer (and returns it).}\par\subhead{Inout Parameters}\startarg{first }{Pointer to first byte index to be packed (on input) or actuallypacked (on output)}\startarg{last }{Pointer to last byte index to be packed (on input) or actuallypacked (on output)}\par\subhead{Return value}Pointer to memory containing packed data.\par\subhead{Notes}\parProviding a send buffer allows implementations to make use of doublebuffering without requiring that the segment code keep track of multiplebuffers.\parThe values of {\tt first} and {\tt last} that are returned must satisfy thefollowing restrictions:\startarg{1 }{(last-first) on output must be less than or equal to (last-first) on input.}\startarg{2 }{(last+1) on output must have the property that when used as first on a subsequent input, the value is unchanged.}\startarg{3 }{If first is zero on input, then first must be 0 on output.}\parIn addition, the {\em change} in first should be as small as possible.For example, moving first so as to align the first byte on a word orcache-line boundary (subject to the 3 requirements above) is allowed(and is the reason to make first an in/out parameter).  However, asrule three requires, if first is zero on input, no change to first isallowed even for alignment purposes.  However, it is permissible to requirethat the buffers satisfy language- or processor-specified alignment rules.\par\subhead{Module}Segment\par\subhead{Questions}If {\tt MPID{\tt \char`\_}Segment{\tt \char`\_}pack} returns an internal buffer, who is responsible forfreeing it?  It can't be a single static buffer because that isn'tthread-safe.  Is it freed as part of {\tt MPID{\tt \char`\_}Segment{\tt \char`\_}free}?\parIf a send buffer is going to be provided, do we want to tell{\tt MPID{\tt \char`\_}Segment{\tt \char`\_}init{\tt \char`\_}pack} so that no internal buffer is allocated?\parShould we return the number of bytes packed in a variable, justto simplify the use of the result (which, after all, is a pointer {\em and}a length)?\endmanpage

⌨️ 快捷键说明

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