OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
BrickExpression.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 BRICK_EXPRESSION_H
12 #define BRICK_EXPRESSION_H
13 
14 // include files
15 #include "Utility/Pooled.h"
16 #include "Utility/RefCounted.h"
17 #include "Field/AssignTags.h"
18 
20 /*
21 class BrickExpressionBase : public RefCounted, public Pooled
22 {
23 public:
24  BrickExpressionBase() {}
25  virtual ~BrickExpressionBase() {}
26  virtual void apply() restrict =0;
27 };
28 */
30 
31 // template<unsigned Dim, class LHS, class RHS, class OP>
32 // class BrickExpression : public BrickExpressionBase
33 template<unsigned Dim, class LHS, class RHS, class OP>
35  public RefCounted, public Pooled< BrickExpression<Dim,LHS,RHS,OP> >
36 {
37 public:
38  BrickExpression(const LHS& l, const RHS& r)
39  : Lhs(l), Rhs(r)
40  {
41  }
42  BrickExpression(const LHS& l, const RHS& r, const OP& o)
43  : Lhs(l), Rhs(r), Op(o)
44  {
45  }
46 
47  virtual void apply();
48 
49 private:
50  LHS Lhs;
51  RHS Rhs;
52  OP Op;
53 };
54 
56 
58 
59 #endif // BRICK_EXPRESSION_H
60 
61 /***************************************************************************
62  * $RCSfile: BrickExpression.h,v $ $Author: adelmann $
63  * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:26 $
64  * IPPL_VERSION_ID: $Id: BrickExpression.h,v 1.1.1.1 2003/01/23 07:40:26 adelmann Exp $
65  ***************************************************************************/
66 
virtual void apply()
BrickExpression(const LHS &l, const RHS &r, const OP &o)
BrickExpression(const LHS &l, const RHS &r)
Definition: Pooled.h:20