Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 10:12:53

0001 /* -*- C -*-
0002  *
0003  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
0004  *                         University Research and Technology
0005  *                         Corporation.  All rights reserved.
0006  * Copyright (c) 2004-2006 The University of Tennessee and The University
0007  *                         of Tennessee Research Foundation.  All rights
0008  *                         reserved.
0009  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
0010  *                         University of Stuttgart.  All rights reserved.
0011  * Copyright (c) 2004-2005 The Regents of the University of California.
0012  *                         All rights reserved.
0013  * Copyright (c) 2012      Los Alamos National Security, Inc.  All rights reserved.
0014  * Copyright (c) 2014-2020 Intel, Inc.  All rights reserved.
0015  * Copyright (c) 2015-2020 Research Organization for Information Science
0016  *                         and Technology (RIST).  All rights reserved.
0017  * Copyright (c) 2021-2022 Nanook Consulting.  All rights reserved.
0018  * $COPYRIGHT$
0019  *
0020  * Additional copyrights may follow
0021  *
0022  * $HEADER$
0023  *
0024  */
0025 #ifndef PMIX_PREG_BASE_H_
0026 #define PMIX_PREG_BASE_H_
0027 
0028 #include "src/include/pmix_config.h"
0029 
0030 #ifdef HAVE_SYS_TIME_H
0031 #    include <sys/time.h> /* for struct timeval */
0032 #endif
0033 #ifdef HAVE_STRING_H
0034 #    include <string.h>
0035 #endif
0036 
0037 #include "src/class/pmix_pointer_array.h"
0038 #include "src/mca/base/pmix_mca_base_framework.h"
0039 #include "src/mca/mca.h"
0040 
0041 #include "src/mca/preg/preg.h"
0042 
0043 BEGIN_C_DECLS
0044 
0045 /*
0046  * MCA Framework
0047  */
0048 PMIX_EXPORT extern pmix_mca_base_framework_t pmix_preg_base_framework;
0049 /**
0050  * PREG select function
0051  *
0052  * Cycle across available components and construct the list
0053  * of active modules
0054  */
0055 PMIX_EXPORT pmix_status_t pmix_preg_base_select(void);
0056 
0057 /**
0058  * Track an active component / module
0059  */
0060 struct pmix_preg_base_active_module_t {
0061     pmix_list_item_t super;
0062     int pri;
0063     pmix_preg_module_t *module;
0064     pmix_mca_base_component_t *component;
0065 };
0066 typedef struct pmix_preg_base_active_module_t pmix_preg_base_active_module_t;
0067 PMIX_CLASS_DECLARATION(pmix_preg_base_active_module_t);
0068 
0069 /* framework globals */
0070 struct pmix_preg_globals_t {
0071     pmix_list_t actives;
0072     bool initialized;
0073     bool selected;
0074 };
0075 typedef struct pmix_preg_globals_t pmix_preg_globals_t;
0076 
0077 PMIX_EXPORT extern pmix_preg_globals_t pmix_preg_globals;
0078 
0079 PMIX_EXPORT pmix_status_t pmix_preg_base_generate_node_regex(const char *input, char **regex);
0080 PMIX_EXPORT pmix_status_t pmix_preg_base_generate_ppn(const char *input, char **ppn);
0081 PMIX_EXPORT pmix_status_t pmix_preg_base_parse_nodes(const char *regexp, char ***names);
0082 PMIX_EXPORT pmix_status_t pmix_preg_base_parse_procs(const char *regexp, char ***procs);
0083 PMIX_EXPORT pmix_status_t pmix_preg_base_copy(char **dest, size_t *len, const char *input);
0084 
0085 PMIX_EXPORT pmix_status_t pmix_preg_base_pack(pmix_buffer_t *buffer, const char *input);
0086 
0087 PMIX_EXPORT pmix_status_t pmix_preg_base_unpack(pmix_buffer_t *buffer, char **regex);
0088 
0089 PMIX_EXPORT pmix_status_t pmix_preg_base_release(char *regexp);
0090 
0091 END_C_DECLS
0092 
0093 #endif