MOOCHO (Single Doxygen Collection)
Version of the Day
|
Helper class type that simplifies the usage of the MatrixOpGetGMSMutable
interface for clients.
More...
#include <AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp>
Public Member Functions | |
MatrixDenseMutableEncap (MatrixOpGetGMSMutable *mat_get) | |
Construct a DMatrixSlice view from a MatrixOpGetGMSMutable object. More... | |
MatrixDenseMutableEncap (MatrixOp *mat) | |
Construct a DMatrixSlice view from a MatrixOp object. More... | |
~MatrixDenseMutableEncap () | |
Frees the DMatrixSlice view and commits the changes. More... | |
DMatrixSlice | operator() () |
Returns a non-const view of the DMatrixSlice view. More... | |
const DMatrixSlice | operator() () const |
Returns a const view of the DMatrixSlice view. More... | |
Private Member Functions | |
MatrixDenseMutableEncap () | |
MatrixDenseMutableEncap (const MatrixDenseMutableEncap &) | |
MatrixDenseMutableEncap & | operator= (const MatrixDenseMutableEncap &) |
Private Attributes | |
MatrixOpGetGMSMutable * | mat_get_ |
DMatrixSlice | gms_view_ |
Helper class type that simplifies the usage of the 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:
In the above code, if the underlying 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 126 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
|
inline |
Construct a DMatrixSlice
view from a MatrixOpGetGMSMutable
object.
Definition at line 161 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
|
inline |
Construct a DMatrixSlice
view from a MatrixOp
object.
If dynamic_cast<MatrixOpGetGMSMutable*>(mat) == NULL
then a ??? exception is thrown.
Definition at line 167 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
|
inline |
Frees the DMatrixSlice
view and commits the changes.
Definition at line 173 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
|
private |
|
private |
|
inline |
Returns a non-const view of the DMatrixSlice
view.
Definition at line 179 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
|
inline |
Returns a const view of the DMatrixSlice
view.
Definition at line 185 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
|
private |
|
private |
Definition at line 147 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.
|
private |
Definition at line 148 of file AbstractLinAlgPack_MatrixOpGetGMSMutable.hpp.