18.2.211. PMIx_Resource_unit_construct
PMIx_Resource_unit_construct — Initialize a caller-provided
pmix_resource_unit_t(5) structure.
18.2.211.1. SYNOPSIS
#include <pmix.h>
void PMIx_Resource_unit_construct(pmix_resource_unit_t *d);
18.2.211.1.1. Python Syntax
No Python equivalent
18.2.211.2. INPUT PARAMETERS
d: Pointer to the pmix_resource_unit_t(5) 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).
18.2.211.3. DESCRIPTION
Initialize the memory of a 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). Do not pass a constructed (as opposed
to created) structure to PMIx_Resource_unit_free(3), as that would attempt to free storage the
library did not allocate.
18.2.211.4. RETURN VALUE
PMIx_Resource_unit_construct returns no value (void).
18.2.211.5. EXAMPLES
Construct a structure:
pmix_resource_unit_t unit;
PMIx_Resource_unit_construct(&unit);