35 #ifndef _BLAZE_MATH_VIEWS_COLUMN_DENSE_H_ 36 #define _BLAZE_MATH_VIEWS_COLUMN_DENSE_H_ 121 template<
typename MT
124 class Column<MT,true,true,SF,CCAs...>
125 :
public View< DenseVector< Column<MT,true,true,SF,CCAs...>, false > >
126 ,
private ColumnData<CCAs...>
130 using DataType = ColumnData<CCAs...>;
131 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
137 using This = Column<MT,
true,
true,SF,CCAs...>;
139 using BaseType = DenseVector<This,false>;
140 using ViewedType = MT;
142 using TransposeType = TransposeType_t<ResultType>;
143 using ElementType = ElementType_t<MT>;
144 using SIMDType = SIMDTrait_t<ElementType>;
145 using ReturnType = ReturnType_t<MT>;
146 using CompositeType =
const Column&;
149 using ConstReference = ConstReference_t<MT>;
152 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
155 using ConstPointer = ConstPointer_t<MT>;
158 using Pointer = If_t< IsConst_v<MT> || !HasMutableDataAccess_v<MT>, ConstPointer, Pointer_t<MT> >;
161 using ConstIterator = ConstIterator_t<MT>;
164 using Iterator = If_t< IsConst_v<MT>, ConstIterator, Iterator_t<MT> >;
169 static constexpr
bool simdEnabled = MT::simdEnabled;
172 static constexpr
bool smpAssignable = MT::smpAssignable;
175 static constexpr
bool compileTimeArgs = DataType::compileTimeArgs;
181 template<
typename... RCAs >
182 explicit inline Column( MT& matrix, RCAs... args );
184 Column(
const Column& ) =
default;
198 inline Reference operator[](
size_t index );
199 inline ConstReference operator[](
size_t index )
const;
200 inline Reference at(
size_t index );
201 inline ConstReference at(
size_t index )
const;
202 inline Pointer
data () noexcept;
203 inline ConstPointer
data () const noexcept;
204 inline Iterator
begin ();
205 inline ConstIterator
begin () const;
206 inline ConstIterator
cbegin() const;
207 inline Iterator
end ();
208 inline ConstIterator
end () const;
209 inline ConstIterator
cend () const;
216 inline Column& operator=( const ElementType& rhs );
217 inline Column& operator=( initializer_list<ElementType> list );
218 inline Column& operator=( const Column& rhs );
220 template< typename VT > inline Column& operator= ( const Vector<VT,false>& rhs );
221 template< typename VT > inline Column& operator+=( const Vector<VT,false>& rhs );
222 template< typename VT > inline Column& operator-=( const Vector<VT,false>& rhs );
223 template< typename VT > inline Column& operator*=( const Vector<VT,false>& rhs );
224 template< typename VT > inline Column& operator/=( const DenseVector<VT,false>& rhs );
225 template< typename VT > inline Column& operator%=( const Vector<VT,false>& rhs );
234 inline MT& operand() noexcept;
235 inline const MT& operand() const noexcept;
237 inline
size_t size() const noexcept;
238 inline
size_t spacing() const noexcept;
239 inline
size_t capacity() const noexcept;
248 template< typename Other > inline Column& scale( const Other& scalar );
255 template< typename VT >
256 static constexpr
bool VectorizedAssign_v =
257 ( useOptimizedKernels &&
258 simdEnabled && VT::simdEnabled &&
264 template< typename VT >
265 static constexpr
bool VectorizedAddAssign_v =
266 ( useOptimizedKernels &&
267 simdEnabled && VT::simdEnabled &&
274 template< typename VT >
275 static constexpr
bool VectorizedSubAssign_v =
276 ( useOptimizedKernels &&
277 simdEnabled && VT::simdEnabled &&
284 template< typename VT >
285 static constexpr
bool VectorizedMultAssign_v =
286 ( useOptimizedKernels &&
287 simdEnabled && VT::simdEnabled &&
294 template< typename VT >
295 static constexpr
bool VectorizedDivAssign_v =
296 ( useOptimizedKernels &&
297 simdEnabled && VT::simdEnabled &&
304 static constexpr
size_t SIMDSIZE = SIMDTrait<ElementType>::
size;
311 template< typename Other >
312 inline
bool canAlias( const Other* alias ) const noexcept;
314 template< typename MT2,
bool SO2,
bool SF2,
size_t... CCAs2 >
315 inline
bool canAlias( const Column<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
317 template< typename Other >
318 inline
bool isAliased( const Other* alias ) const noexcept;
320 template< typename MT2,
bool SO2,
bool SF2,
size_t... CCAs2 >
321 inline
bool isAliased( const Column<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
323 inline
bool isAligned () const noexcept;
324 inline
bool canSMPAssign() const noexcept;
335 template< typename VT >
336 inline auto assign( const DenseVector<VT,false>& rhs ) ->
DisableIf_t< VectorizedAssign_v<VT> >;
338 template< typename VT >
339 inline auto assign( const DenseVector<VT,false>& rhs ) ->
EnableIf_t< VectorizedAssign_v<VT> >;
341 template< typename VT > inline
void assign( const SparseVector<VT,false>& rhs );
343 template< typename VT >
344 inline auto addAssign( const DenseVector<VT,false>& rhs ) ->
DisableIf_t< VectorizedAddAssign_v<VT> >;
346 template< typename VT >
347 inline auto addAssign( const DenseVector<VT,false>& rhs ) ->
EnableIf_t< VectorizedAddAssign_v<VT> >;
349 template< typename VT > inline
void addAssign( const SparseVector<VT,false>& rhs );
351 template< typename VT >
352 inline auto subAssign( const DenseVector<VT,false>& rhs ) ->
DisableIf_t< VectorizedSubAssign_v<VT> >;
354 template< typename VT >
355 inline auto subAssign( const DenseVector<VT,false>& rhs ) ->
EnableIf_t< VectorizedSubAssign_v<VT> >;
357 template< typename VT > inline
void subAssign( const SparseVector<VT,false>& rhs );
359 template< typename VT >
360 inline auto multAssign( const DenseVector<VT,false>& rhs ) ->
DisableIf_t< VectorizedMultAssign_v<VT> >;
362 template< typename VT >
363 inline auto multAssign( const DenseVector<VT,false>& rhs ) ->
EnableIf_t< VectorizedMultAssign_v<VT> >;
365 template< typename VT > inline
void multAssign( const SparseVector<VT,false>& rhs );
367 template< typename VT >
368 inline auto divAssign( const DenseVector<VT,false>& rhs ) ->
DisableIf_t< VectorizedDivAssign_v<VT> >;
370 template< typename VT >
371 inline auto divAssign( const DenseVector<VT,false>& rhs ) ->
EnableIf_t< VectorizedDivAssign_v<VT> >;
384 template< typename MT2,
bool SO2,
bool DF2,
bool SF2,
size_t... CCAs2 > friend class Column;
422 template< typename MT
425 template< typename... RCAs >
426 inline Column<MT,true,true,SF,CCAs...>::Column( MT& matrix, RCAs... args )
427 : DataType( args... )
431 if( matrix_.columns() <=
column() ) {
461 template<
typename MT
464 inline typename Column<MT,
true,
true,SF,CCAs...>::Reference
465 Column<MT,true,true,SF,CCAs...>::operator[](
size_t index )
468 return matrix_(index,
column());
484 template<
typename MT
487 inline typename Column<MT,
true,
true,SF,CCAs...>::ConstReference
488 Column<MT,true,true,SF,CCAs...>::operator[](
size_t index )
const 491 return const_cast<const MT&>( matrix_ )(index,
column());
508 template<
typename MT
511 inline typename Column<MT,
true,
true,SF,CCAs...>::Reference
512 Column<MT,true,true,SF,CCAs...>::at(
size_t index )
514 if( index >=
size() ) {
517 return (*
this)[index];
534 template<
typename MT
537 inline typename Column<MT,
true,
true,SF,CCAs...>::ConstReference
538 Column<MT,true,true,SF,CCAs...>::at(
size_t index )
const 540 if( index >=
size() ) {
543 return (*
this)[index];
558 template<
typename MT
561 inline typename Column<MT,
true,
true,SF,CCAs...>::Pointer
564 return matrix_.data(
column() );
579 template<
typename MT
582 inline typename Column<MT,
true,
true,SF,CCAs...>::ConstPointer
585 return matrix_.data(
column() );
599 template<
typename MT
602 inline typename Column<MT,
true,
true,SF,CCAs...>::Iterator
605 return matrix_.begin(
column() );
619 template<
typename MT
622 inline typename Column<MT,
true,
true,SF,CCAs...>::ConstIterator
625 return matrix_.cbegin(
column() );
639 template<
typename MT
642 inline typename Column<MT,
true,
true,SF,CCAs...>::ConstIterator
645 return matrix_.cbegin(
column() );
659 template<
typename MT
662 inline typename Column<MT,
true,
true,SF,CCAs...>::Iterator
665 return matrix_.end(
column() );
679 template<
typename MT
682 inline typename Column<MT,
true,
true,SF,CCAs...>::ConstIterator
685 return matrix_.cend(
column() );
699 template<
typename MT
702 inline typename Column<MT,
true,
true,SF,CCAs...>::ConstIterator
705 return matrix_.cend(
column() );
730 template<
typename MT
733 inline Column<MT,
true,
true,SF,CCAs...>&
734 Column<MT,true,true,SF,CCAs...>::operator=(
const ElementType& rhs )
736 decltype(
auto) left( derestrict( matrix_ ) );
749 for(
size_t i=ibegin; i<iend; ++i ) {
750 if( !IsRestricted_v<MT> || IsTriangular_v<MT> || trySet( matrix_, i,
column(), rhs ) )
775 template<
typename MT
778 inline Column<MT,
true,
true,SF,CCAs...>&
779 Column<MT,true,true,SF,CCAs...>::operator=( initializer_list<ElementType> list )
781 if( list.size() >
size() ) {
785 if( IsRestricted_v<MT> ) {
786 const InitializerVector<ElementType,false> tmp( list,
size() );
787 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
792 decltype(
auto) left( derestrict( *this ) );
794 std::fill( std::copy( list.
begin(), list.
end(), left.
begin() ), left.
end(), ElementType() );
818 template< typename MT
821 inline Column<MT,true,true,SF,CCAs...>&
822 Column<MT,true,true,SF,CCAs...>::operator=( const Column& rhs )
824 if( &rhs ==
this )
return *
this;
826 if(
size() != rhs.size() ) {
830 if( !tryAssign( matrix_, rhs, 0UL,
column() ) ) {
834 decltype(
auto) left( derestrict( *this ) );
837 const ResultType tmp( rhs );
866 template<
typename MT
869 template<
typename VT >
870 inline Column<MT,
true,
true,SF,CCAs...>&
871 Column<MT,true,true,SF,CCAs...>::operator=(
const Vector<VT,false>& rhs )
880 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
883 if( !tryAssign( matrix_, right, 0UL,
column() ) ) {
887 decltype(
auto) left( derestrict( *this ) );
890 const ResultType_t<VT> tmp( right );
894 if( IsSparseVector_v<VT> )
921 template<
typename MT
924 template<
typename VT >
925 inline Column<MT,
true,
true,SF,CCAs...>&
935 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
938 if( !tryAddAssign( matrix_, right, 0UL,
column() ) ) {
942 decltype(
auto) left( derestrict( *this ) );
945 const ResultType_t<VT> tmp( right );
974 template<
typename MT
977 template<
typename VT >
978 inline Column<MT,
true,
true,SF,CCAs...>&
988 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
991 if( !trySubAssign( matrix_, right, 0UL,
column() ) ) {
995 decltype(
auto) left( derestrict( *this ) );
998 const ResultType_t<VT> tmp( right );
1026 template<
typename MT
1029 template<
typename VT >
1030 inline Column<MT,
true,
true,SF,CCAs...>&
1040 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
1041 Right right( ~rhs );
1043 if( !tryMultAssign( matrix_, right, 0UL,
column() ) ) {
1047 decltype(
auto) left( derestrict( *this ) );
1050 const ResultType_t<VT> tmp( right );
1077 template<
typename MT
1080 template<
typename VT >
1081 inline Column<MT,
true,
true,SF,CCAs...>&
1091 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
1092 Right right( ~rhs );
1094 if( !tryDivAssign( matrix_, right, 0UL,
column() ) ) {
1098 decltype(
auto) left( derestrict( *this ) );
1101 const ResultType_t<VT> tmp( right );
1129 template<
typename MT
1132 template<
typename VT >
1133 inline Column<MT,
true,
true,SF,CCAs...>&
1134 Column<MT,true,true,SF,CCAs...>::operator%=(
const Vector<VT,false>& rhs )
1136 using blaze::assign;
1141 using CrossType = CrossTrait_t< ResultType, ResultType_t<VT> >;
1147 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
1151 const CrossType right( *
this % (~rhs) );
1153 if( !tryAssign( matrix_, right, 0UL,
column() ) ) {
1157 decltype(
auto) left( derestrict( *this ) );
1159 assign( left, right );
1183 template< typename MT
1186 inline MT& Column<MT,true,true,SF,CCAs...>::operand() noexcept
1200 template<
typename MT
1203 inline const MT& Column<MT,true,true,SF,CCAs...>::operand() const noexcept
1217 template<
typename MT
1222 return matrix_.rows();
1237 template<
typename MT
1242 return matrix_.spacing();
1254 template<
typename MT
1259 return matrix_.capacity(
column() );
1274 template<
typename MT
1279 return matrix_.nonZeros(
column() );
1291 template<
typename MT
1296 matrix_.reset(
column() );
1323 template<
typename MT
1326 template<
typename Other >
1327 inline Column<MT,
true,
true,SF,CCAs...>&
1328 Column<MT,true,true,SF,CCAs...>::scale(
const Other& scalar )
1332 const size_t ibegin( ( IsLower_v<MT> )
1333 ?( ( IsStrictlyLower_v<MT> )
1337 const size_t iend ( ( IsUpper_v<MT> )
1338 ?( ( IsStrictlyUpper_v<MT> )
1343 for(
size_t i=ibegin; i<iend; ++i ) {
1344 matrix_(i,
column()) *= scalar;
1372 template<
typename MT
1375 template<
typename Other >
1376 inline bool Column<MT,true,true,SF,CCAs...>::canAlias(
const Other* alias )
const noexcept
1378 return matrix_.isAliased( alias );
1395 template<
typename MT
1398 template<
typename MT2
1403 Column<MT,true,true,SF,CCAs...>::canAlias(
const Column<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
1405 return matrix_.isAliased( alias->matrix_ ) && (
column() == alias->column() );
1422 template<
typename MT
1425 template<
typename Other >
1426 inline bool Column<MT,true,true,SF,CCAs...>::isAliased(
const Other* alias )
const noexcept
1428 return matrix_.isAliased( alias );
1445 template<
typename MT
1448 template<
typename MT2
1453 Column<MT,true,true,SF,CCAs...>::isAliased(
const Column<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
1455 return matrix_.isAliased( &alias->matrix_ ) && (
column() == alias->column() );
1471 template<
typename MT
1474 inline bool Column<MT,true,true,SF,CCAs...>::isAligned() const noexcept
1476 return matrix_.isAligned();
1493 template<
typename MT
1496 inline bool Column<MT,true,true,SF,CCAs...>::canSMPAssign() const noexcept
1498 return (
size() > SMP_DVECASSIGN_THRESHOLD );
1516 template<
typename MT
1520 Column<MT,true,true,SF,CCAs...>::load(
size_t index )
const noexcept
1522 return matrix_.load( index,
column() );
1541 template<
typename MT
1547 return matrix_.loada( index,
column() );
1566 template<
typename MT
1572 return matrix_.loadu( index,
column() );
1591 template<
typename MT
1595 Column<MT,true,true,SF,CCAs...>::store(
size_t index,
const SIMDType& value ) noexcept
1597 matrix_.store( index,
column(), value );
1617 template<
typename MT
1623 matrix_.storea( index,
column(), value );
1643 template<
typename MT
1649 matrix_.storeu( index,
column(), value );
1669 template<
typename MT
1675 matrix_.stream( index,
column(), value );
1693 template<
typename MT
1696 template<
typename VT >
1697 inline auto Column<MT,true,true,SF,CCAs...>::assign(
const DenseVector<VT,false>& rhs )
1698 -> DisableIf_t< VectorizedAssign_v<VT> >
1702 const size_t ipos( (~rhs).
size() &
size_t(-2) );
1703 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1704 matrix_(i ,
column()) = (~rhs)[i ];
1705 matrix_(i+1UL,
column()) = (~rhs)[i+1UL];
1707 if( ipos < (~rhs).size() )
1708 matrix_(ipos,
column()) = (~rhs)[ipos];
1726 template<
typename MT
1729 template<
typename VT >
1730 inline auto Column<MT,true,true,SF,CCAs...>::assign(
const DenseVector<VT,false>& rhs )
1731 -> EnableIf_t< VectorizedAssign_v<VT> >
1737 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
1741 const size_t ipos( ( remainder )?(
rows &
size_t(-SIMDSIZE) ):(
rows ) );
1745 Iterator left(
begin() );
1746 ConstIterator_t<VT> right( (~rhs).
begin() );
1748 if( useStreaming &&
rows > ( cacheSize/(
sizeof(ElementType) * 3UL ) ) && !(~rhs).isAliased(
this ) )
1750 for( ; i<ipos; i+=SIMDSIZE ) {
1751 left.stream( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1753 for( ; remainder && i<
rows; ++i ) {
1754 *left = *right; ++left; ++right;
1759 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
1760 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1761 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1762 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1763 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1765 for( ; i<ipos; i+=SIMDSIZE ) {
1766 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1768 for( ; remainder && i<
rows; ++i ) {
1769 *left = *right; ++left; ++right;
1789 template<
typename MT
1792 template<
typename VT >
1793 inline void Column<MT,true,true,SF,CCAs...>::assign(
const SparseVector<VT,false>& rhs )
1797 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
1798 matrix_(element->index(),
column()) = element->value();
1816 template<
typename MT
1819 template<
typename VT >
1820 inline auto Column<MT,true,true,SF,CCAs...>::addAssign(
const DenseVector<VT,false>& rhs )
1821 -> DisableIf_t< VectorizedAddAssign_v<VT> >
1825 const size_t ipos( (~rhs).
size() &
size_t(-2) );
1826 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1827 matrix_(i ,
column()) += (~rhs)[i ];
1828 matrix_(i+1UL,
column()) += (~rhs)[i+1UL];
1830 if( ipos < (~rhs).size() )
1831 matrix_(ipos,
column()) += (~rhs)[ipos];
1849 template<
typename MT
1852 template<
typename VT >
1853 inline auto Column<MT,true,true,SF,CCAs...>::addAssign(
const DenseVector<VT,false>& rhs )
1854 -> EnableIf_t< VectorizedAddAssign_v<VT> >
1860 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
1864 const size_t ipos( ( remainder )?(
rows &
size_t(-SIMDSIZE) ):(
rows ) );
1868 Iterator left(
begin() );
1869 ConstIterator_t<VT> right( (~rhs).
begin() );
1871 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
1872 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1873 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1874 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1875 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1877 for( ; i<ipos; i+=SIMDSIZE ) {
1878 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1880 for( ; remainder && i<
rows; ++i ) {
1881 *left += *right; ++left; ++right;
1900 template<
typename MT
1903 template<
typename VT >
1904 inline void Column<MT,true,true,SF,CCAs...>::addAssign(
const SparseVector<VT,false>& rhs )
1908 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
1909 matrix_(element->index(),
column()) += element->value();
1927 template<
typename MT
1930 template<
typename VT >
1931 inline auto Column<MT,true,true,SF,CCAs...>::subAssign(
const DenseVector<VT,false>& rhs )
1932 -> DisableIf_t< VectorizedSubAssign_v<VT> >
1936 const size_t ipos( (~rhs).
size() &
size_t(-2) );
1937 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1938 matrix_(i ,
column()) -= (~rhs)[i ];
1939 matrix_(i+1UL,
column()) -= (~rhs)[i+1UL];
1941 if( ipos < (~rhs).size() )
1942 matrix_(ipos,
column()) -= (~rhs)[ipos];
1960 template<
typename MT
1963 template<
typename VT >
1964 inline auto Column<MT,true,true,SF,CCAs...>::subAssign(
const DenseVector<VT,false>& rhs )
1965 -> EnableIf_t< VectorizedSubAssign_v<VT> >
1971 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
1975 const size_t ipos( ( remainder )?(
rows &
size_t(-SIMDSIZE) ):(
rows ) );
1979 Iterator left(
begin() );
1980 ConstIterator_t<VT> right( (~rhs).
begin() );
1982 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
1983 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1984 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1985 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1986 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1988 for( ; i<ipos; i+=SIMDSIZE ) {
1989 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1991 for( ; remainder && i<
rows; ++i ) {
1992 *left -= *right; ++left; ++right;
2011 template<
typename MT
2014 template<
typename VT >
2015 inline void Column<MT,true,true,SF,CCAs...>::subAssign(
const SparseVector<VT,false>& rhs )
2019 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
2020 matrix_(element->index(),
column()) -= element->value();
2038 template<
typename MT
2041 template<
typename VT >
2042 inline auto Column<MT,true,true,SF,CCAs...>::multAssign(
const DenseVector<VT,false>& rhs )
2043 -> DisableIf_t< VectorizedMultAssign_v<VT> >
2047 const size_t ipos( (~rhs).
size() &
size_t(-2) );
2048 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2049 matrix_(i ,
column()) *= (~rhs)[i ];
2050 matrix_(i+1UL,
column()) *= (~rhs)[i+1UL];
2052 if( ipos < (~rhs).size() )
2053 matrix_(ipos,
column()) *= (~rhs)[ipos];
2071 template<
typename MT
2074 template<
typename VT >
2075 inline auto Column<MT,true,true,SF,CCAs...>::multAssign(
const DenseVector<VT,false>& rhs )
2076 -> EnableIf_t< VectorizedMultAssign_v<VT> >
2082 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
2086 const size_t ipos( ( remainder )?(
rows &
size_t(-SIMDSIZE) ):(
rows ) );
2090 Iterator left(
begin() );
2091 ConstIterator_t<VT> right( (~rhs).
begin() );
2093 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
2094 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2095 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2096 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2097 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2099 for( ; i<ipos; i+=SIMDSIZE ) {
2100 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2102 for( ; remainder && i<
rows; ++i ) {
2103 *left *= *right; ++left, ++right;
2122 template<
typename MT
2125 template<
typename VT >
2126 inline void Column<MT,true,true,SF,CCAs...>::multAssign(
const SparseVector<VT,false>& rhs )
2134 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
2135 const size_t index( element->index() );
2136 for( ; i<index; ++i )
2138 matrix_(i,
column()) *= element->value();
2142 for( ; i<
size(); ++i ) {
2162 template<
typename MT
2165 template<
typename VT >
2166 inline auto Column<MT,true,true,SF,CCAs...>::divAssign(
const DenseVector<VT,false>& rhs )
2167 -> DisableIf_t< VectorizedDivAssign_v<VT> >
2171 const size_t ipos( (~rhs).
size() &
size_t(-2) );
2172 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2173 matrix_(i ,
column()) /= (~rhs)[i ];
2174 matrix_(i+1UL,
column()) /= (~rhs)[i+1UL];
2176 if( ipos < (~rhs).size() )
2177 matrix_(ipos,
column()) /= (~rhs)[ipos];
2195 template<
typename MT
2198 template<
typename VT >
2199 inline auto Column<MT,true,true,SF,CCAs...>::divAssign(
const DenseVector<VT,false>& rhs )
2200 -> EnableIf_t< VectorizedDivAssign_v<VT> >
2208 const size_t ipos(
rows &
size_t(-SIMDSIZE) );
2212 Iterator left(
begin() );
2213 ConstIterator_t<VT> right( (~rhs).
begin() );
2215 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
2216 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2217 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2218 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2219 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2221 for( ; i<ipos; i+=SIMDSIZE ) {
2222 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2224 for( ; i<
rows; ++i ) {
2225 *left /= *right; ++left; ++right;
2252 template<
typename MT
2254 class Column<MT,false,true,false,CCAs...>
2255 :
public View< DenseVector< Column<MT,false,true,false,CCAs...>, false > >
2256 ,
private ColumnData<CCAs...>
2260 using DataType = ColumnData<CCAs...>;
2261 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
2267 using This = Column<MT,
false,
true,
false,CCAs...>;
2269 using BaseType = DenseVector<This,false>;
2270 using ViewedType = MT;
2272 using TransposeType = TransposeType_t<ResultType>;
2273 using ElementType = ElementType_t<MT>;
2274 using ReturnType = ReturnType_t<MT>;
2275 using CompositeType =
const Column&;
2278 using ConstReference = ConstReference_t<MT>;
2281 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
2284 using ConstPointer = ConstPointer_t<MT>;
2287 using Pointer = If_t< IsConst_v<MT> || !HasMutableDataAccess_v<MT>, ConstPointer, Pointer_t<MT> >;
2293 template<
typename MatrixType
2294 ,
typename IteratorType >
2295 class ColumnIterator
2300 using IteratorCategory =
typename std::iterator_traits<IteratorType>::iterator_category;
2303 using ValueType =
typename std::iterator_traits<IteratorType>::value_type;
2306 using PointerType =
typename std::iterator_traits<IteratorType>::pointer;
2309 using ReferenceType =
typename std::iterator_traits<IteratorType>::reference;
2312 using DifferenceType =
typename std::iterator_traits<IteratorType>::difference_type;
2315 using iterator_category = IteratorCategory;
2316 using value_type = ValueType;
2317 using pointer = PointerType;
2318 using reference = ReferenceType;
2319 using difference_type = DifferenceType;
2325 inline ColumnIterator() noexcept
2326 : matrix_(
nullptr )
2340 inline ColumnIterator( MatrixType& matrix,
size_t row,
size_t column ) noexcept
2341 : matrix_( &matrix )
2346 if( row_ != matrix_->rows() )
2347 pos_ = matrix_->begin( row_ ) + column_;
2356 template<
typename MatrixType2,
typename IteratorType2 >
2357 inline ColumnIterator(
const ColumnIterator<MatrixType2,IteratorType2>& it ) noexcept
2358 : matrix_( it.matrix_ )
2360 , column_( it.column_ )
2371 inline ColumnIterator&
operator+=(
size_t inc ) noexcept {
2374 if( row_ != matrix_->rows() )
2375 pos_ = matrix_->begin( row_ ) + column_;
2387 inline ColumnIterator&
operator-=(
size_t dec ) noexcept {
2390 if( row_ != matrix_->rows() )
2391 pos_ = matrix_->begin( row_ ) + column_;
2402 inline ColumnIterator& operator++() noexcept {
2405 if( row_ != matrix_->rows() )
2406 pos_ = matrix_->begin( row_ ) + column_;
2417 inline const ColumnIterator operator++(
int ) noexcept {
2418 const ColumnIterator tmp( *
this );
2429 inline ColumnIterator& operator--() noexcept {
2432 if( row_ != matrix_->rows() )
2433 pos_ = matrix_->begin( row_ ) + column_;
2444 inline const ColumnIterator operator--(
int ) noexcept {
2445 const ColumnIterator tmp( *
this );
2457 inline ReferenceType operator[](
size_t index )
const {
2459 const IteratorType pos( matrix_->begin( row_+index ) + column_ );
2469 inline ReferenceType
operator*()
const {
2479 inline PointerType operator->()
const {
2490 template<
typename MatrixType2,
typename IteratorType2 >
2491 inline bool operator==(
const ColumnIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2492 return row_ == rhs.row_;
2502 template<
typename MatrixType2,
typename IteratorType2 >
2503 inline bool operator!=(
const ColumnIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2504 return !( *
this == rhs );
2514 template<
typename MatrixType2,
typename IteratorType2 >
2515 inline bool operator<(
const ColumnIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2516 return row_ < rhs.row_;
2526 template<
typename MatrixType2,
typename IteratorType2 >
2527 inline bool operator>(
const ColumnIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2528 return row_ > rhs.row_;
2538 template<
typename MatrixType2,
typename IteratorType2 >
2539 inline bool operator<=(
const ColumnIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2540 return row_ <= rhs.row_;
2550 template<
typename MatrixType2,
typename IteratorType2 >
2551 inline bool operator>=(
const ColumnIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2552 return row_ >= rhs.row_;
2562 inline DifferenceType
operator-(
const ColumnIterator& rhs )
const noexcept {
2563 return row_ - rhs.row_;
2574 friend inline const ColumnIterator
operator+(
const ColumnIterator& it,
size_t inc ) noexcept {
2575 return ColumnIterator( *it.matrix_, it.row_+inc, it.column_ );
2586 friend inline const ColumnIterator
operator+(
size_t inc,
const ColumnIterator& it ) noexcept {
2587 return ColumnIterator( *it.matrix_, it.row_+inc, it.column_ );
2598 friend inline const ColumnIterator
operator-(
const ColumnIterator& it,
size_t dec ) noexcept {
2599 return ColumnIterator( *it.matrix_, it.row_-dec, it.column_ );
2605 MatrixType* matrix_;
2612 template<
typename MatrixType2,
typename IteratorType2 >
friend class ColumnIterator;
2619 using ConstIterator = ColumnIterator< const MT, ConstIterator_t<MT> >;
2622 using Iterator = If_t< IsConst_v<MT>, ConstIterator, ColumnIterator< MT, Iterator_t<MT> > >;
2627 static constexpr
bool simdEnabled =
false;
2630 static constexpr
bool smpAssignable = MT::smpAssignable;
2633 static constexpr
bool compileTimeArgs = DataType::compileTimeArgs;
2639 template<
typename... RCAs >
2640 explicit inline Column( MT& matrix, RCAs... args );
2642 Column(
const Column& ) =
default;
2649 ~Column() =
default;
2656 inline Reference operator[](
size_t index );
2657 inline ConstReference operator[](
size_t index )
const;
2658 inline Reference at(
size_t index );
2659 inline ConstReference at(
size_t index )
const;
2660 inline Pointer
data () noexcept;
2661 inline ConstPointer
data () const noexcept;
2662 inline Iterator
begin ();
2663 inline ConstIterator
begin () const;
2664 inline ConstIterator
cbegin() const;
2665 inline Iterator
end ();
2666 inline ConstIterator
end () const;
2667 inline ConstIterator
cend () const;
2674 inline Column& operator=( const ElementType& rhs );
2675 inline Column& operator=( initializer_list<ElementType> list );
2676 inline Column& operator=( const Column& rhs );
2678 template< typename VT > inline Column& operator= ( const Vector<VT,false>& rhs );
2679 template< typename VT > inline Column& operator+=( const Vector<VT,false>& rhs );
2680 template< typename VT > inline Column& operator-=( const Vector<VT,false>& rhs );
2681 template< typename VT > inline Column& operator*=( const Vector<VT,false>& rhs );
2682 template< typename VT > inline Column& operator/=( const DenseVector<VT,false>& rhs );
2683 template< typename VT > inline Column& operator%=( const Vector<VT,false>& rhs );
2692 inline MT& operand() noexcept;
2693 inline const MT& operand() const noexcept;
2695 inline
size_t size() const noexcept;
2696 inline
size_t spacing() const noexcept;
2697 inline
size_t capacity() const noexcept;
2699 inline
void reset();
2706 template< typename Other > inline Column& scale( const Other& scalar );
2713 template< typename Other >
2714 inline
bool canAlias ( const Other* alias ) const noexcept;
2716 template< typename MT2,
bool SO2,
bool SF2,
size_t... CCAs2 >
2717 inline
bool canAlias ( const Column<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
2719 template< typename Other >
2720 inline
bool isAliased( const Other* alias ) const noexcept;
2722 template< typename MT2,
bool SO2,
bool SF2,
size_t... CCAs2 >
2723 inline
bool isAliased( const Column<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
2725 inline
bool isAligned () const noexcept;
2726 inline
bool canSMPAssign() const noexcept;
2728 template< typename VT > inline
void assign ( const DenseVector <VT,false>& rhs );
2729 template< typename VT > inline
void assign ( const SparseVector<VT,false>& rhs );
2730 template< typename VT > inline
void addAssign ( const DenseVector <VT,false>& rhs );
2731 template< typename VT > inline
void addAssign ( const SparseVector<VT,false>& rhs );
2732 template< typename VT > inline
void subAssign ( const DenseVector <VT,false>& rhs );
2733 template< typename VT > inline
void subAssign ( const SparseVector<VT,false>& rhs );
2734 template< typename VT > inline
void multAssign( const DenseVector <VT,false>& rhs );
2735 template< typename VT > inline
void multAssign( const SparseVector<VT,false>& rhs );
2736 template< typename VT > inline
void divAssign ( const DenseVector <VT,false>& rhs );
2749 template< typename MT2,
bool SO2,
bool DF2,
bool SF2,
size_t... CCAs2 > friend class Column;
2788 template< typename MT
2790 template< typename... RCAs >
2791 inline Column<MT,false,true,false,CCAs...>::Column( MT& matrix, RCAs... args )
2792 : DataType( args... )
2793 , matrix_ ( matrix )
2796 if( matrix_.columns() <=
column() ) {
2826 template<
typename MT
2828 inline typename Column<MT,
false,
true,
false,CCAs...>::Reference
2829 Column<MT,false,true,false,CCAs...>::operator[](
size_t index )
2832 return matrix_(index,
column());
2848 template<
typename MT
2850 inline typename Column<MT,
false,
true,
false,CCAs...>::ConstReference
2851 Column<MT,false,true,false,CCAs...>::operator[](
size_t index )
const 2854 return const_cast<const MT&>( matrix_ )(index,
column());
2871 template<
typename MT
2873 inline typename Column<MT,
false,
true,
false,CCAs...>::Reference
2874 Column<MT,false,true,false,CCAs...>::at(
size_t index )
2876 if( index >=
size() ) {
2879 return (*
this)[index];
2896 template<
typename MT
2898 inline typename Column<MT,
false,
true,
false,CCAs...>::ConstReference
2899 Column<MT,false,true,false,CCAs...>::at(
size_t index )
const 2901 if( index >=
size() ) {
2904 return (*
this)[index];
2919 template<
typename MT
2921 inline typename Column<MT,
false,
true,
false,CCAs...>::Pointer
2924 return matrix_.data() +
column();
2939 template<
typename MT
2941 inline typename Column<MT,
false,
true,
false,CCAs...>::ConstPointer
2944 return matrix_.data() +
column();
2958 template<
typename MT
2960 inline typename Column<MT,
false,
true,
false,CCAs...>::Iterator
2963 return Iterator( matrix_, 0UL,
column() );
2977 template<
typename MT
2979 inline typename Column<MT,
false,
true,
false,CCAs...>::ConstIterator
2982 return ConstIterator( matrix_, 0UL,
column() );
2996 template<
typename MT
2998 inline typename Column<MT,
false,
true,
false,CCAs...>::ConstIterator
3001 return ConstIterator( matrix_, 0UL,
column() );
3015 template<
typename MT
3017 inline typename Column<MT,
false,
true,
false,CCAs...>::Iterator
3020 return Iterator( matrix_,
size(),
column() );
3034 template<
typename MT
3036 inline typename Column<MT,
false,
true,
false,CCAs...>::ConstIterator
3039 return ConstIterator( matrix_,
size(),
column() );
3053 template<
typename MT
3055 inline typename Column<MT,
false,
true,
false,CCAs...>::ConstIterator
3058 return ConstIterator( matrix_,
size(),
column() );
3083 template<
typename MT
3085 inline Column<MT,
false,
true,
false,CCAs...>&
3086 Column<MT,false,true,false,CCAs...>::operator=(
const ElementType& rhs )
3088 decltype(
auto) left( derestrict( matrix_ ) );
3101 for(
size_t i=ibegin; i<iend; ++i ) {
3102 if( !IsRestricted_v<MT> || IsTriangular_v<MT> || trySet( matrix_, i,
column(), rhs ) )
3127 template<
typename MT
3129 inline Column<MT,
false,
true,
false,CCAs...>&
3130 Column<MT,false,true,false,CCAs...>::operator=( initializer_list<ElementType> list )
3132 if( list.size() >
size() ) {
3136 if( IsRestricted_v<MT> ) {
3137 const InitializerVector<ElementType,false> tmp( list,
size() );
3138 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
3143 decltype(
auto) left( derestrict( *this ) );
3145 std::fill( std::copy( list.
begin(), list.
end(), left.
begin() ), left.
end(), ElementType() );
3169 template< typename MT
3171 inline Column<MT,false,true,false,CCAs...>&
3172 Column<MT,false,true,false,CCAs...>::operator=( const Column& rhs )
3174 if( &rhs ==
this )
return *
this;
3176 if(
size() != rhs.size() ) {
3180 if( !tryAssign( matrix_, rhs, 0UL,
column() ) ) {
3184 decltype(
auto) left( derestrict( *this ) );
3187 const ResultType tmp( rhs );
3216 template<
typename MT
3218 template<
typename VT >
3219 inline Column<MT,
false,
true,
false,CCAs...>&
3220 Column<MT,false,true,false,CCAs...>::operator=(
const Vector<VT,false>& rhs )
3230 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
3231 Right right( ~rhs );
3233 if( !tryAssign( matrix_, right, 0UL,
column() ) ) {
3237 decltype(
auto) left( derestrict( *this ) );
3240 const ResultType tmp( right );
3244 if( IsSparseVector_v<VT> )
3271 template<
typename MT
3273 template<
typename VT >
3274 inline Column<MT,
false,
true,
false,CCAs...>&
3284 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
3285 Right right( ~rhs );
3287 if( !tryAddAssign( matrix_, right, 0UL,
column() ) ) {
3291 decltype(
auto) left( derestrict( *this ) );
3294 const ResultType_t<VT> tmp( right );
3323 template<
typename MT
3325 template<
typename VT >
3326 inline Column<MT,
false,
true,
false,CCAs...>&
3336 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
3337 Right right( ~rhs );
3339 if( !trySubAssign( matrix_, right, 0UL,
column() ) ) {
3343 decltype(
auto) left( derestrict( *this ) );
3346 const ResultType_t<VT> tmp( right );
3374 template<
typename MT
3376 template<
typename VT >
3377 inline Column<MT,
false,
true,
false,CCAs...>&
3387 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
3388 Right right( ~rhs );
3390 if( !tryMultAssign( matrix_, right, 0UL,
column() ) ) {
3394 decltype(
auto) left( derestrict( *this ) );
3397 const ResultType_t<VT> tmp( right );
3424 template<
typename MT
3426 template<
typename VT >
3427 inline Column<MT,
false,
true,
false,CCAs...>&
3437 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
3438 Right right( ~rhs );
3440 if( !tryDivAssign( matrix_, right, 0UL,
column() ) ) {
3444 decltype(
auto) left( derestrict( *this ) );
3447 const ResultType_t<VT> tmp( right );
3475 template<
typename MT
3477 template<
typename VT >
3478 inline Column<MT,
false,
true,
false,CCAs...>&
3479 Column<MT,false,true,false,CCAs...>::operator%=(
const Vector<VT,false>& rhs )
3481 using blaze::assign;
3486 using CrossType = CrossTrait_t< ResultType, ResultType_t<VT> >;
3492 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
3496 const CrossType right( *
this % (~rhs) );
3498 if( !tryAssign( matrix_, right, 0UL,
column() ) ) {
3502 decltype(
auto) left( derestrict( *this ) );
3504 assign( left, right );
3528 template< typename MT
3530 inline MT& Column<MT,false,true,false,CCAs...>::operand() noexcept
3544 template<
typename MT
3546 inline const MT& Column<MT,false,true,false,CCAs...>::operand() const noexcept
3560 template<
typename MT
3564 return matrix_.rows();
3579 template<
typename MT
3583 return matrix_.spacing();
3595 template<
typename MT
3599 return matrix_.rows();
3614 template<
typename MT
3619 size_t nonzeros( 0UL );
3621 for(
size_t i=0UL; i<
rows; ++i )
3637 template<
typename MT
3643 const size_t ibegin( ( IsLower_v<MT> )
3644 ?( ( IsUniLower_v<MT> || IsStrictlyLower_v<MT> )
3648 const size_t iend ( ( IsUpper_v<MT> )
3649 ?( ( IsUniUpper_v<MT> || IsStrictlyUpper_v<MT> )
3654 for(
size_t i=ibegin; i<iend; ++i )
3682 template<
typename MT
3684 template<
typename Other >
3685 inline Column<MT,
false,
true,
false,CCAs...>&
3686 Column<MT,false,true,false,CCAs...>::scale(
const Other& scalar )
3690 const size_t ibegin( ( IsLower_v<MT> )
3691 ?( ( IsStrictlyLower_v<MT> )
3695 const size_t iend ( ( IsUpper_v<MT> )
3696 ?( ( IsStrictlyUpper_v<MT> )
3701 for(
size_t i=ibegin; i<iend; ++i ) {
3702 matrix_(i,
column()) *= scalar;
3730 template<
typename MT
3732 template<
typename Other >
3733 inline bool Column<MT,false,true,false,CCAs...>::canAlias(
const Other* alias )
const noexcept
3735 return matrix_.isAliased( alias );
3752 template<
typename MT
3754 template<
typename MT2
3759 Column<MT,false,true,false,CCAs...>::canAlias(
const Column<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
3761 return matrix_.isAliased( &alias->matrix_ ) && (
column() == alias->column() );
3778 template<
typename MT
3780 template<
typename Other >
3781 inline bool Column<MT,false,true,false,CCAs...>::isAliased(
const Other* alias )
const noexcept
3783 return matrix_.isAliased( alias );
3800 template<
typename MT
3802 template<
typename MT2
3807 Column<MT,false,true,false,CCAs...>::isAliased(
const Column<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
3809 return matrix_.isAliased( &alias->matrix_ ) && (
column() == alias->column() );
3825 template<
typename MT
3827 inline bool Column<MT,false,true,false,CCAs...>::isAligned() const noexcept
3846 template<
typename MT
3848 inline bool Column<MT,false,true,false,CCAs...>::canSMPAssign() const noexcept
3850 return (
size() > SMP_DVECASSIGN_THRESHOLD );
3868 template<
typename MT
3870 template<
typename VT >
3871 inline void Column<MT,false,true,false,CCAs...>::assign(
const DenseVector<VT,false>& rhs )
3875 const size_t ipos( (~rhs).
size() &
size_t(-2) );
3876 for(
size_t i=0UL; i<ipos; i+=2UL ) {
3877 matrix_(i ,
column()) = (~rhs)[i ];
3878 matrix_(i+1UL,
column()) = (~rhs)[i+1UL];
3880 if( ipos < (~rhs).size() )
3881 matrix_(ipos,
column()) = (~rhs)[ipos];
3899 template<
typename MT
3901 template<
typename VT >
3902 inline void Column<MT,false,true,false,CCAs...>::assign(
const SparseVector<VT,false>& rhs )
3906 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
3907 matrix_(element->index(),
column()) = element->value();
3925 template<
typename MT
3927 template<
typename VT >
3928 inline void Column<MT,false,true,false,CCAs...>::addAssign(
const DenseVector<VT,false>& rhs )
3932 const size_t ipos( (~rhs).
size() &
size_t(-2) );
3933 for(
size_t i=0UL; i<ipos; i+=2UL ) {
3934 matrix_(i ,
column()) += (~rhs)[i ];
3935 matrix_(i+1UL,
column()) += (~rhs)[i+1UL];
3937 if( ipos < (~rhs).size() )
3938 matrix_(ipos,
column()) += (~rhs)[ipos];
3956 template<
typename MT
3958 template<
typename VT >
3959 inline void Column<MT,false,true,false,CCAs...>::addAssign(
const SparseVector<VT,false>& rhs )
3963 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
3964 matrix_(element->index(),
column()) += element->value();
3982 template<
typename MT
3984 template<
typename VT >
3985 inline void Column<MT,false,true,false,CCAs...>::subAssign(
const DenseVector<VT,false>& rhs )
3989 const size_t ipos( (~rhs).
size() &
size_t(-2) );
3990 for(
size_t i=0UL; i<ipos; i+=2UL ) {
3991 matrix_(i ,
column()) -= (~rhs)[i ];
3992 matrix_(i+1UL,
column()) -= (~rhs)[i+1UL];
3994 if( ipos < (~rhs).size() )
3995 matrix_(ipos,
column()) -= (~rhs)[ipos];
4013 template<
typename MT
4015 template<
typename VT >
4016 inline void Column<MT,false,true,false,CCAs...>::subAssign(
const SparseVector<VT,false>& rhs )
4020 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
4021 matrix_(element->index(),
column()) -= element->value();
4039 template<
typename MT
4041 template<
typename VT >
4042 inline void Column<MT,false,true,false,CCAs...>::multAssign(
const DenseVector<VT,false>& rhs )
4046 const size_t ipos( (~rhs).
size() &
size_t(-2) );
4047 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4048 matrix_(i ,
column()) *= (~rhs)[i ];
4049 matrix_(i+1UL,
column()) *= (~rhs)[i+1UL];
4051 if( ipos < (~rhs).size() )
4052 matrix_(ipos,
column()) *= (~rhs)[ipos];
4070 template<
typename MT
4072 template<
typename VT >
4073 inline void Column<MT,false,true,false,CCAs...>::multAssign(
const SparseVector<VT,false>& rhs )
4081 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
4082 const size_t index( element->index() );
4083 for( ; i<index; ++i )
4085 matrix_(i,
column()) *= element->value();
4089 for( ; i<
size(); ++i ) {
4109 template<
typename MT
4111 template<
typename VT >
4112 inline void Column<MT,false,true,false,CCAs...>::divAssign(
const DenseVector<VT,false>& rhs )
4116 const size_t ipos( (~rhs).
size() &
size_t(-2) );
4117 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4118 matrix_(i ,
column()) /= (~rhs)[i ];
4119 matrix_(i+1UL,
column()) /= (~rhs)[i+1UL];
4121 if( ipos < (~rhs).size() )
4122 matrix_(ipos,
column()) /= (~rhs)[ipos];
4148 template<
typename MT
4150 class Column<MT,false,true,true,CCAs...>
4151 :
public View< DenseVector< Column<MT,false,true,true,CCAs...>, false > >
4152 ,
private ColumnData<CCAs...>
4156 using DataType = ColumnData<CCAs...>;
4157 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
4163 using This = Column<MT,
false,
true,
true,CCAs...>;
4165 using BaseType = DenseVector<This,false>;
4166 using ViewedType = MT;
4168 using TransposeType = TransposeType_t<ResultType>;
4169 using ElementType = ElementType_t<MT>;
4170 using SIMDType = SIMDTrait_t<ElementType>;
4171 using ReturnType = ReturnType_t<MT>;
4172 using CompositeType =
const Column&;
4175 using ConstReference = ConstReference_t<MT>;
4178 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
4181 using ConstPointer = ConstPointer_t<MT>;
4184 using Pointer = If_t< IsConst_v<MT> || !HasMutableDataAccess_v<MT>, ConstPointer, Pointer_t<MT> >;
4187 using ConstIterator = ConstIterator_t<MT>;
4190 using Iterator = If_t< IsConst_v<MT>, ConstIterator, Iterator_t<MT> >;
4195 static constexpr
bool simdEnabled = MT::simdEnabled;
4198 static constexpr
bool smpAssignable = MT::smpAssignable;
4201 static constexpr
bool compileTimeArgs = DataType::compileTimeArgs;
4207 template<
typename... RCAs >
4208 explicit inline Column( MT& matrix, RCAs... args );
4210 Column(
const Column& ) =
default;
4217 ~Column() =
default;
4224 inline Reference operator[](
size_t index );
4225 inline ConstReference operator[](
size_t index )
const;
4226 inline Reference at(
size_t index );
4227 inline ConstReference at(
size_t index )
const;
4228 inline Pointer
data () noexcept;
4229 inline ConstPointer
data () const noexcept;
4230 inline Iterator
begin ();
4231 inline ConstIterator
begin () const;
4232 inline ConstIterator
cbegin() const;
4233 inline Iterator
end ();
4234 inline ConstIterator
end () const;
4235 inline ConstIterator
cend () const;
4242 inline Column& operator=( const ElementType& rhs );
4243 inline Column& operator=( initializer_list<ElementType> list );
4244 inline Column& operator=( const Column& rhs );
4246 template< typename VT > inline Column& operator= ( const Vector<VT,false>& rhs );
4247 template< typename VT > inline Column& operator+=( const Vector<VT,false>& rhs );
4248 template< typename VT > inline Column& operator-=( const Vector<VT,false>& rhs );
4249 template< typename VT > inline Column& operator*=( const Vector<VT,false>& rhs );
4250 template< typename VT > inline Column& operator/=( const DenseVector<VT,false>& rhs );
4251 template< typename VT > inline Column& operator%=( const Vector<VT,false>& rhs );
4260 inline MT& operand() noexcept;
4261 inline const MT& operand() const noexcept;
4263 inline
size_t size() const noexcept;
4264 inline
size_t spacing() const noexcept;
4265 inline
size_t capacity() const noexcept;
4267 inline
void reset();
4274 template< typename Other > inline Column& scale( const Other& scalar );
4281 template< typename VT >
4282 static constexpr
bool VectorizedAssign_v =
4283 ( useOptimizedKernels &&
4284 simdEnabled && VT::simdEnabled &&
4290 template< typename VT >
4291 static constexpr
bool VectorizedAddAssign_v =
4292 ( useOptimizedKernels &&
4293 simdEnabled && VT::simdEnabled &&
4300 template< typename VT >
4301 static constexpr
bool VectorizedSubAssign_v =
4302 ( useOptimizedKernels &&
4303 simdEnabled && VT::simdEnabled &&
4310 template< typename VT >
4311 static constexpr
bool VectorizedMultAssign_v =
4312 ( useOptimizedKernels &&
4313 simdEnabled && VT::simdEnabled &&
4320 template< typename VT >
4321 static constexpr
bool VectorizedDivAssign_v =
4322 ( useOptimizedKernels &&
4323 simdEnabled && VT::simdEnabled &&
4330 static constexpr
size_t SIMDSIZE = SIMDTrait<ElementType>::
size;
4337 template< typename Other >
4338 inline
bool canAlias( const Other* alias ) const noexcept;
4340 template< typename MT2,
bool SO2,
bool SF2,
size_t... CCAs2 >
4341 inline
bool canAlias( const Column<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
4343 template< typename Other >
4344 inline
bool isAliased( const Other* alias ) const noexcept;
4346 template< typename MT2,
bool SO2,
bool SF2,
size_t... CCAs2 >
4347 inline
bool isAliased( const Column<MT2,SO2,true,SF2,CCAs2...>* alias ) const noexcept;
4349 inline
bool isAligned () const noexcept;
4350 inline
bool canSMPAssign() const noexcept;
4361 template< typename VT >
4362 inline auto assign( const DenseVector<VT,false>& rhs ) ->
DisableIf_t< VectorizedAssign_v<VT> >;
4364 template< typename VT >
4365 inline auto assign( const DenseVector<VT,false>& rhs ) ->
EnableIf_t< VectorizedAssign_v<VT> >;
4367 template< typename VT > inline
void assign( const SparseVector<VT,false>& rhs );
4369 template< typename VT >
4370 inline auto addAssign( const DenseVector<VT,false>& rhs ) ->
DisableIf_t< VectorizedAddAssign_v<VT> >;
4372 template< typename VT >
4373 inline auto addAssign( const DenseVector<VT,false>& rhs ) ->
EnableIf_t< VectorizedAddAssign_v<VT> >;
4375 template< typename VT > inline
void addAssign( const SparseVector<VT,false>& rhs );
4377 template< typename VT >
4378 inline auto subAssign( const DenseVector<VT,false>& rhs ) ->
DisableIf_t< VectorizedSubAssign_v<VT> >;
4380 template< typename VT >
4381 inline auto subAssign( const DenseVector<VT,false>& rhs ) ->
EnableIf_t< VectorizedSubAssign_v<VT> >;
4383 template< typename VT > inline
void subAssign( const SparseVector<VT,false>& rhs );
4385 template< typename VT >
4386 inline auto multAssign( const DenseVector<VT,false>& rhs ) ->
DisableIf_t< VectorizedMultAssign_v<VT> >;
4388 template< typename VT >
4389 inline auto multAssign( const DenseVector<VT,false>& rhs ) ->
EnableIf_t< VectorizedMultAssign_v<VT> >;
4391 template< typename VT > inline
void multAssign( const SparseVector<VT,false>& rhs );
4393 template< typename VT >
4394 inline auto divAssign( const DenseVector<VT,false>& rhs ) ->
DisableIf_t< VectorizedDivAssign_v<VT> >;
4396 template< typename VT >
4397 inline auto divAssign( const DenseVector<VT,false>& rhs ) ->
EnableIf_t< VectorizedDivAssign_v<VT> >;
4410 template< typename MT2,
bool SO2,
bool DF2,
bool SF2,
size_t... CCAs2 > friend class Column;
4449 template< typename MT
4451 template< typename... RCAs >
4452 inline Column<MT,false,true,true,CCAs...>::Column( MT& matrix, RCAs... args )
4453 : DataType( args... )
4454 , matrix_ ( matrix )
4457 if( matrix_.columns() <=
column() ) {
4487 template<
typename MT
4489 inline typename Column<MT,
false,
true,
true,CCAs...>::Reference
4490 Column<MT,false,true,true,CCAs...>::operator[](
size_t index )
4493 return matrix_(
column(),index);
4509 template<
typename MT
4511 inline typename Column<MT,
false,
true,
true,CCAs...>::ConstReference
4512 Column<MT,false,true,true,CCAs...>::operator[](
size_t index )
const 4515 return const_cast<const MT&>( matrix_ )(
column(),index);
4532 template<
typename MT
4534 inline typename Column<MT,
false,
true,
true,CCAs...>::Reference
4535 Column<MT,false,true,true,CCAs...>::at(
size_t index )
4537 if( index >=
size() ) {
4540 return (*
this)[index];
4557 template<
typename MT
4559 inline typename Column<MT,
false,
true,
true,CCAs...>::ConstReference
4560 Column<MT,false,true,true,CCAs...>::at(
size_t index )
const 4562 if( index >=
size() ) {
4565 return (*
this)[index];
4580 template<
typename MT
4582 inline typename Column<MT,
false,
true,
true,CCAs...>::Pointer
4585 return matrix_.data(
column() );
4600 template<
typename MT
4602 inline typename Column<MT,
false,
true,
true,CCAs...>::ConstPointer
4605 return matrix_.data(
column() );
4619 template<
typename MT
4621 inline typename Column<MT,
false,
true,
true,CCAs...>::Iterator
4624 return matrix_.begin(
column() );
4638 template<
typename MT
4640 inline typename Column<MT,
false,
true,
true,CCAs...>::ConstIterator
4643 return matrix_.cbegin(
column() );
4657 template<
typename MT
4659 inline typename Column<MT,
false,
true,
true,CCAs...>::ConstIterator
4662 return matrix_.cbegin(
column() );
4676 template<
typename MT
4678 inline typename Column<MT,
false,
true,
true,CCAs...>::Iterator
4681 return matrix_.end(
column() );
4695 template<
typename MT
4697 inline typename Column<MT,
false,
true,
true,CCAs...>::ConstIterator
4700 return matrix_.cend(
column() );
4714 template<
typename MT
4716 inline typename Column<MT,
false,
true,
true,CCAs...>::ConstIterator
4719 return matrix_.cend(
column() );
4740 template<
typename MT
4742 inline Column<MT,
false,
true,
true,CCAs...>&
4743 Column<MT,false,true,true,CCAs...>::operator=(
const ElementType& rhs )
4745 decltype(
auto) left( derestrict( matrix_ ) );
4758 for(
size_t j=jbegin; j<jend; ++j ) {
4759 if( !IsRestricted_v<MT> || IsTriangular_v<MT> || trySet( matrix_,
column(), j, rhs ) )
4784 template<
typename MT
4786 inline Column<MT,
false,
true,
true,CCAs...>&
4787 Column<MT,false,true,true,CCAs...>::operator=( initializer_list<ElementType> list )
4789 if( list.size() >
size() ) {
4793 if( IsRestricted_v<MT> ) {
4794 const InitializerVector<ElementType,false> tmp( list,
size() );
4795 if( !tryAssign( matrix_, tmp, 0UL,
column() ) ) {
4800 decltype(
auto) left( derestrict( *this ) );
4802 std::fill( std::copy( list.
begin(), list.
end(), left.
begin() ), left.
end(), ElementType() );
4826 template< typename MT
4828 inline Column<MT,false,true,true,CCAs...>&
4829 Column<MT,false,true,true,CCAs...>::operator=( const Column& rhs )
4831 if( &rhs ==
this )
return *
this;
4833 if(
size() != rhs.size() ) {
4837 if( !tryAssign( matrix_, rhs, 0UL,
column() ) ) {
4841 decltype(
auto) left( derestrict( *this ) );
4844 const ResultType tmp( rhs );
4873 template<
typename MT
4875 template<
typename VT >
4876 inline Column<MT,
false,
true,
true,CCAs...>&
4877 Column<MT,false,true,true,CCAs...>::operator=(
const Vector<VT,false>& rhs )
4886 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
4887 Right right( ~rhs );
4889 if( !tryAssign( matrix_, right, 0UL,
column() ) ) {
4893 decltype(
auto) left( derestrict( *this ) );
4896 const ResultType_t<VT> tmp( right );
4900 if( IsSparseVector_v<VT> )
4927 template<
typename MT
4929 template<
typename VT >
4930 inline Column<MT,
false,
true,
true,CCAs...>&
4940 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
4941 Right right( ~rhs );
4943 if( !tryAddAssign( matrix_, right, 0UL,
column() ) ) {
4947 decltype(
auto) left( derestrict( *this ) );
4950 const ResultType_t<VT> tmp( right );
4979 template<
typename MT
4981 template<
typename VT >
4982 inline Column<MT,
false,
true,
true,CCAs...>&
4992 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
4993 Right right( ~rhs );
4995 if( !trySubAssign( matrix_, right, 0UL,
column() ) ) {
4999 decltype(
auto) left( derestrict( *this ) );
5002 const ResultType_t<VT> tmp( right );
5030 template<
typename MT
5032 template<
typename VT >
5033 inline Column<MT,
false,
true,
true,CCAs...>&
5043 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
5044 Right right( ~rhs );
5046 if( !tryMultAssign( matrix_, right, 0UL,
column() ) ) {
5050 decltype(
auto) left( derestrict( *this ) );
5053 const ResultType_t<VT> tmp( right );
5080 template<
typename MT
5082 template<
typename VT >
5083 inline Column<MT,
false,
true,
true,CCAs...>&
5093 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
5094 Right right( ~rhs );
5096 if( !tryDivAssign( matrix_, right, 0UL,
column() ) ) {
5100 decltype(
auto) left( derestrict( *this ) );
5103 const ResultType_t<VT> tmp( right );
5131 template<
typename MT
5133 template<
typename VT >
5134 inline Column<MT,
false,
true,
true,CCAs...>&
5135 Column<MT,false,true,true,CCAs...>::operator%=(
const Vector<VT,false>& rhs )
5137 using blaze::assign;
5142 using CrossType = CrossTrait_t< ResultType, ResultType_t<VT> >;
5148 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
5152 const CrossType right( *
this % (~rhs) );
5154 if( !tryAssign( matrix_, right, 0UL,
column() ) ) {
5158 decltype(
auto) left( derestrict( *this ) );
5160 assign( left, right );
5184 template< typename MT
5186 inline MT& Column<MT,false,true,true,CCAs...>::operand() noexcept
5200 template<
typename MT
5202 inline const MT& Column<MT,false,true,true,CCAs...>::operand() const noexcept
5216 template<
typename MT
5220 return matrix_.rows();
5235 template<
typename MT
5239 return matrix_.spacing();
5251 template<
typename MT
5255 return matrix_.capacity(
column() );
5270 template<
typename MT
5274 return matrix_.nonZeros(
column() );
5286 template<
typename MT
5290 matrix_.reset(
column() );
5317 template<
typename MT
5319 template<
typename Other >
5320 inline Column<MT,
false,
true,
true,CCAs...>&
5321 Column<MT,false,true,true,CCAs...>::scale(
const Other& scalar )
5325 const size_t jbegin( ( IsUpper_v<MT> )
5326 ?( ( IsStrictlyUpper_v<MT> )
5330 const size_t jend ( ( IsLower_v<MT> )
5331 ?( ( IsStrictlyLower_v<MT> )
5336 for(
size_t j=jbegin; j<jend; ++j ) {
5337 matrix_(
column(),j) *= scalar;
5365 template<
typename MT
5367 template<
typename Other >
5368 inline bool Column<MT,false,true,true,CCAs...>::canAlias(
const Other* alias )
const noexcept
5370 return matrix_.isAliased( alias );
5387 template<
typename MT
5389 template<
typename MT2
5394 Column<MT,false,true,true,CCAs...>::canAlias(
const Column<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
5396 return matrix_.isAliased( alias->matrix_ ) && (
column() == alias->column() );
5413 template<
typename MT
5415 template<
typename Other >
5416 inline bool Column<MT,false,true,true,CCAs...>::isAliased(
const Other* alias )
const noexcept
5418 return matrix_.isAliased( alias );
5435 template<
typename MT
5437 template<
typename MT2
5442 Column<MT,false,true,true,CCAs...>::isAliased(
const Column<MT2,SO2,true,SF2,CCAs2...>* alias )
const noexcept
5444 return matrix_.isAliased( &alias->matrix_ ) && (
column() == alias->column() );
5460 template<
typename MT
5462 inline bool Column<MT,false,true,true,CCAs...>::isAligned() const noexcept
5464 return matrix_.isAligned();
5481 template<
typename MT
5483 inline bool Column<MT,false,true,true,CCAs...>::canSMPAssign() const noexcept
5485 return (
size() > SMP_DVECASSIGN_THRESHOLD );
5503 template<
typename MT
5506 Column<MT,false,true,true,CCAs...>::load(
size_t index )
const noexcept
5508 return matrix_.load(
column(), index );
5527 template<
typename MT
5532 return matrix_.loada(
column(), index );
5551 template<
typename MT
5556 return matrix_.loadu(
column(), index );
5575 template<
typename MT
5578 Column<MT,false,true,true,CCAs...>::store(
size_t index,
const SIMDType& value ) noexcept
5580 matrix_.store(
column(), index, value );
5600 template<
typename MT
5605 matrix_.storea(
column(), index, value );
5625 template<
typename MT
5630 matrix_.storeu(
column(), index, value );
5650 template<
typename MT
5655 matrix_.stream(
column(), index, value );
5673 template<
typename MT
5675 template<
typename VT >
5676 inline auto Column<MT,false,true,true,CCAs...>::assign(
const DenseVector<VT,false>& rhs )
5677 -> DisableIf_t< VectorizedAssign_v<VT> >
5681 const size_t jpos( (~rhs).
size() &
size_t(-2) );
5682 for(
size_t j=0UL; j<jpos; j+=2UL ) {
5683 matrix_(
column(),j ) = (~rhs)[j ];
5684 matrix_(
column(),j+1UL) = (~rhs)[j+1UL];
5686 if( jpos < (~rhs).size() )
5687 matrix_(
column(),jpos) = (~rhs)[jpos];
5705 template<
typename MT
5707 template<
typename VT >
5708 inline auto Column<MT,false,true,true,CCAs...>::assign(
const DenseVector<VT,false>& rhs )
5709 -> EnableIf_t< VectorizedAssign_v<VT> >
5715 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
5719 const size_t jpos( ( remainder )?(
columns &
size_t(-SIMDSIZE) ):(
columns ) );
5723 Iterator left(
begin() );
5724 ConstIterator_t<VT> right( (~rhs).
begin() );
5726 if( useStreaming &&
columns > ( cacheSize/(
sizeof(ElementType) * 3UL ) ) && !(~rhs).isAliased(
this ) )
5728 for( ; j<jpos; j+=SIMDSIZE ) {
5729 left.stream( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5731 for( ; remainder && j<
columns; ++j ) {
5732 *left = *right; ++left; ++right;
5737 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
5738 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5739 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5740 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5741 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5743 for( ; j<jpos; j+=SIMDSIZE ) {
5744 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5746 for( ; remainder && j<
columns; ++j ) {
5747 *left = *right; ++left; ++right;
5767 template<
typename MT
5769 template<
typename VT >
5770 inline void Column<MT,false,true,true,CCAs...>::assign(
const SparseVector<VT,false>& rhs )
5774 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
5775 matrix_(
column(),element->index()) = element->value();
5793 template<
typename MT
5795 template<
typename VT >
5796 inline auto Column<MT,false,true,true,CCAs...>::addAssign(
const DenseVector<VT,false>& rhs )
5797 -> DisableIf_t< VectorizedAddAssign_v<VT> >
5801 const size_t jpos( (~rhs).
size() &
size_t(-2) );
5802 for(
size_t j=0UL; j<jpos; j+=2UL ) {
5803 matrix_(
column(),j ) += (~rhs)[j ];
5804 matrix_(
column(),j+1UL) += (~rhs)[j+1UL];
5806 if( jpos < (~rhs).size() )
5807 matrix_(
column(),jpos) += (~rhs)[jpos];
5825 template<
typename MT
5827 template<
typename VT >
5828 inline auto Column<MT,false,true,true,CCAs...>::addAssign(
const DenseVector<VT,false>& rhs )
5829 -> EnableIf_t< VectorizedAddAssign_v<VT> >
5835 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
5839 const size_t jpos( ( remainder )?(
columns &
size_t(-SIMDSIZE) ):(
columns ) );
5843 Iterator left(
begin() );
5844 ConstIterator_t<VT> right( (~rhs).
begin() );
5846 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
5847 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5848 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5849 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5850 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5852 for( ; j<jpos; j+=SIMDSIZE ) {
5853 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5855 for( ; remainder && j<
columns; ++j ) {
5856 *left += *right; ++left; ++right;
5875 template<
typename MT
5877 template<
typename VT >
5878 inline void Column<MT,false,true,true,CCAs...>::addAssign(
const SparseVector<VT,false>& rhs )
5882 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
5883 matrix_(
column(),element->index()) += element->value();
5901 template<
typename MT
5903 template<
typename VT >
5904 inline auto Column<MT,false,true,true,CCAs...>::subAssign(
const DenseVector<VT,false>& rhs )
5905 -> DisableIf_t< VectorizedSubAssign_v<VT> >
5909 const size_t jpos( (~rhs).
size() &
size_t(-2) );
5910 for(
size_t j=0UL; j<jpos; j+=2UL ) {
5911 matrix_(
column(),j ) -= (~rhs)[j ];
5912 matrix_(
column(),j+1UL) -= (~rhs)[j+1UL];
5914 if( jpos < (~rhs).size() )
5915 matrix_(
column(),jpos) -= (~rhs)[jpos];
5933 template<
typename MT
5935 template<
typename VT >
5936 inline auto Column<MT,false,true,true,CCAs...>::subAssign(
const DenseVector<VT,false>& rhs )
5937 -> EnableIf_t< VectorizedSubAssign_v<VT> >
5943 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
5947 const size_t jpos( ( remainder )?(
columns &
size_t(-SIMDSIZE) ):(
columns ) );
5951 Iterator left(
begin() );
5952 ConstIterator_t<VT> right( (~rhs).
begin() );
5954 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
5955 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5956 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5957 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5958 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5960 for( ; j<jpos; j+=SIMDSIZE ) {
5961 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5963 for( ; remainder && j<
columns; ++j ) {
5964 *left -= *right; ++left; ++right;
5983 template<
typename MT
5985 template<
typename VT >
5986 inline void Column<MT,false,true,true,CCAs...>::subAssign(
const SparseVector<VT,false>& rhs )
5990 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
5991 matrix_(
column(),element->index()) -= element->value();
6009 template<
typename MT
6011 template<
typename VT >
6012 inline auto Column<MT,false,true,true,CCAs...>::multAssign(
const DenseVector<VT,false>& rhs )
6013 -> DisableIf_t< VectorizedMultAssign_v<VT> >
6017 const size_t jpos( (~rhs).
size() &
size_t(-2) );
6018 for(
size_t j=0UL; j<jpos; j+=2UL ) {
6019 matrix_(
column(),j ) *= (~rhs)[j ];
6020 matrix_(
column(),j+1UL) *= (~rhs)[j+1UL];
6022 if( jpos < (~rhs).size() )
6023 matrix_(
column(),jpos) *= (~rhs)[jpos];
6041 template<
typename MT
6043 template<
typename VT >
6044 inline auto Column<MT,false,true,true,CCAs...>::multAssign(
const DenseVector<VT,false>& rhs )
6045 -> EnableIf_t< VectorizedMultAssign_v<VT> >
6051 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
6055 const size_t jpos( ( remainder )?(
columns &
size_t(-SIMDSIZE) ):(
columns ) );
6059 Iterator left(
begin() );
6060 ConstIterator_t<VT> right( (~rhs).
begin() );
6062 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
6063 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6064 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6065 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6066 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6068 for( ; j<jpos; j+=SIMDSIZE ) {
6069 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6071 for( ; remainder && j<
columns; ++j ) {
6072 *left *= *right; ++left; ++right;
6091 template<
typename MT
6093 template<
typename VT >
6094 inline void Column<MT,false,true,true,CCAs...>::multAssign(
const SparseVector<VT,false>& rhs )
6102 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
6103 const size_t index( element->index() );
6104 for( ; j<index; ++j )
6106 matrix_(
column(),j) *= element->value();
6110 for( ; j<
size(); ++j ) {
6130 template<
typename MT
6132 template<
typename VT >
6133 inline auto Column<MT,false,true,true,CCAs...>::divAssign(
const DenseVector<VT,false>& rhs )
6134 -> DisableIf_t< VectorizedDivAssign_v<VT> >
6138 const size_t jpos( (~rhs).
size() &
size_t(-2) );
6139 for(
size_t j=0UL; j<jpos; j+=2UL ) {
6140 matrix_(
column(),j ) /= (~rhs)[j ];
6141 matrix_(
column(),j+1UL) /= (~rhs)[j+1UL];
6143 if( jpos < (~rhs).size() )
6144 matrix_(
column(),jpos) /= (~rhs)[jpos];
6162 template<
typename MT
6164 template<
typename VT >
6165 inline auto Column<MT,false,true,true,CCAs...>::divAssign(
const DenseVector<VT,false>& rhs )
6166 -> EnableIf_t< VectorizedDivAssign_v<VT> >
6174 const size_t jpos(
columns &
size_t(-SIMDSIZE) );
6178 Iterator left(
begin() );
6179 ConstIterator_t<VT> right( (~rhs).
begin() );
6181 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
6182 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6183 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6184 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6185 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6187 for( ; j<jpos; j+=SIMDSIZE ) {
6188 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6191 *left /= *right; ++left; ++right;
Constraint on the data type.
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Constraint on the data type.
Header file for auxiliary alias declarations.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:133
Header file for the blaze::checked and blaze::unchecked instances.
auto operator-=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Subtraction assignment operator for the subtraction of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:432
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression,...
Definition: Assert.h:117
Header file for the IsUniUpper type trait.
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:546
Header file for basic type definitions.
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:750
MT::ElementType * data(DenseMatrix< MT, SO > &dm) noexcept
Low-level data access to the dense matrix elements.
Definition: DenseMatrix.h:170
Header file for the View base class.
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a column dense or sparse vector type...
Definition: ColumnVector.h:61
constexpr bool IsSIMDCombinable_v
Auxiliary variable template for the IsSIMDCombinable type trait.The IsSIMDCombinable_v variable templ...
Definition: IsSIMDCombinable.h:137
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.In case the given data type T is a computational expression (i....
Definition: Computation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type,...
Definition: DenseMatrix.h:61
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
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:76
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
Header file for the implementation of the Column base template.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
constexpr bool IsUniUpper_v
Auxiliary variable template for the IsUniUpper type trait.The IsUniUpper_v variable template provides...
Definition: IsUniUpper.h:173
Header file for the DenseVector base class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SUBMATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a submatrix type (i.e....
Definition: Submatrix.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNITRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower or upper unitriangular matrix ty...
Definition: UniTriangular.h:81
constexpr bool IsReference_v
Auxiliary variable template for the IsReference type trait.The IsReference_v variable template provid...
Definition: IsReference.h:95
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:584
#define BLAZE_CONSTRAINT_MUST_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a symmetric matrix type,...
Definition: Symmetric.h:60
Header file for the reset shim.
constexpr bool HasSIMDAdd_v
Auxiliary variable template for the HasSIMDAdd type trait.The HasSIMDAdd_v variable template provides...
Definition: HasSIMDAdd.h:187
Constraints on the storage order of matrix types.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSEXPR_TYPE(T)
Constraint on the data type.In case the given data type T is a transposition expression (i....
Definition: TransExpr.h:81
BLAZE_ALWAYS_INLINE EnableIf_t< IsIntegral_v< T1 > &&HasSize_v< T1, 1UL > > storeu(T1 *address, const SIMDi8< T2 > &value) noexcept
Unaligned store of a vector of 1-byte integral values.
Definition: Storeu.h:75
constexpr bool IsLower_v
Auxiliary variable template for the IsLower type trait.The IsLower_v variable template provides a con...
Definition: IsLower.h:175
Header file for the extended initializer_list functionality.
System settings for performance optimizations.
Header file for the IsUniLower type trait.
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
constexpr bool IsStrictlyLower_v
Auxiliary variable template for the IsStrictlyLower type trait.The IsStrictlyLower_v variable templat...
Definition: IsStrictlyLower.h:173
MT::ConstIterator cend(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:482
MT::ConstIterator cbegin(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:416
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
auto smpDivAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP division assignment of a vector to a dense vector.
Definition: DenseVector.h:220
Constraint on the data type.
size_t spacing(const DenseMatrix< MT, SO > &dm) noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: DenseMatrix.h:253
Constraint on the transpose flag of vector types.
Constraint on the data type.
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
typename ColumnTrait< MT, CCAs... >::Type ColumnTrait_t
Auxiliary alias declaration for the ColumnTrait type trait.The ColumnTrait_t alias declaration provid...
Definition: ColumnTrait.h:170
Header file for the DisableIf class template.
Header file for the IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
constexpr bool IsStrictlyUpper_v
Auxiliary variable template for the IsStrictlyUpper type trait.The IsStrictlyUpper_v variable templat...
Definition: IsStrictlyUpper.h:173
Header file for the If class template.
Header file for the implementation of a vector representation of an initializer list.
constexpr bool IsExpression_v
Auxiliary variable template for the IsExpression type trait.The IsExpression_v variable template prov...
Definition: IsExpression.h:130
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a column-major dense or sparse matri...
Definition: ColumnMajorMatrix.h:61
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:9091
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
constexpr bool HasSIMDSub_v
Auxiliary variable template for the HasSIMDSub type trait.The HasSIMDSub_v variable template provides...
Definition: HasSIMDSub.h:187
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the HasSIMDAdd type trait.
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 > &, const T &rhs)
Greater-or-equal-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:446
auto operator+=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Addition assignment operator for the addition of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.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
Header file for all SIMD functionality.
constexpr bool Contains_v
Auxiliary variable template for the Contains type trait.The Contains_v variable template provides a c...
Definition: Contains.h:138
Header file for the IsLower type trait.
BLAZE_ALWAYS_INLINE EnableIf_t< IsIntegral_v< T1 > &&HasSize_v< T1, 1UL > > storea(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned store of a vector of 1-byte integral values.
Definition: Storea.h:78
Constraint on the data type.
Header file for the IsTriangular type trait.
#define BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE(T)
Constraint on the data type.In case the given data type T is not a vectorizable data type,...
Definition: Vectorizable.h:61
Constraint on the data type.
Header file for the exception macros of the math module.
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:438
constexpr bool HasSIMDDiv_v
Auxiliary variable template for the HasSIMDDiv type trait.The HasSIMDDiv_v variable template provides...
Definition: HasSIMDDiv.h:171
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
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:615
Header file for the IsPadded type trait.
Constraint on the data type.
auto operator/=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Division assignment operator for the division of a dense matrix by a scalar value ( ).
Definition: DenseMatrix.h:558
Header file for the IsSIMDCombinable type trait.
Header file for the IsSparseVector type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type,...
Definition: Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: RowMajorMatrix.h:61
Header file for the HasSIMDMult type trait.
Header file for the IsConst type trait.
Header file for run time assertion macros.
Header file for the cross product trait.
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
Header file for the Unique class template.
Check< false > Unchecked
Type of the blaze::unchecked instance.blaze::Unchecked is the type of the blaze::unchecked instance,...
Definition: Check.h:96
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:133
constexpr bool IsUniLower_v
Auxiliary variable template for the IsUniLower type trait.The IsUniLower_v variable template provides...
Definition: IsUniLower.h:173
Header file for the cache size of the target architecture.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type,...
Definition: Reference.h:79
Header file for the column trait.
Header file for the isDefault shim.
constexpr bool IsUpper_v
Auxiliary variable template for the IsUpper type trait.The IsUpper_v variable template provides a con...
Definition: IsUpper.h:175
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
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
Constraint on the data type.
Constraint on the data type.
Header file for the HasSIMDSub type trait.
Constraints on the storage order of matrix types.
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
Header file for the HasMutableDataAccess type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
Header file for the IsReference type trait.
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
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:718
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loada(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loada.h:79
BLAZE_ALWAYS_INLINE EnableIf_t< IsIntegral_v< T1 > &&HasSize_v< T1, 1UL > > stream(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned, non-temporal store of a vector of 1-byte integral values.
Definition: Stream.h:74
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type,...
Definition: DenseVector.h:61
Header file for the HasSIMDDiv type trait.
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
constexpr bool HasSIMDMult_v
Auxiliary variable template for the HasSIMDMult type trait.The HasSIMDMult_v variable template provid...
Definition: HasSIMDMult.h:188
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:264
auto operator *=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:494
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:635
Header file for the IsUpper type trait.
typename DisableIf< Condition, T >::Type DisableIf_t
Auxiliary type for the DisableIf class template.The DisableIf_t alias declaration provides a convenie...
Definition: DisableIf.h:138
Header file for the implementation of the ColumnData class template.
Header file for the IsRestricted type trait.
System settings for the inline keywords.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
Definition: Assert.h:101
auto smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) -> EnableIf_t< IsDenseVector_v< VT1 > >
Default implementation of the SMP multiplication assignment of a vector to a dense vector.
Definition: DenseVector.h:191
Header file for the clear shim.
Header file for the IsExpression type trait class.
Constraint on the data type.