/*
 * Copyright (c) 2016      Mellanox Technologies, Inc.
 *                         All rights reserved.
 * Copyright (c) 2018      IBM Corporation.  All rights reserved.
 * Copyright (c) 2018      Intel, Inc. All rights reserved.
 * Copyright (c) 2019      Research Organization for Information Science
 *                         and Technology (RIST).  All rights reserved.
 * Copyright (c) 2023-2026 Nanook Consulting  All rights reserved.
 * $COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * $HEADER$
 */


#ifndef PMIx_VERSION_H
#define PMIx_VERSION_H

/* define PMIx version */
#define PMIX_VERSION_MAJOR @pmixmajor@
#define PMIX_VERSION_MINOR @pmixminor@
#define PMIX_VERSION_RELEASE @pmixrelease@

#define PMIX_NUMERIC_VERSION @pmixnumeric@


/* Define a mechanism by which we can flag PMIx versions
 * with "capabilities" - this allows consumers of the library
 * to differentiate based on capabilities instead of release
 * numbers. Note that this differs from the Standard version
 * and ABI version numbers for the release as the capabilities
 * refer to internal behaviors - e.g., how the cmd line parser
 * is operating. So someone who uses the cmd line parser might
 * compensate for some difference that occurs during/between
 * a PMIx release series
 */

/* Note that the values of the individual flags is irrelevant and
 * not used. All that matters is that the definition exists. Only
 * capabilities supported by this specific PMIx version shall be
 * defined - i.e., the existence of the definition indicates that
 * this capability is supported by this version
 */

/* Individual capability flags */
#define PMIX_CAP_BASE            0
#define PMIX_CAP_LTO             1
#define PMIX_CAP_INMEMHELP       2
#define PMIX_CAP_UPCALLS2        3
#define PMIX_CAP_STOP_PRGTHRD    4
#define PMIX_CAP_GET_NUMBER_FN   5


/*****    DEPRECATED    *****/

/* there was an initial thought that we would generate some
 * uber-list of defined flags for capabilities across all PMIx
 * versions, and then indicate which ones were supported by
 * this particular version by OR'ing them together into
 * some more general value. This has proven unworkable as you
 * get into a giant game of bit-counting to create the definitions.
 * Instead, we only define flags that this specific version
 * supports - thus, the value of the individual flag is irrelevant
 * and no general value is required.
 *
 * Since we cannot go back and change already-released versions,
 * we leave this one legacy definition here so those earlier
 * versions can find it. They are restricted to supporting only
 * the earlier capabilities anyway, so it really doesn't matter
 */

#define PMIX_CAPABILITIES \
    (PMIX_CAP_BASE | \
     PMIX_CAP_LTO | \
     PMIX_CAP_INMEMHELP)

#endif
