Ignore:
Timestamp:
Apr 9, 2013, 11:44:26 AM (13 years ago)
Author:
Julian Iseringhausen <isering@…>
Children:
bd61b5c
Parents:
e85cfd
Message:

Added MPI classes output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/comm/mpi/settings.cpp

    re85cfd r0bd47e  
    1717 */
    1818
     19/**
     20 * @file   settings.cpp
     21 * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
     22 * @date   Mon Jan 2 18:45:22 2012
     23 *
     24 * @brief  Computes several MPI-related settings.
     25 *
     26 */
     27
    1928#ifdef HAVE_CONFIG_H
    2029#include <config.h>
     
    3241
    3342#include <cassert>
     43#include <sstream>
     44#include <string>
    3445
    3546#include "comm/comm.hpp"
     
    419430}
    420431
     432std::string VMG::MPI::Settings::ToString() const
     433{
     434  std::stringstream str;
     435  std::map<KeyUnsorted, VMG::MPI::DatatypesGlobal>::const_iterator iter_global;
     436  std::map<KeyUnsorted, VMG::MPI::DatatypesLocal>::const_iterator iter_local;
     437
     438  str << "#### MPI_SETTINGS ####" << std::endl;
     439
     440  for (iter_global = datatypes_global.begin(); iter_global != datatypes_global.end(); ++iter_global)
     441    str << iter_global->second << std::endl;
     442
     443  for (iter_local = datatypes_local.begin(); iter_local != datatypes_local.end(); ++iter_local)
     444    str << iter_local->second << std::endl;
     445
     446  str << "######################";
     447
     448  return str.str();
     449}
     450
     451std::ostream& VMG::MPI::operator<<(std::ostream& out, const VMG::MPI::Settings& settings)
     452{
     453  return out << settings.ToString();
     454}
     455
    421456VMG::MPI::Settings::Settings()
    422457{
Note: See TracChangeset for help on using the changeset viewer.