.\" Man page generated from reStructuredText
.\" by the Docutils 0.23 manpage writer.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "PMIX_CPUSET_CREATE" "3" "Nov 05, 2026" "" "OpenPMIx"
.sp
\fBPMIx_Cpuset_create\fP — Allocate and initialize an array of
pmix_cpuset_t(5) \%<#\:man5-pmix-cpuset-t> structures.
.SH SYNOPSIS
.INDENT 0.0
.INDENT 3.5
.sp
.EX
#include <pmix.h>

pmix_cpuset_t* PMIx_Cpuset_create(size_t n);
.EE
.UNINDENT
.UNINDENT
.SS Python Syntax
.sp
No Python equivalent
.SH INPUT PARAMETERS
.INDENT 0.0
.IP \(bu 2
\fBn\fP: Number of pmix_cpuset_t(5) \%<#\:man5-pmix-cpuset-t> structures to
allocate.
.UNINDENT
.SH DESCRIPTION
.sp
Allocate a contiguous array of \fBn\fP pmix_cpuset_t \%<#\:man5-pmix-cpuset-t>
structures on the heap and construct each element (zeroing its \fBsource\fP and
\fBbitmap\fP fields).
.sp
If \fBn\fP is zero, no allocation is performed and \fBNULL\fP is returned.
.SH RETURN VALUE
.sp
Returns a pointer to the newly allocated and initialized array, or \fBNULL\fP if
\fBn\fP is zero or the allocation fails.
.SH NOTES
.sp
An array obtained from \fBPMIx_Cpuset_create\fP must be released with
PMIx_Cpuset_free(3) \%<#\:man3-pmix-cpuset-free>, which destructs every
element and frees the array storage itself. Pass the same count \fBn\fP used at
creation.
.sp
The convenience macro \fBPMIX_CPUSET_CREATE\fP is provided as a wrapper around
this function.
.SH EXAMPLES
.sp
Create and later release an array of cpusets:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
pmix_cpuset_t *array;

array = PMIx_Cpuset_create(2);
/* ... populate and use the cpusets ... */
PMIx_Cpuset_free(array, 2);
.EE
.UNINDENT
.UNINDENT
.sp
\fBSee also:\fP
.INDENT 0.0
.INDENT 3.5
PMIx_Cpuset_free(3) \%<#\:man3-pmix-cpuset-free>,
PMIx_Cpuset_construct(3) \%<#\:man3-pmix-cpuset-construct>,
PMIx_Cpuset_destruct(3) \%<#\:man3-pmix-cpuset-destruct>,
pmix_cpuset_t(5) \%<#\:man5-pmix-cpuset-t>
.UNINDENT
.UNINDENT
.SH Copyright
2014-2026, OpenPMIx Community
.\" End of generated man page.
