table of contents
- unstable 7.0.0~rc1-1
| PMIX_QUERY_CONSTRUCT(3) | OpenPMIx | PMIX_QUERY_CONSTRUCT(3) |
PMIx_Query_construct — Initialize a caller-provided pmix_query_t(5) <#man5-pmix-query-t> structure.
SYNOPSIS¶
#include <pmix.h> void PMIx_Query_construct(pmix_query_t *p);
Python Syntax¶
No Python equivalent
INPUT PARAMETERS¶
- •
- p: Pointer to the pmix_query_t(5) <#man5-pmix-query-t> structure to be initialized. The storage for the structure itself must already exist — it is supplied by the caller (typically declared on the stack or embedded within another object).
DESCRIPTION¶
Initialize the memory of a pmix_query_t <#man5-pmix-query-t> that the caller has already allocated. The function zeroes the entire structure, clearing the keys and qualifiers pointers and setting nqual to zero. No heap memory is allocated, and no keys or qualifiers are attached.
A query structure must be constructed (or created with PMIx_Query_create(3) <#man3-pmix-query-create>) before its fields are populated and it is passed to a query operation such as PMIx_Query_info(3) <#man3-pmix-query-info>.
Because PMIx_Query_construct operates on caller-provided storage, it must be paired with PMIx_Query_destruct(3) <#man3-pmix-query-destruct> to release any keys or qualifiers the structure subsequently acquires. Do not pass a constructed (as opposed to created) structure to PMIx_Query_release(3) <#man3-pmix-query-release>, as that would attempt to free storage the library did not allocate.
RETURN VALUE¶
PMIx_Query_construct returns no value (void).
NOTES¶
The PMIX_QUERY_CONSTRUCT convenience macro is a direct wrapper for this function.
EXAMPLES¶
Construct a structure:
pmix_query_t query; PMIx_Query_construct(&query);
See also:
Copyright¶
2014-2026, OpenPMIx Community
| September 27, 2026 |