18.2.187. PMIx_Geometry_construct
PMIx_Geometry_construct — Initialize a caller-provided
pmix_geometry_t(5) structure.
18.2.187.1. SYNOPSIS
#include <pmix.h>
void PMIx_Geometry_construct(pmix_geometry_t *g);
18.2.187.1.1. Python Syntax
No Python equivalent
18.2.187.2. INPUT PARAMETERS
g: Pointer to the pmix_geometry_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.187.3. DESCRIPTION
Initialize the memory of a pmix_geometry_t that
the caller has already allocated. The function zeroes the entire structure,
clearing the fabric index, the uuid and osname string pointers, the
coordinates array pointer, and the ncoords count.
No heap memory is allocated and no fabric coordinates are attached; the caller is responsible for populating the fields after construction.
18.2.187.4. RETURN VALUE
PMIx_Geometry_construct returns no value (void).
18.2.187.5. NOTES
Because PMIx_Geometry_construct operates on caller-provided storage, it
must be paired with PMIx_Geometry_destruct(3) to release any payload (the uuid,
osname, and coordinates fields) the structure subsequently acquires. Do
not pass a constructed (as opposed to created) structure to
PMIx_Geometry_free(3), as that would attempt
to free storage the library did not allocate.
An equivalent static initializer, PMIX_GEOMETRY_STATIC_INIT, is available
for initializing a structure at the point of declaration.
18.2.187.6. EXAMPLES
Construct a structure:
pmix_geometry_t geo;
PMIx_Geometry_construct(&geo);