18.3.38. pmix_cpuset_t
pmix_cpuset_t — Contains the binding bitmap of a process
18.3.38.1. SYNTAX
18.3.38.1.1. C Syntax
#include <pmix_common.h>
typedef struct {
char *source;
void *bitmap;
} pmix_cpuset_t;
18.3.38.2. DESCRIPTION
The pmix_cpuset_t structure contains a character string identifying the source of the bitmap and a pointer to the corresponding implementation-specific structure describing a process’s CPU binding.
The source field is a string naming the implementation that generated the
bitmap (e.g., "hwloc"). Operations that consume a pmix_cpuset_t will return
an error if the source does not match the underlying source that provided the
binding bitmap.
The bitmap field is an opaque pointer to the implementation-specific
structure that holds the actual binding (e.g., an hwloc_cpuset_t). Its
interpretation depends on the value of source.
The PMIX_CPUSET_STATIC_INIT macro is provided to statically initialize a
pmix_cpuset_t structure.
A pmix_cpuset_t is loaded by PMIx_Get_cpuset(3),
which retrieves the binding of the calling process, and by
PMIx_Parse_cpuset_string(3), which parses
a PMIX_CPUSET string into the structure. The
pmix_bind_envelope_t(5) value passed to
PMIx_Get_cpuset controls which threads of a possibly multi-threaded process
are considered.
18.3.38.3. STATIC INITIALIZER
A statically declared pmix_cpuset_t may be initialized with the
PMIX_CPUSET_STATIC_INIT macro, which sets both source and bitmap to NULL:
pmix_cpuset_t cpuset = PMIX_CPUSET_STATIC_INIT;