Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Communicator.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* Communicator.cc (C) 2000-2020 */
9/* */
10/* Communicateur pour l'échange de message. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arccore/message_passing/Communicator.h"
15
16#include <iostream>
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
22{
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27Communicator::_Communicator Communicator::null_communicator;
28int Communicator::null_communicator_type = Communicator::T_Null;
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33void Communicator::
34print(std::ostream& o) const
35{
36 if (m_type==T_Null)
37 o << "(null)";
38 else if (m_type==T_Int)
39 o << m_communicator.i;
40 else if (m_type==T_Long)
41 o << m_communicator.l;
42 else
43 o << m_communicator.cv;
44}
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49} // End namespace Arccore::MessagePassing
50
51/*---------------------------------------------------------------------------*/
52/*---------------------------------------------------------------------------*/
Espace de nommage contenant les types et déclarations qui gèrent le mécanisme de parallélisme par éch...