35 #ifndef _BLAZE_MATH_VIEWS_SUBMATRIX_H_
36 #define _BLAZE_MATH_VIEWS_SUBMATRIX_H_
131 template<
typename MT
133 inline typename SubmatrixExprTrait<MT,unaligned>::Type
138 return submatrix<unaligned>( ~matrix,
row,
column, m, n );
202 template<
typename MT
204 inline typename SubmatrixExprTrait<const MT,unaligned>::Type
209 return submatrix<unaligned>( ~matrix,
row,
column, m, n );
299 inline typename DisableIf< Or< IsComputation<MT>, IsTransExpr<MT> >
300 ,
typename SubmatrixExprTrait<MT,AF>::Type >::Type
306 return ReturnType( ~matrix, row, column, m, n );
396 inline typename DisableIf< Or< IsComputation<MT>, IsTransExpr<MT> >
397 ,
typename SubmatrixExprTrait<const MT,AF>::Type >::Type
403 return ReturnType( ~matrix, row, column, m, n );
434 inline typename EnableIf< IsMatMatAddExpr<MT>,
typename SubmatrixExprTrait<MT,AF>::Type >::Type
435 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
439 return submatrix<AF>( (~matrix).leftOperand() ,
row,
column, m, n ) +
440 submatrix<AF>( (~matrix).rightOperand(),
row,
column, m, n );
464 inline typename EnableIf< IsMatMatSubExpr<MT>,
typename SubmatrixExprTrait<MT,AF>::Type >::Type
465 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
469 return submatrix<AF>( (~matrix).leftOperand() ,
row,
column, m, n ) -
470 submatrix<AF>( (~matrix).rightOperand(),
row,
column, m, n );
494 inline typename EnableIf< IsMatMatMultExpr<MT>,
typename SubmatrixExprTrait<MT,AF>::Type >::Type
495 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
499 typename MT::LeftOperand left ( (~matrix).leftOperand() );
500 typename MT::RightOperand right( (~matrix).rightOperand() );
502 return submatrix<AF>( left,
row, 0UL, m, left.columns() ) *
503 submatrix<AF>( right, 0UL, column, right.rows(), n );
527 inline typename EnableIf< IsVecTVecMultExpr<MT>,
typename SubmatrixExprTrait<MT,AF>::Type >::Type
528 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
532 return subvector<AF>( (~matrix).leftOperand(),
row, m ) *
533 subvector<AF>( (~matrix).rightOperand(),
column, n );
557 inline typename EnableIf< IsMatScalarMultExpr<MT>,
typename SubmatrixExprTrait<MT,AF>::Type >::Type
558 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
562 return submatrix<AF>( (~matrix).leftOperand(),
row,
column, m, n ) * (~matrix).rightOperand();
586 inline typename EnableIf< IsMatScalarDivExpr<MT>,
typename SubmatrixExprTrait<MT,AF>::Type >::Type
587 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
591 return submatrix<AF>( (~matrix).leftOperand(),
row,
column, m, n ) / (~matrix).rightOperand();
615 inline typename EnableIf< IsMatAbsExpr<MT>,
typename SubmatrixExprTrait<MT,AF>::Type >::Type
616 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
620 return abs( submatrix<AF>( (~matrix).operand(), row, column, m, n ) );
644 inline typename EnableIf< IsMatEvalExpr<MT>,
typename SubmatrixExprTrait<MT,AF>::Type >::Type
645 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
649 return eval( submatrix<AF>( (~matrix).operand(), row, column, m, n ) );
673 inline typename EnableIf< IsMatTransExpr<MT>,
typename SubmatrixExprTrait<MT,AF>::Type >::Type
674 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
678 return trans( submatrix<AF>( (~matrix).operand(), column, row, n, m ) );
Header file for the subvector/submatrix alignment flag values.
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:751
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename ColumnExprTrait< MT >::Type >::Type column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:103
const DMatAbsExpr< MT, SO > abs(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the absolute values of each single element of dm.
Definition: DMatAbsExpr.h:764
Header file for the IsTransExpr type trait class.
Header file for the IsMatMatAddExpr type trait class.
Header file for the IsMatTransExpr type trait class.
Header file for the IsMatAbsExpr type trait class.
Header file for the DisableIf class template.
Header file for the IsVecTVecMultExpr type trait class.
Header file for the Or class template.
Header file for the IsMatMatMultExpr type trait class.
Header file for the IsMatScalarMultExpr type trait class.
Evaluation of the expression type type of a submatrix operation.Via this type trait it is possible to...
Definition: SubmatrixExprTrait.h:78
Header file for the IsMatEvalExpr type trait class.
Header file for the EnableIf class template.
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename RowExprTrait< MT >::Type >::Type row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:103
Header file for the Matrix base class.
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2383
Header file for the IsMatScalarDivExpr type trait class.
const DMatEvalExpr< MT, SO > eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:584
Header file for the IsMatMatSubExpr type trait class.
SubmatrixExprTrait< MT, unaligned >::Type submatrix(Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:134
Header file for the IsComputation type trait class.
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
Header file for basic type definitions.
Header file for the FunctionTrace class.