MatrixOpGetGMSMutable interface for clients.
More...
#include <AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp>
Public Member Functions | |
| MatrixDenseMutableEncap (MatrixOpGetGMSMutable *mat_get) | |
Construct a DMatrixSlice view from a MatrixOpGetGMSMutable object. | |
| MatrixDenseMutableEncap (MatrixOp *mat) | |
Construct a DMatrixSlice view from a MatrixOp object. | |
| ~MatrixDenseMutableEncap () | |
Frees the DMatrixSlice view and commits the changes. | |
| DMatrixSlice | operator() () |
Returns a non-const view of the DMatrixSlice view. | |
| const DMatrixSlice | operator() () const |
Returns a const view of the DMatrixSlice view. | |
MatrixOpGetGMSMutable interface for clients.
This takes care of worrying about if the MatrixOpGetGMSMutable interface is supported or not and remembering to free the DMatrixSlice view properly.
This class is only to be used on the stack as an automatic variable. For example, to extract a DMatrixSlice view of an abstract vector and use it to set the matrix to a scalar one could write a function like:
void assign( const value_type alpha, MatrixOpGetGMSMutable* mat_inout ) { MatrixDenseMutableEncap gms_inout(*mat_inout); gms_inout() = alpha; }
MatrixOpGetGMSMutable object does not have to perform any dynamic memory allocations and copy in the method MatrixOpGetGMSMutable::get_gms_view() then the above code will only have a constant time overhead.
Definition at line 113 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
| AbstractLinAlgPack::MatrixDenseMutableEncap::MatrixDenseMutableEncap | ( | MatrixOpGetGMSMutable * | mat_get | ) | [inline] |
Construct a DMatrixSlice view from a MatrixOpGetGMSMutable object.
Definition at line 148 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
| AbstractLinAlgPack::MatrixDenseMutableEncap::MatrixDenseMutableEncap | ( | MatrixOp * | mat | ) | [inline] |
Construct a DMatrixSlice view from a MatrixOp object.
If dynamic_cast<MatrixOpGetGMSMutable*>(mat) == NULL then a ??? exception is thrown.
Definition at line 154 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
| AbstractLinAlgPack::MatrixDenseMutableEncap::~MatrixDenseMutableEncap | ( | ) | [inline] |
Frees the DMatrixSlice view and commits the changes.
Definition at line 160 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
| DMatrixSlice AbstractLinAlgPack::MatrixDenseMutableEncap::operator() | ( | ) | [inline] |
Returns a non-const view of the DMatrixSlice view.
Definition at line 166 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
| const DMatrixSlice AbstractLinAlgPack::MatrixDenseMutableEncap::operator() | ( | ) | const [inline] |
Returns a const view of the DMatrixSlice view.
Definition at line 172 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
1.4.7