This source file includes following definitions.
- mca_mpool_base_component_lookup
- mca_mpool_base_module_lookup
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 #define OPAL_DISABLE_ENABLE_MEM_DEBUG 1
  24 #include "opal_config.h"
  25 
  26 #include <stdio.h>
  27 #include <string.h>
  28 
  29 #include "opal/mca/mca.h"
  30 #include "opal/mca/base/base.h"
  31 #include "opal/util/show_help.h"
  32 #include "opal/util/proc.h"
  33 
  34 #include "opal/mca/mpool/mpool.h"
  35 #include "opal/mca/mpool/base/base.h"
  36 
  37 mca_mpool_base_component_t* mca_mpool_base_component_lookup(const char *name)
  38 {
  39     mca_base_component_list_item_t *cli;
  40 
  41     
  42     OPAL_LIST_FOREACH(cli, &opal_mpool_base_framework.framework_components, mca_base_component_list_item_t) {
  43         mca_mpool_base_component_t* component = (mca_mpool_base_component_t *) cli->cli_component;
  44         if (strcmp(component->mpool_version.mca_component_name, name) == 0) {
  45             return component;
  46         }
  47     }
  48 
  49     return NULL;
  50 }
  51 
  52 
  53 
  54 mca_mpool_base_module_t *mca_mpool_base_module_lookup (const char *hints)
  55 {
  56     mca_mpool_base_module_t *best_module = mca_mpool_base_default_module;
  57     mca_base_component_list_item_t *cli;
  58     int best_priority = mca_mpool_base_default_priority;
  59     int rc;
  60 
  61     OPAL_LIST_FOREACH(cli, &opal_mpool_base_framework.framework_components, mca_base_component_list_item_t) {
  62         mca_mpool_base_component_t *component = (mca_mpool_base_component_t *) cli->cli_component;
  63         mca_mpool_base_module_t *module;
  64         int priority;
  65 
  66         rc = component->mpool_query (hints, &priority, &module);
  67         if (OPAL_SUCCESS == rc) {
  68             if (priority > best_priority) {
  69                 best_priority = priority;
  70                 best_module = module;
  71             }
  72         }
  73     }
  74 
  75     return best_module;
  76 }