OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
src
ippl
src
Utility
ParticleDebugFunctions.cpp
Go to the documentation of this file.
1
// -*- C++ -*-
2
/***************************************************************************
3
*
4
* The IPPL Framework
5
*
6
* This program was prepared by PSI.
7
* All rights in the program are reserved by PSI.
8
* Neither PSI nor the author(s)
9
* makes any warranty, express or implied, or assumes any liability or
10
* responsibility for the use of this software
11
*
12
* Visit www.amas.web.psi for more details
13
*
14
***************************************************************************/
15
16
// -*- C++ -*-
17
//-----------------------------------------------------------------------------
18
// The IPPL Framework - Visit http://people.web.psi.ch/adelmann/ for more details
19
//
20
// This program was prepared by the Regents of the University of California at
21
// ParticleDebugFunctions.h , Tim Williams 8/6/1998
22
// Helper functions to print out (formatted ASCII) ParticleAttrib elements.
23
// Intended mainly for use from within a debugger, called interactively, but
24
// also callable as template functions from source code. To call from many
25
// debuggers, the user has to provide nontemplate wrapper functions, as
26
// described in ParticleDebugFunctions.cpp.
27
28
// include files
29
30
#include "
Utility/PAssert.h
"
31
#include "
Utility/IpplInfo.h
"
32
#include "
Utility/ParticleDebugFunctions.h
"
33
34
// forward class declarations
35
//class Inform;
36
37
//----------------------------------------------------------------------
38
// Set up the I/O "stream" (IPPL Inform object) format where the output goes.
39
// This "sticks around" once set until re-set.
40
//----------------------------------------------------------------------
41
Inform
*
PtclDbgInform
;
// Pointer to active Inform object
42
bool
PtclDbgInformIsSet
=
false
;
// Flags whether pointer is set
43
void
setPtclDbgInform
(
Inform
& inform) {
44
45
PtclDbgInform
= &inform;
46
PtclDbgInformIsSet
=
true
;
47
}
48
49
//-----------------------------------------------------------------------------
50
// Set up some pre-instantiated common template particle debug functions, for
51
// common ParticleAttrib types.
52
// Uncallable from the debuggers I've tried, so comment out and use named
53
// nontemplate function workaraound below. --TJW 8/7/98
54
//-----------------------------------------------------------------------------
55
// Forward template function declarations
56
// template<class T>
57
// void pap(ParticleAttrib<T>& pattr, bool docomm);
58
// template<class T>
59
// void epap(ParticleAttrib<T>& pattr, int i, bool docomm);
60
// template<class T>
61
// void spap(ParticleAttrib<T>& pattr,
62
// int ibase, int ibound, int istride, bool docomm);
63
// #include "Utility/ParticleDebug.h"
64
65
// Need these additional forward class declarations as well
66
// template<class T> class ParticleAttrib;
67
// template<class T, unsigned D> class Vektor;
68
69
// template void epap(ParticleAttrib<double>& pattr, int i, bool docomm);
70
// template void spap(ParticleAttrib<double>& pattr, int base, int bnd,
71
// int stride, bool docomm);
72
// template void epap(ParticleAttrib<int>& pattr, int i, bool docomm);
73
// template void spap(ParticleAttrib<int>& pattr, int base, int bnd,
74
// int stride, bool docomm);
75
76
//-----------------------------------------------------------------------------
77
// Named nontemplate function workaraound: --TJW 8/7/98
78
// Users should put functions like these examples somewhere in their own source
79
// modules, to get access from brain-dead debuggers like the SGI debugger cvd,
80
// which can't invoke template functions, and gets confused by multipple
81
// prototypes (making it necessary to embed all this information into the names
82
// of separately-defined functions).
83
//-----------------------------------------------------------------------------
84
// void dpap(ParticleAttrib<double>& pattr, bool docomm) {
85
// pap(pattr, docomm);
86
// }
87
// void depap(ParticleAttrib<double>& pattr, int i, bool docomm) {
88
// epap(pattr, i, docomm);
89
// }
90
// void dspap(ParticleAttrib<double>& pattr, int base, int bnd, int stride,
91
// bool docomm) {
92
// spap(pattr, base, bnd, stride, docomm);
93
// }
94
// void fpap(ParticleAttrib<float>& pattr, bool docomm) {
95
// pap(pattr, docomm);
96
// }
97
// void fepap(ParticleAttrib<float>& pattr, int i, bool docomm) {
98
// epap(pattr, i, docomm);
99
// }
100
// void fspap(ParticleAttrib<float>& pattr, int base, int bnd, int stride,
101
// bool docomm) {
102
// spap(pattr, base, bnd, stride, docomm);
103
// }
104
// void ipap(ParticleAttrib<int>& pattr, bool docomm) {
105
// pap(pattr, docomm);
106
// }
107
// void iepap(ParticleAttrib<int>& pattr, int i, bool docomm) {
108
// epap(pattr, i, docomm);
109
// }
110
// void ispap(ParticleAttrib<int>& pattr, int base, int bnd, int stride,
111
// bool docomm) {
112
// spap(pattr, base, bnd, stride, docomm);
113
// }
114
// void bpap(ParticleAttrib<bool>& pattr, bool docomm) {
115
// pap(pattr, docomm);
116
// }
117
// void bepap(ParticleAttrib<bool>& pattr, int i, bool docomm) {
118
// epap(pattr, i, docomm);
119
// }
120
// void bspap(ParticleAttrib<bool>& pattr, int base, int bnd, int stride,
121
// bool docomm) {
122
// spap(pattr, base, bnd, stride, docomm);
123
// }
124
// void dv1pap(ParticleAttrib<Vektor<double,1> >& pattr, bool docomm) {
125
// pap(pattr, docomm);
126
// }
127
// void dv1epap(ParticleAttrib<Vektor<double,1> >& pattr, int i, bool docomm) {
128
// epap(pattr, i, docomm);
129
// }
130
// void dv1spap(ParticleAttrib<Vektor<double,1> >& pattr, int base, int bnd,
131
// int stride, bool docomm) {
132
// spap(pattr, base, bnd, stride, docomm);
133
// }
134
// void dv2pap(ParticleAttrib<Vektor<double,2> >& pattr, bool docomm) {
135
// pap(pattr, docomm);
136
// }
137
// void dv2epap(ParticleAttrib<Vektor<double,2> >& pattr, int i, bool docomm) {
138
// epap(pattr, i, docomm);
139
// }
140
// void dv2spap(ParticleAttrib<Vektor<double,2> >& pattr, int base, int bnd,
141
// int stride, bool docomm) {
142
// spap(pattr, base, bnd, stride, docomm);
143
// }
144
// void dv3pap(ParticleAttrib<Vektor<double,3> >& pattr, bool docomm) {
145
// pap(pattr, docomm);
146
// }
147
// void dv3epap(ParticleAttrib<Vektor<double,3> >& pattr, int i, bool docomm) {
148
// epap(pattr, i, docomm);
149
// }
150
// void dv3spap(ParticleAttrib<Vektor<double,3> >& pattr, int base, int bnd,
151
// int stride, bool docomm) {
152
// spap(pattr, base, bnd, stride, docomm);
153
// }
154
// void fv1pap(ParticleAttrib<Vektor<float,1> >& pattr, bool docomm) {
155
// pap(pattr, docomm);
156
// }
157
// void fv1epap(ParticleAttrib<Vektor<float,1> >& pattr, int i, bool docomm) {
158
// epap(pattr, i, docomm);
159
// }
160
// void fv1spap(ParticleAttrib<Vektor<float,1> >& pattr, int base, int bnd,
161
// int stride, bool docomm) {
162
// spap(pattr, base, bnd, stride, docomm);
163
// }
164
// void fv2pap(ParticleAttrib<Vektor<float,2> >& pattr, bool docomm) {
165
// pap(pattr, docomm);
166
// }
167
// void fv2epap(ParticleAttrib<Vektor<float,2> >& pattr, int i, bool docomm) {
168
// epap(pattr, i, docomm);
169
// }
170
// void fv2spap(ParticleAttrib<Vektor<float,2> >& pattr, int base, int bnd,
171
// int stride, bool docomm) {
172
// spap(pattr, base, bnd, stride, docomm);
173
// }
174
// void fv3pap(ParticleAttrib<Vektor<float,3> >& pattr, bool docomm) {
175
// pap(pattr, docomm);
176
// }
177
// void fv3epap(ParticleAttrib<Vektor<float,3> >& pattr, int i, bool docomm) {
178
// epap(pattr, i, docomm);
179
// }
180
// void fv3spap(ParticleAttrib<Vektor<float,3> >& pattr, int base, int bnd,
181
// int stride, bool docomm) {
182
// spap(pattr, base, bnd, stride, docomm);
183
// }
184
185
// $Id: ParticleDebugFunctions.cpp,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
186
187
/***************************************************************************
188
* $RCSfile: addheaderfooter,v $ $Author: adelmann $
189
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:17 $
190
* IPPL_VERSION_ID: $Id: addheaderfooter,v 1.1.1.1 2003/01/23 07:40:17 adelmann Exp $
191
***************************************************************************/
192
IpplInfo.h
PtclDbgInformIsSet
bool PtclDbgInformIsSet
Definition:
ParticleDebugFunctions.cpp:42
PtclDbgInform
Inform * PtclDbgInform
Definition:
ParticleDebugFunctions.cpp:41
setPtclDbgInform
void setPtclDbgInform(Inform &inform)
Definition:
ParticleDebugFunctions.cpp:43
ParticleDebugFunctions.h
PAssert.h
Inform
Definition:
Inform.h:42
Generated on Wed Aug 25 2021 16:41:00 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.1