OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
SubFieldAssign.h
Go to the documentation of this file.
1/***************************************************************************
2 *
3 * The IPPL Framework
4 *
5 ***************************************************************************/
6
7#ifndef SUB_FIELD_ASSIGN_H
8#define SUB_FIELD_ASSIGN_H
9
10// include files
11#include "Field/Assign.h"
12
13// forward declarations
14template<class T, unsigned int Dim, class S> class SubBareField;
15
16
17/***************************************************************************
18 Versions of the assign function used to assign values to a SubBareField
19 in an expression. SubFieldAssign uses information in SubFieldAssignDefs
20 for specific definitions of for_each operations used in assign.
21
22 So far, only the assign function for the simple case where everything is
23 perfectly aligned is implemented ... to complete this, assign must handle
24 assigments between non-conforming layouts which requires general
25 communication. Also, support will have to be added for:
26 - Assigning single-element subfield's to scalars
27 - Slice operations between fields of unequal dimension
28 ***************************************************************************/
29
30
32// SubBareField = Expression
33template<class T1, unsigned Dim, class S, class RHS, class OP>
34void
36
37
39// SubBareField = constant
40template<class T, unsigned D, class S, class OP>
41inline void
44}
45
46
48
49#define SUB_ASSIGNMENT_OPERATORS(FUNC,OP) \
50 \
51template<class T, unsigned D, class S> \
52inline void \
53FUNC(const SubBareField<T,D,S>& lhs, const T& rhs) \
54{ \
55 assign(lhs,PETE_Scalar<T>(rhs), OP(),ExprTag<true>()); \
56}
57
58
67
68#include "SubField/SubFieldAssign.hpp"
69
70#endif // SUB_FIELD_ASSIGN_H
std::complex< double > a
void mineq(const SubBareField< T, D, S > &lhs, const T &rhs)
#define SUB_ASSIGNMENT_OPERATORS(FUNC, OP)
void assign(SubBareField< T1, Dim, S > a, RHS b, OP op, ExprTag< true >)
void maxeq(const SubBareField< T, D, S > &lhs, const T &rhs)
Definition: Assign.h:48