18.2.98. PMIx_Value_xfer

PMIx_Value_xfer — Copy the contents of one pmix_value_t(5) into another.

18.2.98.1. SYNOPSIS

#include <pmix.h>

pmix_status_t PMIx_Value_xfer(pmix_value_t *dest,
                              const pmix_value_t *src);

18.2.98.1.1. Python Syntax

No Python equivalent

18.2.98.2. INPUT/OUTPUT PARAMETERS

  • dest: Pointer to the destination pmix_value_t(5) structure. On success it receives a copy of the type and data held in src.

18.2.98.3. INPUT PARAMETERS

18.2.98.4. DESCRIPTION

Transfer the contents of src into dest. Despite the name, the operation is executed as a copy: the source value is not altered, and for payloads that own heap storage (strings, byte objects, nested data arrays, and the like) a deep copy is made so that dest and src do not share memory. The type field of dest is set to match src.

dest must already have been initialized with PMIx_Value_construct(3) (or created via PMIx_Value_create(3)). Because the copy may allocate memory, dest must eventually be released with PMIx_Value_destruct(3) or PMIx_Value_free(3).

18.2.98.5. RETURN VALUE

Returns one of the following:

  • PMIX_SUCCESS The contents were copied successfully.

  • PMIX_ERROR The source value has a type that is not supported by the transfer operation.

Other PMIx error constants (for example, an out-of-memory indication) may be returned if copying a compound payload fails.

18.2.98.6. NOTES

PMIx_Value_xfer is an OpenPMIx convenience routine. The corresponding macro-style interface for this operation is PMIX_VALUE_XFER.