root/ompi/mca/topo/example/topo_example_module.c

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

DEFINITIONS

This source file includes following definitions.
  1. example_module_constructor
  2. example_module_destructor

   1 /*
   2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2013 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * Copyright (c) 2008-2009 Cisco Systems, Inc.  All rights reserved.
  13  * Copyright (c) 2012-2013 Inria.  All rights reserved.
  14  * $COPYRIGHT$
  15  *
  16  * Additional copyrights may follow
  17  *
  18  * $HEADER$
  19  */
  20 
  21 #include "ompi_config.h"
  22 
  23 #include <stdio.h>
  24 
  25 #include "mpi.h"
  26 #include "ompi/communicator/communicator.h"
  27 #include "ompi/mca/topo/topo.h"
  28 #include "ompi/mca/topo/base/base.h"
  29 #include "ompi/mca/topo/example/topo_example.h"
  30 
  31 
  32 /*
  33  * Local functions
  34  */
  35 static void example_module_constructor(mca_topo_example_module_t *u);
  36 static void example_module_destructor(mca_topo_example_module_t *u);
  37 
  38 OBJ_CLASS_INSTANCE(mca_topo_example_module_t, mca_topo_base_module_t,
  39                    example_module_constructor, example_module_destructor);
  40 
  41 
  42 static void example_module_constructor(mca_topo_example_module_t *u)
  43 {
  44     mca_topo_base_module_t *m = &(u->super);
  45 
  46     memset(&m->topo, 0, sizeof(m->topo));
  47 
  48     /* Here we can fill in additional, module-specific data if
  49        necessary */
  50     u->example_module_specific_data = 17;
  51 }
  52 
  53 
  54 static void example_module_destructor(mca_topo_example_module_t *u)
  55 {
  56     /* Do whatever is necessary to clean up / destroy the module */
  57 }
  58 

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