-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMatrixContainer.h
59 lines (49 loc) · 1.13 KB
/
MatrixContainer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Created on: Dec 20, 2013
* Author: Mirko Myllykoski (mirko.myllykoski@gmail.com)
*/
#ifndef PSCRCL_MATRIX_CONTAINER
#define PSCRCL_MATRIX_CONTAINER
#include "common.h"
namespace pscrCL {
/*
* A class which is used to store the vector presentations of the matrices
* A_i and M_i.
*/
class MatrixContainer {
public:
MatrixContainer();
MatrixContainer(
const void *aDiag,
const void *aOffdiag,
const void *mDiag,
const void *mOffdiag,
int n,
int ldf,
const PscrCLMode &mode,
bool flip = false
);
~MatrixContainer();
MatrixContainer(const MatrixContainer &old);
MatrixContainer& operator=(const MatrixContainer &a);
const void* getPointer() const;
int getSize() const;
const void* getADiag() const;
const void* getAOffdiag() const;
const void* getMDiag() const;
const void* getMOffdiag() const;
int getN() const;
int getLdf() const;
const PscrCLMode getMode() const;
bool isFlipped() const;
bool isMTridiagonal() const;
private:
bool mTridiagonal;
bool flipped;
char *data;
int n;
int ldf;
PscrCLMode mode;
};
}
#endif