root/opal/dss/dss_dump.c

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

DEFINITIONS

This source file includes following definitions.
  1. opal_dss_dump
  2. opal_dss_dump_data_types

   1 /*
   2  * Copyright (c) 2004-2005 The Trustees of Indiana University.
   3  *                         All rights reserved.
   4  * Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
   5  *                         All rights reserved.
   6  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   7  *                         University of Stuttgart.  All rights reserved.
   8  * Copyright (c) 2004-2005 The Regents of the University of California.
   9  *                         All rights reserved.
  10  * $COPYRIGHT$
  11  *
  12  * Additional copyrights may follow
  13  *
  14  * $HEADER$
  15  */
  16 
  17 #include "opal_config.h"
  18 
  19 #include "opal/util/output.h"
  20 
  21 #include "opal/dss/dss_internal.h"
  22 
  23 int opal_dss_dump(int output_stream, void *src, opal_data_type_t type)
  24 {
  25     char *sptr;
  26     int rc;
  27 
  28     if (OPAL_SUCCESS != (rc = opal_dss.print(&sptr, NULL, src, type))) {
  29         return rc;
  30     }
  31 
  32     opal_output(output_stream, "%s", sptr);
  33     free(sptr);
  34 
  35     return OPAL_SUCCESS;
  36 }
  37 
  38 
  39 void opal_dss_dump_data_types(int output)
  40 {
  41     opal_dss_type_info_t *ptr;
  42     opal_data_type_t j;
  43     int32_t i;
  44 
  45     opal_output(output, "DUMP OF REGISTERED DATA TYPES");
  46 
  47     j = 0;
  48     for (i=0; i < opal_pointer_array_get_size(&opal_dss_types); i++) {
  49         ptr = opal_pointer_array_get_item(&opal_dss_types, i);
  50         if (NULL != ptr) {
  51             j++;
  52             /* print out the info */
  53             opal_output(output, "\tIndex: %lu\tData type: %lu\tName: %s",
  54                         (unsigned long)j,
  55                         (unsigned long)ptr->odti_type,
  56                         ptr->odti_name);
  57         }
  58     }
  59 }
  60 

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