You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Chap_API_Struct.tex
+110Lines changed: 110 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1294,6 +1294,116 @@ \subsubsection{Info structure support macros}
1294
1294
\item the structure reports a type of \refconst{PMIX_BOOL} and the data flag is \code{true}
1295
1295
\end{compactitemize}
1296
1296
1297
+
%%%%%%%%%%%
1298
+
\subsubsection{Info structure list macros}
1299
+
Constructing an array of \refstruct{pmix_info_t} is a fairly common operation. The following macros are provided to simplify this construction.
1300
+
1301
+
%%%%%%%%%%%
1302
+
\littleheader{Start a list of \refstruct{pmix_info_t} structures}
1303
+
\declaremacro{PMIX_INFO_LIST_START}
1304
+
1305
+
Initialize a list of \refstruct{pmix_info_t} structures. The actual list is opaque to the caller and is implementation-dependent.
1306
+
1307
+
\versionMarker{4.0}
1308
+
\cspecificstart
1309
+
\begin{codepar}
1310
+
PMIX_INFO_LIST_START(m)
1311
+
\end{codepar}
1312
+
\cspecificend
1313
+
1314
+
\begin{arglist}
1315
+
\argin{m}{A \code{void*} pointer (handle)}
1316
+
\end{arglist}
1317
+
1318
+
Note that the pointer will be initialized to an opaque structure whose elements are implementation-dependent. The caller must not modify or dereference the object.
1319
+
1320
+
%%%%%%%%%%%
1321
+
\littleheader{Add a \refstruct{pmix_info_t} structure to a list}
1322
+
\declaremacro{PMIX_INFO_LIST_ADD}
1323
+
1324
+
Add a \refstruct{pmix_info_t} structure containing the specified value to the provided list.
1325
+
1326
+
\versionMarker{4.0}
1327
+
\cspecificstart
1328
+
\begin{codepar}
1329
+
PMIX_INFO_LIST_ADD(rc, m, k, d, t)
1330
+
\end{codepar}
1331
+
\cspecificend
1332
+
1333
+
\begin{arglist}
1334
+
\arginout{rc}{Return status for the operation (\refstruct{pmix_status_t})}
1335
+
\argin{m}{A \code{void*} pointer initialized via \refmacro{PMIX_INFO_LIST_START} (handle)}
1336
+
\argin{k}{String key to be loaded - must be less than or equal to \refconst{PMIX_MAX_KEYLEN} in length (handle)}
1337
+
\argin{d}{Pointer to the data value to be loaded (handle)}
1338
+
\argin{t}{Type of the provided data value (\refstruct{pmix_data_type_t})}
1339
+
\end{arglist}
1340
+
1341
+
\adviceuserstart
1342
+
Both key and data will be copied into the \refstruct{pmix_info_t} on the list - thus, the key and any data stored in the source value can be modified or free'd without affecting the copied data once the macro has completed.
1343
+
\adviceuserend
1344
+
1345
+
%%%%%%%%%%%
1346
+
\littleheader{Transfer a \refstruct{pmix_info_t} structure to a list}
1347
+
\declaremacro{PMIX_INFO_LIST_XFER}
1348
+
1349
+
Transfer the information in a \refstruct{pmix_info_t} structure to the provided list.
1350
+
1351
+
\versionMarker{4.0}
1352
+
\cspecificstart
1353
+
\begin{codepar}
1354
+
PMIX_INFO_LIST_XFER(rc, m, s)
1355
+
\end{codepar}
1356
+
\cspecificend
1357
+
1358
+
\begin{arglist}
1359
+
\arginout{rc}{Return status for the operation (\refstruct{pmix_status_t})}
1360
+
\argin{m}{A \code{void*} pointer initialized via \refmacro{PMIX_INFO_LIST_START} (handle)}
1361
+
\argin{s}{Pointer to the source \refstruct{pmix_info_t} (pointer to \refstruct{pmix_info_t})}
1362
+
\end{arglist}
1363
+
1364
+
\adviceuserstart
1365
+
All data (including key, value, and directives) will be copied into the destination \refstruct{pmix_info_t} on the list - thus, the source \refstruct{pmix_info_t} may be free'd without affecting the copied data once the macro has completed.
1366
+
\adviceuserend
1367
+
1368
+
%%%%%%%%%%%
1369
+
\littleheader{Convert a \refstruct{pmix_info_t} list to an array}
1370
+
\declaremacro{PMIX_INFO_LIST_CONVERT}
1371
+
1372
+
Transfer the information in the provided \refstruct{pmix_info_t} list to a \refstruct{pmix_data_array_t} array
1373
+
1374
+
\versionMarker{4.0}
1375
+
\cspecificstart
1376
+
\begin{codepar}
1377
+
PMIX_INFO_LIST_CONVERT(rc, m, d)
1378
+
\end{codepar}
1379
+
\cspecificend
1380
+
1381
+
\begin{arglist}
1382
+
\arginout{rc}{Return status for the operation (\refstruct{pmix_status_t})}
1383
+
\argin{m}{A \code{void*} pointer initialized via \refmacro{PMIX_INFO_LIST_START} (handle)}
1384
+
\argin{d}{Pointer to an instantiated \refstruct{pmix_data_array_t} structure where the \refstruct{pmix_info_t} array is to be stored (pointer to \refstruct{pmix_data_array_t})}
1385
+
\end{arglist}
1386
+
1387
+
%%%%%%%%%%%
1388
+
\littleheader{Release a \refstruct{pmix_info_t} list}
1389
+
\declaremacro{PMIX_INFO_LIST_RELEASE}
1390
+
1391
+
Release the provided \refstruct{pmix_info_t} list
1392
+
1393
+
\versionMarker{4.0}
1394
+
\cspecificstart
1395
+
\begin{codepar}
1396
+
PMIX_INFO_LIST_RELEASE(m)
1397
+
\end{codepar}
1398
+
\cspecificend
1399
+
1400
+
\begin{arglist}
1401
+
\argin{m}{A \code{void*} pointer initialized via \refmacro{PMIX_INFO_LIST_START} (handle)}
1402
+
\end{arglist}
1403
+
1404
+
Information contained in the \refstruct{pmix_info_t} on the list shall be released in addition to whatever backing storage the implementation may have allocated to support construction of the list.
0 commit comments