root/orte/mca/routed/radix/routed_radix_component.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. orte_routed_radix_component_register
  2. orte_routed_radix_component_query

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2007-2015 Los Alamos National Security, LLC.
   4  *                         All rights reserved.
   5  * Copyright (c) 2004-2008 The Trustees of Indiana University.
   6  *                         All rights reserved.
   7  * Copyright (c) 2013      Cisco Systems, Inc.  All rights reserved.
   8  * Copyright (c) 2013-2017 Intel, Inc.  All rights reserved.
   9  * $COPYRIGHT$
  10  *
  11  * Additional copyrights may follow
  12  *
  13  * $HEADER$
  14  */
  15 
  16 #include "orte_config.h"
  17 #include "orte/constants.h"
  18 
  19 #include "opal/mca/base/base.h"
  20 
  21 #include "orte/mca/routed/base/base.h"
  22 #include "routed_radix.h"
  23 
  24 static int orte_routed_radix_component_register(void);
  25 static int orte_routed_radix_component_query(mca_base_module_t **module, int *priority);
  26 
  27 /**
  28  * component definition
  29  */
  30 orte_routed_radix_component_t mca_routed_radix_component = {
  31     {
  32         /* First, the mca_base_component_t struct containing meta
  33         information about the component itself */
  34 
  35         .base_version = {
  36             ORTE_ROUTED_BASE_VERSION_3_0_0,
  37 
  38             .mca_component_name = "radix",
  39             MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
  40                                   ORTE_RELEASE_VERSION),
  41             .mca_query_component = orte_routed_radix_component_query,
  42             .mca_register_component_params = orte_routed_radix_component_register,
  43         },
  44         .base_data = {
  45             /* This component can be checkpointed */
  46             MCA_BASE_METADATA_PARAM_CHECKPOINT
  47         },
  48     }
  49 };
  50 
  51 static int orte_routed_radix_component_register(void)
  52 {
  53     mca_base_component_t *c = &mca_routed_radix_component.super.base_version;
  54 
  55     mca_routed_radix_component.radix = 64;
  56     (void) mca_base_component_var_register(c, NULL,
  57                                            "Radix to be used for routed radix tree",
  58                                            MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  59                                            OPAL_INFO_LVL_9,
  60                                            MCA_BASE_VAR_SCOPE_READONLY,
  61                                            &mca_routed_radix_component.radix);
  62 
  63     return ORTE_SUCCESS;
  64 }
  65 
  66 static int orte_routed_radix_component_query(mca_base_module_t **module, int *priority)
  67 {
  68     if (0 > mca_routed_radix_component.radix) {
  69         return ORTE_ERR_BAD_PARAM;
  70     }
  71 
  72     *priority = 70;
  73     *module = (mca_base_module_t *) &orte_routed_radix_module;
  74     return ORTE_SUCCESS;
  75 }

/* [<][>][^][v][top][bottom][index][help] */