18.3.14. pmix_data_array_t

pmix_data_array_t — Defines an array of like-typed values

18.3.14.1. SYNTAX

18.3.14.1.1. C Syntax

#include <pmix_common.h>

typedef struct pmix_data_array {
    pmix_data_type_t type;
    size_t size;
    void *array;
} pmix_data_array_t;

18.3.14.2. DESCRIPTION

The pmix_data_array_t structure defines an array data structure — a contiguous block of size elements, all of the same PMIx datatype type.

  • type — a pmix_data_type_t(5) value identifying the datatype of every element stored in array.

  • size — the number of elements in array.

  • array — pointer to the contiguous block of size elements. Each element is of the C type corresponding to type (for example, an array of pmix_info_t(5) when type is PMIX_INFO).

The pmix_data_array_t structure is the mechanism by which a collection of values is conveyed through a single pmix_value_t(5) or pmix_info_t(5): the containing structure references a pmix_data_array_t (via the darray union member of a pmix_value_t), which in turn points at the array of individual objects.

18.3.14.3. STATIC INITIALIZER

A statically declared pmix_data_array_t may be initialized with the PMIX_DATA_ARRAY_STATIC_INIT macro, which sets type to PMIX_UNDEF, size to 0, and array to NULL:

pmix_data_array_t array = PMIX_DATA_ARRAY_STATIC_INIT;