35#ifndef _BLAZE_MATH_VIEWS_COLUMNS_DENSE_H_
36#define _BLAZE_MATH_VIEWS_COLUMNS_DENSE_H_
121class Columns<MT,true,true,SF,CCAs...>
122 :
public View< DenseMatrix< Columns<MT,true,true,SF,CCAs...>, true > >
123 ,
private ColumnsData<CCAs...>
127 using DataType = ColumnsData<CCAs...>;
128 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
137 template<
typename MT1,
typename MT2 >
138 static constexpr bool EnforceEvaluation_v =
139 ( IsRestricted_v<MT1> && RequiresEvaluation_v<MT2> );
145 using This = Columns<MT,
true,
true,SF,CCAs...>;
148 using BaseType = View< DenseMatrix<This,true> >;
150 using ViewedType = MT;
151 using ResultType = ColumnsTrait_t<MT,N>;
152 using OppositeType = OppositeType_t<ResultType>;
153 using TransposeType = TransposeType_t<ResultType>;
154 using ElementType = ElementType_t<MT>;
155 using SIMDType = SIMDTrait_t<ElementType>;
156 using ReturnType = ReturnType_t<MT>;
157 using CompositeType =
const Columns&;
160 using ConstReference = ConstReference_t<MT>;
163 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
166 using ConstPointer = ConstPointer_t<MT>;
169 using Pointer = If_t< IsConst_v<MT> || !HasMutableDataAccess_v<MT>, ConstPointer, Pointer_t<MT> >;
172 using ConstIterator = ConstIterator_t<MT>;
175 using Iterator = If_t< IsConst_v<MT>, ConstIterator, Iterator_t<MT> >;
180 static constexpr bool simdEnabled = MT::simdEnabled;
183 static constexpr bool smpAssignable = MT::smpAssignable;
186 static constexpr bool compileTimeArgs = DataType::compileTimeArgs;
192 template<
typename... RCAs >
193 explicit inline Columns( MT& matrix, RCAs... args );
195 Columns(
const Columns& ) =
default;
196 Columns( Columns&& ) =
default;
203 ~Columns() =
default;
210 inline Reference operator()(
size_t i,
size_t j );
211 inline ConstReference operator()(
size_t i,
size_t j )
const;
212 inline Reference at(
size_t i,
size_t j );
213 inline ConstReference at(
size_t i,
size_t j )
const;
214 inline Pointer
data () noexcept;
215 inline ConstPointer data () const noexcept;
216 inline Pointer data (
size_t j ) noexcept;
217 inline ConstPointer data (
size_t j ) const noexcept;
218 inline Iterator begin (
size_t j );
219 inline ConstIterator begin (
size_t j ) const;
220 inline ConstIterator cbegin(
size_t j ) const;
221 inline Iterator end (
size_t j );
222 inline ConstIterator end (
size_t j ) const;
223 inline ConstIterator cend (
size_t j ) const;
230 inline Columns& operator=( const ElementType& rhs );
231 inline Columns& operator=( initializer_list< initializer_list<ElementType> > list );
232 inline Columns& operator=( const Columns& rhs );
234 template< typename MT2,
bool SO2 >
235 inline Columns& operator=( const Matrix<MT2,SO2>& rhs );
237 template< typename MT2,
bool SO2 >
238 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
239 -> DisableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
241 template< typename MT2,
bool SO2 >
242 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
243 -> EnableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
245 template< typename MT2,
bool SO2 >
246 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
247 -> DisableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
249 template< typename MT2,
bool SO2 >
250 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
251 -> EnableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
253 template< typename MT2,
bool SO2 >
254 inline auto operator%=( const Matrix<MT2,SO2>& rhs )
255 -> DisableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
257 template< typename MT2,
bool SO2 >
258 inline auto operator%=( const Matrix<MT2,SO2>& rhs )
259 -> EnableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
267 using DataType::idces;
268 using DataType::columns;
270 inline MT& operand() noexcept;
271 inline const MT& operand() const noexcept;
273 inline
size_t rows() const noexcept;
274 inline
size_t spacing() const noexcept;
275 inline
size_t capacity() const noexcept;
276 inline
size_t capacity(
size_t j ) const noexcept;
277 inline
size_t nonZeros() const;
278 inline
size_t nonZeros(
size_t j ) const;
280 inline
void reset(
size_t j );
287 inline Columns& transpose();
288 inline Columns& ctranspose();
290 template< typename Other > inline Columns& scale( const Other& scalar );
297 template< typename MT2 >
298 static constexpr
bool VectorizedAssign_v =
299 ( useOptimizedKernels &&
300 simdEnabled && MT2::simdEnabled &&
301 IsSIMDCombinable_v< ElementType, ElementType_t<MT2> > );
306 template< typename MT2 >
307 static constexpr
bool VectorizedAddAssign_v =
308 ( VectorizedAssign_v<MT2> &&
309 HasSIMDAdd_v< ElementType, ElementType_t<MT2> > &&
310 !IsDiagonal_v<MT2> );
315 template< typename MT2 >
316 static constexpr
bool VectorizedSubAssign_v =
317 ( VectorizedAssign_v<MT2> &&
318 HasSIMDSub_v< ElementType, ElementType_t<MT2> > &&
319 !IsDiagonal_v<MT2> );
324 template< typename MT2 >
325 static constexpr
bool VectorizedSchurAssign_v =
326 ( VectorizedAssign_v<MT2> &&
327 HasSIMDMult_v< ElementType, ElementType_t<MT2> > );
332 static constexpr
size_t SIMDSIZE = SIMDTrait<ElementType>::size;
339 template< typename Other >
340 inline
bool canAlias( const Other* alias ) const noexcept;
342 template< typename MT2,
bool SO2,
bool SF2, typename... CCAs2 >
343 inline
bool canAlias( const Columns<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
345 template< typename Other >
346 inline
bool isAliased( const Other* alias ) const noexcept;
348 template< typename MT2,
bool SO2,
bool SF2, typename... CCAs2 >
349 inline
bool isAliased( const Columns<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
351 inline
bool isAligned () const noexcept;
352 inline
bool canSMPAssign() const noexcept;
363 template< typename MT2 >
364 inline auto assign( const DenseMatrix<MT2,true>& rhs ) -> DisableIf_t< VectorizedAssign_v<MT2> >;
366 template< typename MT2 >
367 inline auto assign( const DenseMatrix<MT2,true>& rhs ) -> EnableIf_t< VectorizedAssign_v<MT2> >;
369 template< typename MT2 > inline
void assign( const DenseMatrix<MT2,false>& rhs );
371 template< typename MT2 > inline
void assign( const SparseMatrix<MT2,true>& rhs );
372 template< typename MT2 > inline
void assign( const SparseMatrix<MT2,false>& rhs );
374 template< typename MT2 >
375 inline auto addAssign( const DenseMatrix<MT2,true>& rhs ) -> DisableIf_t< VectorizedAddAssign_v<MT2> >;
377 template< typename MT2 >
378 inline auto addAssign( const DenseMatrix<MT2,true>& rhs ) -> EnableIf_t< VectorizedAddAssign_v<MT2> >;
380 template< typename MT2 > inline
void addAssign( const DenseMatrix<MT2,false>& rhs );
381 template< typename MT2 > inline
void addAssign( const SparseMatrix<MT2,true>& rhs );
382 template< typename MT2 > inline
void addAssign( const SparseMatrix<MT2,false>& rhs );
384 template< typename MT2 >
385 inline auto subAssign( const DenseMatrix<MT2,true>& rhs ) -> DisableIf_t< VectorizedSubAssign_v<MT2> >;
387 template< typename MT2 >
388 inline auto subAssign( const DenseMatrix<MT2,true>& rhs ) -> EnableIf_t< VectorizedSubAssign_v<MT2> >;
390 template< typename MT2 > inline
void subAssign( const DenseMatrix<MT2,false>& rhs );
391 template< typename MT2 > inline
void subAssign( const SparseMatrix<MT2,true>& rhs );
392 template< typename MT2 > inline
void subAssign( const SparseMatrix<MT2,false>& rhs );
394 template< typename MT2 >
395 inline auto schurAssign( const DenseMatrix<MT2,true>& rhs ) -> DisableIf_t< VectorizedSchurAssign_v<MT2> >;
397 template< typename MT2 >
398 inline auto schurAssign( const DenseMatrix<MT2,true>& rhs ) -> EnableIf_t< VectorizedSchurAssign_v<MT2> >;
400 template< typename MT2 > inline
void schurAssign( const DenseMatrix<MT2,false>& rhs );
401 template< typename MT2 > inline
void schurAssign( const SparseMatrix<MT2,true>& rhs );
402 template< typename MT2 > inline
void schurAssign( const SparseMatrix<MT2,false>& rhs );
415 template< typename MT2,
bool SO2,
bool DF2,
bool SF2, typename... CCAs2 > friend class Columns;
457template< typename... RCAs >
458inline Columns<MT,true,true,SF,CCAs...>::Columns( MT& matrix, RCAs... args )
459 : DataType( args... )
463 for( size_t j=0UL; j<columns(); ++j ) {
464 if( matrix_.columns() <= idx(j) ) {
465 BLAZE_THROW_INVALID_ARGUMENT(
"Invalid column access index" );
496inline typename Columns<MT,
true,
true,SF,CCAs...>::Reference
497 Columns<MT,true,true,SF,CCAs...>::operator()(
size_t i,
size_t j )
502 return matrix_(i,idx(j));
522inline typename Columns<MT,
true,
true,SF,CCAs...>::ConstReference
523 Columns<MT,true,true,SF,CCAs...>::operator()(
size_t i,
size_t j )
const
528 return const_cast<const MT&
>( matrix_ )(i,idx(j));
549inline typename Columns<MT,
true,
true,SF,CCAs...>::Reference
550 Columns<MT,true,true,SF,CCAs...>::at(
size_t i,
size_t j )
579inline typename Columns<MT,
true,
true,SF,CCAs...>::ConstReference
580 Columns<MT,true,true,SF,CCAs...>::at(
size_t i,
size_t j )
const
607inline typename Columns<MT,
true,
true,SF,CCAs...>::Pointer
608 Columns<MT,true,true,SF,CCAs...>::data() noexcept
610 return matrix_.data( idx(0UL) );
629inline typename Columns<MT,
true,
true,SF,CCAs...>::ConstPointer
630 Columns<MT,true,true,SF,CCAs...>::data() const noexcept
632 return matrix_.data( idx(0UL) );
650inline typename Columns<MT,
true,
true,SF,CCAs...>::Pointer
651 Columns<MT,true,true,SF,CCAs...>::data(
size_t j )
noexcept
653 return matrix_.data( idx(j) );
671inline typename Columns<MT,
true,
true,SF,CCAs...>::ConstPointer
672 Columns<MT,true,true,SF,CCAs...>::data(
size_t j )
const noexcept
674 return matrix_.data( idx(j) );
692inline typename Columns<MT,
true,
true,SF,CCAs...>::Iterator
693 Columns<MT,true,true,SF,CCAs...>::begin(
size_t j )
696 return matrix_.begin( idx(j) );
714inline typename Columns<MT,
true,
true,SF,CCAs...>::ConstIterator
715 Columns<MT,true,true,SF,CCAs...>::begin(
size_t j )
const
718 return matrix_.cbegin( idx(j) );
736inline typename Columns<MT,
true,
true,SF,CCAs...>::ConstIterator
737 Columns<MT,true,true,SF,CCAs...>::cbegin(
size_t j )
const
740 return matrix_.cbegin( idx(j) );
758inline typename Columns<MT,
true,
true,SF,CCAs...>::Iterator
759 Columns<MT,true,true,SF,CCAs...>::end(
size_t j )
762 return matrix_.end( idx(j) );
780inline typename Columns<MT,
true,
true,SF,CCAs...>::ConstIterator
781 Columns<MT,true,true,SF,CCAs...>::end(
size_t j )
const
784 return matrix_.cend( idx(j) );
802inline typename Columns<MT,
true,
true,SF,CCAs...>::ConstIterator
803 Columns<MT,true,true,SF,CCAs...>::cend(
size_t j )
const
806 return matrix_.cend( idx(j) );
834inline Columns<MT,
true,
true,SF,CCAs...>&
835 Columns<MT,true,true,SF,CCAs...>::operator=(
const ElementType& rhs )
837 for(
size_t j=0UL; j<
columns(); ++j ) {
866inline Columns<MT,
true,
true,SF,CCAs...>&
867 Columns<MT,true,true,SF,CCAs...>::operator=( initializer_list< initializer_list<ElementType> > list )
872 if( list.size() !=
rows() ) {
878 for(
size_t j=0UL; j<
columns(); ++j ) {
879 if( !tryAssign( matrix_,
column( tmp, j ), 0UL, idx(j) ) ) {
885 decltype(
auto) left( derestrict( *
this ) );
888 for(
const auto& rowList : list ) {
890 for(
const auto& element : rowList ) {
891 matrix_(i,idx(j)) = element;
895 matrix_(i,idx(j)) = ElementType();
924inline Columns<MT,
true,
true,SF,CCAs...>&
925 Columns<MT,true,true,SF,CCAs...>::operator=(
const Columns& rhs )
933 if(
this == &rhs || ( &matrix_ == &rhs.matrix_ && compareIndices( *
this, rhs ) ) )
936 if(
rows() != rhs.rows() ||
columns() != rhs.columns() ) {
941 for(
size_t j=0UL; j<
columns(); ++j ) {
948 decltype(
auto) left( derestrict( *
this ) );
950 if( rhs.canAlias(
this ) ) {
951 const ResultType tmp( rhs );
984template<
typename MT2
986inline Columns<MT,
true,
true,SF,CCAs...>&
987 Columns<MT,true,true,SF,CCAs...>::operator=(
const Matrix<MT2,SO2>& rhs )
994 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
1002 for(
size_t j=0UL; j<
columns(); ++j ) {
1009 decltype(
auto) left( derestrict( *
this ) );
1045template<
typename MT
1047 ,
typename... CCAs >
1048template<
typename MT2
1050inline auto Columns<MT,true,true,SF,CCAs...>::operator+=(
const Matrix<MT2,SO2>& rhs )
1065 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
1070 for(
size_t j=0UL; j<
columns(); ++j ) {
1077 decltype(
auto) left( derestrict( *
this ) );
1079 if( (*rhs).canAlias(
this ) ) {
1080 const AddType tmp( *
this + (*rhs) );
1109template<
typename MT
1111 ,
typename... CCAs >
1112template<
typename MT2
1114inline auto Columns<MT,true,true,SF,CCAs...>::operator+=(
const Matrix<MT2,SO2>& rhs )
1129 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
1133 const AddType tmp( *
this + (*rhs) );
1136 for(
size_t j=0UL; j<
columns(); ++j ) {
1143 decltype(
auto) left( derestrict( *
this ) );
1169template<
typename MT
1171 ,
typename... CCAs >
1172template<
typename MT2
1174inline auto Columns<MT,true,true,SF,CCAs...>::operator-=(
const Matrix<MT2,SO2>& rhs )
1189 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
1194 for(
size_t j=0UL; j<
columns(); ++j ) {
1201 decltype(
auto) left( derestrict( *
this ) );
1203 if( (*rhs).canAlias(
this ) ) {
1204 const SubType tmp( *
this - (*rhs ) );
1233template<
typename MT
1235 ,
typename... CCAs >
1236template<
typename MT2
1238inline auto Columns<MT,true,true,SF,CCAs...>::operator-=(
const Matrix<MT2,SO2>& rhs )
1253 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
1257 const SubType tmp( *
this - (*rhs) );
1260 for(
size_t j=0UL; j<
columns(); ++j ) {
1267 decltype(
auto) left( derestrict( *
this ) );
1293template<
typename MT
1295 ,
typename... CCAs >
1296template<
typename MT2
1298inline auto Columns<MT,true,true,SF,CCAs...>::operator%=(
const Matrix<MT2,SO2>& rhs )
1312 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
1317 for(
size_t j=0UL; j<
columns(); ++j ) {
1324 decltype(
auto) left( derestrict( *
this ) );
1326 if( (*rhs).canAlias(
this ) ) {
1327 const SchurType tmp( *
this % (*rhs) );
1358template<
typename MT
1360 ,
typename... CCAs >
1361template<
typename MT2
1363inline auto Columns<MT,true,true,SF,CCAs...>::operator%=(
const Matrix<MT2,SO2>& rhs )
1377 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
1381 const SchurType tmp( *
this % (*rhs) );
1384 for(
size_t j=0UL; j<
columns(); ++j ) {
1391 decltype(
auto) left( derestrict( *
this ) );
1421template<
typename MT
1423 ,
typename... CCAs >
1424inline MT& Columns<MT,true,true,SF,CCAs...>::operand() noexcept
1438template<
typename MT
1440 ,
typename... CCAs >
1441inline const MT& Columns<MT,true,true,SF,CCAs...>::operand() const noexcept
1455template<
typename MT
1457 ,
typename... CCAs >
1458inline size_t Columns<MT,true,true,SF,CCAs...>::rows() const noexcept
1460 return matrix_.rows();
1475template<
typename MT
1477 ,
typename... CCAs >
1478inline size_t Columns<MT,true,true,SF,CCAs...>::spacing() const noexcept
1480 return matrix_.spacing();
1492template<
typename MT
1494 ,
typename... CCAs >
1495inline size_t Columns<MT,true,true,SF,CCAs...>::capacity() const noexcept
1512template<
typename MT
1514 ,
typename... CCAs >
1515inline size_t Columns<MT,true,true,SF,CCAs...>::capacity(
size_t j )
const noexcept
1533template<
typename MT
1535 ,
typename... CCAs >
1536inline size_t Columns<MT,true,true,SF,CCAs...>::nonZeros()
const
1538 size_t nonzeros( 0UL );
1540 for(
size_t j=0UL; j<
columns(); ++j ) {
1541 nonzeros += matrix_.nonZeros( idx(j) );
1559template<
typename MT
1561 ,
typename... CCAs >
1562inline size_t Columns<MT,true,true,SF,CCAs...>::nonZeros(
size_t j )
const
1566 return matrix_.nonZeros( idx(j) );
1578template<
typename MT
1580 ,
typename... CCAs >
1581inline void Columns<MT,true,true,SF,CCAs...>::reset()
1583 for(
size_t j=0UL; j<
columns(); ++j ) {
1584 matrix_.reset( idx(j) );
1600template<
typename MT
1602 ,
typename... CCAs >
1603inline void Columns<MT,true,true,SF,CCAs...>::reset(
size_t j )
1605 matrix_.reset( idx(j) );
1632template<
typename MT
1634 ,
typename... CCAs >
1635inline Columns<MT,
true,
true,SF,CCAs...>&
1636 Columns<MT,true,true,SF,CCAs...>::transpose()
1645 const ResultType tmp(
trans( *
this ) );
1648 for(
size_t j=0UL; j<
columns(); ++j ) {
1649 if( !tryAssign( matrix_,
column( tmp, j ), 0UL, idx(j) ) ) {
1655 decltype(
auto) left( derestrict( *
this ) );
1678template<
typename MT
1680 ,
typename... CCAs >
1681inline Columns<MT,
true,
true,SF,CCAs...>&
1682 Columns<MT,true,true,SF,CCAs...>::ctranspose()
1691 const ResultType tmp(
ctrans( *
this ) );
1694 for(
size_t j=0UL; j<
columns(); ++j ) {
1695 if( !tryAssign( matrix_,
column( tmp, j ), 0UL, idx(j) ) ) {
1701 decltype(
auto) left( derestrict( *
this ) );
1724template<
typename MT
1726 ,
typename... CCAs >
1727template<
typename Other >
1728inline Columns<MT,
true,
true,SF,CCAs...>&
1729 Columns<MT,true,true,SF,CCAs...>::scale(
const Other& scalar )
1735 for(
size_t j=0UL; j<
columns(); ++j )
1737 const size_t index ( idx(j) );
1741 for(
size_t i=ibegin; i<iend; ++i ) {
1742 matrix_(i,index) *= scalar;
1771template<
typename MT
1773 ,
typename... CCAs >
1774template<
typename Other >
1775inline bool Columns<MT,true,true,SF,CCAs...>::canAlias(
const Other* alias )
const noexcept
1777 return matrix_.isAliased( &unview( *alias ) );
1795template<
typename MT
1797 ,
typename... CCAs >
1798template<
typename MT2
1801 ,
typename... CCAs2 >
1803 Columns<MT,true,true,SF,CCAs...>::canAlias(
const Columns<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
1805 return matrix_.isAliased( &alias->matrix_ );
1822template<
typename MT
1824 ,
typename... CCAs >
1825template<
typename Other >
1826inline bool Columns<MT,true,true,SF,CCAs...>::isAliased(
const Other* alias )
const noexcept
1828 return matrix_.isAliased( &unview( *alias ) );
1846template<
typename MT
1848 ,
typename... CCAs >
1849template<
typename MT2
1852 ,
typename... CCAs2 >
1854 Columns<MT,true,true,SF,CCAs...>::isAliased(
const Columns<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
1856 return matrix_.isAliased( &alias->matrix_ );
1872template<
typename MT
1874 ,
typename... CCAs >
1875inline bool Columns<MT,true,true,SF,CCAs...>::isAligned() const noexcept
1877 return matrix_.isAligned();
1894template<
typename MT
1896 ,
typename... CCAs >
1897inline bool Columns<MT,true,true,SF,CCAs...>::canSMPAssign() const noexcept
1899 return (
rows() *
columns() > SMP_DMATASSIGN_THRESHOLD );
1920template<
typename MT
1922 ,
typename... CCAs >
1924 Columns<MT,true,true,SF,CCAs...>::load(
size_t i,
size_t j )
const noexcept
1926 return matrix_.load( i, idx(j) );
1947template<
typename MT
1949 ,
typename... CCAs >
1951 Columns<MT,true,true,SF,CCAs...>::loada(
size_t i,
size_t j )
const noexcept
1953 return matrix_.loada( i, idx(j) );
1974template<
typename MT
1976 ,
typename... CCAs >
1978 Columns<MT,true,true,SF,CCAs...>::loadu(
size_t i,
size_t j )
const noexcept
1980 return matrix_.loadu( i, idx(j) );
2002template<
typename MT
2004 ,
typename... CCAs >
2006 Columns<MT,true,true,SF,CCAs...>::store(
size_t i,
size_t j,
const SIMDType& value )
noexcept
2008 matrix_.store( i, idx(j), value );
2030template<
typename MT
2032 ,
typename... CCAs >
2034 Columns<MT,true,true,SF,CCAs...>::storea(
size_t i,
size_t j,
const SIMDType& value )
noexcept
2036 matrix_.storea( i, idx(j), value );
2058template<
typename MT
2060 ,
typename... CCAs >
2062 Columns<MT,true,true,SF,CCAs...>::storeu(
size_t i,
size_t j,
const SIMDType& value )
noexcept
2064 matrix_.storeu( i, idx(j), value );
2086template<
typename MT
2088 ,
typename... CCAs >
2090 Columns<MT,true,true,SF,CCAs...>::stream(
size_t i,
size_t j,
const SIMDType& value )
noexcept
2092 matrix_.stream( i, idx(j), value );
2110template<
typename MT
2112 ,
typename... CCAs >
2113template<
typename MT2 >
2126 for(
size_t j=0UL; j<
columns(); ++j ) {
2127 const size_t index( idx(j) );
2128 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2129 matrix_(i ,index) = (*rhs)(i ,j);
2130 matrix_(i+1UL,index) = (*rhs)(i+1UL,j);
2132 if( ipos <
rows() ) {
2133 matrix_(ipos,index) = (*rhs)(ipos,j);
2153template<
typename MT
2155 ,
typename... CCAs >
2156template<
typename MT2 >
2172 rows()*
columns() > ( cacheSize / (
sizeof(ElementType) * 3UL ) ) &&
2173 !(*rhs).isAliased(
this ) )
2175 for(
size_t j=0UL; j<
columns(); ++j )
2178 Iterator left(
begin(j) );
2181 for( ; i<ipos; i+=SIMDSIZE ) {
2182 left.stream( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2184 for( ; i<
rows(); ++i ) {
2191 for(
size_t j=0UL; j<
columns(); ++j )
2194 Iterator left(
begin(j) );
2197 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
2198 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2199 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2200 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2201 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2203 for( ; i<ipos; i+=SIMDSIZE ) {
2204 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2206 for( ; i<
rows(); ++i ) {
2207 *left = *right; ++left; ++right;
2228template<
typename MT
2230 ,
typename... CCAs >
2231template<
typename MT2 >
2242 constexpr size_t block( BLOCK_SIZE );
2246 const size_t ipos(
prevMultiple( (*rhs).rows(), 2UL ) );
2249 for(
size_t j=0UL; j<
columns(); ++j ) {
2250 const size_t index( idx(j) );
2251 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2252 matrix_(i ,index) = (*rhs)(i ,j);
2253 matrix_(i+1UL,index) = (*rhs)(i+1UL,j);
2255 if( ipos < (*rhs).rows() ) {
2256 matrix_(ipos,index) = (*rhs)(ipos,j);
2262 for(
size_t jj=0UL; jj<
columns(); jj+=block ) {
2263 const size_t jend( (
columns()<(jj+block) )?(
columns() ):( jj+block ) );
2264 for(
size_t ii=0UL; ii<
rows(); ii+=block ) {
2265 const size_t iend( (
rows()<(ii+block) )?(
rows() ):( ii+block ) );
2266 for(
size_t j=jj; j<jend; ++j ) {
2267 const size_t index( idx(j) );
2268 for(
size_t i=ii; i<iend; ++i ) {
2269 matrix_(i,index) = (*rhs)(i,j);
2292template<
typename MT
2294 ,
typename... CCAs >
2295template<
typename MT2 >
2304 for(
size_t j=0UL; j<
columns(); ++j ) {
2305 const size_t index( idx(j) );
2307 matrix_(element->index(),index) = element->value();
2326template<
typename MT
2328 ,
typename... CCAs >
2329template<
typename MT2 >
2340 for(
size_t i=0UL; i<
rows(); ++i ) {
2342 matrix_(i,idx(element->index())) = element->value();
2361template<
typename MT
2363 ,
typename... CCAs >
2364template<
typename MT2 >
2377 for(
size_t j=0UL; j<
columns(); ++j )
2379 const size_t index( idx(j) );
2381 matrix_(j,index) += (*rhs)(j,j);
2384 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2385 matrix_(i ,index) += (*rhs)(i ,j);
2386 matrix_(i+1UL,index) += (*rhs)(i+1UL,j);
2388 if( ipos <
rows() ) {
2389 matrix_(ipos,index) += (*rhs)(ipos,j);
2410template<
typename MT
2412 ,
typename... CCAs >
2413template<
typename MT2 >
2425 for(
size_t j=0UL; j<
columns(); ++j )
2439 Iterator left(
begin(j) + ibegin );
2442 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
2443 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2444 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2445 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2446 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2448 for( ; i<ipos; i+=SIMDSIZE ) {
2449 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2451 for( ; i<iend; ++i ) {
2452 *left += *right; ++left; ++right;
2472template<
typename MT
2474 ,
typename... CCAs >
2475template<
typename MT2 >
2486 constexpr size_t block( BLOCK_SIZE );
2490 const size_t ipos(
prevMultiple( (*rhs).rows(), 2UL ) );
2493 for(
size_t j=0UL; j<
columns(); ++j ) {
2494 const size_t index( idx(j) );
2495 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2496 matrix_(i ,index) += (*rhs)(i ,j);
2497 matrix_(i+1UL,index) += (*rhs)(i+1UL,j);
2499 if( ipos < (*rhs).rows() )
2500 matrix_(ipos,index) += (*rhs)(ipos,j);
2505 for(
size_t jj=0UL; jj<
columns(); jj+=block ) {
2506 const size_t jend( (
columns()<(jj+block) )?(
columns() ):( jj+block ) );
2507 for(
size_t ii=0UL; ii<
rows(); ii+=block ) {
2508 const size_t iend( (
rows()<(ii+block) )?(
rows() ):( ii+block ) );
2509 for(
size_t j=jj; j<jend; ++j ) {
2510 const size_t index( idx(j) );
2511 for(
size_t i=ii; i<iend; ++i ) {
2512 matrix_(i,index) += (*rhs)(i,j);
2535template<
typename MT
2537 ,
typename... CCAs >
2538template<
typename MT2 >
2547 for(
size_t j=0UL; j<
columns(); ++j ) {
2548 const size_t index( idx(j) );
2550 matrix_(element->index(),index) += element->value();
2569template<
typename MT
2571 ,
typename... CCAs >
2572template<
typename MT2 >
2583 for(
size_t i=0UL; i<
rows(); ++i ) {
2585 matrix_(i,idx(element->index())) += element->value();
2604template<
typename MT
2606 ,
typename... CCAs >
2607template<
typename MT2 >
2620 for(
size_t j=0UL; j<
columns(); ++j )
2622 const size_t index( idx(j) );
2625 matrix_(j,index) -= (*rhs)(j,j);
2628 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2629 matrix_(i ,index) -= (*rhs)(i ,j);
2630 matrix_(i+1UL,index) -= (*rhs)(i+1UL,j);
2632 if( ipos <
rows() ) {
2633 matrix_(ipos,index) -= (*rhs)(ipos,j);
2654template<
typename MT
2656 ,
typename... CCAs >
2657template<
typename MT2 >
2669 for(
size_t j=0UL; j<
columns(); ++j )
2683 Iterator left(
begin(j) + ibegin );
2686 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
2687 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2688 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2689 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2690 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2692 for( ; i<ipos; i+=SIMDSIZE ) {
2693 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2695 for( ; i<iend; ++i ) {
2696 *left -= *right; ++left; ++right;
2716template<
typename MT
2718 ,
typename... CCAs >
2719template<
typename MT2 >
2730 constexpr size_t block( BLOCK_SIZE );
2734 const size_t ipos(
prevMultiple( (*rhs).rows(), 2UL ) );
2737 for(
size_t j=0UL; j<
columns(); ++j ) {
2738 const size_t index( idx(j) );
2739 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2740 matrix_(i ,index) -= (*rhs)(i ,j);
2741 matrix_(i+1UL,index) -= (*rhs)(i+1UL,j);
2743 if( ipos < (*rhs).rows() )
2744 matrix_(ipos,index) -= (*rhs)(ipos,j);
2749 for(
size_t jj=0UL; jj<
columns(); jj+=block ) {
2750 const size_t jend( (
columns()<(jj+block) )?(
columns() ):( jj+block ) );
2751 for(
size_t ii=0UL; ii<
rows(); ii+=block ) {
2752 const size_t iend( (
rows()<(ii+block) )?(
rows() ):( ii+block ) );
2753 for(
size_t j=jj; j<jend; ++j ) {
2754 const size_t index( idx(j) );
2755 for(
size_t i=ii; i<iend; ++i ) {
2756 matrix_(i,index) -= (*rhs)(i,j);
2779template<
typename MT
2781 ,
typename... CCAs >
2782template<
typename MT2 >
2791 for(
size_t j=0UL; j<
columns(); ++j ) {
2792 const size_t index( idx(j) );
2794 matrix_(element->index(),index) -= element->value();
2813template<
typename MT
2815 ,
typename... CCAs >
2816template<
typename MT2 >
2827 for(
size_t i=0UL; i<
rows(); ++i ) {
2829 matrix_(i,idx(element->index())) -= element->value();
2848template<
typename MT
2850 ,
typename... CCAs >
2851template<
typename MT2 >
2864 for(
size_t j=0UL; j<
columns(); ++j ) {
2865 const size_t index( idx(j) );
2866 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2867 matrix_(i ,index) *= (*rhs)(i ,j);
2868 matrix_(i+1UL,index) *= (*rhs)(i+1UL,j);
2870 if( ipos <
rows() ) {
2871 matrix_(ipos,index) *= (*rhs)(ipos,j);
2892template<
typename MT
2894 ,
typename... CCAs >
2895template<
typename MT2 >
2907 for(
size_t j=0UL; j<
columns(); ++j )
2913 Iterator left(
begin(j) );
2916 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
2917 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2918 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2919 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2920 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2922 for( ; i<ipos; i+=SIMDSIZE ) {
2923 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2925 for( ; i<
rows(); ++i ) {
2926 *left *= *right; ++left; ++right;
2946template<
typename MT
2948 ,
typename... CCAs >
2949template<
typename MT2 >
2960 constexpr size_t block( BLOCK_SIZE );
2964 const size_t ipos(
prevMultiple( (*rhs).rows(), 2UL ) );
2967 for(
size_t j=0UL; j<
columns(); ++j ) {
2968 const size_t index( idx(j) );
2969 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2970 matrix_(i ,index) *= (*rhs)(i ,j);
2971 matrix_(i+1UL,index) *= (*rhs)(i+1UL,j);
2973 if( ipos < (*rhs).rows() )
2974 matrix_(ipos,index) *= (*rhs)(ipos,j);
2979 for(
size_t jj=0UL; jj<
columns(); jj+=block ) {
2980 const size_t jend( (
columns()<(jj+block) )?(
columns() ):( jj+block ) );
2981 for(
size_t ii=0UL; ii<
rows(); ii+=block ) {
2982 const size_t iend( (
rows()<(ii+block) )?(
rows() ):( ii+block ) );
2983 for(
size_t j=jj; j<jend; ++j ) {
2984 const size_t index( idx(j) );
2985 for(
size_t i=ii; i<iend; ++i ) {
2986 matrix_(i,index) *= (*rhs)(i,j);
3009template<
typename MT
3011 ,
typename... CCAs >
3012template<
typename MT2 >
3023 for(
size_t j=0UL; j<
columns(); ++j )
3025 const size_t index( idx(j) );
3029 for( ; i<element->index(); ++i )
3030 reset( matrix_(i,index) );
3031 matrix_(i,index) *= element->value();
3035 for( ; i<
rows(); ++i ) {
3036 reset( matrix_(i,index) );
3056template<
typename MT
3058 ,
typename... CCAs >
3059template<
typename MT2 >
3072 for(
size_t i=0UL; i<
rows(); ++i )
3077 for( ; j<element->index(); ++j )
3078 reset( matrix_(i,idx(j)) );
3079 matrix_(i,idx(j)) *= element->value();
3084 reset( matrix_(i,idx(j)) );
3112template<
typename MT
3113 ,
typename... CCAs >
3114class Columns<MT,false,true,false,CCAs...>
3115 :
public View< DenseMatrix< Columns<MT,false,true,false,CCAs...>, true > >
3116 ,
private ColumnsData<CCAs...>
3120 using DataType = ColumnsData<CCAs...>;
3121 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
3130 template<
typename MT1,
typename MT2 >
3131 static constexpr bool EnforceEvaluation_v =
3132 ( IsRestricted_v<MT1> && RequiresEvaluation_v<MT2> );
3138 using This = Columns<MT,
false,
true,
false,CCAs...>;
3141 using BaseType = View< DenseMatrix<This,true> >;
3143 using ViewedType = MT;
3144 using ResultType = ColumnsTrait_t<MT,N>;
3145 using OppositeType = OppositeType_t<ResultType>;
3146 using TransposeType = TransposeType_t<ResultType>;
3147 using ElementType = ElementType_t<MT>;
3148 using ReturnType = ReturnType_t<MT>;
3149 using CompositeType =
const Columns&;
3152 using ConstReference = ConstReference_t<MT>;
3155 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
3158 using ConstPointer = ConstPointer_t<MT>;
3161 using Pointer = If_t< IsConst_v<MT> || !HasMutableDataAccess_v<MT>, ConstPointer, Pointer_t<MT> >;
3167 template<
typename MatrixType
3168 ,
typename IteratorType >
3169 class ColumnsIterator
3174 using IteratorCategory =
typename std::iterator_traits<IteratorType>::iterator_category;
3177 using ValueType =
typename std::iterator_traits<IteratorType>::value_type;
3180 using PointerType =
typename std::iterator_traits<IteratorType>::pointer;
3183 using ReferenceType =
typename std::iterator_traits<IteratorType>::reference;
3186 using DifferenceType =
typename std::iterator_traits<IteratorType>::difference_type;
3189 using iterator_category = IteratorCategory;
3190 using value_type = ValueType;
3191 using pointer = PointerType;
3192 using reference = ReferenceType;
3193 using difference_type = DifferenceType;
3199 inline ColumnsIterator() noexcept
3200 : matrix_(
nullptr )
3214 inline ColumnsIterator( MatrixType& matrix,
size_t row,
size_t column ) noexcept
3215 : matrix_( &matrix )
3220 if( row_ != matrix_->rows() )
3221 pos_ = matrix_->begin( row_ ) + column_;
3230 template<
typename MatrixType2,
typename IteratorType2 >
3231 inline ColumnsIterator(
const ColumnsIterator<MatrixType2,IteratorType2>& it ) noexcept
3232 : matrix_( it.matrix_ )
3234 , column_( it.column_ )
3245 inline ColumnsIterator&
operator+=(
size_t inc )
noexcept {
3248 if( row_ != matrix_->rows() )
3249 pos_ = matrix_->begin( row_ ) + column_;
3261 inline ColumnsIterator&
operator-=(
size_t dec )
noexcept {
3264 if( row_ != matrix_->rows() )
3265 pos_ = matrix_->begin( row_ ) + column_;
3276 inline ColumnsIterator& operator++() noexcept {
3279 if( row_ != matrix_->rows() )
3280 pos_ = matrix_->begin( row_ ) + column_;
3291 inline const ColumnsIterator operator++(
int )
noexcept {
3292 const ColumnsIterator tmp( *
this );
3303 inline ColumnsIterator& operator--() noexcept {
3306 if( row_ != matrix_->rows() )
3307 pos_ = matrix_->begin( row_ ) + column_;
3318 inline const ColumnsIterator operator--(
int )
noexcept {
3319 const ColumnsIterator tmp( *
this );
3331 inline ReferenceType operator[](
size_t index )
const {
3333 const IteratorType pos( matrix_->begin( row_+index ) + column_ );
3343 inline ReferenceType
operator*()
const {
3353 inline PointerType operator->()
const {
3364 template<
typename MatrixType2,
typename IteratorType2 >
3365 inline bool operator==(
const ColumnsIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
3366 return row_ == rhs.row_;
3376 template<
typename MatrixType2,
typename IteratorType2 >
3377 inline bool operator!=(
const ColumnsIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
3378 return !( *
this == rhs );
3388 template<
typename MatrixType2,
typename IteratorType2 >
3389 inline bool operator<(
const ColumnsIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
3390 return row_ < rhs.row_;
3400 template<
typename MatrixType2,
typename IteratorType2 >
3401 inline bool operator>(
const ColumnsIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
3402 return row_ > rhs.row_;
3412 template<
typename MatrixType2,
typename IteratorType2 >
3413 inline bool operator<=(
const ColumnsIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
3414 return row_ <= rhs.row_;
3424 template<
typename MatrixType2,
typename IteratorType2 >
3425 inline bool operator>=(
const ColumnsIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
3426 return row_ >= rhs.row_;
3436 inline DifferenceType
operator-(
const ColumnsIterator& rhs )
const noexcept {
3437 return row_ - rhs.row_;
3448 friend inline const ColumnsIterator
operator+(
const ColumnsIterator& it,
size_t inc )
noexcept {
3449 return ColumnsIterator( *it.matrix_, it.row_+inc, it.column_ );
3460 friend inline const ColumnsIterator
operator+(
size_t inc,
const ColumnsIterator& it )
noexcept {
3461 return ColumnsIterator( *it.matrix_, it.row_+inc, it.column_ );
3472 friend inline const ColumnsIterator
operator-(
const ColumnsIterator& it,
size_t dec )
noexcept {
3473 return ColumnsIterator( *it.matrix_, it.row_-dec, it.column_ );
3479 MatrixType* matrix_;
3486 template<
typename MatrixType2,
typename IteratorType2 >
friend class ColumnsIterator;
3493 using ConstIterator = ColumnsIterator< const MT, ConstIterator_t<MT> >;
3496 using Iterator = If_t< IsConst_v<MT>, ConstIterator, ColumnsIterator< MT, Iterator_t<MT> > >;
3501 static constexpr bool simdEnabled =
false;
3504 static constexpr bool smpAssignable = MT::smpAssignable;
3507 static constexpr bool compileTimeArgs = DataType::compileTimeArgs;
3513 template<
typename... RCAs >
3514 explicit inline Columns( MT& matrix, RCAs... args );
3516 Columns(
const Columns& ) =
default;
3517 Columns( Columns&& ) =
default;
3524 ~Columns() =
default;
3531 inline Reference operator()(
size_t i,
size_t j );
3532 inline ConstReference operator()(
size_t i,
size_t j )
const;
3533 inline Reference at(
size_t i,
size_t j );
3534 inline ConstReference at(
size_t i,
size_t j )
const;
3535 inline Pointer
data () noexcept;
3536 inline ConstPointer data () const noexcept;
3537 inline Pointer data (
size_t j ) noexcept;
3538 inline ConstPointer data (
size_t j ) const noexcept;
3539 inline Iterator begin (
size_t j );
3540 inline ConstIterator begin (
size_t j ) const;
3541 inline ConstIterator cbegin(
size_t j ) const;
3542 inline Iterator end (
size_t j );
3543 inline ConstIterator end (
size_t j ) const;
3544 inline ConstIterator cend (
size_t j ) const;
3551 inline Columns& operator=( const ElementType& rhs );
3552 inline Columns& operator=( initializer_list< initializer_list<ElementType> > list );
3553 inline Columns& operator=( const Columns& rhs );
3555 template< typename MT2,
bool SO2 >
3556 inline Columns& operator=( const Matrix<MT2,SO2>& rhs );
3558 template< typename MT2,
bool SO2 >
3559 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
3560 -> DisableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
3562 template< typename MT2,
bool SO2 >
3563 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
3564 -> EnableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
3566 template< typename MT2,
bool SO2 >
3567 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
3568 -> DisableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
3570 template< typename MT2,
bool SO2 >
3571 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
3572 -> EnableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
3574 template< typename MT2,
bool SO2 >
3575 inline auto operator%=( const Matrix<MT2,SO2>& rhs )
3576 -> DisableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
3578 template< typename MT2,
bool SO2 >
3579 inline auto operator%=( const Matrix<MT2,SO2>& rhs )
3580 -> EnableIf_t< EnforceEvaluation_v<MT,MT2>, Columns& >;
3587 using DataType::idx;
3588 using DataType::idces;
3589 using DataType::columns;
3591 inline MT& operand() noexcept;
3592 inline const MT& operand() const noexcept;
3594 inline
size_t rows() const noexcept;
3595 inline
size_t spacing() const noexcept;
3596 inline
size_t capacity() const noexcept;
3597 inline
size_t capacity(
size_t j ) const noexcept;
3598 inline
size_t nonZeros() const;
3599 inline
size_t nonZeros(
size_t j ) const;
3600 inline
void reset();
3601 inline
void reset(
size_t j );
3608 inline Columns& transpose();
3609 inline Columns& ctranspose();
3611 template< typename Other > inline Columns& scale( const Other& scalar );
3618 template< typename Other >
3619 inline
bool canAlias( const Other* alias ) const noexcept;
3621 template< typename MT2,
bool SO2,
bool SF2, typename... CCAs2 >
3622 inline
bool canAlias( const Columns<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
3624 template< typename Other >
3625 inline
bool isAliased( const Other* alias ) const noexcept;
3627 template< typename MT2,
bool SO2,
bool SF2, typename... CCAs2 >
3628 inline
bool isAliased( const Columns<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
3630 inline
bool isAligned () const noexcept;
3631 inline
bool canSMPAssign() const noexcept;
3633 template< typename MT2 > inline
void assign( const DenseMatrix<MT2,true>& rhs );
3634 template< typename MT2 > inline
void assign( const DenseMatrix<MT2,false>& rhs );
3635 template< typename MT2 > inline
void assign( const SparseMatrix<MT2,true>& rhs );
3636 template< typename MT2 > inline
void assign( const SparseMatrix<MT2,false>& rhs );
3638 template< typename MT2 > inline
void addAssign( const DenseMatrix<MT2,true>& rhs );
3639 template< typename MT2 > inline
void addAssign( const DenseMatrix<MT2,false>& rhs );
3640 template< typename MT2 > inline
void addAssign( const SparseMatrix<MT2,true>& rhs );
3641 template< typename MT2 > inline
void addAssign( const SparseMatrix<MT2,false>& rhs );
3643 template< typename MT2 > inline
void subAssign( const DenseMatrix<MT2,true>& rhs );
3644 template< typename MT2 > inline
void subAssign( const DenseMatrix<MT2,false>& rhs );
3645 template< typename MT2 > inline
void subAssign( const SparseMatrix<MT2,true>& rhs );
3646 template< typename MT2 > inline
void subAssign( const SparseMatrix<MT2,false>& rhs );
3648 template< typename MT2 > inline
void schurAssign( const DenseMatrix<MT2,true>& rhs );
3649 template< typename MT2 > inline
void schurAssign( const DenseMatrix<MT2,false>& rhs );
3650 template< typename MT2 > inline
void schurAssign( const SparseMatrix<MT2,true>& rhs );
3651 template< typename MT2 > inline
void schurAssign( const SparseMatrix<MT2,false>& rhs );
3664 template< typename MT2,
bool SO2,
bool DF2,
bool SF2, typename... CCAs2 > friend class Columns;
3704template< typename MT
3705 , typename... CCAs >
3706template< typename... RCAs >
3707inline Columns<MT,false,true,false,CCAs...>::Columns( MT& matrix, RCAs... args )
3708 : DataType( args... )
3709 , matrix_ ( matrix )
3712 for( size_t j=0UL; j<columns(); ++j ) {
3713 if( matrix_.columns() <= idx(j) ) {
3714 BLAZE_THROW_INVALID_ARGUMENT(
"Invalid column access index" );
3742template<
typename MT
3743 ,
typename... CCAs >
3744inline typename Columns<MT,
false,
true,
false,CCAs...>::Reference
3745 Columns<MT,false,true,false,CCAs...>::operator()(
size_t i,
size_t j )
3750 return matrix_(i,idx(j));
3767template<
typename MT
3768 ,
typename... CCAs >
3769inline typename Columns<MT,
false,
true,
false,CCAs...>::ConstReference
3770 Columns<MT,false,true,false,CCAs...>::operator()(
size_t i,
size_t j )
const
3775 return const_cast<const MT&
>( matrix_ )(i,idx(j));
3793template<
typename MT
3794 ,
typename... CCAs >
3795inline typename Columns<MT,
false,
true,
false,CCAs...>::Reference
3796 Columns<MT,false,true,false,CCAs...>::at(
size_t i,
size_t j )
3804 return (*
this)(i,j);
3822template<
typename MT
3823 ,
typename... CCAs >
3824inline typename Columns<MT,
false,
true,
false,CCAs...>::ConstReference
3825 Columns<MT,false,true,false,CCAs...>::at(
size_t i,
size_t j )
const
3833 return (*
this)(i,j);
3849template<
typename MT
3850 ,
typename... CCAs >
3851inline typename Columns<MT,
false,
true,
false,CCAs...>::Pointer
3852 Columns<MT,false,true,false,CCAs...>::data() noexcept
3854 return matrix_.data() + idx(0UL);
3870template<
typename MT
3871 ,
typename... CCAs >
3872inline typename Columns<MT,
false,
true,
false,CCAs...>::ConstPointer
3873 Columns<MT,false,true,false,CCAs...>::data() const noexcept
3875 return matrix_.data() + idx(0UL);
3890template<
typename MT
3891 ,
typename... CCAs >
3892inline typename Columns<MT,
false,
true,
false,CCAs...>::Pointer
3893 Columns<MT,false,true,false,CCAs...>::data(
size_t j )
noexcept
3895 return matrix_.data() + idx(j);
3910template<
typename MT
3911 ,
typename... CCAs >
3912inline typename Columns<MT,
false,
true,
false,CCAs...>::ConstPointer
3913 Columns<MT,false,true,false,CCAs...>::data(
size_t j )
const noexcept
3915 return matrix_.data() + idx(j);
3930template<
typename MT
3931 ,
typename... CCAs >
3932inline typename Columns<MT,
false,
true,
false,CCAs...>::Iterator
3933 Columns<MT,false,true,false,CCAs...>::begin(
size_t j )
3936 return Iterator( matrix_, 0UL, idx(j) );
3951template<
typename MT
3952 ,
typename... CCAs >
3953inline typename Columns<MT,
false,
true,
false,CCAs...>::ConstIterator
3954 Columns<MT,false,true,false,CCAs...>::begin(
size_t j )
const
3957 return ConstIterator( matrix_, 0UL, idx(j) );
3972template<
typename MT
3973 ,
typename... CCAs >
3974inline typename Columns<MT,
false,
true,
false,CCAs...>::ConstIterator
3975 Columns<MT,false,true,false,CCAs...>::cbegin(
size_t j )
const
3978 return ConstIterator( matrix_, 0UL, idx(j) );
3993template<
typename MT
3994 ,
typename... CCAs >
3995inline typename Columns<MT,
false,
true,
false,CCAs...>::Iterator
3996 Columns<MT,false,true,false,CCAs...>::end(
size_t j )
3999 return Iterator( matrix_,
rows(), idx(j) );
4014template<
typename MT
4015 ,
typename... CCAs >
4016inline typename Columns<MT,
false,
true,
false,CCAs...>::ConstIterator
4017 Columns<MT,false,true,false,CCAs...>::end(
size_t j )
const
4020 return ConstIterator( matrix_,
rows(), idx(j) );
4035template<
typename MT
4036 ,
typename... CCAs >
4037inline typename Columns<MT,
false,
true,
false,CCAs...>::ConstIterator
4038 Columns<MT,false,true,false,CCAs...>::cend(
size_t j )
const
4041 return ConstIterator( matrix_,
rows(), idx(j) );
4066template<
typename MT
4067 ,
typename... CCAs >
4068inline Columns<MT,
false,
true,
false,CCAs...>&
4069 Columns<MT,false,true,false,CCAs...>::operator=(
const ElementType& rhs )
4071 for(
size_t j=0UL; j<
columns(); ++j ) {
4097template<
typename MT
4098 ,
typename... CCAs >
4099inline Columns<MT,
false,
true,
false,CCAs...>&
4100 Columns<MT,false,true,false,CCAs...>::operator=( initializer_list< initializer_list<ElementType> > list )
4105 if( list.size() !=
rows() ) {
4111 for(
size_t j=0UL; j<
columns(); ++j ) {
4112 if( !tryAssign( matrix_,
column( tmp, j ), 0UL, idx(j) ) ) {
4118 decltype(
auto) left( derestrict( *
this ) );
4121 for(
const auto& rowList : list ) {
4123 for(
const auto& element : rowList ) {
4124 matrix_(i,idx(j)) = element;
4128 matrix_(i,idx(j)) = ElementType();
4154template<
typename MT
4155 ,
typename... CCAs >
4156inline Columns<MT,
false,
true,
false,CCAs...>&
4157 Columns<MT,false,true,false,CCAs...>::operator=(
const Columns& rhs )
4165 if(
this == &rhs || ( &matrix_ == &rhs.matrix_ && compareIndices( *
this, rhs ) ) )
4168 if(
rows() != rhs.rows() ||
columns() != rhs.columns() ) {
4173 for(
size_t j=0UL; j<
columns(); ++j ) {
4180 decltype(
auto) left( derestrict( *
this ) );
4182 if( rhs.canAlias(
this ) ) {
4183 const ResultType tmp( rhs );
4213template<
typename MT
4214 ,
typename... CCAs >
4215template<
typename MT2
4217inline Columns<MT,
false,
true,
false,CCAs...>&
4218 Columns<MT,false,true,false,CCAs...>::operator=(
const Matrix<MT2,SO2>& rhs )
4225 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
4230 Right right( *rhs );
4233 for(
size_t j=0UL; j<
columns(); ++j ) {
4240 decltype(
auto) left( derestrict( *
this ) );
4276template<
typename MT
4277 ,
typename... CCAs >
4278template<
typename MT2
4280inline auto Columns<MT,false,true,false,CCAs...>::operator+=(
const Matrix<MT2,SO2>& rhs )
4295 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
4300 for(
size_t j=0UL; j<
columns(); ++j ) {
4307 decltype(
auto) left( derestrict( *
this ) );
4309 if( (*rhs).canAlias(
this ) ) {
4310 const AddType tmp( *
this + (*rhs) );
4339template<
typename MT
4340 ,
typename... CCAs >
4341template<
typename MT2
4343inline auto Columns<MT,false,true,false,CCAs...>::operator+=(
const Matrix<MT2,SO2>& rhs )
4358 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
4362 const AddType tmp( *
this + (*rhs) );
4365 for(
size_t j=0UL; j<
columns(); ++j ) {
4372 decltype(
auto) left( derestrict( *
this ) );
4398template<
typename MT
4399 ,
typename... CCAs >
4400template<
typename MT2
4402inline auto Columns<MT,false,true,false,CCAs...>::operator-=(
const Matrix<MT2,SO2>& rhs )
4417 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
4422 for(
size_t j=0UL; j<
columns(); ++j ) {
4429 decltype(
auto) left( derestrict( *
this ) );
4431 if( (*rhs).canAlias(
this ) ) {
4432 const SubType tmp( *
this - (*rhs ) );
4461template<
typename MT
4462 ,
typename... CCAs >
4463template<
typename MT2
4465inline auto Columns<MT,false,true,false,CCAs...>::operator-=(
const Matrix<MT2,SO2>& rhs )
4480 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
4484 const SubType tmp( *
this - (*rhs) );
4487 for(
size_t j=0UL; j<
columns(); ++j ) {
4494 decltype(
auto) left( derestrict( *
this ) );
4520template<
typename MT
4521 ,
typename... CCAs >
4522template<
typename MT2
4524inline auto Columns<MT,false,true,false,CCAs...>::operator%=(
const Matrix<MT2,SO2>& rhs )
4538 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
4543 for(
size_t j=0UL; j<
columns(); ++j ) {
4550 decltype(
auto) left( derestrict( *
this ) );
4552 if( (*rhs).canAlias(
this ) ) {
4553 const SchurType tmp( *
this % (*rhs) );
4584template<
typename MT
4585 ,
typename... CCAs >
4586template<
typename MT2
4588inline auto Columns<MT,false,true,false,CCAs...>::operator%=(
const Matrix<MT2,SO2>& rhs )
4602 if(
rows() != (*rhs).rows() ||
columns() != (*rhs).columns() ) {
4606 const SchurType tmp( *
this % (*rhs) );
4609 for(
size_t j=0UL; j<
columns(); ++j ) {
4616 decltype(
auto) left( derestrict( *
this ) );
4646template<
typename MT
4647 ,
typename... CCAs >
4648inline MT& Columns<MT,false,true,false,CCAs...>::operand() noexcept
4662template<
typename MT
4663 ,
typename... CCAs >
4664inline const MT& Columns<MT,false,true,false,CCAs...>::operand() const noexcept
4678template<
typename MT
4679 ,
typename... CCAs >
4680inline size_t Columns<MT,false,true,false,CCAs...>::rows() const noexcept
4682 return matrix_.rows();
4697template<
typename MT
4698 ,
typename... CCAs >
4699inline size_t Columns<MT,false,true,false,CCAs...>::spacing() const noexcept
4701 return matrix_.rows();
4713template<
typename MT
4714 ,
typename... CCAs >
4715inline size_t Columns<MT,false,true,false,CCAs...>::capacity() const noexcept
4732template<
typename MT
4733 ,
typename... CCAs >
4734inline size_t Columns<MT,false,true,false,CCAs...>::capacity(
size_t j )
const noexcept
4752template<
typename MT
4753 ,
typename... CCAs >
4754inline size_t Columns<MT,false,true,false,CCAs...>::nonZeros()
const
4756 size_t nonzeros( 0UL );
4758 for(
size_t j=0UL; j<
columns(); ++j ) {
4777template<
typename MT
4778 ,
typename... CCAs >
4779inline size_t Columns<MT,false,true,false,CCAs...>::nonZeros(
size_t j )
const
4783 size_t nonzeros( 0UL );
4785 const size_t index( idx(j) );
4786 for(
size_t i=0UL; i<
rows(); ++i ) {
4803template<
typename MT
4804 ,
typename... CCAs >
4805inline void Columns<MT,false,true,false,CCAs...>::reset()
4807 for(
size_t j=0UL; j<
columns(); ++j ) {
4824template<
typename MT
4825 ,
typename... CCAs >
4826inline void Columns<MT,false,true,false,CCAs...>::reset(
size_t j )
4830 const size_t index( idx(j) );
4831 for(
size_t i=0UL; i<
rows(); ++i ) {
4832 reset( matrix_( i, index ) );
4860template<
typename MT
4861 ,
typename... CCAs >
4862inline Columns<MT,
false,
true,
false,CCAs...>&
4863 Columns<MT,false,true,false,CCAs...>::transpose()
4872 const ResultType tmp(
trans( *
this ) );
4875 for(
size_t j=0UL; j<
columns(); ++j ) {
4876 if( !tryAssign( matrix_,
column( tmp, j ), 0UL, idx(j) ) ) {
4882 decltype(
auto) left( derestrict( *
this ) );
4905template<
typename MT
4906 ,
typename... CCAs >
4907inline Columns<MT,
false,
true,
false,CCAs...>&
4908 Columns<MT,false,true,false,CCAs...>::ctranspose()
4917 const ResultType tmp(
ctrans( *
this ) );
4920 for(
size_t j=0UL; j<
columns(); ++j ) {
4921 if( !tryAssign( matrix_,
column( tmp, j ), 0UL, idx(j) ) ) {
4927 decltype(
auto) left( derestrict( *
this ) );
4950template<
typename MT
4951 ,
typename... CCAs >
4952template<
typename Other >
4953inline Columns<MT,
false,
true,
false,CCAs...>&
4954 Columns<MT,false,true,false,CCAs...>::scale(
const Other& scalar )
4960 for(
size_t j=0UL; j<
columns(); ++j )
4962 const size_t index ( idx(j) );
4966 for(
size_t i=ibegin; i<iend; ++i ) {
4967 matrix_(i,index) *= scalar;
4996template<
typename MT
4997 ,
typename... CCAs >
4998template<
typename Other >
4999inline bool Columns<MT,false,true,false,CCAs...>::canAlias(
const Other* alias )
const noexcept
5001 return matrix_.isAliased( &unview( *alias ) );
5019template<
typename MT
5020 ,
typename... CCAs >
5021template<
typename MT2
5024 ,
typename... CCAs2 >
5026 Columns<MT,false,true,false,CCAs...>::canAlias(
const Columns<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
5028 return matrix_.isAliased( &alias->matrix_ );
5045template<
typename MT
5046 ,
typename... CCAs >
5047template<
typename Other >
5048inline bool Columns<MT,false,true,false,CCAs...>::isAliased(
const Other* alias )
const noexcept
5050 return matrix_.isAliased( &unview( *alias ) );
5068template<
typename MT
5069 ,
typename... CCAs >
5070template<
typename MT2
5073 ,
typename... CCAs2 >
5075 Columns<MT,false,true,false,CCAs...>::isAliased(
const Columns<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
5077 return matrix_.isAliased( &alias->matrix_ );
5093template<
typename MT
5094 ,
typename... CCAs >
5095inline bool Columns<MT,false,true,false,CCAs...>::isAligned() const noexcept
5114template<
typename MT
5115 ,
typename... CCAs >
5116inline bool Columns<MT,false,true,false,CCAs...>::canSMPAssign() const noexcept
5118 return (
rows() *
columns() > SMP_DMATASSIGN_THRESHOLD );
5136template<
typename MT
5137 ,
typename... CCAs >
5138template<
typename MT2 >
5150 for(
size_t j=0UL; j<
columns(); ++j ) {
5151 const size_t index( idx(j) );
5152 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5153 matrix_(i ,index) = (*rhs)(i ,j);
5154 matrix_(i+1UL,index) = (*rhs)(i+1UL,j);
5156 if( ipos <
rows() ) {
5157 matrix_(ipos,index) = (*rhs)(ipos,j);
5177template<
typename MT
5178 ,
typename... CCAs >
5179template<
typename MT2 >
5190 constexpr size_t block( BLOCK_SIZE );
5194 const size_t ipos(
prevMultiple( (*rhs).rows(), 2UL ) );
5197 for(
size_t j=0UL; j<
columns(); ++j ) {
5198 const size_t index( idx(j) );
5199 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5200 matrix_(i ,index) = (*rhs)(i ,j);
5201 matrix_(i+1UL,index) = (*rhs)(i+1UL,j);
5203 if( ipos < (*rhs).rows() ) {
5204 matrix_(ipos,index) = (*rhs)(ipos,j);
5210 for(
size_t jj=0UL; jj<
columns(); jj+=block ) {
5211 const size_t jend( (
columns()<(jj+block) )?(
columns() ):( jj+block ) );
5212 for(
size_t ii=0UL; ii<
rows(); ii+=block ) {
5213 const size_t iend( (
rows()<(ii+block) )?(
rows() ):( ii+block ) );
5214 for(
size_t j=jj; j<jend; ++j ) {
5215 const size_t index( idx(j) );
5216 for(
size_t i=ii; i<iend; ++i ) {
5217 matrix_(i,index) = (*rhs)(i,j);
5240template<
typename MT
5241 ,
typename... CCAs >
5242template<
typename MT2 >
5251 for(
size_t j=0UL; j<
columns(); ++j ) {
5252 const size_t index( idx(j) );
5254 matrix_(element->index(),index) = element->value();
5273template<
typename MT
5274 ,
typename... CCAs >
5275template<
typename MT2 >
5286 for(
size_t i=0UL; i<
rows(); ++i ) {
5288 matrix_(i,idx(element->index())) = element->value();
5307template<
typename MT
5308 ,
typename... CCAs >
5309template<
typename MT2 >
5321 for(
size_t j=0UL; j<
columns(); ++j )
5323 const size_t index( idx(j) );
5325 matrix_(j,index) += (*rhs)(j,j);
5328 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5329 matrix_(i ,index) += (*rhs)(i ,j);
5330 matrix_(i+1UL,index) += (*rhs)(i+1UL,j);
5332 if( ipos <
rows() ) {
5333 matrix_(ipos,index) += (*rhs)(ipos,j);
5354template<
typename MT
5355 ,
typename... CCAs >
5356template<
typename MT2 >
5367 constexpr size_t block( BLOCK_SIZE );
5371 const size_t ipos(
prevMultiple( (*rhs).rows(), 2UL ) );
5374 for(
size_t j=0UL; j<
columns(); ++j ) {
5375 const size_t index( idx(j) );
5376 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5377 matrix_(i ,index) += (*rhs)(i ,j);
5378 matrix_(i+1UL,index) += (*rhs)(i+1UL,j);
5380 if( ipos < (*rhs).rows() )
5381 matrix_(ipos,index) += (*rhs)(ipos,j);
5386 for(
size_t jj=0UL; jj<
columns(); jj+=block ) {
5387 const size_t jend( (
columns()<(jj+block) )?(
columns() ):( jj+block ) );
5388 for(
size_t ii=0UL; ii<
rows(); ii+=block ) {
5389 const size_t iend( (
rows()<(ii+block) )?(
rows() ):( ii+block ) );
5390 for(
size_t j=jj; j<jend; ++j ) {
5391 const size_t index( idx(j) );
5392 for(
size_t i=ii; i<iend; ++i ) {
5393 matrix_(i,index) += (*rhs)(i,j);
5416template<
typename MT
5417 ,
typename... CCAs >
5418template<
typename MT2 >
5427 for(
size_t j=0UL; j<
columns(); ++j ) {
5428 const size_t index( idx(j) );
5430 matrix_(element->index(),index) += element->value();
5449template<
typename MT
5450 ,
typename... CCAs >
5451template<
typename MT2 >
5462 for(
size_t i=0UL; i<
rows(); ++i ) {
5464 matrix_(i,idx(element->index())) += element->value();
5483template<
typename MT
5484 ,
typename... CCAs >
5485template<
typename MT2 >
5497 for(
size_t j=0UL; j<
columns(); ++j )
5499 const size_t index( idx(j) );
5502 matrix_(j,index) -= (*rhs)(j,j);
5505 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5506 matrix_(i ,index) -= (*rhs)(i ,j);
5507 matrix_(i+1UL,index) -= (*rhs)(i+1UL,j);
5509 if( ipos <
rows() ) {
5510 matrix_(ipos,index) -= (*rhs)(ipos,j);
5531template<
typename MT
5532 ,
typename... CCAs >
5533template<
typename MT2 >
5544 constexpr size_t block( BLOCK_SIZE );
5548 const size_t ipos(
prevMultiple( (*rhs).rows(), 2UL ) );
5551 for(
size_t j=0UL; j<
columns(); ++j ) {
5552 const size_t index( idx(j) );
5553 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5554 matrix_(i ,index) -= (*rhs)(i ,j);
5555 matrix_(i+1UL,index) -= (*rhs)(i+1UL,j);
5557 if( ipos < (*rhs).rows() )
5558 matrix_(ipos,index) -= (*rhs)(ipos,j);
5563 for(
size_t jj=0UL; jj<
columns(); jj+=block ) {
5564 const size_t jend( (
columns()<(jj+block) )?(
columns() ):( jj+block ) );
5565 for(
size_t ii=0UL; ii<
rows(); ii+=block ) {
5566 const size_t iend( (
rows()<(ii+block) )?(
rows() ):( ii+block ) );
5567 for(
size_t j=jj; j<jend; ++j ) {
5568 const size_t index( idx(j) );
5569 for(
size_t i=ii; i<iend; ++i ) {
5570 matrix_(i,index) -= (*rhs)(i,j);
5593template<
typename MT
5594 ,
typename... CCAs >
5595template<
typename MT2 >
5604 for(
size_t j=0UL; j<
columns(); ++j ) {
5605 const size_t index( idx(j) );
5607 matrix_(element->index(),index) -= element->value();
5626template<
typename MT
5627 ,
typename... CCAs >
5628template<
typename MT2 >
5639 for(
size_t i=0UL; i<
rows(); ++i ) {
5641 matrix_(i,idx(element->index())) -= element->value();
5660template<
typename MT
5661 ,
typename... CCAs >
5662template<
typename MT2 >
5674 for(
size_t j=0UL; j<
columns(); ++j ) {
5675 const size_t index( idx(j) );
5676 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5677 matrix_(i ,index) *= (*rhs)(i ,j);
5678 matrix_(i+1UL,index) *= (*rhs)(i+1UL,j);
5680 if( ipos <
rows() ) {
5681 matrix_(ipos,index) *= (*rhs)(ipos,j);
5701template<
typename MT
5702 ,
typename... CCAs >
5703template<
typename MT2 >
5714 constexpr size_t block( BLOCK_SIZE );
5718 const size_t ipos(
prevMultiple( (*rhs).rows(), 2UL ) );
5721 for(
size_t j=0UL; j<
columns(); ++j ) {
5722 const size_t index( idx(j) );
5723 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5724 matrix_(i ,index) *= (*rhs)(i ,j);
5725 matrix_(i+1UL,index) *= (*rhs)(i+1UL,j);
5727 if( ipos < (*rhs).rows() )
5728 matrix_(ipos,index) *= (*rhs)(ipos,j);
5733 for(
size_t jj=0UL; jj<
columns(); jj+=block ) {
5734 const size_t jend( (
columns()<(jj+block) )?(
columns() ):( jj+block ) );
5735 for(
size_t ii=0UL; ii<
rows(); ii+=block ) {
5736 const size_t iend( (
rows()<(ii+block) )?(
rows() ):( ii+block ) );
5737 for(
size_t j=jj; j<jend; ++j ) {
5738 const size_t index( idx(j) );
5739 for(
size_t i=ii; i<iend; ++i ) {
5740 matrix_(i,index) *= (*rhs)(i,j);
5763template<
typename MT
5764 ,
typename... CCAs >
5765template<
typename MT2 >
5776 for(
size_t j=0UL; j<
columns(); ++j )
5778 const size_t index( idx(j) );
5782 for( ; i<element->index(); ++i )
5783 reset( matrix_(i,index) );
5784 matrix_(i,index) *= element->value();
5788 for( ; i<
rows(); ++i ) {
5789 reset( matrix_(i,index) );
5809template<
typename MT
5810 ,
typename... CCAs >
5811template<
typename MT2 >
5824 for(
size_t i=0UL; i<
rows(); ++i )
5829 for( ; j<element->index(); ++j )
5830 reset( matrix_(i,idx(j)) );
5831 matrix_(i,idx(j)) *= element->value();
5836 reset( matrix_(i,idx(j)) );
5864template<
typename MT
5865 ,
typename... CCAs >
5866class Columns<MT,false,true,true,CCAs...>
5867 :
public View< DenseMatrix< Columns<MT,false,true,true,CCAs...>, true > >
5868 ,
private ColumnsData<CCAs...>
5872 using DataType = ColumnsData<CCAs...>;
5873 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
5883 using This = Columns<MT,
false,
true,
true,CCAs...>;
5886 using BaseType = View< DenseMatrix<This,true> >;
5888 using ViewedType = MT;
5889 using ResultType = ColumnsTrait_t<MT,N>;
5890 using OppositeType = OppositeType_t<ResultType>;
5891 using TransposeType = TransposeType_t<ResultType>;
5892 using ElementType = ElementType_t<MT>;
5893 using SIMDType = SIMDTrait_t<ElementType>;
5894 using ReturnType = ReturnType_t<MT>;
5895 using CompositeType =
const Columns&;
5898 using ConstReference = ConstReference_t<MT>;
5901 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
5904 using ConstPointer = ConstPointer_t<MT>;
5907 using Pointer = If_t< IsConst_v<MT> || !HasMutableDataAccess_v<MT>, ConstPointer, Pointer_t<MT> >;
5910 using ConstIterator = ConstIterator_t<MT>;
5913 using Iterator = If_t< IsConst_v<MT>, ConstIterator, Iterator_t<MT> >;
5918 static constexpr bool simdEnabled = MT::simdEnabled;
5921 static constexpr bool smpAssignable = MT::smpAssignable;
5924 static constexpr bool compileTimeArgs = DataType::compileTimeArgs;
5930 template<
typename... RCAs >
5931 explicit inline Columns( MT& matrix, RCAs... args );
5933 Columns(
const Columns& ) =
default;
5934 Columns( Columns&& ) =
default;
5941 ~Columns() =
default;
5948 inline Reference operator()(
size_t i,
size_t j );
5949 inline ConstReference operator()(
size_t i,
size_t j )
const;
5950 inline Reference at(
size_t i,
size_t j );
5951 inline ConstReference at(
size_t i,
size_t j )
const;
5952 inline Pointer
data () noexcept;
5953 inline ConstPointer data () const noexcept;
5954 inline Pointer data (
size_t j ) noexcept;
5955 inline ConstPointer data (
size_t j ) const noexcept;
5956 inline Iterator begin (
size_t j );
5957 inline ConstIterator begin (
size_t j ) const;
5958 inline ConstIterator cbegin(
size_t j ) const;
5959 inline Iterator end (
size_t j );
5960 inline ConstIterator end (
size_t j ) const;
5961 inline ConstIterator cend (
size_t j ) const;
5968 inline Columns& operator=( const ElementType& rhs );
5970 Columns& operator=( const Columns& ) = delete;
5977 using DataType::idx;
5978 using DataType::idces;
5979 using DataType::columns;
5981 inline MT& operand() noexcept;
5982 inline const MT& operand() const noexcept;
5984 inline
size_t rows() const noexcept;
5985 inline
size_t spacing() const noexcept;
5986 inline
size_t capacity() const noexcept;
5987 inline
size_t capacity(
size_t j ) const noexcept;
5988 inline
size_t nonZeros() const;
5989 inline
size_t nonZeros(
size_t j ) const;
5990 inline
void reset();
5991 inline
void reset(
size_t j );
5998 template< typename Other >
5999 inline
bool canAlias( const Other* alias ) const noexcept;
6001 template< typename MT2,
bool SO2,
bool SF2, typename... CCAs2 >
6002 inline
bool canAlias( const Columns<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
6004 template< typename Other >
6005 inline
bool isAliased( const Other* alias ) const noexcept;
6007 template< typename MT2,
bool SO2,
bool SF2, typename... CCAs2 >
6008 inline
bool isAliased( const Columns<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
6010 inline
bool isAligned () const noexcept;
6011 inline
bool canSMPAssign() const noexcept;
6028 template< typename MT2,
bool SO2,
bool DF2,
bool SF2, typename... CCAs2 > friend class Columns;
6068template< typename MT
6069 , typename... CCAs >
6070template< typename... RCAs >
6071inline Columns<MT,false,true,true,CCAs...>::Columns( MT& matrix, RCAs... args )
6072 : DataType( args... )
6073 , matrix_ ( matrix )
6076 for( size_t j=0UL; j<columns(); ++j ) {
6077 if( matrix_.columns() <= idx(j) ) {
6078 BLAZE_THROW_INVALID_ARGUMENT(
"Invalid column access index" );
6106template<
typename MT
6107 ,
typename... CCAs >
6108inline typename Columns<MT,
false,
true,
true,CCAs...>::Reference
6109 Columns<MT,false,true,true,CCAs...>::operator()(
size_t i,
size_t j )
6114 return matrix_(idx(j),i);
6131template<
typename MT
6132 ,
typename... CCAs >
6133inline typename Columns<MT,
false,
true,
true,CCAs...>::ConstReference
6134 Columns<MT,false,true,true,CCAs...>::operator()(
size_t i,
size_t j )
const
6139 return const_cast<const MT&
>( matrix_ )(idx(j),i);
6157template<
typename MT
6158 ,
typename... CCAs >
6159inline typename Columns<MT,
false,
true,
true,CCAs...>::Reference
6160 Columns<MT,false,true,true,CCAs...>::at(
size_t i,
size_t j )
6168 return (*
this)(i,j);
6186template<
typename MT
6187 ,
typename... CCAs >
6188inline typename Columns<MT,
false,
true,
true,CCAs...>::ConstReference
6189 Columns<MT,false,true,true,CCAs...>::at(
size_t i,
size_t j )
const
6197 return (*
this)(i,j);
6213template<
typename MT
6214 ,
typename... CCAs >
6215inline typename Columns<MT,
false,
true,
true,CCAs...>::Pointer
6216 Columns<MT,false,true,true,CCAs...>::data() noexcept
6218 return matrix_.data( idx(0UL) );
6234template<
typename MT
6235 ,
typename... CCAs >
6236inline typename Columns<MT,
false,
true,
true,CCAs...>::ConstPointer
6237 Columns<MT,false,true,true,CCAs...>::data() const noexcept
6239 return matrix_.data( idx(0UL) );
6254template<
typename MT
6255 ,
typename... CCAs >
6256inline typename Columns<MT,
false,
true,
true,CCAs...>::Pointer
6257 Columns<MT,false,true,true,CCAs...>::data(
size_t j )
noexcept
6259 return matrix_.data( idx(j) );
6274template<
typename MT
6275 ,
typename... CCAs >
6276inline typename Columns<MT,
false,
true,
true,CCAs...>::ConstPointer
6277 Columns<MT,false,true,true,CCAs...>::data(
size_t j )
const noexcept
6279 return matrix_.data( idx(j) );
6294template<
typename MT
6295 ,
typename... CCAs >
6296inline typename Columns<MT,
false,
true,
true,CCAs...>::Iterator
6297 Columns<MT,false,true,true,CCAs...>::begin(
size_t j )
6300 return matrix_.begin( idx(j) );
6315template<
typename MT
6316 ,
typename... CCAs >
6317inline typename Columns<MT,
false,
true,
true,CCAs...>::ConstIterator
6318 Columns<MT,false,true,true,CCAs...>::begin(
size_t j )
const
6321 return matrix_.cbegin( idx(j) );
6336template<
typename MT
6337 ,
typename... CCAs >
6338inline typename Columns<MT,
false,
true,
true,CCAs...>::ConstIterator
6339 Columns<MT,false,true,true,CCAs...>::cbegin(
size_t j )
const
6342 return matrix_.cbegin( idx(j) );
6357template<
typename MT
6358 ,
typename... CCAs >
6359inline typename Columns<MT,
false,
true,
true,CCAs...>::Iterator
6360 Columns<MT,false,true,true,CCAs...>::end(
size_t j )
6363 return matrix_.end( idx(j) );
6378template<
typename MT
6379 ,
typename... CCAs >
6380inline typename Columns<MT,
false,
true,
true,CCAs...>::ConstIterator
6381 Columns<MT,false,true,true,CCAs...>::end(
size_t j )
const
6384 return matrix_.cend( idx(j) );
6399template<
typename MT
6400 ,
typename... CCAs >
6401inline typename Columns<MT,
false,
true,
true,CCAs...>::ConstIterator
6402 Columns<MT,false,true,true,CCAs...>::cend(
size_t j )
const
6405 return matrix_.cend( idx(j) );
6430template<
typename MT
6431 ,
typename... CCAs >
6432inline Columns<MT,
false,
true,
true,CCAs...>&
6433 Columns<MT,false,true,true,CCAs...>::operator=(
const ElementType& rhs )
6435 for(
size_t j=0UL; j<
columns(); ++j ) {
6459template<
typename MT
6460 ,
typename... CCAs >
6461inline MT& Columns<MT,false,true,true,CCAs...>::operand() noexcept
6475template<
typename MT
6476 ,
typename... CCAs >
6477inline const MT& Columns<MT,false,true,true,CCAs...>::operand() const noexcept
6491template<
typename MT
6492 ,
typename... CCAs >
6493inline size_t Columns<MT,false,true,true,CCAs...>::rows() const noexcept
6495 return matrix_.rows();
6510template<
typename MT
6511 ,
typename... CCAs >
6512inline size_t Columns<MT,false,true,true,CCAs...>::spacing() const noexcept
6514 return matrix_.spacing();
6526template<
typename MT
6527 ,
typename... CCAs >
6528inline size_t Columns<MT,false,true,true,CCAs...>::capacity() const noexcept
6545template<
typename MT
6546 ,
typename... CCAs >
6547inline size_t Columns<MT,false,true,true,CCAs...>::capacity(
size_t j )
const noexcept
6565template<
typename MT
6566 ,
typename... CCAs >
6567inline size_t Columns<MT,false,true,true,CCAs...>::nonZeros()
const
6569 size_t nonzeros( 0UL );
6571 for(
size_t j=0UL; j<
columns(); ++j ) {
6572 nonzeros += matrix_.nonZeros( idx(j) );
6590template<
typename MT
6591 ,
typename... CCAs >
6592inline size_t Columns<MT,false,true,true,CCAs...>::nonZeros(
size_t j )
const
6596 return matrix_.nonZeros( idx(j) );
6608template<
typename MT
6609 ,
typename... CCAs >
6610inline void Columns<MT,false,true,true,CCAs...>::reset()
6612 for(
size_t j=0UL; j<
columns(); ++j ) {
6613 matrix_.reset( idx(j) );
6629template<
typename MT
6630 ,
typename... CCAs >
6631inline void Columns<MT,false,true,true,CCAs...>::reset(
size_t j )
6633 matrix_.reset( idx(j) );
6656template<
typename MT
6657 ,
typename... CCAs >
6658template<
typename Other >
6659inline bool Columns<MT,false,true,true,CCAs...>::canAlias(
const Other* alias )
const noexcept
6661 return matrix_.isAliased( &unview( *alias ) );
6679template<
typename MT
6680 ,
typename... CCAs >
6681template<
typename MT2
6684 ,
typename... CCAs2 >
6686 Columns<MT,false,true,true,CCAs...>::canAlias(
const Columns<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
6688 return matrix_.isAliased( &alias->matrix_ );
6705template<
typename MT
6706 ,
typename... CCAs >
6707template<
typename Other >
6708inline bool Columns<MT,false,true,true,CCAs...>::isAliased(
const Other* alias )
const noexcept
6710 return matrix_.isAliased( &unview( *alias ) );
6728template<
typename MT
6729 ,
typename... CCAs >
6730template<
typename MT2
6733 ,
typename... CCAs2 >
6735 Columns<MT,false,true,true,CCAs...>::isAliased(
const Columns<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
6737 return matrix_.isAliased( &alias->matrix_ );
6753template<
typename MT
6754 ,
typename... CCAs >
6755inline bool Columns<MT,false,true,true,CCAs...>::isAligned() const noexcept
6757 return matrix_.isAligned();
6774template<
typename MT
6775 ,
typename... CCAs >
6776inline bool Columns<MT,false,true,true,CCAs...>::canSMPAssign() const noexcept
6778 return (
rows() *
columns() > SMP_DMATASSIGN_THRESHOLD );
6799template<
typename MT
6800 ,
typename... CCAs >
6802 Columns<MT,false,true,true,CCAs...>::load(
size_t i,
size_t j )
const noexcept
6804 return matrix_.load( idx(j), i );
6825template<
typename MT
6826 ,
typename... CCAs >
6828 Columns<MT,false,true,true,CCAs...>::loada(
size_t i,
size_t j )
const noexcept
6830 return matrix_.loada( idx(j), i );
6851template<
typename MT
6852 ,
typename... CCAs >
6854 Columns<MT,false,true,true,CCAs...>::loadu(
size_t i,
size_t j )
const noexcept
6856 return matrix_.loadu( idx(j), i );
Header file for the addition trait.
Header file for auxiliary alias declarations.
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.
Definition Aliases.h:130
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition Aliases.h:110
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition Aliases.h:450
Header file for run time assertion macros.
Header file for kernel specific block sizes.
Header file for the blaze::checked and blaze::unchecked instances.
Constraints on the storage order of matrix types.
Header file for the implementation of the ColumnsData class template.
Header file for the columns trait.
constexpr const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Subtraction between a DenseIterator and an integral value.
Definition DenseIterator.h:751
constexpr const DenseIterator< Type, AF > operator+(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Addition between a DenseIterator and an integral value.
Definition DenseIterator.h:719
Header file for the EnableIf class template.
Header file for the HasMutableDataAccess type trait.
Header file for the HasSIMDAdd type trait.
Header file for the HasSIMDMult type trait.
Header file for the HasSIMDSub type trait.
Constraint on the data type.
Header file for the If class template.
Header file for the IsConst type trait.
Header file for the IsDiagonal type trait.
Header file for the IsExpression type trait class.
Header file for the IsLower type trait.
Header file for the IsReference type trait.
Header file for the IsRestricted type trait.
Header file for the IsSIMDCombinable type trait.
Header file for the IsSparseMatrix type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper 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 prevMultiple shim.
Constraint on the data type.
Constraints on the storage order of matrix types.
Header file for all SIMD functionality.
Header file for the Schur product trait.
Header file for the subtraction trait.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Base class for dense matrices.
Definition DenseMatrix.h:82
Dense matrix representation of an initializer list.
Definition InitializerMatrix.h:185
Base class for matrices.
Definition Matrix.h:85
Base class for sparse matrices.
Definition SparseMatrix.h:77
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the implementation of a matrix representation of an initializer list.
Header file for the DenseMatrix base class.
Header file for the View base class.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition Column.h:137
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.
Definition Pointer.h:79
#define BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE(T)
Constraint on the data type.
Definition Vectorizable.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.
Definition Reference.h:79
decltype(auto) ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition DMatMapExpr.h:1501
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition DMatTransExpr.h:766
MT::ElementType * data(DenseMatrix< MT, SO > &dm) noexcept
Low-level data access to the dense matrix elements.
Definition DenseMatrix.h:182
auto operator+=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Addition assignment operator for the addition of a dense matrix and a scalar value ( ).
Definition DenseMatrix.h:386
decltype(auto) operator*(const DenseMatrix< MT1, false > &lhs, const DenseMatrix< MT2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition DMatDMatMultExpr.h:9640
auto operator-=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Subtraction assignment operator for the subtraction of a dense matrix and a scalar value ( ).
Definition DenseMatrix.h:448
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
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition RowMajorMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.
Definition Hermitian.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSEXPR_TYPE(T)
Constraint on the data type.
Definition TransExpr.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SUBMATRIX_TYPE(T)
Constraint on the data type.
Definition Submatrix.h:81
#define BLAZE_CONSTRAINT_MUST_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition Symmetric.h:60
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition DenseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.
Definition Computation.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNITRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.
Definition UniTriangular.h:81
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.
Definition ColumnMajorMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COLUMNS_TYPE(T)
Constraint on the data type.
Definition Columns.h:81
typename SchurTrait< T1, T2 >::Type SchurTrait_t
Auxiliary alias declaration for the SchurTrait class template.
Definition SchurTrait.h:137
typename SubTrait< T1, T2 >::Type SubTrait_t
Auxiliary alias declaration for the SubTrait class template.
Definition SubTrait.h:163
typename AddTrait< T1, T2 >::Type AddTrait_t
Auxiliary alias declaration for the AddTrait class template.
Definition AddTrait.h:163
constexpr bool IsStrictlyUpper_v
Auxiliary variable template for the IsStrictlyUpper type trait.
Definition IsStrictlyUpper.h:173
constexpr bool IsStrictlyLower_v
Auxiliary variable template for the IsStrictlyLower type trait.
Definition IsStrictlyLower.h:173
constexpr bool IsUpper_v
Auxiliary variable template for the IsUpper type trait.
Definition IsUpper.h:175
constexpr bool IsDiagonal_v
Auxiliary variable template for the IsDiagonal type trait.
Definition IsDiagonal.h:148
constexpr bool IsSparseMatrix_v
Auxiliary variable template for the IsSparseMatrix type trait.
Definition IsSparseMatrix.h:124
constexpr bool IsRestricted_v
Auxiliary variable template for the IsRestricted type trait.
Definition IsRestricted.h:140
constexpr bool IsLower_v
Auxiliary variable template for the IsLower type trait.
Definition IsLower.h:175
BLAZE_ALWAYS_INLINE constexpr auto prevMultiple(T1 value, T2 factor) noexcept
Rounds down an integral value to the previous multiple of a given factor.
Definition PrevMultiple.h:68
constexpr bool operator>(const NegativeAccuracy< A > &lhs, const T &rhs)
Greater-than comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:370
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:253
constexpr bool operator<(const NegativeAccuracy< A > &lhs, const T &rhs)
Less-than comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:332
constexpr bool operator>=(const NegativeAccuracy< A > &, const T &rhs)
Greater-or-equal-than comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:446
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:293
constexpr bool operator<=(const NegativeAccuracy< A > &, const T &rhs)
Less-or-equal-than comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:408
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition Matrix.h:644
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition Matrix.h:730
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition Matrix.h:806
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition Matrix.h:660
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
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
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition DenseMatrix.h:162
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition DenseMatrix.h:100
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition DenseMatrix.h:194
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition DenseMatrix.h:131
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition Inline.h:85
constexpr bool IsReference_v
Auxiliary variable template for the IsReference type trait.
Definition IsReference.h:95
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition MaybeUnused.h:81
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition Exception.h:235
#define BLAZE_THROW_LOGIC_ERROR(MESSAGE)
Macro for the emission of a std::logic_error exception.
Definition Exception.h:187
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition If.h:108
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:175
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 exception macros of the math module.
Header file for the extended initializer_list functionality.
Header file for the reset shim.
Compile time check for lower triangular matrices.
Definition IsLower.h:118
Compile time check for upper triangular matrices.
Definition IsUpper.h:118
Base class for all views.
Definition View.h:67
Header file for the cache size of the target architecture.
System settings for the inline keywords.
System settings for performance optimizations.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.
Header file for the implementation of the Columns base template.