Blaze  3.6
DVecExpandExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECEXPANDEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECEXPANDEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
46 #include <blaze/math/Exception.h>
61 #include <blaze/system/Inline.h>
62 #include <blaze/util/Assert.h>
63 #include <blaze/util/EnableIf.h>
65 #include <blaze/util/InvalidType.h>
66 #include <blaze/util/MaybeUnused.h>
67 #include <blaze/util/mpl/If.h>
68 #include <blaze/util/Types.h>
70 
71 
72 namespace blaze {
73 
74 //=================================================================================================
75 //
76 // CLASS DVECEXPANDEXPR
77 //
78 //=================================================================================================
79 
80 //*************************************************************************************************
87 template< typename VT // Type of the dense vector
88  , bool TF // Transpose flag
89  , size_t... CEAs > // Compile time expansion arguments
91  : public VecExpandExpr< DenseMatrix< DVecExpandExpr<VT,TF,CEAs...>, !TF >, CEAs... >
92  , private Transformation
93  , private ExpandExprData<CEAs...>
94 {
95  private:
96  //**Type definitions****************************************************************************
97  using RT = ResultType_t<VT>;
98 
99  using DataType = ExpandExprData<CEAs...>;
100 
102  BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT( GetConstIterator, ConstIterator, INVALID_TYPE );
103  //**********************************************************************************************
104 
105  //**Serial evaluation strategy******************************************************************
107 
113  static constexpr bool useAssign = IsComputation_v<VT> || RequiresEvaluation_v<VT>;
114 
116  template< typename MT >
118  static constexpr bool UseAssign_v = useAssign;
120  //**********************************************************************************************
121 
122  //**Parallel evaluation strategy****************************************************************
124 
129  template< typename MT >
130  static constexpr bool UseSMPAssign_v = ( !VT::smpAssignable && useAssign );
132  //**********************************************************************************************
133 
134  public:
135  //**Type definitions****************************************************************************
136  using This = DVecExpandExpr<VT,TF,CEAs...>;
138  using ResultType = ExpandTrait_t<VT,CEAs...>;
143 
146 
148  using ConstIterator = GetConstIterator_t<VT>;
149 
151  using Operand = If_t< IsExpression_v<VT>, const VT, const VT& >;
152  //**********************************************************************************************
153 
154  //**Compilation flags***************************************************************************
156  static constexpr bool simdEnabled = VT::simdEnabled;
157 
159  static constexpr bool smpAssignable = VT::smpAssignable;
160  //**********************************************************************************************
161 
162  //**SIMD properties*****************************************************************************
164  static constexpr size_t SIMDSIZE = SIMDTrait<ElementType>::size;
165  //**********************************************************************************************
166 
167  //**Constructor*********************************************************************************
173  template< typename... REAs > // Runtime expansion arguments
174  explicit inline DVecExpandExpr( const VT& dv, REAs... args ) noexcept
175  : DataType( args... ) // Base class initialization
176  , dv_ ( dv ) // Dense vector of the expansion expression
177  {}
178  //**********************************************************************************************
179 
180  //**Access operator*****************************************************************************
187  inline ReturnType operator()( size_t i, size_t j ) const {
188  if( TF ) {
189  BLAZE_INTERNAL_ASSERT( i < expansion(), "Invalid row access index" );
190  BLAZE_INTERNAL_ASSERT( j < dv_.size() , "Invalid column access index" );
191  return dv_[j];
192  }
193  else {
194  BLAZE_INTERNAL_ASSERT( i < dv_.size(), "Invalid row access index" );
195  BLAZE_INTERNAL_ASSERT( j < expansion(), "Invalid column access index" );
196  return dv_[i];
197  }
198  }
199  //**********************************************************************************************
200 
201  //**At function*********************************************************************************
209  inline ReturnType at( size_t i, size_t j ) const {
210  if( i >= ( TF ? expansion() : dv_.size() ) ) {
211  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
212  }
213  if( j >= ( TF ? dv_.size() : expansion() ) ) {
214  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
215  }
216  return (*this)(i,j);
217  }
218  //**********************************************************************************************
219 
220  //**Load function*******************************************************************************
227  BLAZE_ALWAYS_INLINE auto load( size_t i, size_t j ) const noexcept {
228  if( TF ) {
229  BLAZE_INTERNAL_ASSERT( i < expansion(), "Invalid row access index" );
230  BLAZE_INTERNAL_ASSERT( j < dv_.size() , "Invalid column access index" );
231  BLAZE_INTERNAL_ASSERT( j % SIMDSIZE == 0UL, "Invalid row access index" );
232  return dv_.load(j);
233  }
234  else {
235  BLAZE_INTERNAL_ASSERT( i < dv_.size() , "Invalid row access index" );
236  BLAZE_INTERNAL_ASSERT( j < expansion(), "Invalid column access index" );
237  BLAZE_INTERNAL_ASSERT( i % SIMDSIZE == 0UL, "Invalid row access index" );
238  return dv_.load(i);
239  }
240  }
241  //**********************************************************************************************
242 
243  //**Begin function******************************************************************************
249  inline ConstIterator begin( size_t i ) const {
250  MAYBE_UNUSED( i );
251  return ConstIterator( dv_.begin() );
252  }
253  //**********************************************************************************************
254 
255  //**End function********************************************************************************
261  inline ConstIterator end( size_t i ) const {
262  MAYBE_UNUSED( i );
263  return ConstIterator( dv_.end() );
264  }
265  //**********************************************************************************************
266 
267  //**Rows function*******************************************************************************
272  inline size_t rows() const noexcept {
273  return ( TF ? expansion() : dv_.size() );
274  }
275  //**********************************************************************************************
276 
277  //**Columns function****************************************************************************
282  inline size_t columns() const noexcept {
283  return ( TF ? dv_.size() : expansion() );
284  }
285  //**********************************************************************************************
286 
287  //**Operand access******************************************************************************
292  inline Operand operand() const noexcept {
293  return dv_;
294  }
295  //**********************************************************************************************
296 
297  //**********************************************************************************************
298  using DataType::expansion;
299  //**********************************************************************************************
300 
301  //**********************************************************************************************
307  template< typename T >
308  inline bool canAlias( const T* alias ) const noexcept {
309  return dv_.canAlias( alias );
310  }
311  //**********************************************************************************************
312 
313  //**********************************************************************************************
319  template< typename T >
320  inline bool isAliased( const T* alias ) const noexcept {
321  return dv_.isAliased( alias );
322  }
323  //**********************************************************************************************
324 
325  //**********************************************************************************************
330  inline bool isAligned() const noexcept {
331  return dv_.isAligned();
332  }
333  //**********************************************************************************************
334 
335  //**********************************************************************************************
340  inline bool canSMPAssign() const noexcept {
341  return dv_.canSMPAssign();
342  }
343  //**********************************************************************************************
344 
345  private:
346  //**Member variables****************************************************************************
348  //**********************************************************************************************
349 
350  //**Assignment to matrices**********************************************************************
364  template< typename MT // Type of the target matrix
365  , bool SO > // Storage order of the target matrix
366  friend inline auto assign( Matrix<MT,SO>& lhs, const DVecExpandExpr& rhs )
368  {
369  using blaze::expand;
370 
372 
373  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
374  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
375 
376  const RT tmp( serial( ~rhs.dv_ ) );
377 
378  assign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
379  }
381  //**********************************************************************************************
382 
383  //**Addition assignment to matrices*************************************************************
397  template< typename MT // Type of the target matrix
398  , bool SO > // Storage order of the target matrix
399  friend inline auto addAssign( Matrix<MT,SO>& lhs, const DVecExpandExpr& rhs )
401  {
402  using blaze::expand;
403 
405 
406  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
407  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
408 
409  const RT tmp( serial( ~rhs.dv_ ) );
410 
411  addAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
412  }
414  //**********************************************************************************************
415 
416  //**Subtraction assignment to matrices**********************************************************
430  template< typename MT // Type of the target matrix
431  , bool SO > // Storage order of the target matrix
432  friend inline auto subAssign( Matrix<MT,SO>& lhs, const DVecExpandExpr& rhs )
433  -> EnableIf_t< UseAssign_v<MT> >
434  {
435  using blaze::expand;
436 
438 
439  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
440  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
441 
442  const RT tmp( serial( ~rhs.dv_ ) );
443 
444  subAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
445  }
447  //**********************************************************************************************
448 
449  //**Schur product assignment to matrices********************************************************
463  template< typename MT // Type of the target matrix
464  , bool SO > // Storage order of the target matrix
465  friend inline auto schurAssign( Matrix<MT,SO>& lhs, const DVecExpandExpr& rhs )
466  -> EnableIf_t< UseAssign_v<MT> >
467  {
468  using blaze::expand;
469 
471 
472  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
473  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
474 
475  const RT tmp( serial( ~rhs.dv_ ) );
476 
477  schurAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
478  }
480  //**********************************************************************************************
481 
482  //**Multiplication assignment to matrices*******************************************************
496  template< typename MT // Type of the target matrix
497  , bool SO > // Storage order of the target matrix
498  friend inline auto multAssign( Matrix<MT,SO>& lhs, const DVecExpandExpr& rhs )
499  -> EnableIf_t< UseAssign_v<MT> >
500  {
501  using blaze::expand;
502 
504 
505  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
506  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
507 
508  const RT tmp( serial( ~rhs.dv_ ) );
509 
510  multAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
511  }
513  //**********************************************************************************************
514 
515  //**SMP assignment to matrices******************************************************************
529  template< typename MT // Type of the target matrix
530  , bool SO > // Storage order of the target matrix
531  friend inline auto smpAssign( Matrix<MT,SO>& lhs, const DVecExpandExpr& rhs )
532  -> EnableIf_t< UseSMPAssign_v<MT> >
533  {
534  using blaze::expand;
535 
537 
538  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
539  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
540 
541  const RT tmp( ~rhs.dv_ );
542 
543  smpAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
544  }
546  //**********************************************************************************************
547 
548  //**SMP addition assignment to matrices*********************************************************
562  template< typename MT // Type of the target matrix
563  , bool SO > // Storage order of the target matrix
564  friend inline auto smpAddAssign( Matrix<MT,SO>& lhs, const DVecExpandExpr& rhs )
565  -> EnableIf_t< UseSMPAssign_v<MT> >
566  {
567  using blaze::expand;
568 
570 
571  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
572  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
573 
574  const RT tmp( ~rhs.dv_ );
575 
576  smpAddAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
577  }
579  //**********************************************************************************************
580 
581  //**SMP subtraction assignment to matrices******************************************************
595  template< typename MT // Type of the target matrix
596  , bool SO > // Storage order of the target matrix
597  friend inline auto smpSubAssign( Matrix<MT,SO>& lhs, const DVecExpandExpr& rhs )
598  -> EnableIf_t< UseSMPAssign_v<MT> >
599  {
600  using blaze::expand;
601 
603 
604  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
605  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
606 
607  const RT tmp( ~rhs.dv_ );
608 
609  smpSubAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
610  }
612  //**********************************************************************************************
613 
614  //**SMP Schur product assignment to matrices****************************************************
628  template< typename MT // Type of the target matrix
629  , bool SO > // Storage order of the target matrix
630  friend inline auto smpSchurAssign( Matrix<MT,SO>& lhs, const DVecExpandExpr& rhs )
631  -> EnableIf_t< UseSMPAssign_v<MT> >
632  {
633  using blaze::expand;
634 
636 
637  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
638  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
639 
640  const RT tmp( ~rhs.dv_ );
641 
642  smpSchurAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
643  }
645  //**********************************************************************************************
646 
647  //**SMP multiplication assignment to matrices***************************************************
661  template< typename MT // Type of the target matrix
662  , bool SO > // Storage order of the target matrix
663  friend inline auto smpMultAssign( Matrix<MT,SO>& lhs, const DVecExpandExpr& rhs )
664  -> EnableIf_t< UseSMPAssign_v<MT> >
665  {
666  using blaze::expand;
667 
669 
670  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
671  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
672 
673  const RT tmp( ~rhs.dv_ );
674 
675  smpMultAssign( ~lhs, expand<CEAs...>( tmp, rhs.expansion() ) );
676  }
678  //**********************************************************************************************
679 
680  //**Compile time checks*************************************************************************
685  //**********************************************************************************************
686 };
687 //*************************************************************************************************
688 
689 
690 
691 
692 //=================================================================================================
693 //
694 // GLOBAL OPERATORS
695 //
696 //=================================================================================================
697 
698 //*************************************************************************************************
737 template< typename VT // Type of the dense vector
738  , bool TF > // Transpose flag
739 inline decltype(auto) expand( const DenseVector<VT,TF>& dv, size_t expansion )
740 {
742 
743  using ReturnType = const DVecExpandExpr<VT,TF>;
744  return ReturnType( ~dv, expansion );
745 }
746 //*************************************************************************************************
747 
748 
749 //*************************************************************************************************
787 template< size_t E // Compile time expansion argument
788  , typename VT // Type of the dense vector
789  , bool TF > // Transpose flag
790 inline decltype(auto) expand( const DenseVector<VT,TF>& dv )
791 {
793 
794  using ReturnType = const DVecExpandExpr<VT,TF,E>;
795  return ReturnType( ~dv );
796 }
797 //*************************************************************************************************
798 
799 
800 //*************************************************************************************************
812 template< size_t E // Compile time expansion argument
813  , typename VT // Type of the dense vector
814  , bool TF > // Transpose flag
815 inline decltype(auto) expand( const DenseVector<VT,TF>& dv, size_t expansion )
816 {
817  MAYBE_UNUSED( expansion );
818 
820 
821  using ReturnType = const DVecExpandExpr<VT,TF,E>;
822  return ReturnType( ~dv );
823 }
825 //*************************************************************************************************
826 
827 
828 
829 
830 //=================================================================================================
831 //
832 // ISALIGNED SPECIALIZATIONS
833 //
834 //=================================================================================================
835 
836 //*************************************************************************************************
838 template< typename VT, bool TF, size_t... CEAs >
839 struct IsAligned< DVecExpandExpr<VT,TF,CEAs...> >
840  : public IsAligned<VT>
841 {};
843 //*************************************************************************************************
844 
845 
846 
847 
848 //=================================================================================================
849 //
850 // ISPADDED SPECIALIZATIONS
851 //
852 //=================================================================================================
853 
854 //*************************************************************************************************
856 template< typename VT, bool TF, size_t... CEAs >
857 struct IsPadded< DVecExpandExpr<VT,TF,CEAs...> >
858  : public IsPadded<VT>
859 {};
861 //*************************************************************************************************
862 
863 } // namespace blaze
864 
865 #endif
Header file for auxiliary alias declarations.
ElementType_t< VT > ElementType
Resulting element type.
Definition: DVecExpandExpr.h:141
ReturnType_t< VT > ReturnType
Return type for expression template evaluations.
Definition: DVecExpandExpr.h:142
Header file for basic type definitions.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
Header file for the implementation of the ExpandExprData class template.
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecExpandExpr.h:330
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DVecExpandExpr.h:139
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row/column i.
Definition: DVecExpandExpr.h:249
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Header file for the serial shim.
ExpandTrait_t< VT, CEAs... > ResultType
Result type for expression template evaluations.
Definition: DVecExpandExpr.h:138
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DVecExpandExpr.h:308
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DVecExpandExpr.h:209
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DVecExpandExpr.h:187
Header file for the DenseVector base class.
Header file for the MAYBE_UNUSED function template.
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DVecExpandExpr.h:340
Header file for the RequiresEvaluation type trait.
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DVecExpandExpr.h:140
Operand operand() const noexcept
Returns the dense vector operand.
Definition: DVecExpandExpr.h:292
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
Header file for the SIMD trait.
ResultType_t< VT > RT
Result type of the dense vector expression.
Definition: DVecExpandExpr.h:97
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes....
Definition: DenseMatrix.h:81
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DVecExpandExpr.h:272
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
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DVecExpandExpr.h:159
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
Header file for the If class template.
Header file for the Transformation base class.
Header file for the expand trait.
ExpandExprData< CEAs... > DataType
The type of the ExpandExprData base class.
Definition: DVecExpandExpr.h:99
DVecExpandExpr(const VT &dv, REAs... args) noexcept
Constructor for the DVecExpandExpr class.
Definition: DVecExpandExpr.h:174
#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 DenseMatrix base class.
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
Header file for the GetMemberType type trait.
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
Header file for the IsAligned type trait.
Constraint on the data type.
If_t< IsExpression_v< VT >, const VT, const VT & > Operand
Composite data type of the dense matrix expression.
Definition: DVecExpandExpr.h:151
Constraint on the data type.
Header file for the exception macros of the math module.
Header file for the EnableIf class template.
Header file for the IsPadded type trait.
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DVecExpandExpr.h:164
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DVecExpandExpr.h:156
Header file for run time assertion macros.
Utility type for generic codes.
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
decltype(auto) expand(const DenseVector< VT, TF > &dv, size_t expansion)
Expansion of the given dense vector.
Definition: DVecExpandExpr.h:739
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:295
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DVecExpandExpr.h:320
Header file for all forward declarations for expression class templates.
Base class for all transform expression templates.The Transformation class serves as a tag for all tr...
Definition: Transformation.h:65
Operand dv_
Dense vector of the expansion expression.
Definition: DVecExpandExpr.h:347
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:114
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
GetConstIterator_t< VT > ConstIterator
Iterator over the elements of the dense matrix.
Definition: DVecExpandExpr.h:148
BLAZE_ALWAYS_INLINE auto load(size_t i, size_t j) const noexcept
Access to the SIMD elements of the matrix.
Definition: DVecExpandExpr.h:227
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
Base class for all vector expansion expression templates.The VecExpandExpr class serves as a tag for ...
Definition: VecExpandExpr.h:67
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:194
typename ExpandTrait< T, CEAs... >::Type ExpandTrait_t
Auxiliary alias declaration for the ExpandTrait type trait.The ExpandTrait_t alias declaration provid...
Definition: ExpandTrait.h:171
#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 VecExpandExpr base class.
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the expansion expression.
Definition: DVecExpandExpr.h:113
Header file for the IsComputation type trait class.
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
BLAZE_CREATE_GET_TYPE_MEMBER_TYPE_TRAIT(GetConstIterator, ConstIterator, INVALID_TYPE)
Definition of the GetConstIterator type trait.
If_t< useAssign, const ResultType, const DVecExpandExpr & > CompositeType
Data type for composite expression templates.
Definition: DVecExpandExpr.h:145
Auxiliary class template for the data members of expressions expression classes.The auxiliary ExpandE...
Definition: ExpandExprData.h:63
Expression object for dense vector expansion.The DVecExpandExpr class represents the compile time exp...
Definition: DVecExpandExpr.h:90
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DVecExpandExpr.h:282
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row/column i.
Definition: DVecExpandExpr.h:261
System settings for the inline keywords.
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.In case the given data type T is not a dense or sparse vector type and in...
Definition: TransposeFlag.h:63
#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 IsExpression type trait class.
Header file for the function trace functionality.