Blaze 3.9
DVecDVecMapExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_DVECDVECMAPEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DVECDVECMAPEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <iterator>
44#include <utility>
45#include <blaze/math/Aliases.h>
69#include <blaze/math/SIMD.h>
80#include <blaze/system/Inline.h>
82#include <blaze/util/Assert.h>
83#include <blaze/util/EnableIf.h>
86#include <blaze/util/mpl/If.h>
87#include <blaze/util/Types.h>
88
89
90namespace blaze {
91
92//=================================================================================================
93//
94// CLASS DVECDVECMAPEXPR
95//
96//=================================================================================================
97
98//*************************************************************************************************
105template< typename VT1 // Type of the left-hand side dense vector
106 , typename VT2 // Type of the right-hand side dense vector
107 , typename OP // Type of the custom operation
108 , bool TF > // Transpose flag
110 : public VecVecMapExpr< DenseVector< DVecDVecMapExpr<VT1,VT2,OP,TF>, TF > >
111 , private Computation
112{
113 private:
114 //**Type definitions****************************************************************************
123 //**********************************************************************************************
124
125 //**Serial evaluation strategy******************************************************************
127
132 static constexpr bool useAssign = ( RequiresEvaluation_v<VT1> || RequiresEvaluation_v<VT2> );
133
136 template< typename VT >
137 static constexpr bool UseAssign_v = useAssign;
139 //**********************************************************************************************
140
141 //**Parallel evaluation strategy****************************************************************
143
149 template< typename VT >
150 static constexpr bool UseSMPAssign_v =
151 ( ( !VT1::smpAssignable || !VT2::smpAssignable ) && useAssign );
153 //**********************************************************************************************
154
155 public:
156 //**Type definitions****************************************************************************
159
162
166
168 using ReturnType = decltype( std::declval<OP>()( std::declval<RN1>(), std::declval<RN2>() ) );
169
172
174 using LeftOperand = If_t< IsExpression_v<VT1>, const VT1, const VT1& >;
175
177 using RightOperand = If_t< IsExpression_v<VT2>, const VT2, const VT2& >;
178
180 using Operation = OP;
181
184
187 //**********************************************************************************************
188
189 //**ConstIterator class definition**************************************************************
193 {
194 public:
195 //**Type definitions*************************************************************************
196 using IteratorCategory = std::random_access_iterator_tag;
200 using DifferenceType = ptrdiff_t;
201
202 // STL iterator requirements
208
211
214 //*******************************************************************************************
215
216 //**Constructor******************************************************************************
224 : left_ ( left ) // Iterator to the current left-hand side element
225 , right_( right ) // Iterator to the current right-hand side element
226 , op_ ( std::move(op) ) // The custom binary operation
227 {}
228 //*******************************************************************************************
229
230 //**Addition assignment operator*************************************************************
237 left_ += inc;
238 right_ += inc;
239 return *this;
240 }
241 //*******************************************************************************************
242
243 //**Subtraction assignment operator**********************************************************
250 left_ -= dec;
251 right_ -= dec;
252 return *this;
253 }
254 //*******************************************************************************************
255
256 //**Prefix increment operator****************************************************************
262 ++left_;
263 ++right_;
264 return *this;
265 }
266 //*******************************************************************************************
267
268 //**Postfix increment operator***************************************************************
274 return ConstIterator( left_++, right_++, op_ );
275 }
276 //*******************************************************************************************
277
278 //**Prefix decrement operator****************************************************************
284 --left_;
285 --right_;
286 return *this;
287 }
288 //*******************************************************************************************
289
290 //**Postfix decrement operator***************************************************************
296 return ConstIterator( left_--, right_--, op_ );
297 }
298 //*******************************************************************************************
299
300 //**Element access operator******************************************************************
305 inline ReturnType operator*() const {
306 return op_( *left_, *right_ );
307 }
308 //*******************************************************************************************
309
310 //**Load function****************************************************************************
315 inline auto load() const noexcept {
316 return op_.load( left_.load(), right_.load() );
317 }
318 //*******************************************************************************************
319
320 //**Equality operator************************************************************************
326 inline bool operator==( const ConstIterator& rhs ) const {
327 return left_ == rhs.left_;
328 }
329 //*******************************************************************************************
330
331 //**Inequality operator**********************************************************************
337 inline bool operator!=( const ConstIterator& rhs ) const {
338 return left_ != rhs.left_;
339 }
340 //*******************************************************************************************
341
342 //**Less-than operator***********************************************************************
348 inline bool operator<( const ConstIterator& rhs ) const {
349 return left_ < rhs.left_;
350 }
351 //*******************************************************************************************
352
353 //**Greater-than operator********************************************************************
359 inline bool operator>( const ConstIterator& rhs ) const {
360 return left_ > rhs.left_;
361 }
362 //*******************************************************************************************
363
364 //**Less-or-equal-than operator**************************************************************
370 inline bool operator<=( const ConstIterator& rhs ) const {
371 return left_ <= rhs.left_;
372 }
373 //*******************************************************************************************
374
375 //**Greater-or-equal-than operator***********************************************************
381 inline bool operator>=( const ConstIterator& rhs ) const {
382 return left_ >= rhs.left_;
383 }
384 //*******************************************************************************************
385
386 //**Subtraction operator*********************************************************************
392 inline DifferenceType operator-( const ConstIterator& rhs ) const {
393 return left_ - rhs.left_;
394 }
395 //*******************************************************************************************
396
397 //**Addition operator************************************************************************
404 friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
405 return ConstIterator( it.left_ + inc, it.right_ + inc, it.op_ );
406 }
407 //*******************************************************************************************
408
409 //**Addition operator************************************************************************
416 friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
417 return ConstIterator( it.left_ + inc, it.right_ + inc, it.op_ );
418 }
419 //*******************************************************************************************
420
421 //**Subtraction operator*********************************************************************
428 friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
429 return ConstIterator( it.left_ - dec, it.right_ - dec, it.op_ );
430 }
431 //*******************************************************************************************
432
433 private:
434 //**Member variables*************************************************************************
437 OP op_;
438 //*******************************************************************************************
439 };
440 //**********************************************************************************************
441
442 //**Compilation flags***************************************************************************
444 static constexpr bool simdEnabled =
445 ( VT1::simdEnabled && VT2::simdEnabled &&
446 If_t< HasSIMDEnabled_v<OP>, GetSIMDEnabled<OP,ET1,ET2>, HasLoad<OP> >::value );
447
449 static constexpr bool smpAssignable = ( VT1::smpAssignable && VT2::smpAssignable );
450 //**********************************************************************************************
451
452 //**SIMD properties*****************************************************************************
454 static constexpr size_t SIMDSIZE = SIMDTrait<ElementType>::size;
455 //**********************************************************************************************
456
457 //**Constructor*********************************************************************************
464 inline DVecDVecMapExpr( const VT1& lhs, const VT2& rhs, OP op ) noexcept
465 : lhs_( lhs ) // Left-hand side dense vector of the map expression
466 , rhs_( rhs ) // Right-hand side dense vector of the map expression
467 , op_ ( std::move(op) ) // The custom binary operation
468 {}
469 //**********************************************************************************************
470
471 //**Subscript operator**************************************************************************
477 inline ReturnType operator[]( size_t index ) const {
478 BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
479 return op_( lhs_[index], rhs_[index] );
480 }
481 //**********************************************************************************************
482
483 //**At function*********************************************************************************
490 inline ReturnType at( size_t index ) const {
491 if( index >= lhs_.size() ) {
492 BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
493 }
494 return (*this)[index];
495 }
496 //**********************************************************************************************
497
498 //**Load function*******************************************************************************
504 BLAZE_ALWAYS_INLINE auto load( size_t index ) const noexcept {
505 BLAZE_INTERNAL_ASSERT( index < lhs_.size() , "Invalid vector access index" );
506 BLAZE_INTERNAL_ASSERT( index % SIMDSIZE == 0UL, "Invalid vector access index" );
507 return op_.load( lhs_.load( index ), rhs_.load( index ) );
508 }
509 //**********************************************************************************************
510
511 //**Begin function******************************************************************************
516 inline ConstIterator begin() const {
517 return ConstIterator( lhs_.begin(), rhs_.begin(), op_ );
518 }
519 //**********************************************************************************************
520
521 //**End function********************************************************************************
526 inline ConstIterator end() const {
527 return ConstIterator( lhs_.end(), rhs_.end(), op_ );
528 }
529 //**********************************************************************************************
530
531 //**Size function*******************************************************************************
536 inline size_t size() const noexcept {
537 return lhs_.size();
538 }
539 //**********************************************************************************************
540
541 //**Left operand access*************************************************************************
546 inline LeftOperand leftOperand() const noexcept {
547 return lhs_;
548 }
549 //**********************************************************************************************
550
551 //**Right operand access************************************************************************
556 inline RightOperand rightOperand() const noexcept {
557 return rhs_;
558 }
559 //**********************************************************************************************
560
561 //**Operation access****************************************************************************
566 inline Operation operation() const {
567 return op_;
568 }
569 //**********************************************************************************************
570
571 //**********************************************************************************************
577 template< typename T >
578 inline bool canAlias( const T* alias ) const noexcept {
579 return ( IsExpression_v<VT1> && lhs_.canAlias( alias ) ) ||
580 ( IsExpression_v<VT2> && rhs_.canAlias( alias ) );
581 }
582 //**********************************************************************************************
583
584 //**********************************************************************************************
590 template< typename T >
591 inline bool isAliased( const T* alias ) const noexcept {
592 return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
593 }
594 //**********************************************************************************************
595
596 //**********************************************************************************************
601 inline bool isAligned() const noexcept {
602 return lhs_.isAligned() && rhs_.isAligned();
603 }
604 //**********************************************************************************************
605
606 //**********************************************************************************************
611 inline bool canSMPAssign() const noexcept {
612 return lhs_.canSMPAssign() && rhs_.canSMPAssign();
613 }
614 //**********************************************************************************************
615
616 private:
617 //**Member variables****************************************************************************
621 //**********************************************************************************************
622
623 //**Assignment to dense vectors*****************************************************************
637 template< typename VT > // Type of the target dense vector
638 friend inline auto assign( DenseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
640 {
642
643 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
644
645 LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
646 RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
647
648 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
649 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
650
651 assign( *lhs, map( x, y, rhs.op_ ) );
652 }
654 //**********************************************************************************************
655
656 //**Assignment to sparse vectors****************************************************************
670 template< typename VT > // Type of the target sparse vector
671 friend inline auto assign( SparseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
673 {
675
679
680 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
681
682 const ResultType tmp( serial( rhs ) );
683 assign( *lhs, tmp );
684 }
686 //**********************************************************************************************
687
688 //**Addition assignment to dense vectors********************************************************
702 template< typename VT > // Type of the target dense vector
703 friend inline auto addAssign( DenseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
704 -> EnableIf_t< UseAssign_v<VT> >
705 {
707
708 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
709
710 LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
711 RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
712
713 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
714 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
715
716 addAssign( *lhs, map( x, y, rhs.op_ ) );
717 }
719 //**********************************************************************************************
720
721 //**Addition assignment to sparse vectors*******************************************************
722 // No special implementation for the addition assignment to sparse vectors.
723 //**********************************************************************************************
724
725 //**Subtraction assignment to dense vectors*****************************************************
739 template< typename VT > // Type of the target dense vector
740 friend inline auto subAssign( DenseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
741 -> EnableIf_t< UseAssign_v<VT> >
742 {
744
745 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
746
747 LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
748 RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
749
750 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
751 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
752
753 subAssign( *lhs, map( x, y, rhs.op_ ) );
754 }
756 //**********************************************************************************************
757
758 //**Subtraction assignment to sparse vectors****************************************************
759 // No special implementation for the subtraction assignment to sparse vectors.
760 //**********************************************************************************************
761
762 //**Multiplication assignment to dense vectors**************************************************
776 template< typename VT > // Type of the target dense vector
777 friend inline auto multAssign( DenseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
778 -> EnableIf_t< UseAssign_v<VT> >
779 {
781
782 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
783
784 LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
785 RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
786
787 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
788 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
789
790 multAssign( *lhs, map( x, y, rhs.op_ ) );
791 }
793 //**********************************************************************************************
794
795 //**Multiplication assignment to sparse vectors*************************************************
796 // No special implementation for the multiplication assignment to sparse vectors.
797 //**********************************************************************************************
798
799 //**Division assignment to dense vectors********************************************************
813 template< typename VT > // Type of the target dense vector
814 friend inline auto divAssign( DenseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
815 -> EnableIf_t< UseAssign_v<VT> >
816 {
818
819 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
820
821 LT x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense vector operand
822 RT y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
823
824 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
825 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
826
827 divAssign( *lhs, map( x, y, rhs.op_ ) );
828 }
830 //**********************************************************************************************
831
832 //**Division assignment to sparse vectors*******************************************************
833 // No special implementation for the division assignment to sparse vectors.
834 //**********************************************************************************************
835
836 //**SMP assignment to dense vectors*************************************************************
850 template< typename VT > // Type of the target dense vector
851 friend inline auto smpAssign( DenseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
852 -> EnableIf_t< UseSMPAssign_v<VT> >
853 {
855
856 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
857
858 LT x( rhs.lhs_ ); // Evaluation of the left-hand side dense vector operand
859 RT y( rhs.rhs_ ); // Evaluation of the right-hand side dense vector operand
860
861 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
862 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
863
864 smpAssign( *lhs, map( x, y, rhs.op_ ) );
865 }
867 //**********************************************************************************************
868
869 //**SMP assignment to sparse vectors************************************************************
883 template< typename VT > // Type of the target sparse vector
884 friend inline auto smpAssign( SparseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
885 -> EnableIf_t< UseSMPAssign_v<VT> >
886 {
888
892
893 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
894
895 const ResultType tmp( rhs );
896 smpAssign( *lhs, tmp );
897 }
899 //**********************************************************************************************
900
901 //**SMP addition assignment to dense vectors****************************************************
916 template< typename VT > // Type of the target dense vector
917 friend inline auto smpAddAssign( DenseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
918 -> EnableIf_t< UseSMPAssign_v<VT> >
919 {
921
922 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
923
924 LT x( rhs.lhs_ ); // Evaluation of the left-hand side dense vector operand
925 RT y( rhs.rhs_ ); // Evaluation of the right-hand side dense vector operand
926
927 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
928 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
929
930 smpAddAssign( *lhs, map( x, y, rhs.op_ ) );
931 }
933 //**********************************************************************************************
934
935 //**SMP addition assignment to sparse vectors***************************************************
936 // No special implementation for the SMP addition assignment to sparse vectors.
937 //**********************************************************************************************
938
939 //**SMP subtraction assignment to dense vectors*************************************************
954 template< typename VT > // Type of the target dense vector
955 friend inline auto smpSubAssign( DenseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
956 -> EnableIf_t< UseSMPAssign_v<VT> >
957 {
959
960 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
961
962 LT x( rhs.lhs_ ); // Evaluation of the left-hand side dense vector operand
963 RT y( rhs.rhs_ ); // Evaluation of the right-hand side dense vector operand
964
965 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
966 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
967
968 smpSubAssign( *lhs, map( x, y, rhs.op_ ) );
969 }
971 //**********************************************************************************************
972
973 //**SMP subtraction assignment to sparse vectors************************************************
974 // No special implementation for the SMP subtraction assignment to sparse vectors.
975 //**********************************************************************************************
976
977 //**SMP multiplication assignment to dense vectors**********************************************
992 template< typename VT > // Type of the target dense vector
993 friend inline auto smpMultAssign( DenseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
994 -> EnableIf_t< UseSMPAssign_v<VT> >
995 {
997
998 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
999
1000 LT x( rhs.lhs_ ); // Evaluation of the left-hand side dense vector operand
1001 RT y( rhs.rhs_ ); // Evaluation of the right-hand side dense vector operand
1002
1003 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
1004 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
1005
1006 smpMultAssign( *lhs, map( x, y, rhs.op_ ) );
1007 }
1009 //**********************************************************************************************
1010
1011 //**SMP multiplication assignment to sparse vectors*********************************************
1012 // No special implementation for the SMP multiplication assignment to sparse vectors.
1013 //**********************************************************************************************
1014
1015 //**SMP division assignment to dense vectors****************************************************
1030 template< typename VT > // Type of the target dense vector
1031 friend inline auto smpDivAssign( DenseVector<VT,TF>& lhs, const DVecDVecMapExpr& rhs )
1032 -> EnableIf_t< UseSMPAssign_v<VT> >
1033 {
1035
1036 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
1037
1038 LT x( rhs.lhs_ ); // Evaluation of the left-hand side dense vector operand
1039 RT y( rhs.rhs_ ); // Evaluation of the right-hand side dense vector operand
1040
1041 BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
1042 BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
1043
1044 smpDivAssign( *lhs, map( x, y, rhs.op_ ) );
1045 }
1047 //**********************************************************************************************
1048
1049 //**SMP division assignment to sparse vectors***************************************************
1050 // No special implementation for the SMP division assignment to sparse vectors.
1051 //**********************************************************************************************
1052
1053 //**Compile time checks*************************************************************************
1060 //**********************************************************************************************
1061};
1062//*************************************************************************************************
1063
1064
1065
1066
1067//=================================================================================================
1068//
1069// GLOBAL FUNCTIONS
1070//
1071//=================================================================================================
1072
1073//*************************************************************************************************
1097template< typename VT1 // Type of the left-hand side dense vector
1098 , typename VT2 // Type of the right-hand side dense vector
1099 , bool TF // Transpose flag
1100 , typename OP > // Type of the custom operation
1101inline decltype(auto)
1102 map( const DenseVector<VT1,TF>& lhs, const DenseVector<VT2,TF>& rhs, OP op )
1103{
1105
1106 if( (*lhs).size() != (*rhs).size() ) {
1107 BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
1108 }
1109
1110 using ReturnType = const DVecDVecMapExpr<VT1,VT2,OP,TF>;
1111 return ReturnType( *lhs, *rhs, std::move(op) );
1112}
1113//*************************************************************************************************
1114
1115
1116//*************************************************************************************************
1134template< typename VT1 // Type of the first dense vector
1135 , typename VT2 // Type of the second dense vector
1136 , typename VT3 // Type of the third dense vector
1137 , bool TF // Transpose flag
1138 , typename OP > // Type of the custom operation
1139inline decltype(auto)
1141 const DenseVector<VT3,TF>& dv3, OP op )
1142{
1144
1145 const MakePair mp{};
1146 return map( map( map( *dv1, *dv2, mp ), *dv3, mp ), join( std::move(op) ) );
1147}
1148//*************************************************************************************************
1149
1150
1151//*************************************************************************************************
1170template< typename VT1 // Type of the first dense vector
1171 , typename VT2 // Type of the second dense vector
1172 , typename VT3 // Type of the third dense vector
1173 , typename VT4 // Type of the fourth dense vector
1174 , bool TF // Transpose flag
1175 , typename OP > // Type of the custom operation
1176inline decltype(auto)
1178 const DenseVector<VT3,TF>& dv3, const DenseVector<VT4,TF>& dv4, OP op )
1179{
1181
1182 const MakePair mp{};
1183 return map( map( map( map( *dv1, *dv2, mp ), *dv3, mp ), *dv4, mp ), join( std::move(op) ) );
1184}
1185//*************************************************************************************************
1186
1187
1188//*************************************************************************************************
1208template< typename VT1 // Type of the first dense vector
1209 , typename VT2 // Type of the second dense vector
1210 , typename VT3 // Type of the third dense vector
1211 , typename VT4 // Type of the fourth dense vector
1212 , typename VT5 // Type of the fifth dense vector
1213 , bool TF // Transpose flag
1214 , typename OP > // Type of the custom operation
1215inline decltype(auto)
1217 const DenseVector<VT3,TF>& dv3, const DenseVector<VT4,TF>& dv4,
1218 const DenseVector<VT5,TF>& dv5, OP op )
1219{
1221
1222 const MakePair mp{};
1223 return map( map( map( map( map( *dv1, *dv2, mp ), *dv3, mp ), *dv4, mp ), *dv5, mp ), join( std::move(op) ) );
1224}
1225//*************************************************************************************************
1226
1227
1228//*************************************************************************************************
1249template< typename VT1 // Type of the first dense vector
1250 , typename VT2 // Type of the second dense vector
1251 , typename VT3 // Type of the third dense vector
1252 , typename VT4 // Type of the fourth dense vector
1253 , typename VT5 // Type of the fifth dense vector
1254 , typename VT6 // Type of the sixth dense vector
1255 , bool TF // Transpose flag
1256 , typename OP > // Type of the custom operation
1257inline decltype(auto)
1259 const DenseVector<VT3,TF>& dv3, const DenseVector<VT4,TF>& dv4,
1260 const DenseVector<VT5,TF>& dv5, const DenseVector<VT6,TF>& dv6, OP op )
1261{
1263
1264 const MakePair mp{};
1265 return map( map( map( map( map( map( *dv1, *dv2, mp ), *dv3, mp ), *dv4, mp ), *dv5, mp ), *dv6, mp ), join( std::move(op) ) );
1266}
1267//*************************************************************************************************
1268
1269
1270//*************************************************************************************************
1292template< typename VT1 // Type of the left-hand side dense vector
1293 , typename VT2 // Type of the right-hand side dense vector
1294 , bool TF > // Transpose flag
1295inline decltype(auto)
1297{
1299
1300 return map( *lhs, *rhs, Min() );
1301}
1302//*************************************************************************************************
1303
1304
1305//*************************************************************************************************
1327template< typename VT1 // Type of the left-hand side dense vector
1328 , typename VT2 // Type of the right-hand side dense vector
1329 , bool TF > // Transpose flag
1330inline decltype(auto)
1332{
1334
1335 return map( *lhs, *rhs, Max() );
1336}
1337//*************************************************************************************************
1338
1339
1340//*************************************************************************************************
1362template< typename VT1 // Type of the left-hand side dense vector
1363 , typename VT2 // Type of the right-hand side dense vector
1364 , bool TF > // Transpose flag
1365inline decltype(auto)
1367{
1369
1370 return map( *lhs, *rhs, Hypot() );
1371}
1372//*************************************************************************************************
1373
1374
1375//*************************************************************************************************
1397template< typename VT1 // Type of the left-hand side dense vector
1398 , typename VT2 // Type of the right-hand side dense vector
1399 , bool TF > // Transpose flag
1400inline decltype(auto)
1402{
1404
1405 return map( *lhs, *rhs, Pow() );
1406}
1407//*************************************************************************************************
1408
1409
1410//*************************************************************************************************
1432template< typename VT1 // Type of the left-hand side dense vector
1433 , typename VT2 // Type of the right-hand side dense vector
1434 , bool TF > // Transpose flag
1435inline decltype(auto)
1437{
1439
1440 return map( *lhs, *rhs, Atan2() );
1441}
1442//*************************************************************************************************
1443
1444
1445//*************************************************************************************************
1475template< typename VT1 // Type of the conditional dense vector
1476 , typename VT2 // Type of the true-case dense vector
1477 , typename VT3 // Type of the false-case dense vector
1478 , bool TF > // Transpose flag
1479inline decltype(auto)
1481{
1483
1484 return map( cond, lhs, rhs, []( bool c, const auto& a, const auto& b ) { return c ? a : b; } );
1485}
1486//*************************************************************************************************
1487
1488
1489
1490
1491//=================================================================================================
1492//
1493// GLOBAL BINARY ARITHMETIC OPERATORS
1494//
1495//=================================================================================================
1496
1497//*************************************************************************************************
1517template< typename VT1 // Type of the left-hand side dense vector
1518 , typename VT2 // Type of the right-hand side dense vector
1519 , bool TF > // Transpose flag
1520inline decltype(auto)
1521 operator<<( const DenseVector<VT1,TF>& lhs, const DenseVector<VT2,TF>& rhs )
1522{
1524
1525 return map( *lhs, *rhs, ShiftLV() );
1526}
1527//*************************************************************************************************
1528
1529
1530//*************************************************************************************************
1550template< typename VT1 // Type of the left-hand side dense vector
1551 , typename VT2 // Type of the right-hand side dense vector
1552 , bool TF > // Transpose flag
1553inline decltype(auto)
1554 operator>>( const DenseVector<VT1,TF>& lhs, const DenseVector<VT2,TF>& rhs )
1555{
1557
1558 return map( *lhs, *rhs, ShiftRV() );
1559}
1560//*************************************************************************************************
1561
1562
1563//*************************************************************************************************
1583template< typename VT1 // Type of the left-hand side dense vector
1584 , typename VT2 // Type of the right-hand side dense vector
1585 , bool TF > // Transpose flag
1586inline decltype(auto)
1587 operator&( const DenseVector<VT1,TF>& lhs, const DenseVector<VT2,TF>& rhs )
1588{
1590
1591 return map( *lhs, *rhs, Bitand() );
1592}
1593//*************************************************************************************************
1594
1595
1596//*************************************************************************************************
1616template< typename VT1 // Type of the left-hand side dense vector
1617 , typename VT2 // Type of the right-hand side dense vector
1618 , bool TF > // Transpose flag
1619inline decltype(auto)
1620 operator|( const DenseVector<VT1,TF>& lhs, const DenseVector<VT2,TF>& rhs )
1621{
1623
1624 return map( *lhs, *rhs, Bitor() );
1625}
1626//*************************************************************************************************
1627
1628
1629//*************************************************************************************************
1649template< typename VT1 // Type of the left-hand side dense vector
1650 , typename VT2 // Type of the right-hand side dense vector
1651 , bool TF > // Transpose flag
1652inline decltype(auto)
1653 operator^( const DenseVector<VT1,TF>& lhs, const DenseVector<VT2,TF>& rhs )
1654{
1656
1657 return map( *lhs, *rhs, Bitxor() );
1658}
1659//*************************************************************************************************
1660
1661
1662
1663
1664//=================================================================================================
1665//
1666// GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
1667//
1668//=================================================================================================
1669
1670//*************************************************************************************************
1684template< typename VT1 // Type of the left-hand side dense vector
1685 , typename VT2 // Type of the middle dense vector
1686 , typename VT3 // Type of the right-hand side dense vector
1687 , bool TF > // Transpose flag
1688inline decltype(auto)
1689 operator<<( const DVecDVecMapExpr<VT1,VT2,ShiftLV,TF>& lhs, const DenseVector<VT3,TF>& rhs )
1690{
1692
1693 return map( lhs.leftOperand(), lhs.rightOperand() + (*rhs), lhs.operation() );
1694}
1696//*************************************************************************************************
1697
1698
1699//*************************************************************************************************
1713template< typename VT1 // Type of the left-hand side dense vector
1714 , typename VT2 // Type of the middle dense vector
1715 , typename VT3 // Type of the right-hand side dense vector
1716 , bool TF > // Transpose flag
1717inline decltype(auto)
1718 operator>>( const DVecDVecMapExpr<VT1,VT2,ShiftRV,TF>& lhs, const DenseVector<VT3,TF>& rhs )
1719{
1721
1722 return map( lhs.leftOperand(), lhs.rightOperand() + (*rhs), lhs.operation() );
1723}
1725//*************************************************************************************************
1726
1727
1728
1729
1730//=================================================================================================
1731//
1732// GLOBAL BINARY LOGICAL OPERATORS
1733//
1734//=================================================================================================
1735
1736//*************************************************************************************************
1756template< typename VT1 // Type of the left-hand side dense vector
1757 , typename VT2 // Type of the right-hand side dense vector
1758 , bool TF > // Transpose flag
1759inline decltype(auto)
1760 operator&&( const DenseVector<VT1,TF>& lhs, const DenseVector<VT2,TF>& rhs )
1761{
1763
1764 return map( *lhs, *rhs, And{} );
1765}
1766//*************************************************************************************************
1767
1768
1769//*************************************************************************************************
1789template< typename VT1 // Type of the left-hand side dense vector
1790 , typename VT2 // Type of the right-hand side dense vector
1791 , bool TF > // Transpose flag
1792inline decltype(auto)
1793 operator||( const DenseVector<VT1,TF>& lhs, const DenseVector<VT2,TF>& rhs )
1794{
1796
1797 return map( *lhs, *rhs, Or{} );
1798}
1799//*************************************************************************************************
1800
1801
1802
1803
1804//=================================================================================================
1805//
1806// ISALIGNED SPECIALIZATIONS
1807//
1808//=================================================================================================
1809
1810//*************************************************************************************************
1812template< typename VT1, typename VT2, typename OP, bool TF >
1813struct IsAligned< DVecDVecMapExpr<VT1,VT2,OP,TF> >
1814 : public BoolConstant< IsAligned_v<VT1> && IsAligned_v<VT2> >
1815{};
1817//*************************************************************************************************
1818
1819
1820
1821
1822//=================================================================================================
1823//
1824// ISPADDED SPECIALIZATIONS
1825//
1826//=================================================================================================
1827
1828//*************************************************************************************************
1830template< typename VT1, typename VT2, typename OP, bool TF >
1831struct IsPadded< DVecDVecMapExpr<VT1,VT2,OP,TF> >
1832 : public BoolConstant< IsPadded_v<VT1> && IsPadded_v<VT2> && IsPaddingEnabled_v<OP> >
1833{};
1835//*************************************************************************************************
1836
1837} // namespace blaze
1838
1839#endif
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition: Aliases.h:110
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.
Definition: Aliases.h:470
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition: Aliases.h:450
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.
Definition: Aliases.h:130
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.
Definition: Aliases.h:550
Header file for run time assertion macros.
Header file for the EnableIf class template.
Header file for the function trace functionality.
Header file for the HasLoad type trait.
Macro for CUDA compatibility.
Header file for the If class template.
Header file for the IntegralConstant class template.
Header file for the IsAligned type trait.
Header file for the IsExpression type trait class.
Header file for the IsPadded type trait.
Header file for the IsPaddingEnabled type trait.
Header file for the IsSIMDEnabled type trait.
Header file for the IsVector type trait.
Header file for the Join functor.
Deactivation of problematic macros.
Header file for the MakePair functor.
Header file for the map trait.
Header file for all SIMD functionality.
Iterator over the elements of the dense vector map expression.
Definition: DVecDVecMapExpr.h:193
IteratorCategory iterator_category
The iterator category.
Definition: DVecDVecMapExpr.h:203
RightIteratorType right_
Iterator to the current right-hand side element.
Definition: DVecDVecMapExpr.h:436
PointerType pointer
Pointer return type.
Definition: DVecDVecMapExpr.h:205
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecDVecMapExpr.h:381
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecDVecMapExpr.h:326
BLAZE_DEVICE_CALLABLE const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecDVecMapExpr.h:273
ConstIterator_t< VT2 > RightIteratorType
ConstIterator type of the right-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:213
ConstIterator_t< VT1 > LeftIteratorType
ConstIterator type of the left-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:210
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecDVecMapExpr.h:359
BLAZE_DEVICE_CALLABLE ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecDVecMapExpr.h:249
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecDVecMapExpr.h:337
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecDVecMapExpr.h:196
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecDVecMapExpr.h:404
auto load() const noexcept
Access to the SIMD elements of the vector.
Definition: DVecDVecMapExpr.h:315
LeftIteratorType left_
Iterator to the current left-hand side element.
Definition: DVecDVecMapExpr.h:435
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecDVecMapExpr.h:428
ValueType value_type
Type of the underlying elements.
Definition: DVecDVecMapExpr.h:204
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecDVecMapExpr.h:416
ElementType * PointerType
Pointer return type.
Definition: DVecDVecMapExpr.h:198
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecDVecMapExpr.h:370
ReferenceType reference
Reference return type.
Definition: DVecDVecMapExpr.h:206
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecDVecMapExpr.h:305
BLAZE_DEVICE_CALLABLE ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecDVecMapExpr.h:236
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecDVecMapExpr.h:200
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecDVecMapExpr.h:348
ElementType ValueType
Type of the underlying elements.
Definition: DVecDVecMapExpr.h:197
ElementType & ReferenceType
Reference return type.
Definition: DVecDVecMapExpr.h:199
DifferenceType difference_type
Difference between two iterators.
Definition: DVecDVecMapExpr.h:207
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecDVecMapExpr.h:392
ConstIterator(LeftIteratorType left, RightIteratorType right, OP op)
Constructor for the ConstIterator class.
Definition: DVecDVecMapExpr.h:223
BLAZE_DEVICE_CALLABLE ConstIterator & operator++()
Pre-increment operator.
Definition: DVecDVecMapExpr.h:261
BLAZE_DEVICE_CALLABLE const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecDVecMapExpr.h:295
OP op_
The custom binary operation.
Definition: DVecDVecMapExpr.h:437
BLAZE_DEVICE_CALLABLE ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecDVecMapExpr.h:283
Expression object for the dense vector-dense vector map() function.
Definition: DVecDVecMapExpr.h:112
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DVecDVecMapExpr.h:164
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense vector operand.
Definition: DVecDVecMapExpr.h:546
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecDVecMapExpr.h:516
If_t< RequiresEvaluation_v< VT2 >, const RT2, CT2 > RT
Type for the assignment of the right-hand side dense vector operand.
Definition: DVecDVecMapExpr.h:186
DVecDVecMapExpr(const VT1 &lhs, const VT2 &rhs, OP op) noexcept
Constructor for the DVecDVecMapExpr class.
Definition: DVecDVecMapExpr.h:464
Operation operation() const
Returns a copy of the custom operation.
Definition: DVecDVecMapExpr.h:566
ResultType_t< VT1 > RT1
Result type of the left-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:115
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DVecDVecMapExpr.h:591
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecDVecMapExpr.h:526
If_t< useAssign, const ResultType, const DVecDVecMapExpr & > CompositeType
Data type for composite expression templates.
Definition: DVecDVecMapExpr.h:171
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the map expression.
Definition: DVecDVecMapExpr.h:132
CompositeType_t< VT2 > CT2
Composite type of the right-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:122
ReturnType_t< VT2 > RN2
Return type of the right-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:120
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: DVecDVecMapExpr.h:490
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecDVecMapExpr.h:601
RightOperand rhs_
Right-hand side dense vector of the map expression.
Definition: DVecDVecMapExpr.h:619
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DVecDVecMapExpr.h:444
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: DVecDVecMapExpr.h:165
If_t< IsExpression_v< VT2 >, const VT2, const VT2 & > RightOperand
Composite type of the right-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:177
ElementType_t< VT2 > ET2
Element type of the right-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:118
RightOperand rightOperand() const noexcept
Returns the right-hand side dense vector operand.
Definition: DVecDVecMapExpr.h:556
MapTrait_t< RT1, RT2, OP > ResultType
Result type for expression template evaluations.
Definition: DVecDVecMapExpr.h:163
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: DVecDVecMapExpr.h:536
ElementType_t< VT1 > ET1
Element type of the left-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:117
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecDVecMapExpr.h:477
ResultType_t< VT2 > RT2
Result type of the right-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:116
ReturnType_t< VT1 > RN1
Return type of the left-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:119
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: DVecDVecMapExpr.h:454
BLAZE_ALWAYS_INLINE auto load(size_t index) const noexcept
Access to the SIMD elements of the vector.
Definition: DVecDVecMapExpr.h:504
Operation op_
The custom binary operation.
Definition: DVecDVecMapExpr.h:620
If_t< IsExpression_v< VT1 >, const VT1, const VT1 & > LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:174
LeftOperand lhs_
Left-hand side dense vector of the map expression.
Definition: DVecDVecMapExpr.h:618
OP Operation
Data type of the custom binary operation.
Definition: DVecDVecMapExpr.h:180
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DVecDVecMapExpr.h:449
decltype(std::declval< OP >()(std::declval< RN1 >(), std::declval< RN2 >())) ReturnType
Return type for expression template evaluations.
Definition: DVecDVecMapExpr.h:168
CompositeType_t< VT1 > CT1
Composite type of the left-hand side dense vector expression.
Definition: DVecDVecMapExpr.h:121
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DVecDVecMapExpr.h:578
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DVecDVecMapExpr.h:611
If_t< RequiresEvaluation_v< VT1 >, const RT1, CT1 > LT
Type for the assignment of the left-hand side dense vector operand.
Definition: DVecDVecMapExpr.h:183
Base class for N-dimensional dense vectors.
Definition: DenseVector.h:77
SIMD characteristics of data types.
Definition: SIMDTrait.h:297
Base class for sparse vectors.
Definition: SparseVector.h:72
Constraint on the data type.
Constraint on the data type.
Header file for the Computation base class.
Header file for the DenseVector base class.
Header file for the VecVecMapExpr base class.
Header file for the Atan2 functor.
Header file for the Bitand functor.
Header file for the Bitor functor.
Header file for the Bitxor functor.
Header file for the Hypot functor.
Header file for the Pow functor.
Header file for the ShiftLV functor.
Header file for the ShiftRV functor.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:812
decltype(auto) map(const DenseVector< VT1, TF > &dv1, const DenseVector< VT2, TF > &dv2, const DenseVector< VT3, TF > &dv3, const DenseVector< VT4, TF > &dv4, const DenseVector< VT5, TF > &dv5, const DenseVector< VT6, TF > &dv6, OP op)
Elementwise evaluation of the given 6-ary operation on each single element of the dense vectors dv1,...
Definition: DVecDVecMapExpr.h:1258
decltype(auto) min(const DenseVector< VT1, TF > &lhs, const DenseVector< VT2, TF > &rhs)
Computes the componentwise minimum of the dense vectors lhs and rhs.
Definition: DVecDVecMapExpr.h:1296
decltype(auto) max(const DenseVector< VT1, TF > &lhs, const DenseVector< VT2, TF > &rhs)
Computes the componentwise maximum of the dense vectors lhs and rhs.
Definition: DVecDVecMapExpr.h:1331
decltype(auto) select(const DenseVector< VT1, TF > &cond, const DenseVector< VT2, TF > &lhs, const DenseVector< VT3, TF > &rhs)
Elementwise conditional selection of values from the dense vectors lhs and rhs.
Definition: DVecDVecMapExpr.h:1480
decltype(auto) hypot(const DenseVector< VT1, TF > &lhs, const DenseVector< VT2, TF > &rhs)
Computes the componentwise hypotenous for the dense vectors lhs and rhs.
Definition: DVecDVecMapExpr.h:1366
decltype(auto) pow(const DenseVector< VT1, TF > &lhs, const DenseVector< VT2, TF > &rhs)
Computes the componentwise exponential value for the dense vectors lhs and rhs.
Definition: DVecDVecMapExpr.h:1401
decltype(auto) atan2(const DenseVector< VT1, TF > &lhs, const DenseVector< VT2, TF > &rhs)
Computes the multi-valued inverse tangent of the dense vectors lhs and rhs.
Definition: DVecDVecMapExpr.h:1436
constexpr Join< OP > join(const OP &op)
Wraps the given operation to unpack paired arguments.
Definition: Join.h:183
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition: RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.
Definition: TransposeFlag.h:63
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition: DenseVector.h:61
typename MapTrait< Args... >::Type MapTrait_t
Auxiliary alias declaration for the MapTrait class template.
Definition: MapTrait.h:131
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
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:221
auto smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:162
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:100
auto 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:192
auto smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:131
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition: If.h:108
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition: IntegralConstant.h:110
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition: Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition: Exception.h:235
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
Header file for the exception macros of the math module.
Constraint on the data type.
Header file for all forward declarations for expression class templates.
Header file for the And functor.
Header file for the Max functor.
Header file for the Min functor.
Header file for the Or functor.
Header file for the serial shim.
Generic wrapper for the logical AND operator.
Definition: And.h:60
Generic wrapper for the atan2() function.
Definition: Atan2.h:80
Generic wrapper for the bitwise AND ('&') operator.
Definition: Bitand.h:82
Generic wrapper for the bitwise OR ('|') operator.
Definition: Bitor.h:82
Generic wrapper for the bitwise XOR ('^') operator.
Definition: Bitxor.h:68
Base class for all compute expression templates.
Definition: Computation.h:68
Generic wrapper for the hypot() function.
Definition: Hypot.h:80
Generic wrapper for the make_pair() function.
Definition: MakePair.h:82
Generic wrapper for the max() function.
Definition: Max.h:82
Generic wrapper for the min() function.
Definition: Min.h:82
Generic wrapper for the logical OR operator.
Definition: Or.h:60
Generic wrapper for the pow() function.
Definition: Pow.h:65
Generic wrapper for the elementwise left-shift operation.
Definition: ShiftLV.h:77
Generic wrapper for the elementwise right-shift operation.
Definition: ShiftRV.h:77
Base class for all binary vector map expression templates.
Definition: VecVecMapExpr.h:68
System settings for the inline keywords.
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.