SEP Solver Library  1.0
 All Classes Namespaces Files Functions Variables Typedefs Macros
matmul.h
Go to the documentation of this file.
1 #ifndef MATMUL_H
2 #define MATMUL_H 1
3 #include "Operator.h"
4 #include "DataInCoreFloat.h"
5 
6 namespace SEP {
7 
8 class Matmul: public Operator{
9 
10  public:
11 
13  long long n1, n2;
14 
15  Matmul(Space *mod, Space *data, Vector *mat){
16  setDomain(mod);
17  setRange(data);
18  matrix = mat;
19 
20  n1 = ((inCoreFloat*)matrix->getSpace())->get_n(0);
21  n2 = ((inCoreFloat*)matrix->getSpace())->get_n(1);
22 
23  if (n1 != ((inCoreFloat*)data)->get_n123() || n2 != ((inCoreFloat*)mod)->get_n123()) {
24  std::cout<<"Dimensions do not agree.\n";
25  }
26 
27  };
28 
29  ~Matmul(){};
30 
31  virtual bool Forward(bool add, Vector *model, Vector *data);
32  virtual bool Adjoint(bool add, Vector *model, Vector *data);
33 
34 };
35 
36 }
37 
38 #endif