35#ifndef _BLAZE_MATH_VIEWS_SUBMATRIX_H_
36#define _BLAZE_MATH_VIEWS_SUBMATRIX_H_
185 return submatrix<unaligned,I,J,M,N>( *matrix, args... );
254 return submatrix<unaligned,I,J,M,N>( *matrix, args... );
285 return submatrix<unaligned,I,J,M,N>( std::move( *matrix ), args... );
368 using ReturnType = Submatrix_<MT,AF,I,J,M,N>;
369 return ReturnType( *matrix, args... );
450 using ReturnType =
const Submatrix_<const MT,AF,I,J,M,N>;
451 return ReturnType( *matrix, args... );
484 using ReturnType = Submatrix_<MT,AF,I,J,M,N>;
485 return ReturnType( *matrix, args... );
556 return submatrix<unaligned>( *matrix,
row,
column, m, n, args... );
626 return submatrix<unaligned>( *matrix,
row,
column, m, n, args... );
658 return submatrix<unaligned>( std::move( *matrix ),
row,
column, m, n, args... );
742 using ReturnType = Submatrix_<MT,AF>;
743 return ReturnType( *matrix,
row,
column, m, n, args... );
825 using ReturnType =
const Submatrix_<const MT,AF>;
826 return ReturnType( *matrix,
row,
column, m, n, args... );
860 using ReturnType = Submatrix_<MT,AF>;
861 return ReturnType( *matrix,
row,
column, m, n, args... );
891inline decltype(
auto)
submatrix(
const MatMatAddExpr<MT>& matrix, RSAs... args )
895 return submatrix<AF,CSAs...>( (*matrix).leftOperand(), args... ) +
896 submatrix<AF,CSAs...>( (*matrix).rightOperand(), args... );
919inline decltype(
auto)
submatrix(
const MatMatSubExpr<MT>& matrix, RSAs... args )
923 return submatrix<AF,CSAs...>( (*matrix).leftOperand(), args... ) -
924 submatrix<AF,CSAs...>( (*matrix).rightOperand(), args... );
947inline decltype(
auto)
submatrix(
const SchurExpr<MT>& matrix, RSAs... args )
951 return submatrix<AF,CSAs...>( (*matrix).leftOperand(), args... ) %
952 submatrix<AF,CSAs...>( (*matrix).rightOperand(), args... );
975inline decltype(
auto)
submatrix(
const MatMatMultExpr<MT>& matrix, RSAs... args )
979 using MT1 = RemoveReference_t< LeftOperand_t< MatrixType_t<MT> > >;
980 using MT2 = RemoveReference_t< RightOperand_t< MatrixType_t<MT> > >;
982 const SubmatrixData<CSAs...> sd( args... );
984 decltype(
auto) left ( (*matrix).leftOperand() );
985 decltype(
auto) right( (*matrix).rightOperand() );
987 const size_t begin(
max( ( IsUpper_v<MT1> )
988 ?( ( !AF && IsStrictlyUpper_v<MT1> )
993 ?( ( !AF && IsStrictlyLower_v<MT2> )
994 ?( sd.column() + 1UL )
997 const size_t end(
min( ( IsLower_v<MT1> )
998 ?( ( IsStrictlyLower_v<MT1> && sd.rows() > 0UL )
999 ?( sd.row() + sd.rows() - 1UL )
1000 :( sd.row() + sd.rows() ) )
1002 , ( IsUpper_v<MT2> )
1003 ?( ( IsStrictlyUpper_v<MT2> && sd.columns() > 0UL )
1004 ?( sd.column() + sd.columns() - 1UL )
1005 :( sd.column() + sd.columns() ) )
1006 :( left.columns() ) ) );
1010 return submatrix<AF>( left, sd.row(),
begin, sd.rows(), diff ) *
1011 submatrix<AF>( right,
begin, sd.column(), diff, sd.columns() );
1036 ,
typename... RSAs >
1037inline decltype(
auto)
submatrix(
const MatMatKronExpr<MT>& matrix, RSAs... args )
1042 return columns(
rows( *matrix, make_shifted_index_sequence<I,M>(), args... )
1043 , make_shifted_index_sequence<J,N>(), args... );
1072 ,
typename... RSAs >
1073inline decltype(
auto)
1074 submatrix(
const MatMatKronExpr<MT>& matrix,
size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1080 , [
column](
size_t i ){
return i+
column; }, n, args... );
1108 ,
typename... RSAs >
1109inline decltype(
auto)
submatrix(
const VecTVecMultExpr<MT>& matrix, RSAs... args )
1114 return subvector<AF,I,M>( (*matrix).leftOperand(), args... ) *
1115 subvector<AF,J,N>( (*matrix).rightOperand(), args... );
1143 ,
typename... RSAs >
1144inline decltype(
auto)
1145 submatrix(
const VecTVecMultExpr<MT>& matrix,
size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1150 return subvector<AF>( (*matrix).leftOperand(),
row, m, args... ) *
1151 subvector<AF>( (*matrix).rightOperand(),
column, n, args... );
1177 ,
typename... RSAs >
1178inline decltype(
auto)
submatrix(
const MatScalarMultExpr<MT>& matrix, RSAs... args )
1182 return submatrix<AF,CSAs...>( (*matrix).leftOperand(), args... ) * (*matrix).rightOperand();
1204 ,
typename... RSAs >
1205inline decltype(
auto)
submatrix(
const MatScalarDivExpr<MT>& matrix, RSAs... args )
1209 return submatrix<AF,CSAs...>( (*matrix).leftOperand(), args... ) / (*matrix).rightOperand();
1231 ,
typename... RSAs >
1232inline decltype(
auto)
submatrix(
const MatMapExpr<MT>& matrix, RSAs... args )
1236 return map( submatrix<AF,CSAs...>( (*matrix).operand(), args... ), (*matrix).operation() );
1258 ,
typename... RSAs >
1259inline decltype(
auto)
submatrix(
const MatMatMapExpr<MT>& matrix, RSAs... args )
1263 return map( submatrix<AF,CSAs...>( (*matrix).leftOperand(), args... ),
1264 submatrix<AF,CSAs...>( (*matrix).rightOperand(), args... ),
1265 (*matrix).operation() );
1289 ,
typename... RSAs >
1290inline decltype(
auto)
submatrix(
const VecTVecMapExpr<MT>& matrix, RSAs... args )
1295 return map( subvector<AF,I,M>( (*matrix).leftOperand(), args... ),
1296 subvector<AF,J,N>( (*matrix).rightOperand(), args... ),
1297 (*matrix).operation() );
1325 ,
typename... RSAs >
1326inline decltype(
auto)
1327 submatrix(
const VecTVecMapExpr<MT>& matrix,
size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1332 return map( subvector<AF>( (*matrix).leftOperand(),
row, m, args... ),
1333 subvector<AF>( (*matrix).rightOperand(),
column, n, args... ),
1334 (*matrix).operation() );
1360 ,
typename... RSAs >
1361inline decltype(
auto)
submatrix(
const MatEvalExpr<MT>& matrix, RSAs... args )
1365 return eval( submatrix<AF,CSAs...>( (*matrix).operand(), args... ) );
1387 ,
typename... RSAs >
1388inline decltype(
auto)
submatrix(
const MatSerialExpr<MT>& matrix, RSAs... args )
1392 return serial( submatrix<AF,CSAs...>( (*matrix).operand(), args... ) );
1414 ,
typename... RSAs >
1415inline decltype(
auto)
submatrix(
const MatNoAliasExpr<MT>& matrix, RSAs... args )
1419 return noalias( submatrix<AF,CSAs...>( (*matrix).operand(), args... ) );
1441 ,
typename... RSAs >
1442inline decltype(
auto)
submatrix(
const MatNoSIMDExpr<MT>& matrix, RSAs... args )
1446 return nosimd( submatrix<AF,CSAs...>( (*matrix).operand(), args... ) );
1468 ,
typename... RSAs >
1469inline decltype(
auto)
submatrix(
const DeclExpr<MT>& matrix, RSAs... args )
1473 return submatrix<AF,CSAs...>( (*matrix).operand(), args... );
1498 ,
typename... RSAs >
1499inline decltype(
auto)
submatrix(
const MatTransExpr<MT>& matrix, RSAs... args )
1503 return trans( submatrix<AF,J,I,N,M>( (*matrix).operand(), args... ) );
1528 ,
typename... RSAs >
1529inline decltype(
auto)
1530 submatrix(
const MatTransExpr<MT>& matrix,
size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1534 return trans( submatrix<AF>( (*matrix).operand(),
column,
row, n, m, args... ) );
1560 ,
typename... RSAs >
1561inline decltype(
auto)
submatrix(
const VecExpandExpr<MT,CEAs...>& matrix, RSAs... args )
1566 if( ( I + M > (*matrix).rows() ) || ( J + N > (*matrix).columns() ) ) {
1571 BLAZE_USER_ASSERT( I + M <= (*matrix).rows() ,
"Invalid submatrix specification" );
1572 BLAZE_USER_ASSERT( J + N <= (*matrix).columns(),
"Invalid submatrix specification" );
1577 constexpr bool TF( TransposeFlag_v<VT> );
1579 constexpr size_t index ( TF ? J : I );
1580 constexpr size_t size ( TF ? N : M );
1581 constexpr size_t expansion( TF ? M : N );
1583 return expand<expansion>( subvector<index,size>( (*matrix).operand(),
unchecked ) );
1609 ,
typename... RSAs >
1610inline decltype(
auto)
1611 submatrix(
const VecExpandExpr<MT,CEAs...>& matrix,
1612 size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1617 if( (
row + m > (*matrix).rows() ) || (
column + n > (*matrix).columns() ) ) {
1628 constexpr bool TF( TransposeFlag_v<VT> );
1630 const size_t index ( TF ?
column :
row );
1631 const size_t size ( TF ? n : m );
1632 const size_t expansion( TF ? m : n );
1660 ,
typename... RSAs >
1661inline decltype(
auto)
submatrix(
const MatRepeatExpr<MT,CRAs...>& matrix, RSAs... args )
1666 if( ( I + M > (*matrix).rows() ) || ( J + N > (*matrix).columns() ) ) {
1671 BLAZE_USER_ASSERT( I + M <= (*matrix).rows() ,
"Invalid submatrix specification" );
1672 BLAZE_USER_ASSERT( J + N <= (*matrix).columns(),
"Invalid submatrix specification" );
1675 const size_t M2 = (*matrix).operand().rows();
1676 const size_t N2 = (*matrix).operand().columns();
1678 return columns(
rows( (*matrix).operand(), [M2](
size_t i ){ return (i+I)%M2; }, M, args... )
1679 , [N2](
size_t i ){ return (i+J)%N2; }, N,
unchecked );
1705 ,
typename... RSAs >
1706inline decltype(
auto)
1707 submatrix(
const MatRepeatExpr<MT,CRAs...>& matrix,
1708 size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1713 if( (
row + m > (*matrix).rows() ) || (
column + n > (*matrix).columns() ) ) {
1722 const size_t M = (*matrix).operand().rows();
1723 const size_t N = (*matrix).operand().columns();
1725 return columns(
rows( (*matrix).operand(), [
row,M](
size_t i ){ return (i+row)%M; }, m, args... )
1758 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
1759 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
1760inline decltype(
auto)
submatrix( MT&& sm, RSAs... args )
1772 return submatrix<AF,I+I2,J+J2,M,N>( sm.operand(), args... );
1797 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
1798inline decltype(
auto)
submatrix( MT&& sm, RSAs... args )
1803 if( ( I + M > sm.rows() ) || ( J + N > sm.columns() ) ) {
1812 return submatrix<AF>( sm.operand(), sm.row() + I, sm.column() + J, M, N,
unchecked );
1837 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
1838inline decltype(
auto)
submatrix( MT&& sm,
size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1843 if( (
row + m > sm.rows() ) || (
column + n > sm.columns() ) ) {
1852 return submatrix<AF>( sm.operand(), sm.row() +
row, sm.column() +
column, m, n,
unchecked );
1882 ,
typename... RSAs >
1883inline decltype(
auto)
subvector(
const MatVecMultExpr<VT>& vector, RSAs... args )
1887 using MT = RemoveReference_t< LeftOperand_t< VectorType_t<VT> > >;
1889 const SubvectorData<CSAs...> sd( args... );
1891 decltype(
auto) left ( (*vector).leftOperand() );
1892 decltype(
auto) right( (*vector).rightOperand() );
1894 const size_t column( ( IsUpper_v<MT> )
1895 ?( ( !AF && IsStrictlyUpper_v<MT> )?( sd.offset() + 1UL ):( sd.offset() ) )
1897 const size_t n( ( IsLower_v<MT> )
1898 ?( ( IsUpper_v<MT> )?( sd.size() )
1899 :( ( IsStrictlyLower_v<MT> && sd.size() > 0UL )
1900 ?( sd.offset() + sd.size() - 1UL )
1901 :( sd.offset() + sd.size() ) ) )
1902 :( ( IsUpper_v<MT> )?( left.columns() -
column )
1903 :( left.columns() ) ) );
1905 constexpr auto check(
getCheck( args... ) );
1908 return submatrix<AF>( left, sd.offset(),
column, sd.size(), n, check ) *
1909 subvector<AF>( right,
column, n, check );
1935 ,
typename... RSAs >
1936inline decltype(
auto)
subvector(
const TVecMatMultExpr<VT>& vector, RSAs... args )
1940 using MT = RemoveReference_t< RightOperand_t< VectorType_t<VT> > >;
1942 const SubvectorData<CSAs...> sd( args... );
1944 decltype(
auto) left ( (*vector).leftOperand() );
1945 decltype(
auto) right( (*vector).rightOperand() );
1947 const size_t row( ( IsLower_v<MT> )
1948 ?( ( !AF && IsStrictlyLower_v<MT> )?( sd.offset() + 1UL ):( sd.offset() ) )
1950 const size_t m( ( IsUpper_v<MT> )
1951 ?( ( IsLower_v<MT> )?( sd.size() )
1952 :( ( IsStrictlyUpper_v<MT> && sd.size() > 0UL )
1953 ?( sd.offset() + sd.size() - 1UL )
1954 :( sd.offset() + sd.size() ) ) )
1955 :( ( IsLower_v<MT> )?( right.rows() -
row )
1956 :( right.rows() ) ) );
1958 constexpr auto check(
getCheck( args... ) );
1961 return subvector<AF>( left,
row, m, check ) *
1962 submatrix<AF>( right,
row, sd.offset(), m, sd.size(), check );
1988 ,
typename... RSAs >
1989inline decltype(
auto)
subvector(
const MatReduceExpr<VT,columnwise>& vector, RSAs... args )
1993 const SubvectorData<CSAs...> sd( args... );
1994 const size_t M( (*vector).operand().rows() );
1995 constexpr auto check(
getCheck( args... ) );
1998 decltype(
auto) sm( submatrix<AF>( (*vector).operand(), 0UL, sd.offset(), M, sd.size(), check ) );
1999 return reduce<columnwise>( sm, (*vector).operation() );
2025 ,
typename... RSAs >
2026inline decltype(
auto)
subvector(
const MatReduceExpr<VT,rowwise>& vector, RSAs... args )
2030 const SubvectorData<CSAs...> sd( args... );
2031 const size_t N( (*vector).operand().columns() );
2032 constexpr auto check(
getCheck( args... ) );
2035 decltype(
auto) sm( submatrix<AF>( (*vector).operand(), sd.offset(), 0UL, sd.size(), N, check ) );
2036 return reduce<rowwise>( sm, (*vector).operation() );
2068 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2069 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2070inline decltype(
auto)
row( MT&& sm, RRAs... args )
2102template<
typename MT
2104 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2105 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2106inline decltype(
auto)
row( MT&& sm,
size_t index, RRAs... args )
2116 if( ( index >= M ) ) {
2142template<
size_t... CRAs
2145 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2146 !RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2147inline decltype(
auto)
row( MT&& sm, RRAs... args )
2151 const RowData<CRAs...> rd( args... );
2154 if( ( rd.row() >= sm.rows() ) ) {
2162 const size_t index( rd.row() + sm.row() );
2193 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2194 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2195inline decltype(
auto)
rows( MT&& sm, RRAs... args )
2204 return submatrix<0UL,J,
sizeof...(Is)+1UL,N>(
2205 rows( sm.operand(), make_shifted_index_subsequence<I2,M,I,Is...>(), args... ),
unchecked );
2227 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2228 !RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2229inline decltype(
auto)
rows( MT&& sm, RRAs... args )
2234 constexpr size_t indices[] = { I, Is... };
2235 for(
size_t i=0UL; i<
sizeof...(Is)+1UL; ++i ) {
2236 if( sm.rows() <= indices[i] ) {
2243 0UL, sm.column(),
sizeof...(Is)+1UL, sm.columns(),
unchecked );
2263template<
typename MT
2266 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
2267inline decltype(
auto)
rows( MT&& sm, T* indices,
size_t n, RRAs... args )
2272 for(
size_t i=0UL; i<n; ++i ) {
2273 if( sm.rows() <=
size_t( indices[i] ) ) {
2279 SmallArray<size_t,128UL> newIndices( indices, indices+n );
2280 std::for_each( newIndices.begin(), newIndices.end(),
2281 [
row=sm.row()](
size_t& index ){ index += row; } );
2284 0UL, sm.column(), n, sm.columns(),
unchecked );
2304template<
typename MT
2307 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
2308inline decltype(
auto)
rows( MT&& sm, P p,
size_t n, RRAs... args )
2313 for(
size_t i=0UL; i<n; ++i ) {
2314 if( sm.rows() <=
size_t( p(i) ) ) {
2320 return submatrix(
rows( sm.operand(), [p,offset=sm.row()](
size_t i ){ return p(i)+offset; }, n,
unchecked ),
2321 0UL, sm.column(), n, sm.columns(),
unchecked );
2349 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2350 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2351inline decltype(
auto)
column( MT&& sm, RCAs... args )
2383template<
typename MT
2385 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2386 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2387inline decltype(
auto)
column( MT&& sm,
size_t index, RCAs... args )
2397 if( ( index >= N ) ) {
2423template<
size_t... CCAs
2426 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2427 !RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2428inline decltype(
auto)
column( MT&& sm, RCAs... args )
2432 const ColumnData<CCAs...> cd( args... );
2435 if( ( cd.column() >= sm.columns() ) ) {
2443 const size_t index( cd.column() + sm.column() );
2474 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2475 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2476inline decltype(
auto)
columns( MT&& sm, RCAs... args )
2485 return submatrix<I2,0UL,M,
sizeof...(Is)+1UL>(
2486 columns( sm.operand(), make_shifted_index_subsequence<J,N,I,Is...>(), args... ),
unchecked );
2508 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2509 !RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2510inline decltype(
auto)
columns( MT&& sm, RCAs... args )
2515 constexpr size_t indices[] = { I, Is... };
2516 for(
size_t j=0UL; j<
sizeof...(Is)+1UL; ++j ) {
2517 if( sm.columns() <= indices[j] ) {
2524 sm.row(), 0UL, sm.rows(),
sizeof...(Is)+1UL,
unchecked );
2544template<
typename MT
2547 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
2548inline decltype(
auto)
columns( MT&& sm, T* indices,
size_t n, RCAs... args )
2553 for(
size_t j=0UL; j<n; ++j ) {
2554 if( sm.columns() <=
size_t( indices[j] ) ) {
2560 SmallArray<size_t,128UL> newIndices( indices, indices+n );
2561 std::for_each( newIndices.begin(), newIndices.end(),
2562 [
column=sm.column()](
size_t& index ){ index += column; } );
2565 sm.row(), 0UL, sm.rows(), n,
unchecked );
2585template<
typename MT
2588 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
2589inline decltype(
auto)
columns( MT&& sm, P p,
size_t n, RCAs... args )
2594 for(
size_t j=0UL; j<n; ++j ) {
2595 if( sm.columns() <=
size_t( p(j) ) ) {
2602 sm.row(), 0UL, sm.rows(), n,
unchecked );
2647inline bool isDefault(
const Submatrix<MT,AF,SO,true,CSAs...>& sm )
2651 if( SO == rowMajor ) {
2652 for(
size_t i=0UL; i<(*sm).rows(); ++i )
2653 for(
size_t j=0UL; j<(*sm).columns(); ++j )
2654 if( !isDefault<RF>( (*sm)(i,j) ) )
2658 for(
size_t j=0UL; j<(*sm).columns(); ++j )
2659 for(
size_t i=0UL; i<(*sm).rows(); ++i )
2660 if( !isDefault<RF>( (*sm)(i,j) ) )
2701inline bool isDefault(
const Submatrix<MT,AF,SO,false,CSAs...>& sm )
2705 const size_t iend( ( SO == rowMajor)?( sm.rows() ):( sm.columns() ) );
2707 for(
size_t i=0UL; i<iend; ++i ) {
2708 for(
auto element=sm.cbegin(i); element!=sm.cend(i); ++element )
2709 if( !isDefault<RF>( element->value() ) )
return false;
2737template<
typename MT
2742inline bool isIntact(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
noexcept
2744 return ( sm.row() + sm.rows() <= sm.operand().rows() &&
2745 sm.column() + sm.columns() <= sm.operand().columns() &&
2773template<
typename MT
2778inline bool isSymmetric(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2780 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2782 if( IsSymmetric_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2784 else return isSymmetric(
static_cast<const BaseType&
>( sm ) );
2811template<
typename MT
2816inline bool isHermitian(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2818 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2820 if( IsHermitian_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2822 else return isHermitian(
static_cast<const BaseType&
>( sm ) );
2859template<
typename MT
2864inline bool isLower(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2866 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2868 if( IsLower_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2870 else return isLower(
static_cast<const BaseType&
>( sm ) );
2906template<
typename MT
2911inline bool isUniLower(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2913 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2915 if( IsUniLower_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2917 else return isUniLower(
static_cast<const BaseType&
>( sm ) );
2953template<
typename MT
2958inline bool isStrictlyLower(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2960 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2962 if( IsStrictlyLower_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
3001template<
typename MT
3006inline bool isUpper(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3008 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
3010 if( IsUpper_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
3012 else return isUpper(
static_cast<const BaseType&
>( sm ) );
3048template<
typename MT
3053inline bool isUniUpper(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3055 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
3057 if( IsUniUpper_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
3059 else return isUniUpper(
static_cast<const BaseType&
>( sm ) );
3095template<
typename MT
3100inline bool isStrictlyUpper(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3102 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
3104 if( IsStrictlyUpper_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
3125template<
typename MT
3130inline bool isSame(
const Submatrix<MT,AF,SO,DF,CSAs...>& a,
const Matrix<MT,SO>& b )
noexcept
3132 return (
isSame( a.operand(), *b ) &&
3133 ( a.rows() == (*b).rows() ) &&
3134 ( a.columns() == (*b).columns() ) );
3153template<
typename MT
3158inline bool isSame(
const Matrix<MT,SO>& a,
const Submatrix<MT,AF,SO,DF,CSAs...>& b )
noexcept
3160 return (
isSame( *a, b.operand() ) &&
3161 ( (*a).rows() == b.rows() ) &&
3162 ( (*a).columns() == b.columns() ) );
3181template<
typename MT1
3191inline bool isSame(
const Submatrix<MT1,AF1,SO1,DF1,CSAs1...>& a,
3192 const Submatrix<MT2,AF2,SO2,DF2,CSAs2...>& b )
noexcept
3194 return (
isSame( a.operand(), b.operand() ) &&
3195 ( a.row() == b.row() ) && ( a.column() == b.column() ) &&
3196 ( a.rows() == b.rows() ) && ( a.columns() == b.columns() ) );
3246inline auto invert( Submatrix<MT,AF,SO,true,CSAs...>& sm )
3247 -> DisableIf_t< HasMutableDataAccess_v<MT> >
3249 using RT =
ResultType_t< Submatrix<MT,AF,SO,
true,CSAs...> >;
3278template<
typename MT
3284inline bool trySet(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3289 return trySet( sm.operand(), sm.row()+i, sm.column()+j, value );
3313template<
typename MT
3320 trySet(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3327 return trySet( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3349template<
typename MT
3355inline bool tryAdd(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3360 return tryAdd( sm.operand(), sm.row()+i, sm.column()+j, value );
3384template<
typename MT
3391 tryAdd(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3398 return tryAdd( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3420template<
typename MT
3426inline bool trySub(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3431 return trySub( sm.operand(), sm.row()+i, sm.column()+j, value );
3455template<
typename MT
3462 trySub(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3469 return trySub( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3491template<
typename MT
3497inline bool tryMult(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3502 return tryMult( sm.operand(), sm.row()+i, sm.column()+j, value );
3526template<
typename MT
3533 tryMult(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3540 return tryMult( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3562template<
typename MT
3568inline bool tryDiv(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3573 return tryDiv( sm.operand(), sm.row()+i, sm.column()+j, value );
3597template<
typename MT
3604 tryDiv(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3611 return tryDiv( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3633template<
typename MT
3638inline bool tryShift(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
int count )
3643 return tryShift( sm.operand(), sm.row()+i, sm.column()+j, count );
3667template<
typename MT
3673 tryShift(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
int count )
3680 return tryShift( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, count );
3702template<
typename MT
3708inline bool tryBitand(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3713 return tryBitand( sm.operand(), sm.row()+i, sm.column()+j, value );
3737template<
typename MT
3744 tryBitand(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3751 return tryBitand( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3773template<
typename MT
3779inline bool tryBitor(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3784 return tryBitor( sm.operand(), sm.row()+i, sm.column()+j, value );
3808template<
typename MT
3815 tryBitor(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3822 return tryBitor( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3844template<
typename MT
3850inline bool tryBitxor(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3855 return tryBitxor( sm.operand(), sm.row()+i, sm.column()+j, value );
3879template<
typename MT
3886 tryBitxor(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3893 return tryBitxor( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3915template<
typename MT
3922inline bool tryAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
3923 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
3930 return tryAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
3953template<
typename MT
3960inline bool tryAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
3968 return tryAssign( lhs.operand(), *rhs,
band +
ptrdiff_t( lhs.column() - lhs.row() ),
3969 lhs.row() +
row, lhs.column() +
column );
3991template<
typename MT1
3998inline bool tryAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
3999 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4006 return tryAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4028template<
typename MT
4035inline bool tryAddAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4036 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4043 return tryAddAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4067template<
typename MT
4074inline bool tryAddAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4082 return tryAddAssign( lhs.operand(), *rhs,
band +
ptrdiff_t( lhs.column() - lhs.row() ),
4083 lhs.row() +
row, lhs.column() +
column );
4105template<
typename MT1
4112inline bool tryAddAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4113 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4120 return tryAddAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4142template<
typename MT
4149inline bool trySubAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4150 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4157 return trySubAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4181template<
typename MT
4188inline bool trySubAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4196 return trySubAssign( lhs.operand(), *rhs,
band +
ptrdiff_t( lhs.column() - lhs.row() ),
4197 lhs.row() +
row, lhs.column() +
column );
4219template<
typename MT1
4226inline bool trySubAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4227 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4234 return trySubAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4256template<
typename MT
4263inline bool tryMultAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4264 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4271 return tryMultAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4295template<
typename MT
4302inline bool tryMultAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4310 return tryMultAssign( lhs.operand(), *rhs,
band +
ptrdiff_t( lhs.column() - lhs.row() ),
4311 lhs.row() +
row, lhs.column() +
column );
4333template<
typename MT1
4340inline bool trySchurAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4341 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4348 return trySchurAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4370template<
typename MT
4377inline bool tryDivAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4378 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4385 return tryDivAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4409template<
typename MT
4416inline bool tryDivAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4424 return tryDivAssign( lhs.operand(), *rhs,
band +
ptrdiff_t( lhs.column() - lhs.row() ),
4425 lhs.row() +
row, lhs.column() +
column );
4447template<
typename MT
4454inline bool tryShiftAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4455 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4462 return tryShiftAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4486template<
typename MT
4493inline bool tryShiftAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4501 return tryShiftAssign( lhs.operand(), *rhs,
band +
ptrdiff_t( lhs.column() - lhs.row() ),
4502 lhs.row() +
row, lhs.column() +
column );
4524template<
typename MT1
4531inline bool tryShiftAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4532 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4539 return tryShiftAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4561template<
typename MT
4568inline bool tryBitandAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4569 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4576 return tryBitandAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4600template<
typename MT
4607inline bool tryBitandAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4615 return tryBitandAssign( lhs.operand(), *rhs,
band +
ptrdiff_t( lhs.column() - lhs.row() ),
4616 lhs.row() +
row, lhs.column() +
column );
4638template<
typename MT1
4645inline bool tryBitandAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4646 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4653 return tryBitandAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4675template<
typename MT
4682inline bool tryBitorAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4683 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4690 return tryBitorAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4714template<
typename MT
4721inline bool tryBitorAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4729 return tryBitorAssign( lhs.operand(), *rhs,
band +
ptrdiff_t( lhs.column() - lhs.row() ),
4730 lhs.row() +
row, lhs.column() +
column );
4752template<
typename MT1
4759inline bool tryBitorAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4760 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4767 return tryBitorAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4789template<
typename MT
4796inline bool tryBitxorAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4797 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4804 return tryBitxorAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4828template<
typename MT
4835inline bool tryBitxorAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4843 return tryBitxorAssign( lhs.operand(), *rhs,
band +
ptrdiff_t( lhs.column() - lhs.row() ),
4844 lhs.row() +
row, lhs.column() +
column );
4866template<
typename MT1
4873inline bool tryBitxorAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4874 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4881 return tryBitxorAssign( lhs.operand(), *rhs, lhs.row() +
row, lhs.column() +
column );
4902template<
typename MT
4910inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF,I,J,M,N>& sm )
4912 return submatrix<AF,I,J,M,N>( derestrict( sm.operand() ),
unchecked );
4933template<
typename MT
4941inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF,I,J,M,N>&& sm )
4943 return submatrix<AF,I,J,M,N>( derestrict( sm.operand() ),
unchecked );
4964template<
typename MT
4968inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF>& sm )
4970 return submatrix<AF>( derestrict( sm.operand() ), sm.row(), sm.column(), sm.rows(), sm.columns(),
unchecked );
4991template<
typename MT
4995inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF>&& sm )
4997 return submatrix<AF>( derestrict( sm.operand() ), sm.row(), sm.column(), sm.rows(), sm.columns(),
unchecked );
5016template<
typename MT
5021inline decltype(
auto) unview( Submatrix<MT,AF,SO,DF,CSAs...>& sm )
5023 return sm.operand();
5042template<
typename MT
5047inline decltype(
auto) unview(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
5049 return sm.operand();
5065template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5066struct Size< Submatrix<MT,AF,SO,DF,I,J,M,N>, 0UL >
5067 :
public Ptrdiff_t< static_cast<ptrdiff_t>(M) >
5070template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5071struct Size< Submatrix<MT,AF,SO,DF,I,J,M,N>, 1UL >
5072 :
public Ptrdiff_t< static_cast<ptrdiff_t>(N) >
5088template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5089struct MaxSize< Submatrix<MT,AF,SO,DF,I,J,M,N>, 0UL >
5090 :
public Ptrdiff_t< static_cast<ptrdiff_t>(M) >
5093template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5094struct MaxSize< Submatrix<MT,AF,SO,DF,I,J,M,N>, 1UL >
5095 :
public Ptrdiff_t< static_cast<ptrdiff_t>(N) >
5111template<
typename MT,
AlignmentFlag AF,
bool SO,
bool DF,
size_t... CSAs >
5112struct IsRestricted< Submatrix<MT,AF,SO,DF,CSAs...> >
5113 :
public IsRestricted<MT>
5129template<
typename MT,
AlignmentFlag AF,
bool SO,
size_t... CSAs >
5130struct HasConstDataAccess< Submatrix<MT,AF,SO,true,CSAs...> >
5131 :
public HasConstDataAccess<MT>
5147template<
typename MT,
AlignmentFlag AF,
bool SO,
size_t... CSAs >
5148struct HasMutableDataAccess< Submatrix<MT,AF,SO,true,CSAs...> >
5149 :
public HasMutableDataAccess<MT>
5165template<
typename MT,
bool SO,
size_t... CSAs >
5166struct IsAligned< Submatrix<MT,
aligned,SO,true,CSAs...> >
5183template<
typename MT,
AlignmentFlag AF,
bool SO,
size_t... CSAs >
5184struct IsContiguous< Submatrix<MT,AF,SO,true,CSAs...> >
5185 :
public IsContiguous<MT>
5201template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5202struct IsSymmetric< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5203 :
public BoolConstant< ( IsSymmetric_v<MT> && I == J && M == N ) >
5219template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5220struct IsHermitian< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5221 :
public BoolConstant< ( IsHermitian_v<MT> && I == J && M == N ) >
5237template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5238struct IsLower< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5239 :
public BoolConstant< ( IsLower_v<MT> && I == J && M == N ) ||
5240 ( IsStrictlyLower_v<MT> && I == J+1UL && M == N ) >
5256template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5257struct IsUniLower< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5258 :
public BoolConstant< ( IsUniLower_v<MT> && I == J && M == N ) >
5274template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5275struct IsStrictlyLower< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5276 :
public BoolConstant< ( IsLower_v<MT> && I < J && M == N ) ||
5277 ( IsStrictlyLower_v<MT> && I == J && M == N ) >
5293template< typename MT, AlignmentFlag AF, bool SO, bool DF, size_t I, size_t J, size_t M, size_t N >
5294struct IsUpper< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5295 : public BoolConstant< ( IsUpper_v<MT> && I == J && M == N ) ||
5296 ( IsStrictlyUpper_v<MT> && I+1UL == J && M == N ) >
5312template< typename MT, AlignmentFlag AF, bool SO, bool DF, size_t I, size_t J, size_t M, size_t N >
5313struct IsUniUpper< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5314 : public BoolConstant< ( IsUniUpper_v<MT> && I == J && M == N ) >
5330template< typename MT, AlignmentFlag AF, bool SO, bool DF, size_t I, size_t J, size_t M, size_t N >
5331struct IsStrictlyUpper< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5332 : public BoolConstant< ( IsUpper_v<MT> && I > J && M == N ) ||
5333 ( IsStrictlyUpper_v<MT> && I == J && M == N ) >
Header file for auxiliary alias declarations.
typename T::VectorType VectorType_t
Alias declaration for nested VectorType type definitions.
Definition: Aliases.h:590
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition: Aliases.h:450
typename T::BaseType BaseType_t
Alias declaration for nested BaseType type definitions.
Definition: Aliases.h:90
Header file for the alignment flag enumeration.
Header file for run time assertion macros.
Header file for the blaze::checked and blaze::unchecked instances.
Header file for the implementation of the ColumnData class template.
Header file for the EnableIf class template.
Header file for the function trace functionality.
Header file for the HasConstDataAccess type trait.
Header file for the HasMutableDataAccess type trait.
Header file for the integer_sequence and index_sequence aliases.
Header file for the IntegralConstant class template.
Header file for the dense matrix inversion flags.
Header file for the IsAligned type trait.
Header file for the IsContiguous type trait.
Header file for the isDefault shim.
Header file for the IsHermitian type trait.
Header file for the IsLower type trait.
Header file for the IsRestricted type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSubmatrix type trait.
Header file for the IsSymmetric type trait.
Header file for the IsUniLower type trait.
Header file for the IsUniUpper type trait.
Header file for the IsUpper type trait.
Header file for the MAYBE_UNUSED function template.
Constraint on the data type.
Header file for the reduction flags.
Header file for the relaxation flag enumeration.
Header file for the RemoveReference type trait.
Header file for the implementation of the RowData class template.
Header file for the SmallArray implementation.
Base class for matrices.
Definition: Matrix.h:85
Pointer difference type of the Blaze library.
Size type of the Blaze library.
Constraint on the data type.
Header file for the DeclExpr base class.
Header file for the MatEvalExpr base class.
Header file for the MatMapExpr base class.
Header file for the MatMatAddExpr base class.
Header file for the MatMatKronExpr base class.
Header file for the MatMatMapExpr base class.
Header file for the MatMatMultExpr base class.
Header file for the MatMatSubExpr base class.
Header file for the MatNoAliasExpr base class.
Header file for the MatNoSIMDExpr base class.
Header file for the MatReduceExpr base class.
Header file for the MatRepeatExpr base class.
Header file for the MatScalarDivExpr base class.
Header file for the MatScalarMultExpr base class.
Header file for the MatSerialExpr base class.
Header file for the MatTransExpr base class.
Header file for the MatVecMultExpr base class.
Header file for the Matrix base class.
Header file for the SchurExpr base class.
Header file for the TVecMatMultExpr base class.
Header file for the VecExpandExpr base class.
Header file for the VecTVecMapExpr base class.
Header file for the VecTVecMultExpr base class.
decltype(auto) band(Matrix< MT, SO > &matrix, RBAs... args)
Creating a view on a specific band of the given matrix.
Definition: Band.h:140
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:137
decltype(auto) noalias(const DenseMatrix< MT, SO > &dm)
Forces the non-aliased evaluation of the given dense matrix expression dm.
Definition: DMatNoAliasExpr.h:679
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:2096
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1339
decltype(auto) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:790
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1375
bool isLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower triangular matrix.
Definition: DenseMatrix.h:1921
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:766
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:2009
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Elementwise evaluation of the given binary operation on each single element of the dense matrices lhs...
Definition: DMatDMatMapExpr.h:1144
decltype(auto) nosimd(const DenseMatrix< MT, SO > &dm)
Disables the SIMD evaluation of the given dense matrix expression dm.
Definition: DMatNoSIMDExpr.h:717
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:2363
bool isHermitian(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is Hermitian.
Definition: DenseMatrix.h:1534
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:812
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:1456
bool isUniUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper unitriangular matrix.
Definition: DenseMatrix.h:2276
bool isUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper triangular matrix.
Definition: DenseMatrix.h:2188
decltype(auto) expand(const DenseVector< VT, TF > &dv, size_t expansion)
Expansion of the given dense vector.
Definition: DVecExpandExpr.h:746
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:207
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition: DiagonalMatrix.h:169
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:693
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition: RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MUST_HAVE_MUTABLE_DATA_ACCESS(T)
Constraint on the data type.
Definition: MutableDataAccess.h:61
RelaxationFlag
Relaxation flag for strict or relaxed semantics.
Definition: RelaxationFlag.h:66
InversionFlag
Inversion flag.
Definition: InversionFlag.h:102
AlignmentFlag
Alignment flag for (un-)aligned vectors and matrices.
Definition: AlignmentFlag.h:63
@ aligned
Flag for aligned vectors and matrices.
Definition: AlignmentFlag.h:65
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:644
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:660
bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b) noexcept
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:1424
MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:584
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:518
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:676
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:137
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition: Assert.h:117
#define BLAZE_STATIC_ASSERT_MSG(expr, msg)
Compile time assertion macro.
Definition: StaticAssert.h:123
decltype(auto) submatrix(Matrix< MT, SO > &, RSAs...)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:181
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:158
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
typename RemoveReference< T >::Type RemoveReference_t
Auxiliary alias declaration for the RemoveReference type trait.
Definition: RemoveReference.h:95
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
IntegralConstant< ptrdiff_t, N > Ptrdiff_t
Compile time integral constant wrapper for ptrdiff_t.
Definition: IntegralConstant.h:237
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition: IntegralConstant.h:110
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition: Exception.h:235
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
constexpr auto getCheck(const T &a, const Ts &... args) noexcept
Extracting blaze::Check arguments from a given list of arguments.
Definition: Check.h:205
constexpr bool isChecked(const Ts &... args)
Extracting blaze::Check arguments from a given list of arguments.
Definition: Check.h:225
constexpr Unchecked unchecked
Global Unchecked instance.
Definition: Check.h:146
Header file for the Size type trait.
Header file for the TransposeFlag type trait.
Header file for the serial shim.
Header file for basic type definitions.
Header file for the generic max algorithm.
Header file for the generic min algorithm.
Header file for the implementation of the Subvector view.
Header file for the implementation of the Submatrix base template.
Submatrix specialization for dense matrices.
Submatrix specialization for sparse matrices.