OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
SubFieldAssignDefs.h
Go to the documentation of this file.
1// -*- C++ -*-
2/***************************************************************************
3 *
4 * The IPPL Framework
5 *
6 *
7 * Visit http://people.web.psi.ch/adelmann/ for more details
8 *
9 ***************************************************************************/
10
11#ifndef SUB_FIELD_ASSIGN_DEFS_H
12#define SUB_FIELD_ASSIGN_DEFS_H
13
14// include files
15#include "Field/AssignDefs.h"
16
17// forward references
18template<class T, unsigned int D, class S> class SubFieldIter;
19
20
22//
23// Is the domain specification object compressed?
24//
26
28 typedef bool PETE_Return_t;
29};
30
31template<class T, class S, class C, unsigned int D>
32inline bool
34{
35 return p.DomainCompressed();
36}
37
38template<class T, class C, unsigned int D>
39inline bool
41{
42 return true;
43}
44
45template<class C>
46inline bool
48{
49 return false;
50}
51
52template<class T, class C>
53inline bool
55{
56 return true;
57}
58
59
61//
62// Do the terms all use the same kind of subset object?
63//
65
67 typedef bool PETE_Return_t;
68 int fID;
69 SameSubsetType(int id) : fID(id) {}
70};
71
72template<class T, class S, class C, unsigned int D>
73inline bool
75{
76 return p.matchType(s.fID);
77}
78
79template<class T, class C, unsigned int D>
80inline bool
82{
83 return false;
84}
85
86template<class C>
87inline bool
89{
90 return true;
91}
92
93template<class T, class C>
94inline bool
96{
97 return true;
98}
99
100
102//
103// Initialize all subset objects in an expression before the loop starts
104//
106
108 typedef int PETE_Return_t;
109};
110
111template<class T, class S, class C, unsigned int D>
112inline int
114{
115 p.initialize();
116 return 0;
117}
118
119template<class T, class C, unsigned int D>
120inline int
122{
123 return 0;
124}
125
126template<class C>
127inline int
129{
130 return 0;
131}
132
133template<class T, class C>
134inline int
136{
137 return 0;
138}
139
140
142//
143// Set a subfield iterator to point to the next lfield
144//
146
148 typedef int PETE_Return_t;
149};
150
151template<class T, class S, class C, unsigned int D>
152inline int
154{
155 p.nextLField();
156 return 0;
157}
158
159template<class T, class C, unsigned int D>
160inline int
162{
163 return 0;
164}
165
166template<class C>
167inline int
169{
170 return 0;
171}
172
173template<class T, class C>
174inline int
176{
177 return 0;
178}
179
180
182//
183// Do any of the terms in an expression have an ID equal to a given one?
184//
186
187template<class T, class S, class C, unsigned int D>
188inline bool
190{
191 return (int)p.getBareField().get_Id() == s.fID;
192}
193
195//
196// Plugbase.
197//
199
200template<class T, unsigned D, class S, class C>
201inline bool
203{
204 return p.plugBase(f.Domain);
205}
206
208//
209// Check for compression.
210//
212
213template<class T, class S, class C, unsigned int D>
214inline bool
216{
217 return p.IsCompressed();
218}
219
221//
222// Evaluation functors.
223// First, no arguments.
224//
226
227template<class T, class S, unsigned int D>
228inline T&
230{
231 return *p;
232}
233
235//
236// Evaluation functors.
237// One argument.
238//
240
241template<class T, class S, unsigned int D>
242inline T&
244{
245 return p.offset(e.I);
246}
247
249//
250// Evaluation functors.
251// Two arguments.
252//
254
255template<class T, class S, unsigned int D>
256inline T&
258{
259 return p.offset(e.I,e.J);
260}
261
263//
264// Evaluation functors.
265// Three arguments.
266//
268
269template<class T, class S, unsigned int D>
270inline T&
272{
273 return p.offset(e.I,e.J,e.K);
274}
275
277//
278// Step in some dimension.
279//
281
282template<class T, class S, class C, unsigned int D>
283inline int
285{
286 p.step(s.D);
287 return 0;
288}
289
291//
292// Rewind in some dimension.
293//
295
296template<class T, class S, class C, unsigned int D>
297inline int
299{
300 p.rewind(s.D);
301 return 0;
302}
303
305//
306// Does an iterator reference something with unit stride?
307// Don't worry about it for now.
308//
310
311template<class T, unsigned int D, class S, class C>
312inline bool
314{
315 return false;
316}
317
319//
320// Ask each term to fill guard cells and compress itself
321//
323
324template<class T, unsigned int D, class S, class C, class T1>
325inline int
327{
328 //tjw3/3/99 p.FillGCIfNecessary(f.I, f.I);
329 p.FillGCIfNecessary();
330 return 0;
331}
332
333#endif // SUB_FIELD_ASSIGN_DEFS_H
334
335/***************************************************************************
336 * $RCSfile: SubFieldAssignDefs.h,v $ $Author: adelmann $
337 * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
338 * IPPL_VERSION_ID: $Id: SubFieldAssignDefs.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
339 ***************************************************************************/
bool for_each(SubFieldIter< T, D, S > &p, DomainCompressed, C)
constexpr double e
The value of.
Definition: Physics.h:39
NDIndex< D > Domain
Definition: AssignDefs.h:71
unsigned D
Definition: AssignTags.h:89
unsigned D
Definition: AssignTags.h:96