table of contents
| PMIX_RESOURCE_UNIT_CONSTRUCT(3) | OpenPMIx | PMIX_RESOURCE_UNIT_CONSTRUCT(3) |
PMIx_Resource_unit_construct — Initialize a caller-provided pmix_resource_unit_t(5) <#man5-pmix-resource-unit-t> structure.
SYNOPSIS¶
#include <pmix.h> void PMIx_Resource_unit_construct(pmix_resource_unit_t *d);
Python Syntax¶
No Python equivalent
INPUT PARAMETERS¶
- •
- d: Pointer to the pmix_resource_unit_t(5) <#man5-pmix-resource-unit-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_resource_unit_t <#man5-pmix-resource-unit-t> that the caller has already allocated. The function zeroes the structure, setting the count field to zero and the type field to PMIX_DEVTYPE_UNKNOWN. No heap memory is allocated.
Because PMIx_Resource_unit_construct operates on caller-provided storage, it should be paired with PMIx_Resource_unit_destruct(3) <#man3-pmix-resource-unit-destruct>. Do not pass a constructed (as opposed to created) structure to PMIx_Resource_unit_free(3) <#man3-pmix-resource-unit-free>, as that would attempt to free storage the library did not allocate.
RETURN VALUE¶
PMIx_Resource_unit_construct returns no value (void).
EXAMPLES¶
Construct a structure:
pmix_resource_unit_t unit; PMIx_Resource_unit_construct(&unit);
See also:
Copyright¶
2014-2026, OpenPMIx Community
| November 5, 2026 |