Building with move semantic¶
DirectMatrixBuilder¶
-
class Alien::Move::DirectMatrixBuilder : protected MoveObject<MatrixData>, public Common::DirectMatrixBuilder¶
Public Functions
-
inline DirectMatrixBuilder(MatrixData &&matrix, const ResetFlag reset_flag, const SymmetricFlag symmetric_flag = SymmetricFlag::eSymmetric)¶
-
virtual ~DirectMatrixBuilder() = default¶
-
inline MatrixData &&release()¶
-
inline DirectMatrixBuilder(MatrixData &&matrix, const ResetFlag reset_flag, const SymmetricFlag symmetric_flag = SymmetricFlag::eSymmetric)¶
ProfiledMatrixBuilder¶
-
class ProfiledMatrixBuilder : protected MoveObject<MatrixData>, public Common::ProfiledMatrixBuilder¶
MatrixData¶
-
class Alien::Move::MatrixData : public IMatrix¶
Algebraic Matrix with internal multi-representation object.
Public Types
-
typedef Real ValueType¶
Public Functions
-
MatrixData()¶
Empty constructor
This matrix must be associated with a \r Space before use.
-
MatrixData(const Space &space, const MatrixDistribution &dist)¶
Build a new matrix from a Space
This matrix is directly ready to use.
- Parameters
space – Domain (and Codomain) Space of the matrix.
dist – Parallel distribution.
-
MatrixData(const Space &row_space, const Space &col_space, const MatrixDistribution &dist)¶
Build a new matrix from two Spaces
This matrix is directly ready to use.
- Parameters
row_space – Domain Space of the matrix.
col_space – Codomain Space of the matrix.
dist – Parallel distribution.
-
MatrixData(Integer size, const MatrixDistribution &dist)¶
Build a new matrix from a size.
Matlab-like interface, matrix is defined as a [0, n-1]x[0, n-1] array.
This matrix is ready to use on an anonymous Space.
- Parameters
size – Number of rows and columns of the matrix.
dist – Parallel distribution.
-
MatrixData(Integer row_size, Integer col_size, const MatrixDistribution &dist)¶
Build a new matrix from two sizes.
Matlab-like interface, matrix is defined as a [0, n-1]x[0, m-1] array.
This matrix is ready to use on an anonymous Space.
- Parameters
row_size – Number of rows of the matrix.
col_size – Number of rows of the matrix.
dist – Parallel distribution.
-
explicit MatrixData(const MatrixDistribution &dist)¶
Build a new matrix on
MatrixDistribution
This matrix is directly ready to use.
- Parameters
dist – Parallel distribution.
-
MatrixData(MatrixData &&matrix)¶
Move constructor for Matrix
- Parameters
matrix – Matrix to move from.
-
virtual ~MatrixData() = default¶
}@
Destructor All internal data structures will be deleted.
-
MatrixData &operator=(MatrixData &&matrix)¶
Move from Matrix.
Move assignment
- Parameters
matrix – Matrix to move from.
-
void init(const Space &space, const MatrixDistribution &dist)¶
Initialize a Matrix with a Space.
- Parameters
space – Domain and Codomain Space for the Matrix.
dist – Parallel Distribution.
-
MatrixData(const MatrixData&) = delete¶
Only support move semantic
-
void operator=(const MatrixData&) = delete¶
Only support move semantic
-
MatrixData clone() const¶
-
void setBlockInfos(const Integer block_size)¶
-
void setBlockInfos(const Block *block)¶
-
void setBlockInfos(const VBlock *block)¶
-
Block const *block() const¶
-
VBlock const *vblock() const¶
-
void free()¶
}@
Delete all internal data structures
-
void clear()¶
Clean all internal data structures.
Internal data are cleared, not deleted.
-
void visit(ICopyOnWriteMatrix&) const¶
Handle for visitor pattern
-
const ISpace &rowSpace() const¶
Domain Space of the current matrix
- Throws
FatalException – if uninitialized. Call isNull before to avoid any problem.
- Returns
Domain Space.
-
const ISpace &colSpace() const¶
CoDomain Space of the current matrix
- Throws
FatalException – if uninitialized. Call isNull before to avoid any problem.
- Returns
CoDomain Space.
-
const MatrixDistribution &distribution() const¶
}@
Parallel distribution of the Matrix.
- Returns
Parallel distribution of the Matrix.
-
inline void lock()¶
Lock Matrix with the caller.
-
inline void unlock()¶
Unlock Matrix, making it available for others.
-
inline bool isLocked() const¶
Test if a Matrix is locked.
- Returns
whether of not a matrix is already locked by someone.
-
void setUserFeature(String feature)¶
Add a new property on this matrix
-
bool hasUserFeature(String feature) const¶
Check if a property is set.
-
inline bool isTransposed() const¶
Alias on property “transposed”
-
bool isComposite() const¶
Is this matrix composite ?
-
MultiMatrixImpl *impl()¶
-
const MultiMatrixImpl *impl() const¶
Friends
} @
-
typedef Real ValueType¶
IMatrix¶
-
class Alien::IMatrix¶
Interface for all matrices.
Subclassed by Alien::CompositeMatrix
Public Functions
-
inline virtual ~IMatrix()¶
-
virtual void visit(ICopyOnWriteMatrix&) const = 0¶
Visit method.
-
virtual const ISpace &rowSpace() const = 0¶
Get row space associated to the matrix.
- Returns
The row space
-
virtual const ISpace &colSpace() const = 0¶
Get col space associated to the matrix.
- Returns
The col space
-
virtual MultiMatrixImpl *impl() = 0¶
Get the multimatrix implementation.
- Returns
The multimatrix implementation
-
virtual const MultiMatrixImpl *impl() const = 0¶
Get the multimatrix implementation.
- Returns
The multimatrix implementation
-
inline virtual ~IMatrix()¶