Ice Sheet System Model
4.18
Code documentation
src
c
shared
io
Print
Print.h
Go to the documentation of this file.
1
/*\file Print.h
2
*\brief: print I/O for ISSM
3
*/
4
5
#ifndef _ISSM_PRINT_H_
6
#define _ISSM_PRINT_H_
7
8
#ifdef HAVE_CONFIG_H
9
#include <config.h>
10
#else
11
#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
12
#endif
13
14
/*Only include forward declaration to save compile time*/
15
#include <iosfwd>
16
#include <sstream>
17
18
using namespace
std;
19
/*macros:*/
20
/* _printf_{{{*/
21
/* macro to print some string on all cpus */
22
#define _printf_(StreamArgs)\
23
do{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
24
aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs; \
25
PrintfFunctionOnAllCpus(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}while(0)
26
/*}}}*/
27
/* _printf0_ {{{*/
28
/* macro to print some string only on cpu 0 */
29
#define _printf0_(StreamArgs)\
30
do{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
31
aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs; \
32
PrintfFunctionOnCpu0(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}while(0)
33
/*}}}*/
34
35
/*functions: */
36
int
PrintfFunctionOnCpu0
(
const
string
& message);
37
int
PrintfFunctionOnAllCpus
(
const
string
& message);
38
39
#endif
PrintfFunctionOnCpu0
int PrintfFunctionOnCpu0(const string &message)
Definition:
PrintfFunction.cpp:26
PrintfFunctionOnAllCpus
int PrintfFunctionOnAllCpus(const string &message)
Definition:
PrintfFunction.cpp:40
Generated on Thu Jul 2 2020 08:09:22 for Ice Sheet System Model by
1.8.19