18.3.31. pmix_resource_unit_t
pmix_resource_unit_t — Describes a quantity of a given resource type
18.3.31.1. SYNTAX
18.3.31.1.1. C Syntax
#include <pmix_common.h>
typedef struct pmix_resource_unit {
pmix_device_type_t type;
size_t count;
} pmix_resource_unit_t;
18.3.31.2. DESCRIPTION
The pmix_resource_unit_t structure describes a quantity of a particular type of resource. It is used, for example, to specify the minimum allocatable unit for a system or to describe the resources contained in an allocation.
The type field is a pmix_device_type_t(5)
value identifying the kind of resource being described (e.g., a class of
compute, memory, or fabric device). The count field is the number of units
of that resource type.
Arrays of pmix_resource_unit_t structures are conveyed via attributes such
as PMIX_ALLOC_MAU (the minimum allocatable unit for the system) passed to
PMIx_Allocation_request(3).
The PMIx_Resource_unit_string(3) function returns a string representation of a pmix_resource_unit_t value.
18.3.31.3. STATIC INITIALIZER
A statically declared pmix_resource_unit_t may be initialized with the
PMIX_RESOURCE_UNIT_STATIC_INIT macro, which sets type to PMIX_DEVTYPE_UNKNOWN and count to 0:
pmix_resource_unit_t unit = PMIX_RESOURCE_UNIT_STATIC_INIT;