18.2.99. PMIx_Value_compare

PMIx_Value_compare — Compare the contents of two pmix_value_t(5) structures.

18.2.99.1. SYNOPSIS

#include <pmix.h>

pmix_value_cmp_t PMIx_Value_compare(pmix_value_t *v1,
                                    pmix_value_t *v2);

18.2.99.1.1. Python Syntax

No Python equivalent

18.2.99.2. INPUT PARAMETERS

18.2.99.3. DESCRIPTION

Compare the type and payload of two pmix_value_t(5) structures and report the relationship between them. The comparison first considers the values’ type fields; values of different types are reported as different rather than ordered. For matching types, the payloads are compared according to that type’s semantics.

Neither input value is modified.

18.2.99.4. RETURN VALUE

Returns a pmix_value_cmp_t(5) indicating the result of the comparison:

  • PMIX_EQUAL The two values are equal.

  • PMIX_VALUE1_GREATER v1 is greater than v2.

  • PMIX_VALUE2_GREATER v2 is greater than v1.

  • PMIX_VALUE_TYPE_DIFFERENT The values are of different types and cannot be ordered.

  • PMIX_VALUE_INCOMPATIBLE_OBJECTS The values reference objects that cannot be meaningfully compared.

  • PMIX_VALUE_COMPARISON_NOT_AVAIL No comparison is available for the given value type.

18.2.99.5. NOTES

PMIx_Value_compare is an OpenPMIx convenience routine.