Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:47:27

0001 /*
0002  * Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
0003  *                         University Research and Technology
0004  *                         Corporation.  All rights reserved.
0005  * Copyright (c) 2004-2011 The University of Tennessee and The University
0006  *                         of Tennessee Research Foundation.  All rights
0007  *                         reserved.
0008  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
0009  *                         University of Stuttgart.  All rights reserved.
0010  * Copyright (c) 2004-2005 The Regents of the University of California.
0011  *                         All rights reserved.
0012  * Copyright (c) 2010      Oracle and/or its affiliates.  All rights reserved.
0013  * Copyright (c) 2014-2016 Research Organization for Information Science
0014  *                         and Technology (RIST). All rights reserved.
0015  * Copyright (c) 2018-2020 Intel, Inc.  All rights reserved.
0016  * Copyright (c) 2021-2022 Nanook Consulting.  All rights reserved.
0017  * $COPYRIGHT$
0018  *
0019  * Additional copyrights may follow
0020  *
0021  * $HEADER$
0022  */
0023 
0024 #ifndef _PMIX_NAME_FNS_H_
0025 #define _PMIX_NAME_FNS_H_
0026 
0027 #include "src/include/pmix_config.h"
0028 
0029 #ifdef HAVE_STDINT_h
0030 #    include <stdint.h>
0031 #endif
0032 
0033 #include "pmix_common.h"
0034 
0035 BEGIN_C_DECLS
0036 
0037 /* define an internal-only process name that has
0038  * a dynamically-sized nspace field to save memory */
0039 typedef struct {
0040     char *nspace;
0041     pmix_rank_t rank;
0042 } pmix_name_t;
0043 
0044 #define PMIX_CHECK_NAMES(a, b) \
0045     (PMIX_CHECK_NSPACE((a)->nspace, (b)->nspace) && ((a)->rank == (b)->rank || (PMIX_RANK_WILDCARD == (a)->rank || PMIX_RANK_WILDCARD == (b)->rank)))
0046 
0047 /* useful define to print name args in output messages */
0048 PMIX_EXPORT char *pmix_util_print_name_args(const pmix_proc_t *name);
0049 #define PMIX_NAME_PRINT(n) pmix_util_print_name_args(n)
0050 
0051 PMIX_EXPORT char *pmix_util_print_pname_args(const pmix_name_t *name);
0052 #define PMIX_PNAME_PRINT(n) pmix_util_print_pname_args(n)
0053 
0054 PMIX_EXPORT char *pmix_util_print_rank(const pmix_rank_t vpid);
0055 #define PMIX_RANK_PRINT(n) pmix_util_print_rank(n)
0056 
0057 #define PMIX_PEER_PRINT(p) pmix_util_print_pname_args(&(p)->info->pname)
0058 
0059 PMIX_EXPORT int pmix_util_compare_proc(const void *a, const void *b);
0060 
0061 END_C_DECLS
0062 #endif