35 #ifndef _BLAZE_MATH_VIEWS_ROW_DENSE_H_ 36 #define _BLAZE_MATH_VIEWS_ROW_DENSE_H_ 121 template<
typename MT
124 class Row<MT,true,true,SF,CRAs...>
125 :
public View< DenseVector< Row<MT,true,true,SF,CRAs...>, true > >
126 ,
private RowData<CRAs...>
130 using DataType = RowData<CRAs...>;
131 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
137 using This = Row<MT,
true,
true,SF,CRAs...>;
139 using BaseType = DenseVector<This,true>;
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 Row&;
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... RRAs >
182 explicit inline Row( MT& matrix, RRAs... args );
184 Row(
const Row& ) =
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 Row& operator=( const ElementType& rhs );
217 inline Row& operator=( initializer_list<ElementType> list );
218 inline Row& operator=( const Row& rhs );
220 template< typename VT > inline Row& operator= ( const Vector<VT,true>& rhs );
221 template< typename VT > inline Row& operator+=( const Vector<VT,true>& rhs );
222 template< typename VT > inline Row& operator-=( const Vector<VT,true>& rhs );
223 template< typename VT > inline Row& operator*=( const Vector<VT,true>& rhs );
224 template< typename VT > inline Row& operator/=( const DenseVector<VT,true>& rhs );
225 template< typename VT > inline Row& operator%=( const Vector<VT,true>& 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 Row& 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... CRAs2 >
315 inline
bool canAlias( const Row<MT2,SO2,true,SF2,CRAs2...>* 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... CRAs2 >
321 inline
bool isAliased( const Row<MT2,SO2,true,SF2,CRAs2...>* 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,true>& rhs ) ->
DisableIf_t< VectorizedAssign_v<VT> >;
338 template< typename VT >
339 inline auto assign( const DenseVector<VT,true>& rhs ) ->
EnableIf_t< VectorizedAssign_v<VT> >;
341 template< typename VT > inline
void assign( const SparseVector<VT,true>& rhs );
343 template< typename VT >
344 inline auto addAssign( const DenseVector<VT,true>& rhs ) ->
DisableIf_t< VectorizedAddAssign_v<VT> >;
346 template< typename VT >
347 inline auto addAssign( const DenseVector<VT,true>& rhs ) ->
EnableIf_t< VectorizedAddAssign_v<VT> >;
349 template< typename VT > inline
void addAssign( const SparseVector<VT,true>& rhs );
351 template< typename VT >
352 inline auto subAssign( const DenseVector<VT,true>& rhs ) ->
DisableIf_t< VectorizedSubAssign_v<VT> >;
354 template< typename VT >
355 inline auto subAssign( const DenseVector<VT,true>& rhs ) ->
EnableIf_t< VectorizedSubAssign_v<VT> >;
357 template< typename VT > inline
void subAssign( const SparseVector<VT,true>& rhs );
359 template< typename VT >
360 inline auto multAssign( const DenseVector<VT,true>& rhs ) ->
DisableIf_t< VectorizedMultAssign_v<VT> >;
362 template< typename VT >
363 inline auto multAssign( const DenseVector<VT,true>& rhs ) ->
EnableIf_t< VectorizedMultAssign_v<VT> >;
365 template< typename VT > inline
void multAssign( const SparseVector<VT,true>& rhs );
367 template< typename VT >
368 inline auto divAssign( const DenseVector<VT,true>& rhs ) ->
DisableIf_t< VectorizedDivAssign_v<VT> >;
370 template< typename VT >
371 inline auto divAssign( const DenseVector<VT,true>& rhs ) ->
EnableIf_t< VectorizedDivAssign_v<VT> >;
384 template< typename MT2,
bool SO2,
bool DF2,
bool SF2,
size_t... CRAs2 > friend class Row;
422 template< typename MT
425 template< typename... RRAs >
426 inline Row<MT,true,true,SF,CRAs...>::Row( MT& matrix, RRAs... args )
427 : DataType( args... )
431 if( matrix_.rows() <=
row() ) {
461 template<
typename MT
464 inline typename Row<MT,
true,
true,SF,CRAs...>::Reference
465 Row<MT,true,true,SF,CRAs...>::operator[](
size_t index )
468 return matrix_(
row(),index);
484 template<
typename MT
487 inline typename Row<MT,
true,
true,SF,CRAs...>::ConstReference
488 Row<MT,true,true,SF,CRAs...>::operator[](
size_t index )
const 491 return const_cast<const MT&>( matrix_ )(
row(),index);
508 template<
typename MT
511 inline typename Row<MT,
true,
true,SF,CRAs...>::Reference
512 Row<MT,true,true,SF,CRAs...>::at(
size_t index )
514 if( index >=
size() ) {
517 return (*
this)[index];
534 template<
typename MT
537 inline typename Row<MT,
true,
true,SF,CRAs...>::ConstReference
538 Row<MT,true,true,SF,CRAs...>::at(
size_t index )
const 540 if( index >=
size() ) {
543 return (*
this)[index];
558 template<
typename MT
561 inline typename Row<MT,
true,
true,SF,CRAs...>::Pointer
564 return matrix_.data(
row() );
579 template<
typename MT
582 inline typename Row<MT,
true,
true,SF,CRAs...>::ConstPointer
585 return matrix_.data(
row() );
599 template<
typename MT
602 inline typename Row<MT,
true,
true,SF,CRAs...>::Iterator
605 return matrix_.begin(
row() );
619 template<
typename MT
622 inline typename Row<MT,
true,
true,SF,CRAs...>::ConstIterator
625 return matrix_.cbegin(
row() );
639 template<
typename MT
642 inline typename Row<MT,
true,
true,SF,CRAs...>::ConstIterator
645 return matrix_.cbegin(
row() );
659 template<
typename MT
662 inline typename Row<MT,
true,
true,SF,CRAs...>::Iterator
665 return matrix_.end(
row() );
679 template<
typename MT
682 inline typename Row<MT,
true,
true,SF,CRAs...>::ConstIterator
685 return matrix_.cend(
row() );
699 template<
typename MT
702 inline typename Row<MT,
true,
true,SF,CRAs...>::ConstIterator
705 return matrix_.cend(
row() );
730 template<
typename MT
733 inline Row<MT,
true,
true,SF,CRAs...>&
734 Row<MT,true,true,SF,CRAs...>::operator=(
const ElementType& rhs )
736 decltype(
auto) left( derestrict( matrix_ ) );
749 for(
size_t j=jbegin; j<jend; ++j ) {
750 if( !IsRestricted_v<MT> || IsTriangular_v<MT> || trySet( matrix_,
row(), j, rhs ) )
775 template<
typename MT
778 inline Row<MT,
true,
true,SF,CRAs...>&
779 Row<MT,true,true,SF,CRAs...>::operator=( initializer_list<ElementType> list )
781 if( list.size() >
size() ) {
785 if( IsRestricted_v<MT> ) {
786 const InitializerVector<ElementType,true> tmp( list,
size() );
787 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
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 Row<MT,true,true,SF,CRAs...>&
822 Row<MT,true,true,SF,CRAs...>::operator=( const Row& rhs )
824 if( &rhs ==
this )
return *
this;
826 if(
size() != rhs.size() ) {
830 if( !tryAssign( matrix_, rhs,
row(), 0UL ) ) {
834 decltype(
auto) left( derestrict( *this ) );
837 const ResultType tmp( rhs );
866 template<
typename MT
869 template<
typename VT >
870 inline Row<MT,
true,
true,SF,CRAs...>&
871 Row<MT,true,true,SF,CRAs...>::operator=(
const Vector<VT,true>& rhs )
880 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
883 if( !tryAssign( matrix_, right,
row(), 0UL ) ) {
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 Row<MT,
true,
true,SF,CRAs...>&
935 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
938 if( !tryAddAssign( matrix_, right,
row(), 0UL ) ) {
942 decltype(
auto) left( derestrict( *this ) );
945 const ResultType_t<VT> tmp( right );
974 template<
typename MT
977 template<
typename VT >
978 inline Row<MT,
true,
true,SF,CRAs...>&
988 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
991 if( !trySubAssign( matrix_, right,
row(), 0UL ) ) {
995 decltype(
auto) left( derestrict( *this ) );
998 const ResultType_t<VT> tmp( right );
1026 template<
typename MT
1029 template<
typename VT >
1030 inline Row<MT,
true,
true,SF,CRAs...>&
1040 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
1041 Right right( ~rhs );
1043 if( !tryMultAssign( matrix_, right,
row(), 0UL ) ) {
1047 decltype(
auto) left( derestrict( *this ) );
1050 const ResultType_t<VT> tmp( right );
1077 template<
typename MT
1080 template<
typename VT >
1081 inline Row<MT,
true,
true,SF,CRAs...>&
1091 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
1092 Right right( ~rhs );
1094 if( !tryDivAssign( matrix_, right,
row(), 0UL ) ) {
1098 decltype(
auto) left( derestrict( *this ) );
1101 const ResultType_t<VT> tmp( right );
1129 template<
typename MT
1132 template<
typename VT >
1133 inline Row<MT,
true,
true,SF,CRAs...>&
1134 Row<MT,true,true,SF,CRAs...>::operator%=(
const Vector<VT,true>& 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,
row(), 0UL ) ) {
1157 decltype(
auto) left( derestrict( *this ) );
1159 assign( left, right );
1183 template< typename MT
1186 inline MT& Row<MT,true,true,SF,CRAs...>::operand() noexcept
1200 template<
typename MT
1203 inline const MT& Row<MT,true,true,SF,CRAs...>::operand() const noexcept
1217 template<
typename MT
1222 return matrix_.columns();
1237 template<
typename MT
1242 return matrix_.spacing();
1254 template<
typename MT
1259 return matrix_.capacity(
row() );
1274 template<
typename MT
1279 return matrix_.nonZeros(
row() );
1291 template<
typename MT
1296 matrix_.reset(
row() );
1323 template<
typename MT
1326 template<
typename Other >
1327 inline Row<MT,
true,
true,SF,CRAs...>&
1328 Row<MT,true,true,SF,CRAs...>::scale(
const Other& scalar )
1332 const size_t jbegin( ( IsUpper_v<MT> )
1333 ?( ( IsStrictlyUpper_v<MT> )
1337 const size_t jend ( ( IsLower_v<MT> )
1338 ?( ( IsStrictlyLower_v<MT> )
1343 for(
size_t j=jbegin; j<jend; ++j ) {
1344 matrix_(
row(),j) *= scalar;
1372 template<
typename MT
1375 template<
typename Other >
1376 inline bool Row<MT,true,true,SF,CRAs...>::canAlias(
const Other* alias )
const noexcept
1378 return matrix_.isAliased( alias );
1395 template<
typename MT
1398 template<
typename MT2
1403 Row<MT,true,true,SF,CRAs...>::canAlias(
const Row<MT2,SO2,true,SF2,CRAs2...>* alias )
const noexcept
1405 return matrix_.isAliased( &alias->matrix_ ) && (
row() == alias->row() );
1422 template<
typename MT
1425 template<
typename Other >
1426 inline bool Row<MT,true,true,SF,CRAs...>::isAliased(
const Other* alias )
const noexcept
1428 return matrix_.isAliased( alias );
1445 template<
typename MT
1448 template<
typename MT2
1453 Row<MT,true,true,SF,CRAs...>::isAliased(
const Row<MT2,SO2,true,SF2,CRAs2...>* alias )
const noexcept
1455 return matrix_.isAliased( &alias->matrix_ ) && (
row() == alias->row() );
1471 template<
typename MT
1474 inline bool Row<MT,true,true,SF,CRAs...>::isAligned() const noexcept
1476 return matrix_.isAligned();
1493 template<
typename MT
1496 inline bool Row<MT,true,true,SF,CRAs...>::canSMPAssign() const noexcept
1498 return (
size() > SMP_DVECASSIGN_THRESHOLD );
1517 template<
typename MT
1521 Row<MT,true,true,SF,CRAs...>::load(
size_t index )
const noexcept
1523 return matrix_.load(
row(), index );
1542 template<
typename MT
1548 return matrix_.loada(
row(), index );
1567 template<
typename MT
1573 return matrix_.loadu(
row(), index );
1593 template<
typename MT
1597 Row<MT,true,true,SF,CRAs...>::store(
size_t index,
const SIMDType& value ) noexcept
1599 matrix_.store(
row(), index, value );
1619 template<
typename MT
1625 matrix_.storea(
row(), index, value );
1645 template<
typename MT
1651 matrix_.storeu(
row(), index, value );
1671 template<
typename MT
1677 matrix_.stream(
row(), index, value );
1695 template<
typename MT
1698 template<
typename VT >
1699 inline auto Row<MT,true,true,SF,CRAs...>::assign(
const DenseVector<VT,true>& rhs )
1700 -> DisableIf_t< VectorizedAssign_v<VT> >
1704 const size_t jpos( (~rhs).
size() &
size_t(-2) );
1705 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1706 matrix_(
row(),j ) = (~rhs)[j ];
1707 matrix_(
row(),j+1UL) = (~rhs)[j+1UL];
1709 if( jpos < (~rhs).size() )
1710 matrix_(
row(),jpos) = (~rhs)[jpos];
1728 template<
typename MT
1731 template<
typename VT >
1732 inline auto Row<MT,true,true,SF,CRAs...>::assign(
const DenseVector<VT,true>& rhs )
1733 -> EnableIf_t< VectorizedAssign_v<VT> >
1739 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
1743 const size_t jpos( ( remainder )?(
columns &
size_t(-SIMDSIZE) ):(
columns ) );
1747 Iterator left(
begin() );
1748 ConstIterator_t<VT> right( (~rhs).
begin() );
1750 if( useStreaming &&
columns > ( cacheSize/(
sizeof(ElementType) * 3UL ) ) && !(~rhs).isAliased( &matrix_ ) )
1752 for( ; j<jpos; j+=SIMDSIZE ) {
1753 left.stream( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1755 for( ; remainder && j<
columns; ++j ) {
1756 *left = *right; ++left; ++right;
1761 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
1762 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1763 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1764 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1765 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1767 for( ; j<jpos; j+=SIMDSIZE ) {
1768 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1770 for( ; remainder && j<
columns; ++j ) {
1771 *left = *right; ++left; ++right;
1791 template<
typename MT
1794 template<
typename VT >
1795 inline void Row<MT,true,true,SF,CRAs...>::assign(
const SparseVector<VT,true>& rhs )
1799 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
1800 matrix_(
row(),element->index()) = element->value();
1818 template<
typename MT
1821 template<
typename VT >
1822 inline auto Row<MT,true,true,SF,CRAs...>::addAssign(
const DenseVector<VT,true>& rhs )
1823 -> DisableIf_t< VectorizedAddAssign_v<VT> >
1827 const size_t jpos( (~rhs).
size() &
size_t(-2) );
1828 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1829 matrix_(
row(),j ) += (~rhs)[j ];
1830 matrix_(
row(),j+1UL) += (~rhs)[j+1UL];
1832 if( jpos < (~rhs).size() )
1833 matrix_(
row(),jpos) += (~rhs)[jpos];
1851 template<
typename MT
1854 template<
typename VT >
1855 inline auto Row<MT,true,true,SF,CRAs...>::addAssign(
const DenseVector<VT,true>& rhs )
1856 -> EnableIf_t< VectorizedAddAssign_v<VT> >
1862 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
1866 const size_t jpos( ( remainder )?(
columns &
size_t(-SIMDSIZE) ):(
columns ) );
1870 Iterator left(
begin() );
1871 ConstIterator_t<VT> right( (~rhs).
begin() );
1873 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
1874 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1875 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1876 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1877 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1879 for( ; j<jpos; j+=SIMDSIZE ) {
1880 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1882 for( ; remainder && j<
columns; ++j ) {
1883 *left += *right; ++left; ++right;
1902 template<
typename MT
1905 template<
typename VT >
1906 inline void Row<MT,true,true,SF,CRAs...>::addAssign(
const SparseVector<VT,true>& rhs )
1910 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
1911 matrix_(
row(),element->index()) += element->value();
1929 template<
typename MT
1932 template<
typename VT >
1933 inline auto Row<MT,true,true,SF,CRAs...>::subAssign(
const DenseVector<VT,true>& rhs )
1934 -> DisableIf_t< VectorizedSubAssign_v<VT> >
1938 const size_t jpos( (~rhs).
size() &
size_t(-2) );
1939 for(
size_t j=0UL; j<jpos; j+=2UL ) {
1940 matrix_(
row(),j ) -= (~rhs)[j ];
1941 matrix_(
row(),j+1UL) -= (~rhs)[j+1UL];
1943 if( jpos < (~rhs).size() )
1944 matrix_(
row(),jpos) -= (~rhs)[jpos];
1962 template<
typename MT
1965 template<
typename VT >
1966 inline auto Row<MT,true,true,SF,CRAs...>::subAssign(
const DenseVector<VT,true>& rhs )
1967 -> EnableIf_t< VectorizedSubAssign_v<VT> >
1973 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
1977 const size_t jpos( ( remainder )?(
columns &
size_t(-SIMDSIZE) ):(
columns ) );
1981 Iterator left(
begin() );
1982 ConstIterator_t<VT> right( (~rhs).
begin() );
1984 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
1985 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1986 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1987 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1988 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1990 for( ; j<jpos; j+=SIMDSIZE ) {
1991 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
1993 for( ; remainder && j<
columns; ++j ) {
1994 *left -= *right; ++left; ++right;
2013 template<
typename MT
2016 template<
typename VT >
2017 inline void Row<MT,true,true,SF,CRAs...>::subAssign(
const SparseVector<VT,true>& rhs )
2021 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
2022 matrix_(
row(),element->index()) -= element->value();
2040 template<
typename MT
2043 template<
typename VT >
2044 inline auto Row<MT,true,true,SF,CRAs...>::multAssign(
const DenseVector<VT,true>& rhs )
2045 -> DisableIf_t< VectorizedMultAssign_v<VT> >
2049 const size_t jpos( (~rhs).
size() &
size_t(-2) );
2050 for(
size_t j=0UL; j<jpos; j+=2UL ) {
2051 matrix_(
row(),j ) *= (~rhs)[j ];
2052 matrix_(
row(),j+1UL) *= (~rhs)[j+1UL];
2054 if( jpos < (~rhs).size() )
2055 matrix_(
row(),jpos) *= (~rhs)[jpos];
2073 template<
typename MT
2076 template<
typename VT >
2077 inline auto Row<MT,true,true,SF,CRAs...>::multAssign(
const DenseVector<VT,true>& rhs )
2078 -> EnableIf_t< VectorizedMultAssign_v<VT> >
2084 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
2088 const size_t jpos( ( remainder )?(
columns &
size_t(-SIMDSIZE) ):(
columns ) );
2092 Iterator left(
begin() );
2093 ConstIterator_t<VT> right( (~rhs).
begin() );
2095 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2096 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2097 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2098 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2099 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2101 for( ; j<jpos; j+=SIMDSIZE ) {
2102 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2104 for( ; remainder && j<
columns; ++j ) {
2105 *left *= *right; ++left; ++right;
2124 template<
typename MT
2127 template<
typename VT >
2128 inline void Row<MT,true,true,SF,CRAs...>::multAssign(
const SparseVector<VT,true>& rhs )
2136 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
2137 const size_t index( element->index() );
2138 for( ; j<index; ++j )
2140 matrix_(
row(),j) *= element->value();
2144 for( ; j<
size(); ++j ) {
2164 template<
typename MT
2167 template<
typename VT >
2168 inline auto Row<MT,true,true,SF,CRAs...>::divAssign(
const DenseVector<VT,true>& rhs )
2169 -> DisableIf_t< VectorizedDivAssign_v<VT> >
2173 const size_t jpos( (~rhs).
size() &
size_t(-2) );
2174 for(
size_t j=0UL; j<jpos; j+=2UL ) {
2175 matrix_(
row(),j ) /= (~rhs)[j ];
2176 matrix_(
row(),j+1UL) /= (~rhs)[j+1UL];
2178 if( jpos < (~rhs).size() )
2179 matrix_(
row(),jpos) /= (~rhs)[jpos];
2197 template<
typename MT
2200 template<
typename VT >
2201 inline auto Row<MT,true,true,SF,CRAs...>::divAssign(
const DenseVector<VT,true>& rhs )
2202 -> EnableIf_t< VectorizedDivAssign_v<VT> >
2210 const size_t jpos(
columns &
size_t(-SIMDSIZE) );
2214 Iterator left(
begin() );
2215 ConstIterator_t<VT> right( (~rhs).
begin() );
2217 for( ; (j+SIMDSIZE*3UL) < jpos; j+=SIMDSIZE*4UL ) {
2218 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2219 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2220 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2221 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2223 for( ; j<jpos; j+=SIMDSIZE ) {
2224 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
2227 *left /= *right; ++left; ++right;
2254 template<
typename MT
2256 class Row<MT,false,true,false,CRAs...>
2257 :
public View< DenseVector< Row<MT,false,true,false,CRAs...>, true > >
2258 ,
private RowData<CRAs...>
2262 using DataType = RowData<CRAs...>;
2263 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
2269 using This = Row<MT,
false,
true,
false,CRAs...>;
2271 using BaseType = DenseVector<This,true>;
2272 using ViewedType = MT;
2274 using TransposeType = TransposeType_t<ResultType>;
2275 using ElementType = ElementType_t<MT>;
2276 using ReturnType = ElementType_t<MT>;
2277 using CompositeType =
const Row&;
2280 using ConstReference = ConstReference_t<MT>;
2283 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
2286 using ConstPointer = ConstPointer_t<MT>;
2289 using Pointer = If_t< IsConst_v<MT> || !HasMutableDataAccess_v<MT>, ConstPointer, Pointer_t<MT> >;
2295 template<
typename MatrixType
2296 ,
typename IteratorType >
2302 using IteratorCategory =
typename std::iterator_traits<IteratorType>::iterator_category;
2305 using ValueType =
typename std::iterator_traits<IteratorType>::value_type;
2308 using PointerType =
typename std::iterator_traits<IteratorType>::pointer;
2311 using ReferenceType =
typename std::iterator_traits<IteratorType>::reference;
2314 using DifferenceType =
typename std::iterator_traits<IteratorType>::difference_type;
2317 using iterator_category = IteratorCategory;
2318 using value_type = ValueType;
2319 using pointer = PointerType;
2320 using reference = ReferenceType;
2321 using difference_type = DifferenceType;
2327 inline RowIterator() noexcept
2328 : matrix_(
nullptr )
2342 inline RowIterator( MatrixType& matrix,
size_t row,
size_t column ) noexcept
2343 : matrix_( &matrix )
2348 if( column_ != matrix_->columns() )
2349 pos_ = matrix_->begin( column_ ) + row_;
2358 template<
typename MatrixType2,
typename IteratorType2 >
2359 inline RowIterator(
const RowIterator<MatrixType2,IteratorType2>& it ) noexcept
2360 : matrix_( it.matrix_ )
2362 , column_( it.column_ )
2373 inline RowIterator&
operator+=(
size_t inc ) noexcept {
2376 if( column_ != matrix_->columns() )
2377 pos_ = matrix_->begin( column_ ) + row_;
2389 inline RowIterator&
operator-=(
size_t dec ) noexcept {
2392 if( column_ != matrix_->columns() )
2393 pos_ = matrix_->begin( column_ ) + row_;
2404 inline RowIterator& operator++() noexcept {
2407 if( column_ != matrix_->columns() )
2408 pos_ = matrix_->begin( column_ ) + row_;
2419 inline const RowIterator operator++(
int ) noexcept {
2420 const RowIterator tmp( *
this );
2431 inline RowIterator& operator--() noexcept {
2434 if( column_ != matrix_->columns() )
2435 pos_ = matrix_->begin( column_ ) + row_;
2446 inline const RowIterator operator--(
int ) noexcept {
2447 const RowIterator tmp( *
this );
2459 inline ReferenceType operator[](
size_t index )
const {
2461 const IteratorType pos( matrix_->begin( column_+index ) + row_ );
2471 inline ReferenceType
operator*()
const {
2481 inline PointerType operator->()
const {
2492 template<
typename MatrixType2,
typename IteratorType2 >
2493 inline bool operator==(
const RowIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2494 return column_ == rhs.column_;
2504 template<
typename MatrixType2,
typename IteratorType2 >
2505 inline bool operator!=(
const RowIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2506 return !( *
this == rhs );
2516 template<
typename MatrixType2,
typename IteratorType2 >
2517 inline bool operator<(
const RowIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2518 return column_ < rhs.column_;
2528 template<
typename MatrixType2,
typename IteratorType2 >
2529 inline bool operator>(
const RowIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2530 return column_ > rhs.column_;
2540 template<
typename MatrixType2,
typename IteratorType2 >
2541 inline bool operator<=(
const RowIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2542 return column_ <= rhs.column_;
2552 template<
typename MatrixType2,
typename IteratorType2 >
2553 inline bool operator>=(
const RowIterator<MatrixType2,IteratorType2>& rhs )
const noexcept {
2554 return column_ >= rhs.column_;
2564 inline DifferenceType
operator-(
const RowIterator& rhs )
const noexcept {
2565 return column_ - rhs.column_;
2576 friend inline const RowIterator
operator+(
const RowIterator& it,
size_t inc ) noexcept {
2577 return RowIterator( *it.matrix_, it.row_, it.column_+inc );
2588 friend inline const RowIterator
operator+(
size_t inc,
const RowIterator& it ) noexcept {
2589 return RowIterator( *it.matrix_, it.row_, it.column_+inc );
2600 friend inline const RowIterator
operator-(
const RowIterator& it,
size_t dec ) noexcept {
2601 return RowIterator( *it.matrix_, it.row_, it.column_-dec );
2607 MatrixType* matrix_;
2614 template<
typename MatrixType2,
typename IteratorType2 >
friend class RowIterator;
2621 using ConstIterator = RowIterator< const MT, ConstIterator_t<MT> >;
2624 using Iterator = If_t< IsConst_v<MT>, ConstIterator, RowIterator< MT, Iterator_t<MT> > >;
2629 static constexpr
bool simdEnabled =
false;
2632 static constexpr
bool smpAssignable = MT::smpAssignable;
2635 static constexpr
bool compileTimeArgs = DataType::compileTimeArgs;
2641 template<
typename... RRAs >
2642 explicit inline Row( MT& matrix, RRAs... args );
2644 Row(
const Row& ) =
default;
2658 inline Reference operator[](
size_t index );
2659 inline ConstReference operator[](
size_t index )
const;
2660 inline Reference at(
size_t index );
2661 inline ConstReference at(
size_t index )
const;
2662 inline Pointer
data () noexcept;
2663 inline ConstPointer
data () const noexcept;
2664 inline Iterator
begin ();
2665 inline ConstIterator
begin () const;
2666 inline ConstIterator
cbegin() const;
2667 inline Iterator
end ();
2668 inline ConstIterator
end () const;
2669 inline ConstIterator
cend () const;
2676 inline Row& operator=( const ElementType& rhs );
2677 inline Row& operator=( initializer_list<ElementType> list );
2678 inline Row& operator=( const Row& rhs );
2680 template< typename VT > inline Row& operator= ( const Vector<VT,true>& rhs );
2681 template< typename VT > inline Row& operator+=( const Vector<VT,true>& rhs );
2682 template< typename VT > inline Row& operator-=( const Vector<VT,true>& rhs );
2683 template< typename VT > inline Row& operator*=( const Vector<VT,true>& rhs );
2684 template< typename VT > inline Row& operator/=( const DenseVector<VT,true>& rhs );
2685 template< typename VT > inline Row& operator%=( const Vector<VT,true>& rhs );
2692 using DataType::
row;
2694 inline MT& operand() noexcept;
2695 inline const MT& operand() const noexcept;
2697 inline
size_t size() const noexcept;
2698 inline
size_t spacing() const noexcept;
2699 inline
size_t capacity() const noexcept;
2701 inline
void reset();
2708 template< typename Other > inline Row& scale( const Other& scalar );
2715 template< typename Other >
2716 inline
bool canAlias( const Other* alias ) const noexcept;
2718 template< typename MT2,
bool SO2,
bool SF2,
size_t... CRAs2 >
2719 inline
bool canAlias( const Row<MT2,SO2,true,SF2,CRAs2...>* alias ) const noexcept;
2721 template< typename Other >
2722 inline
bool isAliased( const Other* alias ) const noexcept;
2724 template< typename MT2,
bool SO2,
bool SF2,
size_t... CRAs2 >
2725 inline
bool isAliased( const Row<MT2,SO2,true,SF2,CRAs2...>* alias ) const noexcept;
2727 inline
bool isAligned () const noexcept;
2728 inline
bool canSMPAssign() const noexcept;
2730 template< typename VT > inline
void assign ( const DenseVector <VT,true>& rhs );
2731 template< typename VT > inline
void assign ( const SparseVector<VT,true>& rhs );
2732 template< typename VT > inline
void addAssign ( const DenseVector <VT,true>& rhs );
2733 template< typename VT > inline
void addAssign ( const SparseVector<VT,true>& rhs );
2734 template< typename VT > inline
void subAssign ( const DenseVector <VT,true>& rhs );
2735 template< typename VT > inline
void subAssign ( const SparseVector<VT,true>& rhs );
2736 template< typename VT > inline
void multAssign( const DenseVector <VT,true>& rhs );
2737 template< typename VT > inline
void multAssign( const SparseVector<VT,true>& rhs );
2738 template< typename VT > inline
void divAssign ( const DenseVector <VT,true>& rhs );
2751 template< typename MT2,
bool SO2,
bool DF2,
bool SF2,
size_t... CRAs2 > friend class Row;
2790 template< typename MT
2792 template< typename... RRAs >
2793 inline Row<MT,false,true,false,CRAs...>::Row( MT& matrix, RRAs... args )
2794 : DataType( args... )
2795 , matrix_ ( matrix )
2798 if( matrix_.rows() <=
row() ) {
2828 template<
typename MT
2830 inline typename Row<MT,
false,
true,
false,CRAs...>::Reference
2831 Row<MT,false,true,false,CRAs...>::operator[](
size_t index )
2834 return matrix_(
row(),index);
2850 template<
typename MT
2852 inline typename Row<MT,
false,
true,
false,CRAs...>::ConstReference
2853 Row<MT,false,true,false,CRAs...>::operator[](
size_t index )
const 2856 return const_cast<const MT&>( matrix_ )(
row(),index);
2873 template<
typename MT
2875 inline typename Row<MT,
false,
true,
false,CRAs...>::Reference
2876 Row<MT,false,true,false,CRAs...>::at(
size_t index )
2878 if( index >=
size() ) {
2881 return (*
this)[index];
2898 template<
typename MT
2900 inline typename Row<MT,
false,
true,
false,CRAs...>::ConstReference
2901 Row<MT,false,true,false,CRAs...>::at(
size_t index )
const 2903 if( index >=
size() ) {
2906 return (*
this)[index];
2921 template<
typename MT
2923 inline typename Row<MT,
false,
true,
false,CRAs...>::Pointer
2926 return matrix_.data() +
row();
2941 template<
typename MT
2943 inline typename Row<MT,
false,
true,
false,CRAs...>::ConstPointer
2946 return matrix_.data() +
row();
2960 template<
typename MT
2962 inline typename Row<MT,
false,
true,
false,CRAs...>::Iterator
2965 return Iterator( matrix_,
row(), 0UL );
2979 template<
typename MT
2981 inline typename Row<MT,
false,
true,
false,CRAs...>::ConstIterator
2984 return ConstIterator( matrix_,
row(), 0UL );
2998 template<
typename MT
3000 inline typename Row<MT,
false,
true,
false,CRAs...>::ConstIterator
3003 return ConstIterator( matrix_,
row(), 0UL );
3017 template<
typename MT
3019 inline typename Row<MT,
false,
true,
false,CRAs...>::Iterator
3022 return Iterator( matrix_,
row(),
size() );
3036 template<
typename MT
3038 inline typename Row<MT,
false,
true,
false,CRAs...>::ConstIterator
3041 return ConstIterator( matrix_,
row(),
size() );
3055 template<
typename MT
3057 inline typename Row<MT,
false,
true,
false,CRAs...>::ConstIterator
3060 return ConstIterator( matrix_,
row(),
size() );
3085 template<
typename MT
3087 inline Row<MT,
false,
true,
false,CRAs...>&
3088 Row<MT,false,true,false,CRAs...>::operator=(
const ElementType& rhs )
3090 decltype(
auto) left( derestrict( matrix_ ) );
3103 for(
size_t j=jbegin; j<jend; ++j ) {
3104 if( !IsRestricted_v<MT> || IsTriangular_v<MT> || trySet( matrix_,
row(), j, rhs ) )
3105 left(
row(),j) = rhs;
3129 template<
typename MT
3131 inline Row<MT,
false,
true,
false,CRAs...>&
3132 Row<MT,false,true,false,CRAs...>::operator=( initializer_list<ElementType> list )
3134 if( list.size() >
size() ) {
3138 if( IsRestricted_v<MT> ) {
3139 const InitializerVector<ElementType,true> tmp( list,
size() );
3140 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
3145 decltype(
auto) left( derestrict( *this ) );
3147 std::fill( std::copy( list.
begin(), list.
end(), left.
begin() ), left.
end(), ElementType() );
3171 template< typename MT
3173 inline Row<MT,false,true,false,CRAs...>&
3174 Row<MT,false,true,false,CRAs...>::operator=( const Row& rhs )
3176 if( &rhs ==
this )
return *
this;
3178 if(
size() != rhs.size() ) {
3182 if( !tryAssign( matrix_, rhs,
row(), 0UL ) ) {
3186 decltype(
auto) left( derestrict( *this ) );
3189 const ResultType tmp( rhs );
3218 template<
typename MT
3220 template<
typename VT >
3221 inline Row<MT,
false,
true,
false,CRAs...>&
3222 Row<MT,false,true,false,CRAs...>::operator=(
const Vector<VT,true>& rhs )
3232 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
3233 Right right( ~rhs );
3235 if( !tryAssign( matrix_, right,
row(), 0UL ) ) {
3239 decltype(
auto) left( derestrict( *this ) );
3242 const ResultType tmp( right );
3246 if( IsSparseVector_v<VT> )
3273 template<
typename MT
3275 template<
typename VT >
3276 inline Row<MT,
false,
true,
false,CRAs...>&
3286 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
3287 Right right( ~rhs );
3289 if( !tryAddAssign( matrix_, right,
row(), 0UL ) ) {
3293 decltype(
auto) left( derestrict( *this ) );
3296 const ResultType_t<VT> tmp( right );
3325 template<
typename MT
3327 template<
typename VT >
3328 inline Row<MT,
false,
true,
false,CRAs...>&
3338 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
3339 Right right( ~rhs );
3341 if( !trySubAssign( matrix_, right,
row(), 0UL ) ) {
3345 decltype(
auto) left( derestrict( *this ) );
3348 const ResultType_t<VT> tmp( right );
3376 template<
typename MT
3378 template<
typename VT >
3379 inline Row<MT,
false,
true,
false,CRAs...>&
3389 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
3390 Right right( ~rhs );
3392 if( !tryMultAssign( matrix_, right,
row(), 0UL ) ) {
3396 decltype(
auto) left( derestrict( *this ) );
3399 const ResultType_t<VT> tmp( right );
3426 template<
typename MT
3428 template<
typename VT >
3429 inline Row<MT,
false,
true,
false,CRAs...>&
3439 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
3440 Right right( ~rhs );
3442 if( !tryDivAssign( matrix_, right,
row(), 0UL ) ) {
3446 decltype(
auto) left( derestrict( *this ) );
3449 const ResultType_t<VT> tmp( right );
3477 template<
typename MT
3479 template<
typename VT >
3480 inline Row<MT,
false,
true,
false,CRAs...>&
3481 Row<MT,false,true,false,CRAs...>::operator%=(
const Vector<VT,true>& rhs )
3483 using blaze::assign;
3488 using CrossType = CrossTrait_t< ResultType, ResultType_t<VT> >;
3494 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
3498 const CrossType right( *
this % (~rhs) );
3500 if( !tryAssign( matrix_, right,
row(), 0UL ) ) {
3504 decltype(
auto) left( derestrict( *this ) );
3506 assign( left, right );
3530 template< typename MT
3532 inline MT& Row<MT,false,true,false,CRAs...>::operand() noexcept
3546 template<
typename MT
3548 inline const MT& Row<MT,false,true,false,CRAs...>::operand() const noexcept
3562 template<
typename MT
3566 return matrix_.columns();
3581 template<
typename MT
3585 return matrix_.spacing();
3597 template<
typename MT
3601 return matrix_.columns();
3616 template<
typename MT
3621 size_t nonzeros( 0UL );
3623 for(
size_t j=0UL; j<
columns; ++j )
3639 template<
typename MT
3645 const size_t jbegin( ( IsUpper_v<MT> )
3646 ?( ( IsUniUpper_v<MT> || IsStrictlyUpper_v<MT> )
3650 const size_t jend ( ( IsLower_v<MT> )
3651 ?( ( IsUniLower_v<MT> || IsStrictlyLower_v<MT> )
3656 for(
size_t j=jbegin; j<jend; ++j )
3684 template<
typename MT
3686 template<
typename Other >
3687 inline Row<MT,
false,
true,
false,CRAs...>&
3688 Row<MT,false,true,false,CRAs...>::scale(
const Other& scalar )
3692 const size_t jbegin( ( IsUpper_v<MT> )
3693 ?( ( IsStrictlyUpper_v<MT> )
3697 const size_t jend ( ( IsLower_v<MT> )
3698 ?( ( IsStrictlyLower_v<MT> )
3703 for(
size_t j=jbegin; j<jend; ++j ) {
3704 matrix_(
row(),j) *= scalar;
3732 template<
typename MT
3734 template<
typename Other >
3735 inline bool Row<MT,false,true,false,CRAs...>::canAlias(
const Other* alias )
const noexcept
3737 return matrix_.isAliased( alias );
3754 template<
typename MT
3756 template<
typename MT2
3761 Row<MT,false,true,false,CRAs...>::canAlias(
const Row<MT2,SO2,true,SF2,CRAs2...>* alias )
const noexcept
3763 return matrix_.isAliased( &alias->matrix_ ) && (
row() == alias->row() );
3780 template<
typename MT
3782 template<
typename Other >
3783 inline bool Row<MT,false,true,false,CRAs...>::isAliased(
const Other* alias )
const noexcept
3785 return matrix_.isAliased( alias );
3802 template<
typename MT
3804 template<
typename MT2
3809 Row<MT,false,true,false,CRAs...>::isAliased(
const Row<MT2,SO2,true,SF2,CRAs2...>* alias )
const noexcept
3811 return matrix_.isAliased( &alias->matrix_ ) && (
row() == alias->row() );
3827 template<
typename MT
3829 inline bool Row<MT,false,true,false,CRAs...>::isAligned() const noexcept
3848 template<
typename MT
3850 inline bool Row<MT,false,true,false,CRAs...>::canSMPAssign() const noexcept
3852 return (
size() > SMP_DVECASSIGN_THRESHOLD );
3870 template<
typename MT
3872 template<
typename VT >
3873 inline void Row<MT,false,true,false,CRAs...>::assign(
const DenseVector<VT,true>& rhs )
3877 const size_t jpos( (~rhs).
size() &
size_t(-2) );
3878 for(
size_t j=0UL; j<jpos; j+=2UL ) {
3879 matrix_(
row(),j ) = (~rhs)[j ];
3880 matrix_(
row(),j+1UL) = (~rhs)[j+1UL];
3882 if( jpos < (~rhs).size() )
3883 matrix_(
row(),jpos) = (~rhs)[jpos];
3901 template<
typename MT
3903 template<
typename VT >
3904 inline void Row<MT,false,true,false,CRAs...>::assign(
const SparseVector<VT,true>& rhs )
3908 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
3909 matrix_(
row(),element->index()) = element->value();
3927 template<
typename MT
3929 template<
typename VT >
3930 inline void Row<MT,false,true,false,CRAs...>::addAssign(
const DenseVector<VT,true>& rhs )
3934 const size_t jpos( (~rhs).
size() &
size_t(-2) );
3935 for(
size_t j=0UL; j<jpos; j+=2UL ) {
3936 matrix_(
row(),j ) += (~rhs)[j ];
3937 matrix_(
row(),j+1UL) += (~rhs)[j+1UL];
3939 if( jpos < (~rhs).size() )
3940 matrix_(
row(),jpos) += (~rhs)[jpos];
3958 template<
typename MT
3960 template<
typename VT >
3961 inline void Row<MT,false,true,false,CRAs...>::addAssign(
const SparseVector<VT,true>& rhs )
3965 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
3966 matrix_(
row(),element->index()) += element->value();
3984 template<
typename MT
3986 template<
typename VT >
3987 inline void Row<MT,false,true,false,CRAs...>::subAssign(
const DenseVector<VT,true>& rhs )
3991 const size_t jpos( (~rhs).
size() &
size_t(-2) );
3992 for(
size_t j=0UL; j<jpos; j+=2UL ) {
3993 matrix_(
row(),j ) -= (~rhs)[j ];
3994 matrix_(
row(),j+1UL) -= (~rhs)[j+1UL];
3996 if( jpos < (~rhs).size() )
3997 matrix_(
row(),jpos) -= (~rhs)[jpos];
4015 template<
typename MT
4017 template<
typename VT >
4018 inline void Row<MT,false,true,false,CRAs...>::subAssign(
const SparseVector<VT,true>& rhs )
4022 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
4023 matrix_(
row(),element->index()) -= element->value();
4041 template<
typename MT
4043 template<
typename VT >
4044 inline void Row<MT,false,true,false,CRAs...>::multAssign(
const DenseVector<VT,true>& rhs )
4048 const size_t jpos( (~rhs).
size() &
size_t(-2) );
4049 for(
size_t j=0UL; j<jpos; j+=2UL ) {
4050 matrix_(
row(),j ) *= (~rhs)[j ];
4051 matrix_(
row(),j+1UL) *= (~rhs)[j+1UL];
4053 if( jpos < (~rhs).size() )
4054 matrix_(
row(),jpos) *= (~rhs)[jpos];
4072 template<
typename MT
4074 template<
typename VT >
4075 inline void Row<MT,false,true,false,CRAs...>::multAssign(
const SparseVector<VT,true>& rhs )
4083 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
4084 const size_t index( element->index() );
4085 for( ; j<index; ++j )
4087 matrix_(
row(),j) *= element->value();
4091 for( ; j<
size(); ++j ) {
4111 template<
typename MT
4113 template<
typename VT >
4114 inline void Row<MT,false,true,false,CRAs...>::divAssign(
const DenseVector<VT,true>& rhs )
4118 const size_t jpos( (~rhs).
size() &
size_t(-2) );
4119 for(
size_t j=0UL; j<jpos; j+=2UL ) {
4120 matrix_(
row(),j ) /= (~rhs)[j ];
4121 matrix_(
row(),j+1UL) /= (~rhs)[j+1UL];
4123 if( jpos < (~rhs).size() )
4124 matrix_(
row(),jpos) /= (~rhs)[jpos];
4150 template<
typename MT
4152 class Row<MT,false,true,true,CRAs...>
4153 :
public View< DenseVector< Row<MT,false,true,true,CRAs...>, true > >
4154 ,
private RowData<CRAs...>
4158 using DataType = RowData<CRAs...>;
4159 using Operand = If_t< IsExpression_v<MT>, MT, MT& >;
4165 using This = Row<MT,
false,
true,
true,CRAs...>;
4167 using BaseType = DenseVector<This,true>;
4168 using ViewedType = MT;
4170 using TransposeType = TransposeType_t<ResultType>;
4171 using ElementType = ElementType_t<MT>;
4172 using SIMDType = SIMDTrait_t<ElementType>;
4173 using ReturnType = ElementType_t<MT>;
4174 using CompositeType =
const Row&;
4177 using ConstReference = ConstReference_t<MT>;
4180 using Reference = If_t< IsConst_v<MT>, ConstReference, Reference_t<MT> >;
4183 using ConstPointer = ConstPointer_t<MT>;
4186 using Pointer = If_t< IsConst_v<MT> || !HasMutableDataAccess_v<MT>, ConstPointer, Pointer_t<MT> >;
4189 using ConstIterator = ConstIterator_t<MT>;
4192 using Iterator = If_t< IsConst_v<MT>, ConstIterator, Iterator_t<MT> >;
4197 static constexpr
bool simdEnabled = MT::simdEnabled;
4200 static constexpr
bool smpAssignable = MT::smpAssignable;
4203 static constexpr
bool compileTimeArgs = DataType::compileTimeArgs;
4209 template<
typename... RRAs >
4210 explicit inline Row( MT& matrix, RRAs... args );
4212 Row(
const Row& ) =
default;
4226 inline Reference operator[](
size_t index );
4227 inline ConstReference operator[](
size_t index )
const;
4228 inline Reference at(
size_t index );
4229 inline ConstReference at(
size_t index )
const;
4230 inline Pointer
data () noexcept;
4231 inline ConstPointer
data () const noexcept;
4232 inline Iterator
begin ();
4233 inline ConstIterator
begin () const;
4234 inline ConstIterator
cbegin() const;
4235 inline Iterator
end ();
4236 inline ConstIterator
end () const;
4237 inline ConstIterator
cend () const;
4244 inline Row& operator=( const ElementType& rhs );
4245 inline Row& operator=( initializer_list<ElementType> list );
4246 inline Row& operator=( const Row& rhs );
4248 template< typename VT > inline Row& operator= ( const Vector<VT,true>& rhs );
4249 template< typename VT > inline Row& operator+=( const Vector<VT,true>& rhs );
4250 template< typename VT > inline Row& operator-=( const Vector<VT,true>& rhs );
4251 template< typename VT > inline Row& operator*=( const Vector<VT,true>& rhs );
4252 template< typename VT > inline Row& operator/=( const DenseVector<VT,true>& rhs );
4253 template< typename VT > inline Row& operator%=( const Vector<VT,true>& rhs );
4260 using DataType::
row;
4262 inline MT& operand() noexcept;
4263 inline const MT& operand() const noexcept;
4265 inline
size_t size() const noexcept;
4266 inline
size_t spacing() const noexcept;
4267 inline
size_t capacity() const noexcept;
4269 inline
void reset();
4276 template< typename Other > inline Row& scale( const Other& scalar );
4283 template< typename VT >
4284 static constexpr
bool VectorizedAssign_v =
4285 ( useOptimizedKernels &&
4286 simdEnabled && VT::simdEnabled &&
4292 template< typename VT >
4293 static constexpr
bool VectorizedAddAssign_v =
4294 ( useOptimizedKernels &&
4295 simdEnabled && VT::simdEnabled &&
4302 template< typename VT >
4303 static constexpr
bool VectorizedSubAssign_v =
4304 ( useOptimizedKernels &&
4305 simdEnabled && VT::simdEnabled &&
4312 template< typename VT >
4313 static constexpr
bool VectorizedMultAssign_v =
4314 ( useOptimizedKernels &&
4315 simdEnabled && VT::simdEnabled &&
4322 template< typename VT >
4323 static constexpr
bool VectorizedDivAssign_v =
4324 ( useOptimizedKernels &&
4325 simdEnabled && VT::simdEnabled &&
4332 static constexpr
size_t SIMDSIZE = SIMDTrait<ElementType>::
size;
4339 template< typename Other >
4340 inline
bool canAlias( const Other* alias ) const noexcept;
4342 template< typename MT2,
bool SO2,
bool SF2,
size_t... CRAs2 >
4343 inline
bool canAlias( const Row<MT2,SO2,true,SF2,CRAs2...>* alias ) const noexcept;
4345 template< typename Other >
4346 inline
bool isAliased( const Other* alias ) const noexcept;
4348 template< typename MT2,
bool SO2,
bool SF2,
size_t... CRAs2 >
4349 inline
bool isAliased( const Row<MT2,SO2,true,SF2,CRAs2...>* alias ) const noexcept;
4351 inline
bool isAligned () const noexcept;
4352 inline
bool canSMPAssign() const noexcept;
4363 template< typename VT >
4364 inline auto assign( const DenseVector<VT,true>& rhs ) ->
DisableIf_t< VectorizedAssign_v<VT> >;
4366 template< typename VT >
4367 inline auto assign( const DenseVector<VT,true>& rhs ) ->
EnableIf_t< VectorizedAssign_v<VT> >;
4369 template< typename VT > inline
void assign( const SparseVector<VT,true>& rhs );
4371 template< typename VT >
4372 inline auto addAssign( const DenseVector<VT,true>& rhs ) ->
DisableIf_t< VectorizedAddAssign_v<VT> >;
4374 template< typename VT >
4375 inline auto addAssign( const DenseVector<VT,true>& rhs ) ->
EnableIf_t< VectorizedAddAssign_v<VT> >;
4377 template< typename VT > inline
void addAssign( const SparseVector<VT,true>& rhs );
4379 template< typename VT >
4380 inline auto subAssign( const DenseVector<VT,true>& rhs ) ->
DisableIf_t< VectorizedSubAssign_v<VT> >;
4382 template< typename VT >
4383 inline auto subAssign( const DenseVector<VT,true>& rhs ) ->
EnableIf_t< VectorizedSubAssign_v<VT> >;
4385 template< typename VT > inline
void subAssign( const SparseVector<VT,true>& rhs );
4387 template< typename VT >
4388 inline auto multAssign( const DenseVector<VT,true>& rhs ) ->
DisableIf_t< VectorizedMultAssign_v<VT> >;
4390 template< typename VT >
4391 inline auto multAssign( const DenseVector<VT,true>& rhs ) ->
EnableIf_t< VectorizedMultAssign_v<VT> >;
4393 template< typename VT > inline
void multAssign( const SparseVector<VT,true>& rhs );
4395 template< typename VT >
4396 inline auto divAssign( const DenseVector<VT,true>& rhs ) ->
DisableIf_t< VectorizedDivAssign_v<VT> >;
4398 template< typename VT >
4399 inline auto divAssign( const DenseVector<VT,true>& rhs ) ->
EnableIf_t< VectorizedDivAssign_v<VT> >;
4412 template< typename MT2,
bool SO2,
bool DF2,
bool SF2,
size_t... CRAs2 > friend class Row;
4451 template< typename MT
4453 template< typename... RRAs >
4454 inline Row<MT,false,true,true,CRAs...>::Row( MT& matrix, RRAs... args )
4455 : DataType( args... )
4456 , matrix_ ( matrix )
4459 if( matrix_.rows() <=
row() ) {
4489 template<
typename MT
4491 inline typename Row<MT,
false,
true,
true,CRAs...>::Reference
4492 Row<MT,false,true,true,CRAs...>::operator[](
size_t index )
4495 return matrix_(index,
row());
4511 template<
typename MT
4513 inline typename Row<MT,
false,
true,
true,CRAs...>::ConstReference
4514 Row<MT,false,true,true,CRAs...>::operator[](
size_t index )
const 4517 return const_cast<const MT&>( matrix_ )(index,
row());
4534 template<
typename MT
4536 inline typename Row<MT,
false,
true,
true,CRAs...>::Reference
4537 Row<MT,false,true,true,CRAs...>::at(
size_t index )
4539 if( index >=
size() ) {
4542 return (*
this)[index];
4559 template<
typename MT
4561 inline typename Row<MT,
false,
true,
true,CRAs...>::ConstReference
4562 Row<MT,false,true,true,CRAs...>::at(
size_t index )
const 4564 if( index >=
size() ) {
4567 return (*
this)[index];
4582 template<
typename MT
4584 inline typename Row<MT,
false,
true,
true,CRAs...>::Pointer
4587 return matrix_.data(
row() );
4602 template<
typename MT
4604 inline typename Row<MT,
false,
true,
true,CRAs...>::ConstPointer
4607 return matrix_.data(
row() );
4621 template<
typename MT
4623 inline typename Row<MT,
false,
true,
true,CRAs...>::Iterator
4626 return matrix_.begin(
row() );
4640 template<
typename MT
4642 inline typename Row<MT,
false,
true,
true,CRAs...>::ConstIterator
4645 return matrix_.cbegin(
row() );
4659 template<
typename MT
4661 inline typename Row<MT,
false,
true,
true,CRAs...>::ConstIterator
4664 return matrix_.cbegin(
row() );
4678 template<
typename MT
4680 inline typename Row<MT,
false,
true,
true,CRAs...>::Iterator
4683 return matrix_.end(
row() );
4697 template<
typename MT
4699 inline typename Row<MT,
false,
true,
true,CRAs...>::ConstIterator
4702 return matrix_.cend(
row() );
4716 template<
typename MT
4718 inline typename Row<MT,
false,
true,
true,CRAs...>::ConstIterator
4721 return matrix_.cend(
row() );
4742 template<
typename MT
4744 inline Row<MT,
false,
true,
true,CRAs...>&
4745 Row<MT,false,true,true,CRAs...>::operator=(
const ElementType& rhs )
4747 decltype(
auto) left( derestrict( matrix_ ) );
4760 for(
size_t i=ibegin; i<iend; ++i ) {
4761 if( !IsRestricted_v<MT> || IsTriangular_v<MT> || trySet( matrix_, i,
row(), rhs ) )
4762 left(i,
row()) = rhs;
4786 template<
typename MT
4788 inline Row<MT,
false,
true,
true,CRAs...>&
4789 Row<MT,false,true,true,CRAs...>::operator=( initializer_list<ElementType> list )
4791 if( list.size() >
size() ) {
4795 if( IsRestricted_v<MT> ) {
4796 const InitializerVector<ElementType,true> tmp( list,
size() );
4797 if( !tryAssign( matrix_, tmp,
row(), 0UL ) ) {
4802 decltype(
auto) left( derestrict( *this ) );
4804 std::fill( std::copy( list.
begin(), list.
end(), left.
begin() ), left.
end(), ElementType() );
4828 template< typename MT
4830 inline Row<MT,false,true,true,CRAs...>&
4831 Row<MT,false,true,true,CRAs...>::operator=( const Row& rhs )
4833 if( &rhs ==
this )
return *
this;
4835 if(
size() != rhs.size() ) {
4839 if( !tryAssign( matrix_, rhs,
row(), 0UL ) ) {
4843 decltype(
auto) left( derestrict( *this ) );
4846 const ResultType tmp( rhs );
4875 template<
typename MT
4877 template<
typename VT >
4878 inline Row<MT,
false,
true,
true,CRAs...>&
4879 Row<MT,false,true,true,CRAs...>::operator=(
const Vector<VT,true>& rhs )
4888 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
4889 Right right( ~rhs );
4891 if( !tryAssign( matrix_, right,
row(), 0UL ) ) {
4895 decltype(
auto) left( derestrict( *this ) );
4898 const ResultType_t<VT> tmp( right );
4902 if( IsSparseVector_v<VT> )
4929 template<
typename MT
4931 template<
typename VT >
4932 inline Row<MT,
false,
true,
true,CRAs...>&
4942 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
4943 Right right( ~rhs );
4945 if( !tryAddAssign( matrix_, right,
row(), 0UL ) ) {
4949 decltype(
auto) left( derestrict( *this ) );
4952 const ResultType_t<VT> tmp( right );
4981 template<
typename MT
4983 template<
typename VT >
4984 inline Row<MT,
false,
true,
true,CRAs...>&
4994 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
4995 Right right( ~rhs );
4997 if( !trySubAssign( matrix_, right,
row(), 0UL ) ) {
5001 decltype(
auto) left( derestrict( *this ) );
5004 const ResultType_t<VT> tmp( right );
5032 template<
typename MT
5034 template<
typename VT >
5035 inline Row<MT,
false,
true,
true,CRAs...>&
5045 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
5046 Right right( ~rhs );
5048 if( !tryMultAssign( matrix_, right,
row(), 0UL ) ) {
5052 decltype(
auto) left( derestrict( *this ) );
5055 const ResultType_t<VT> tmp( right );
5082 template<
typename MT
5084 template<
typename VT >
5085 inline Row<MT,
false,
true,
true,CRAs...>&
5095 using Right = If_t< IsRestricted_v<MT>, CompositeType_t<VT>,
const VT& >;
5096 Right right( ~rhs );
5098 if( !tryDivAssign( matrix_, right,
row(), 0UL ) ) {
5102 decltype(
auto) left( derestrict( *this ) );
5105 const ResultType_t<VT> tmp( right );
5133 template<
typename MT
5135 template<
typename VT >
5136 inline Row<MT,
false,
true,
true,CRAs...>&
5137 Row<MT,false,true,true,CRAs...>::operator%=(
const Vector<VT,true>& rhs )
5139 using blaze::assign;
5144 using CrossType = CrossTrait_t< ResultType, ResultType_t<VT> >;
5150 if(
size() != 3UL || (~rhs).
size() != 3UL ) {
5154 const CrossType right( *
this % (~rhs) );
5156 if( !tryAssign( matrix_, right,
row(), 0UL ) ) {
5160 decltype(
auto) left( derestrict( *this ) );
5162 assign( left, right );
5186 template< typename MT
5188 inline MT& Row<MT,false,true,true,CRAs...>::operand() noexcept
5202 template<
typename MT
5204 inline const MT& Row<MT,false,true,true,CRAs...>::operand() const noexcept
5218 template<
typename MT
5222 return matrix_.columns();
5237 template<
typename MT
5241 return matrix_.spacing();
5253 template<
typename MT
5257 return matrix_.capacity(
row() );
5272 template<
typename MT
5276 return matrix_.nonZeros(
row() );
5288 template<
typename MT
5292 matrix_.reset(
row() );
5319 template<
typename MT
5321 template<
typename Other >
5322 inline Row<MT,
false,
true,
true,CRAs...>&
5323 Row<MT,false,true,true,CRAs...>::scale(
const Other& scalar )
5327 const size_t ibegin( ( IsLower_v<MT> )
5328 ?( ( IsStrictlyLower_v<MT> )
5332 const size_t iend ( ( IsUpper_v<MT> )
5333 ?( ( IsStrictlyUpper_v<MT> )
5338 for(
size_t i=ibegin; i<iend; ++i ) {
5339 matrix_(i,
row()) *= scalar;
5367 template<
typename MT
5369 template<
typename Other >
5370 inline bool Row<MT,false,true,true,CRAs...>::canAlias(
const Other* alias )
const noexcept
5372 return matrix_.isAliased( alias );
5389 template<
typename MT
5391 template<
typename MT2
5396 Row<MT,false,true,true,CRAs...>::canAlias(
const Row<MT2,SO2,true,SF2,CRAs2...>* alias )
const noexcept
5398 return matrix_.isAliased( &alias->matrix_ ) && (
row() == alias->row() );
5415 template<
typename MT
5417 template<
typename Other >
5418 inline bool Row<MT,false,true,true,CRAs...>::isAliased(
const Other* alias )
const noexcept
5420 return matrix_.isAliased( alias );
5437 template<
typename MT
5439 template<
typename MT2
5444 Row<MT,false,true,true,CRAs...>::isAliased(
const Row<MT2,SO2,true,SF2,CRAs2...>* alias )
const noexcept
5446 return matrix_.isAliased( &alias->matrix_ ) && (
row() == alias->row() );
5462 template<
typename MT
5464 inline bool Row<MT,false,true,true,CRAs...>::isAligned() const noexcept
5466 return matrix_.isAligned();
5483 template<
typename MT
5485 inline bool Row<MT,false,true,true,CRAs...>::canSMPAssign() const noexcept
5487 return (
size() > SMP_DVECASSIGN_THRESHOLD );
5506 template<
typename MT
5509 Row<MT,false,true,true,CRAs...>::load(
size_t index )
const noexcept
5511 return matrix_.load( index,
row() );
5530 template<
typename MT
5535 return matrix_.loada( index,
row() );
5554 template<
typename MT
5559 return matrix_.loadu( index,
row() );
5579 template<
typename MT
5582 Row<MT,false,true,true,CRAs...>::store(
size_t index,
const SIMDType& value ) noexcept
5584 matrix_.store( index,
row(), value );
5604 template<
typename MT
5609 matrix_.storea( index,
row(), value );
5629 template<
typename MT
5634 matrix_.storeu( index,
row(), value );
5654 template<
typename MT
5659 matrix_.stream( index,
row(), value );
5677 template<
typename MT
5679 template<
typename VT >
5680 inline auto Row<MT,false,true,true,CRAs...>::assign(
const DenseVector<VT,true>& rhs )
5681 -> DisableIf_t< VectorizedAssign_v<VT> >
5685 const size_t ipos( (~rhs).
size() &
size_t(-2) );
5686 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5687 matrix_(i ,
row()) = (~rhs)[i ];
5688 matrix_(i+1UL,
row()) = (~rhs)[i+1UL];
5690 if( ipos < (~rhs).size() )
5691 matrix_(ipos,
row()) = (~rhs)[ipos];
5709 template<
typename MT
5711 template<
typename VT >
5712 inline auto Row<MT,false,true,true,CRAs...>::assign(
const DenseVector<VT,true>& rhs )
5713 -> EnableIf_t< VectorizedAssign_v<VT> >
5719 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
5723 const size_t ipos( ( remainder )?(
rows &
size_t(-SIMDSIZE) ):(
rows ) );
5727 Iterator left(
begin() );
5728 ConstIterator_t<VT> right( (~rhs).
begin() );
5730 if( useStreaming &&
rows > ( cacheSize/(
sizeof(ElementType) * 3UL ) ) && !(~rhs).isAliased( &matrix_ ) )
5732 for( ; i<ipos; i+=SIMDSIZE ) {
5733 left.stream( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5735 for( ; remainder && i<
rows; ++i ) {
5736 *left = *right; ++left; ++right;
5741 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5742 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5743 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5744 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5745 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5747 for( ; i<ipos; i+=SIMDSIZE ) {
5748 left.store( right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5750 for( ; remainder && i<
rows; ++i ) {
5751 *left = *right; ++left; ++right;
5771 template<
typename MT
5773 template<
typename VT >
5774 inline void Row<MT,false,true,true,CRAs...>::assign(
const SparseVector<VT,true>& rhs )
5778 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
5779 matrix_(element->index(),
row()) = element->value();
5797 template<
typename MT
5799 template<
typename VT >
5800 inline auto Row<MT,false,true,true,CRAs...>::addAssign(
const DenseVector<VT,true>& rhs )
5801 -> DisableIf_t< VectorizedAddAssign_v<VT> >
5805 const size_t ipos( (~rhs).
size() &
size_t(-2) );
5806 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5807 matrix_(i ,
row()) += (~rhs)[i ];
5808 matrix_(i+1UL,
row()) += (~rhs)[i+1UL];
5810 if( ipos < (~rhs).size() )
5811 matrix_(ipos,
row()) += (~rhs)[ipos];
5829 template<
typename MT
5831 template<
typename VT >
5832 inline auto Row<MT,false,true,true,CRAs...>::addAssign(
const DenseVector<VT,true>& rhs )
5833 -> EnableIf_t< VectorizedAddAssign_v<VT> >
5839 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
5843 const size_t ipos( ( remainder )?(
rows &
size_t(-SIMDSIZE) ):(
rows ) );
5847 Iterator left(
begin() );
5848 ConstIterator_t<VT> right( (~rhs).
begin() );
5850 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5851 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5852 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5853 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5854 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5856 for( ; i<ipos; i+=SIMDSIZE ) {
5857 left.store( left.load() + right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5859 for( ; remainder && i<
rows; ++i ) {
5860 *left += *right; ++left; ++right;
5879 template<
typename MT
5881 template<
typename VT >
5882 inline void Row<MT,false,true,true,CRAs...>::addAssign(
const SparseVector<VT,true>& rhs )
5886 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
5887 matrix_(element->index(),
row()) += element->value();
5905 template<
typename MT
5907 template<
typename VT >
5908 inline auto Row<MT,false,true,true,CRAs...>::subAssign(
const DenseVector<VT,true>& rhs )
5909 -> DisableIf_t< VectorizedSubAssign_v<VT> >
5913 const size_t ipos( (~rhs).
size() &
size_t(-2) );
5914 for(
size_t i=0UL; i<ipos; i+=2UL ) {
5915 matrix_(i ,
row()) -= (~rhs)[i ];
5916 matrix_(i+1UL,
row()) -= (~rhs)[i+1UL];
5918 if( ipos < (~rhs).size() )
5919 matrix_(ipos,
row()) -= (~rhs)[ipos];
5937 template<
typename MT
5939 template<
typename VT >
5940 inline auto Row<MT,false,true,true,CRAs...>::subAssign(
const DenseVector<VT,true>& rhs )
5941 -> EnableIf_t< VectorizedSubAssign_v<VT> >
5947 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
5951 const size_t ipos( ( remainder )?(
rows &
size_t(-SIMDSIZE) ):(
rows ) );
5955 Iterator left(
begin() );
5956 ConstIterator_t<VT> right( (~rhs).
begin() );
5958 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
5959 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5960 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5961 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5962 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5964 for( ; i<ipos; i+=SIMDSIZE ) {
5965 left.store( left.load() - right.load() ); left += SIMDSIZE; right += SIMDSIZE;
5967 for( ; remainder && i<
rows; ++i ) {
5968 *left -= *right; ++left; ++right;
5987 template<
typename MT
5989 template<
typename VT >
5990 inline void Row<MT,false,true,true,CRAs...>::subAssign(
const SparseVector<VT,true>& rhs )
5994 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element )
5995 matrix_(element->index(),
row()) -= element->value();
6013 template<
typename MT
6015 template<
typename VT >
6016 inline auto Row<MT,false,true,true,CRAs...>::multAssign(
const DenseVector<VT,true>& rhs )
6017 -> DisableIf_t< VectorizedMultAssign_v<VT> >
6021 const size_t ipos( (~rhs).
size() &
size_t(-2) );
6022 for(
size_t i=0UL; i<ipos; i+=2UL ) {
6023 matrix_(i ,
row()) *= (~rhs)[i ];
6024 matrix_(i+1UL,
row()) *= (~rhs)[i+1UL];
6026 if( ipos < (~rhs).size() )
6027 matrix_(ipos,
row()) *= (~rhs)[ipos];
6045 template<
typename MT
6047 template<
typename VT >
6048 inline auto Row<MT,false,true,true,CRAs...>::multAssign(
const DenseVector<VT,true>& rhs )
6049 -> EnableIf_t< VectorizedMultAssign_v<VT> >
6055 constexpr
bool remainder( !IsPadded_v<MT> || !IsPadded_v<VT> );
6059 const size_t ipos( ( remainder )?(
rows &
size_t(-SIMDSIZE) ):(
rows ) );
6063 Iterator left(
begin() );
6064 ConstIterator_t<VT> right( (~rhs).
begin() );
6066 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
6067 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6068 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6069 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6070 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6072 for( ; i<ipos; i+=SIMDSIZE ) {
6073 left.store( left.load() * right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6075 for( ; remainder && i<
rows; ++i ) {
6076 *left *= *right; ++left; ++right;
6095 template<
typename MT
6097 template<
typename VT >
6098 inline void Row<MT,false,true,true,CRAs...>::multAssign(
const SparseVector<VT,true>& rhs )
6106 for( ConstIterator_t<VT> element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
6107 const size_t index( element->index() );
6108 for( ; i<index; ++i )
6110 matrix_(i,
row()) *= element->value();
6114 for( ; i<
size(); ++i ) {
6134 template<
typename MT
6136 template<
typename VT >
6137 inline auto Row<MT,false,true,true,CRAs...>::divAssign(
const DenseVector<VT,true>& rhs )
6138 -> DisableIf_t< VectorizedDivAssign_v<VT> >
6142 const size_t ipos( (~rhs).
size() &
size_t(-2) );
6143 for(
size_t i=0UL; i<ipos; i+=2UL ) {
6144 matrix_(i ,
row()) /= (~rhs)[i ];
6145 matrix_(i+1UL,
row()) /= (~rhs)[i+1UL];
6147 if( ipos < (~rhs).size() )
6148 matrix_(ipos,
row()) /= (~rhs)[ipos];
6166 template<
typename MT
6168 template<
typename VT >
6169 inline auto Row<MT,false,true,true,CRAs...>::divAssign(
const DenseVector<VT,true>& rhs )
6170 -> EnableIf_t< VectorizedDivAssign_v<VT> >
6178 const size_t ipos(
rows &
size_t(-SIMDSIZE) );
6182 Iterator left(
begin() );
6183 ConstIterator_t<VT> right( (~rhs).
begin() );
6185 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
6186 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6187 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6188 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6189 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6191 for( ; i<ipos; i+=SIMDSIZE ) {
6192 left.store( left.load() / right.load() ); left += SIMDSIZE; right += SIMDSIZE;
6194 for( ; i<
rows; ++i ) {
6195 *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
Header file for the implementation of the RowData class template.
#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.
Header file for the row trait.
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
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 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
Header file for the DisableIf class template.
Header file for the implementation of the Row base 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
typename RowTrait< MT, CRAs... >::Type RowTrait_t
Auxiliary alias declaration for the RowTrait type trait.The RowTrait_t alias declaration provides a c...
Definition: RowTrait.h:170
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
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a row dense or sparse vector type (i...
Definition: RowVector.h:61
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 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.
Constraint on the transpose flag of vector types.
Header file for the IsExpression type trait class.
Constraint on the data type.