Blaze 3.9
SVecMapExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_SVECMAPEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_SVECMAPEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <iterator>
44#include <utility>
45#include <blaze/math/Aliases.h>
54#include <blaze/math/Functors.h>
65#include <blaze/util/Assert.h>
66#include <blaze/util/EnableIf.h>
68#include <blaze/util/mpl/If.h>
69#include <blaze/util/Types.h>
72
73
74namespace blaze {
75
76//=================================================================================================
77//
78// CLASS SVECMAPEXPR
79//
80//=================================================================================================
81
82//*************************************************************************************************
89template< typename VT // Type of the sparse vector
90 , typename OP // Type of the custom operation
91 , bool TF > // Transpose flag
93 : public VecMapExpr< SparseVector< SVecMapExpr<VT,OP,TF>, TF > >
94 , private Computation
95{
96 private:
97 //**Type definitions****************************************************************************
100 //**********************************************************************************************
101
102 //**Serial evaluation strategy******************************************************************
104
110 static constexpr bool useAssign = RequiresEvaluation_v<VT>;
111
114 template< typename VT2 >
115 static constexpr bool UseAssign_v = useAssign;
117 //**********************************************************************************************
118
119 //**Parallel evaluation strategy****************************************************************
121
127 template< typename VT2 >
128 static constexpr bool UseSMPAssign_v =
129 ( ( !VT2::smpAssignable || !VT::smpAssignable ) && useAssign );
131 //**********************************************************************************************
132
133 public:
134 //**Type definitions****************************************************************************
137
140
144
146 using ReturnType = decltype( std::declval<OP>()( std::declval<RN>() ) );
147
150
152 using Operand = If_t< IsExpression_v<VT>, const VT, const VT& >;
153
155 using Operation = OP;
156 //**********************************************************************************************
157
158 //**ConstIterator class definition**************************************************************
162 {
163 public:
164 //**Type definitions*************************************************************************
167
170
171 using IteratorCategory = std::forward_iterator_tag;
175 using DifferenceType = ptrdiff_t;
176
177 // STL iterator requirements
183 //*******************************************************************************************
184
185 //**Constructor******************************************************************************
191 inline ConstIterator( IteratorType it, OP op )
192 : it_( it ) // Iterator over the elements of the sparse vector expression
193 , op_( std::move(op) ) // The custom unary operation
194 {}
195 //*******************************************************************************************
196
197 //**Prefix increment operator****************************************************************
203 ++it_;
204 return *this;
205 }
206 //*******************************************************************************************
207
208 //**Element access operator******************************************************************
213 inline const Element operator*() const {
214 return Element( op_( it_->value() ), it_->index() );
215 }
216 //*******************************************************************************************
217
218 //**Element access operator******************************************************************
223 inline const ConstIterator* operator->() const {
224 return this;
225 }
226 //*******************************************************************************************
227
228 //**Value function***************************************************************************
233 inline ReturnType value() const {
234 return op_( it_->value() );
235 }
236 //*******************************************************************************************
237
238 //**Index function***************************************************************************
243 inline size_t index() const {
244 return it_->index();
245 }
246 //*******************************************************************************************
247
248 //**Equality operator************************************************************************
254 inline bool operator==( const ConstIterator& rhs ) const {
255 return it_ == rhs.it_;
256 }
257 //*******************************************************************************************
258
259 //**Inequality operator**********************************************************************
265 inline bool operator!=( const ConstIterator& rhs ) const {
266 return it_ != rhs.it_;
267 }
268 //*******************************************************************************************
269
270 //**Subtraction operator*********************************************************************
276 inline DifferenceType operator-( const ConstIterator& rhs ) const {
277 return it_ - rhs.it_;
278 }
279 //*******************************************************************************************
280
281 private:
282 //**Member variables*************************************************************************
284 OP op_;
285 //*******************************************************************************************
286 };
287 //**********************************************************************************************
288
289 //**Compilation flags***************************************************************************
291 static constexpr bool smpAssignable = VT::smpAssignable;
292 //**********************************************************************************************
293
294 //**Constructor*********************************************************************************
300 inline SVecMapExpr( const VT& sv, OP op ) noexcept
301 : sv_( sv ) // Sparse vector of the map expression
302 , op_( std::move(op) ) // The custom unary operation
303 {}
304 //**********************************************************************************************
305
306 //**Subscript operator**************************************************************************
312 inline ReturnType operator[]( size_t index ) const {
313 BLAZE_INTERNAL_ASSERT( index < sv_.size(), "Invalid vector access index" );
314 return op_( sv_[index] );
315 }
316 //**********************************************************************************************
317
318 //**At function*********************************************************************************
325 inline ReturnType at( size_t index ) const {
326 if( index >= sv_.size() ) {
327 BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
328 }
329 return (*this)[index];
330 }
331 //**********************************************************************************************
332
333 //**Begin function******************************************************************************
338 inline ConstIterator begin() const {
339 return ConstIterator( sv_.begin(), op_ );
340 }
341 //**********************************************************************************************
342
343 //**End function********************************************************************************
348 inline ConstIterator end() const {
349 return ConstIterator( sv_.end(), op_ );
350 }
351 //**********************************************************************************************
352
353 //**Size function*******************************************************************************
358 inline size_t size() const noexcept {
359 return sv_.size();
360 }
361 //**********************************************************************************************
362
363 //**NonZeros function***************************************************************************
368 inline size_t nonZeros() const {
369 return sv_.nonZeros();
370 }
371 //**********************************************************************************************
372
373 //**Find function*******************************************************************************
379 inline ConstIterator find( size_t index ) const {
381 return ConstIterator( sv_.find( index ), op_ );
382 }
383 //**********************************************************************************************
384
385 //**LowerBound function*************************************************************************
391 inline ConstIterator lowerBound( size_t index ) const {
393 return ConstIterator( sv_.lowerBound( index ), op_ );
394 }
395 //**********************************************************************************************
396
397 //**UpperBound function*************************************************************************
403 inline ConstIterator upperBound( size_t index ) const {
405 return ConstIterator( sv_.upperBound( index ), op_ );
406 }
407 //**********************************************************************************************
408
409 //**Operand access******************************************************************************
414 inline Operand operand() const noexcept {
415 return sv_;
416 }
417 //**********************************************************************************************
418
419 //**Operation access****************************************************************************
424 inline Operation operation() const {
425 return op_;
426 }
427 //**********************************************************************************************
428
429 //**********************************************************************************************
435 template< typename T >
436 inline bool canAlias( const T* alias ) const noexcept {
437 return sv_.canAlias( alias );
438 }
439 //**********************************************************************************************
440
441 //**********************************************************************************************
447 template< typename T >
448 inline bool isAliased( const T* alias ) const noexcept {
449 return sv_.isAliased( alias );
450 }
451 //**********************************************************************************************
452
453 //**********************************************************************************************
458 inline bool canSMPAssign() const noexcept {
459 return sv_.canSMPAssign();
460 }
461 //**********************************************************************************************
462
463 private:
464 //**Member variables****************************************************************************
467 //**********************************************************************************************
468
469 //**Assignment to dense vectors*****************************************************************
483 template< typename VT2 > // Type of the target dense vector
484 friend inline auto assign( DenseVector<VT2,TF>& lhs, const SVecMapExpr& rhs )
486 {
488
492
493 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
494
495 const RT tmp( serial( rhs.sv_ ) );
496 assign( *lhs, map( tmp, rhs.op_ ) );
497 }
499 //**********************************************************************************************
500
501 //**Assignment to sparse vectors****************************************************************
516 template< typename VT2 > // Type of the target sparse vector
517 friend inline auto assign( SparseVector<VT2,TF>& lhs, const SVecMapExpr& rhs )
519 IsSame_v< UnderlyingScalar_t<VT>, UnderlyingScalar_t<VT2> > >
520 {
522
523 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
524
525 assign( *lhs, rhs.sv_ );
526
527 const auto end( (*lhs).end() );
528 for( auto element=(*lhs).begin(); element!=end; ++element ) {
529 element->value() = rhs.op_( element->value() );
530 }
531 }
533 //**********************************************************************************************
534
535 //**Assignment to sparse vectors****************************************************************
550 template< typename VT2 > // Type of the target sparse vector
551 friend inline auto assign( SparseVector<VT2,TF>& lhs, const SVecMapExpr& rhs )
552 -> EnableIf_t< UseAssign_v<VT2> &&
553 !IsSame_v< UnderlyingScalar_t<VT>, UnderlyingScalar_t<VT2> > >
554 {
556
560
561 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
562
563 const RT tmp( serial( rhs.sv_ ) );
564 (*lhs).reserve( tmp.nonZeros() );
565 assign( *lhs, map( tmp, rhs.op_ ) );
566 }
568 //**********************************************************************************************
569
570 //**Addition assignment to dense vectors********************************************************
584 template< typename VT2 > // Type of the target dense vector
585 friend inline auto addAssign( DenseVector<VT2,TF>& lhs, const SVecMapExpr& rhs )
586 -> EnableIf_t< UseAssign_v<VT2> >
587 {
589
593
594 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
595
596 const RT tmp( serial( rhs.sv_ ) );
597 addAssign( *lhs, map( tmp, rhs.op_ ) );
598 }
600 //**********************************************************************************************
601
602 //**Addition assignment to sparse vectors*******************************************************
603 // No special implementation for the addition assignment to sparse vectors.
604 //**********************************************************************************************
605
606 //**Subtraction assignment to dense vectors*****************************************************
620 template< typename VT2 > // Type of the target dense vector
621 friend inline auto subAssign( DenseVector<VT2,TF>& lhs, const SVecMapExpr& rhs )
622 -> EnableIf_t< UseAssign_v<VT2> >
623 {
625
629
630 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
631
632 const RT tmp( serial( rhs.sv_ ) );
633 subAssign( *lhs, map( tmp, rhs.op_ ) );
634 }
636 //**********************************************************************************************
637
638 //**Subtraction assignment to sparse vectors****************************************************
639 // No special implementation for the subtraction assignment to sparse vectors.
640 //**********************************************************************************************
641
642 //**Multiplication assignment to dense vectors**************************************************
656 template< typename VT2 > // Type of the target dense vector
657 friend inline auto multAssign( DenseVector<VT2,TF>& lhs, const SVecMapExpr& rhs )
658 -> EnableIf_t< UseAssign_v<VT2> >
659 {
661
665
666 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
667
668 const RT tmp( serial( rhs.sv_ ) );
669 multAssign( *lhs, map( tmp, rhs.op_ ) );
670 }
672 //**********************************************************************************************
673
674 //**Multiplication assignment to sparse vectors*************************************************
675 // No special implementation for the multiplication assignment to sparse vectors.
676 //**********************************************************************************************
677
678 //**SMP assignment to dense vectors*************************************************************
692 template< typename VT2 > // Type of the target dense vector
693 friend inline auto smpAssign( DenseVector<VT2,TF>& lhs, const SVecMapExpr& rhs )
694 -> EnableIf_t< UseSMPAssign_v<VT2> >
695 {
697
701
702 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
703
704 const RT tmp( rhs.sv_ );
705 smpAssign( *lhs, map( tmp, rhs.op_ ) );
706 }
708 //**********************************************************************************************
709
710 //**SMP assignment to sparse vectors************************************************************
711 // No special implementation for the SMP assignment to sparse vectors.
712 //**********************************************************************************************
713
714 //**SMP addition assignment to dense vectors****************************************************
728 template< typename VT2 > // Type of the target dense vector
729 friend inline auto smpAddAssign( DenseVector<VT2,TF>& lhs, const SVecMapExpr& rhs )
730 -> EnableIf_t< UseSMPAssign_v<VT2> >
731 {
733
737
738 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
739
740 const RT tmp( rhs.sv_ );
741 smpAddAssign( *lhs, map( tmp, rhs.op_ ) );
742 }
744 //**********************************************************************************************
745
746 //**SMP addition assignment to sparse vectors***************************************************
747 // No special implementation for the SMP addition assignment to sparse vectors.
748 //**********************************************************************************************
749
750 //**SMP subtraction assignment to dense vectors*************************************************
764 template< typename VT2 > // Type of the target dense vector
765 friend inline auto smpSubAssign( DenseVector<VT2,TF>& lhs, const SVecMapExpr& rhs )
766 -> EnableIf_t< UseSMPAssign_v<VT2> >
767 {
769
773
774 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
775
776 const RT tmp( rhs.sv_ );
777 smpSubAssign( *lhs, map( tmp, rhs.op_ ) );
778 }
780 //**********************************************************************************************
781
782 //**SMP subtraction assignment to sparse vectors************************************************
783 // No special implementation for the SMP subtraction assignment to sparse vectors.
784 //**********************************************************************************************
785
786 //**SMP multiplication assignment to dense vectors**********************************************
800 template< typename VT2 > // Type of the target dense vector
801 friend inline auto smpMultAssign( DenseVector<VT2,TF>& lhs, const SVecMapExpr& rhs )
802 -> EnableIf_t< UseSMPAssign_v<VT2> >
803 {
805
809
810 BLAZE_INTERNAL_ASSERT( (*lhs).size() == rhs.size(), "Invalid vector sizes" );
811
812 const RT tmp( rhs.sv_ );
813 smpMultAssign( *lhs, map( tmp, rhs.op_ ) );
814 }
816 //**********************************************************************************************
817
818 //**SMP multiplication assignment to sparse vectors*********************************************
819 // No special implementation for the SMP multiplication assignment to sparse vectors.
820 //**********************************************************************************************
821
822 //**Compile time checks*************************************************************************
827 //**********************************************************************************************
828};
829//*************************************************************************************************
830
831
832
833
834//=================================================================================================
835//
836// GLOBAL FUNCTIONS
837//
838//=================================================================================================
839
840//*************************************************************************************************
858template< typename VT // Type of the sparse vector
859 , bool TF // Transpose flag
860 , typename OP > // Type of the custom operation
861inline decltype(auto) map( const SparseVector<VT,TF>& sv, OP op )
862{
864
865 using ReturnType = const SVecMapExpr<VT,OP,TF>;
866 return ReturnType( *sv, std::move(op) );
867}
868//*************************************************************************************************
869
870
871//*************************************************************************************************
889template< typename VT // Type of the sparse vector
890 , bool TF // Transpose flag
891 , typename OP > // Type of the custom operation
892inline decltype(auto) forEach( const SparseVector<VT,TF>& sv, OP op )
893{
895
896 return map( *sv, std::move(op) );
897}
898//*************************************************************************************************
899
900
901//*************************************************************************************************
918template< typename VT // Type of the sparse vector
919 , bool TF > // Transpose flag
920inline decltype(auto) abs( const SparseVector<VT,TF>& sv )
921{
923
924 return map( *sv, Abs() );
925}
926//*************************************************************************************************
927
928
929//*************************************************************************************************
946template< typename VT // Type of the sparse vector
947 , bool TF > // Transpose flag
948inline decltype(auto) sign( const SparseVector<VT,TF>& sv )
949{
951
952 return map( *sv, Sign() );
953}
954//*************************************************************************************************
955
956
957//*************************************************************************************************
974template< typename VT // Type of the sparse vector
975 , bool TF > // Transpose flag
976inline decltype(auto) floor( const SparseVector<VT,TF>& sv )
977{
979
980 return map( *sv, Floor() );
981}
982//*************************************************************************************************
983
984
985//*************************************************************************************************
1002template< typename VT // Type of the sparse vector
1003 , bool TF > // Transpose flag
1004inline decltype(auto) ceil( const SparseVector<VT,TF>& sv )
1005{
1007
1008 return map( *sv, Ceil() );
1009}
1010//*************************************************************************************************
1011
1012
1013//*************************************************************************************************
1030template< typename VT // Type of the sparse vector
1031 , bool TF > // Transpose flag
1032inline decltype(auto) trunc( const SparseVector<VT,TF>& sv )
1033{
1035
1036 return map( *sv, Trunc() );
1037}
1038//*************************************************************************************************
1039
1040
1041//*************************************************************************************************
1058template< typename VT // Type of the sparse vector
1059 , bool TF > // Transpose flag
1060inline decltype(auto) round( const SparseVector<VT,TF>& sv )
1061{
1063
1064 return map( *sv, Round() );
1065}
1066//*************************************************************************************************
1067
1068
1069//*************************************************************************************************
1086template< typename VT // Type of the sparse vector
1087 , bool TF > // Transpose flag
1088inline decltype(auto) conj( const SparseVector<VT,TF>& sv )
1089{
1091
1092 return map( *sv, Conj() );
1093}
1094//*************************************************************************************************
1095
1096
1097//*************************************************************************************************
1123template< typename VT // Type of the sparse vector
1124 , bool TF > // Transpose flag
1125inline decltype(auto) ctrans( const SparseVector<VT,TF>& sv )
1126{
1128
1129 return trans( conj( *sv ) );
1130}
1131//*************************************************************************************************
1132
1133
1134//*************************************************************************************************
1151template< typename VT // Type of the sparse vector
1152 , bool TF > // Transpose flag
1153inline decltype(auto) real( const SparseVector<VT,TF>& sv )
1154{
1156
1157 return map( *sv, Real() );
1158}
1159//*************************************************************************************************
1160
1161
1162//*************************************************************************************************
1179template< typename VT // Type of the sparse vector
1180 , bool TF > // Transpose flag
1181inline decltype(auto) imag( const SparseVector<VT,TF>& sv )
1182{
1184
1185 return map( *sv, Imag() );
1186}
1187//*************************************************************************************************
1188
1189
1190//*************************************************************************************************
1207template< typename VT // Type of the sparse vector
1208 , bool TF > // Transpose flag
1209inline decltype(auto) arg( const SparseVector<VT,TF>& sv )
1210{
1212
1213 return map( *sv, Arg() );
1214}
1215//*************************************************************************************************
1216
1217
1218//*************************************************************************************************
1238template< typename VT // Type of the sparse vector
1239 , bool TF > // Transpose flag
1240inline decltype(auto) sqrt( const SparseVector<VT,TF>& sv )
1241{
1243
1244 return map( *sv, Sqrt() );
1245}
1246//*************************************************************************************************
1247
1248
1249//*************************************************************************************************
1269template< typename VT // Type of the sparse vector
1270 , bool TF > // Transpose flag
1271inline decltype(auto) invsqrt( const SparseVector<VT,TF>& sv )
1272{
1274
1275 return map( *sv, InvSqrt() );
1276}
1277//*************************************************************************************************
1278
1279
1280//*************************************************************************************************
1300template< typename VT // Type of the sparse vector
1301 , bool TF > // Transpose flag
1302inline decltype(auto) cbrt( const SparseVector<VT,TF>& sv )
1303{
1305
1306 return map( *sv, Cbrt() );
1307}
1308//*************************************************************************************************
1309
1310
1311//*************************************************************************************************
1331template< typename VT // Type of the sparse vector
1332 , bool TF > // Transpose flag
1333inline decltype(auto) invcbrt( const SparseVector<VT,TF>& sv )
1334{
1336
1337 return map( *sv, InvCbrt() );
1338}
1339//*************************************************************************************************
1340
1341
1342//*************************************************************************************************
1361template< typename VT // Type of the sparse vector
1362 , bool TF // Transpose flag
1363 , typename DT > // Type of the delimiters
1364inline decltype(auto) clamp( const SparseVector<VT,TF>& sv, const DT& min, const DT& max )
1365{
1367
1368 return map( *sv, bind2nd( bind3rd( Clamp(), max ), min ) );
1369}
1370//*************************************************************************************************
1371
1372
1373//*************************************************************************************************
1391template< typename VT // Type of the sparse vector
1392 , bool TF // Transpose flag
1393 , typename ST // Type of the scalar exponent
1394 , EnableIf_t< IsScalar_v<ST> >* = nullptr >
1395inline decltype(auto) pow( const SparseVector<VT,TF>& sv, ST exp )
1396{
1398
1399 using ScalarType = MultTrait_t< UnderlyingBuiltin_t<VT>, ST >;
1400 return map( *sv, blaze::bind2nd( Pow(), ScalarType( exp ) ) );
1401}
1402//*************************************************************************************************
1403
1404
1405//*************************************************************************************************
1422template< typename VT // Type of the sparse vector
1423 , bool TF > // Transpose flag
1424inline decltype(auto) exp( const SparseVector<VT,TF>& sv )
1425{
1427
1428 return map( *sv, Exp() );
1429}
1430//*************************************************************************************************
1431
1432
1433//*************************************************************************************************
1450template< typename VT // Type of the sparse vector
1451 , bool TF > // Transpose flag
1452inline decltype(auto) exp2( const SparseVector<VT,TF>& sv )
1453{
1455
1456 return map( *sv, Exp2() );
1457}
1458//*************************************************************************************************
1459
1460
1461//*************************************************************************************************
1478template< typename VT // Type of the sparse vector
1479 , bool TF > // Transpose flag
1480inline decltype(auto) exp10( const SparseVector<VT,TF>& sv )
1481{
1483
1484 return map( *sv, Exp10() );
1485}
1486//*************************************************************************************************
1487
1488
1489//*************************************************************************************************
1509template< typename VT // Type of the sparse vector
1510 , bool TF > // Transpose flag
1511inline decltype(auto) log( const SparseVector<VT,TF>& sv )
1512{
1514
1515 return map( *sv, Log() );
1516}
1517//*************************************************************************************************
1518
1519
1520//*************************************************************************************************
1540template< typename VT // Type of the sparse vector
1541 , bool TF > // Transpose flag
1542inline decltype(auto) log2( const SparseVector<VT,TF>& sv )
1543{
1545
1546 return map( *sv, Log2() );
1547}
1548//*************************************************************************************************
1549
1550
1551//*************************************************************************************************
1571template< typename VT // Type of the sparse vector
1572 , bool TF > // Transpose flag
1573inline decltype(auto) log10( const SparseVector<VT,TF>& sv )
1574{
1576
1577 return map( *sv, Log10() );
1578}
1579//*************************************************************************************************
1580
1581
1582//*************************************************************************************************
1604template< typename VT // Type of the sparse vector
1605 , bool TF > // Transpose flag
1606inline decltype(auto) log1p( const SparseVector<VT,TF>& sv )
1607{
1609
1610 return map( *sv, Log1p() );
1611}
1612//*************************************************************************************************
1613
1614
1615//*************************************************************************************************
1637template< typename VT // Type of the sparse vector
1638 , bool TF > // Transpose flag
1639inline decltype(auto) lgamma( const SparseVector<VT,TF>& sv )
1640{
1642
1643 return map( *sv, LGamma() );
1644}
1645//*************************************************************************************************
1646
1647
1648//*************************************************************************************************
1665template< typename VT // Type of the sparse vector
1666 , bool TF > // Transpose flag
1667inline decltype(auto) sin( const SparseVector<VT,TF>& sv )
1668{
1670
1671 return map( *sv, Sin() );
1672}
1673//*************************************************************************************************
1674
1675
1676//*************************************************************************************************
1696template< typename VT // Type of the sparse vector
1697 , bool TF > // Transpose flag
1698inline decltype(auto) asin( const SparseVector<VT,TF>& sv )
1699{
1701
1702 return map( *sv, Asin() );
1703}
1704//*************************************************************************************************
1705
1706
1707//*************************************************************************************************
1724template< typename VT // Type of the sparse vector
1725 , bool TF > // Transpose flag
1726inline decltype(auto) sinh( const SparseVector<VT,TF>& sv )
1727{
1729
1730 return map( *sv, Sinh() );
1731}
1732//*************************************************************************************************
1733
1734
1735//*************************************************************************************************
1752template< typename VT // Type of the sparse vector
1753 , bool TF > // Transpose flag
1754inline decltype(auto) asinh( const SparseVector<VT,TF>& sv )
1755{
1757
1758 return map( *sv, Asinh() );
1759}
1760//*************************************************************************************************
1761
1762
1763//*************************************************************************************************
1780template< typename VT // Type of the sparse vector
1781 , bool TF > // Transpose flag
1782inline decltype(auto) cos( const SparseVector<VT,TF>& sv )
1783{
1785
1786 return map( *sv, Cos() );
1787}
1788//*************************************************************************************************
1789
1790
1791//*************************************************************************************************
1811template< typename VT // Type of the sparse vector
1812 , bool TF > // Transpose flag
1813inline decltype(auto) acos( const SparseVector<VT,TF>& sv )
1814{
1816
1817 return map( *sv, Acos() );
1818}
1819//*************************************************************************************************
1820
1821
1822//*************************************************************************************************
1839template< typename VT // Type of the sparse vector
1840 , bool TF > // Transpose flag
1841inline decltype(auto) cosh( const SparseVector<VT,TF>& sv )
1842{
1844
1845 return map( *sv, Cosh() );
1846}
1847//*************************************************************************************************
1848
1849
1850//*************************************************************************************************
1870template< typename VT // Type of the sparse vector
1871 , bool TF > // Transpose flag
1872inline decltype(auto) acosh( const SparseVector<VT,TF>& sv )
1873{
1875
1876 return map( *sv, Acosh() );
1877}
1878//*************************************************************************************************
1879
1880
1881//*************************************************************************************************
1898template< typename VT // Type of the sparse vector
1899 , bool TF > // Transpose flag
1900inline decltype(auto) tan( const SparseVector<VT,TF>& sv )
1901{
1903
1904 return map( *sv, Tan() );
1905}
1906//*************************************************************************************************
1907
1908
1909//*************************************************************************************************
1926template< typename VT // Type of the sparse vector
1927 , bool TF > // Transpose flag
1928inline decltype(auto) atan( const SparseVector<VT,TF>& sv )
1929{
1931
1932 return map( *sv, Atan() );
1933}
1934//*************************************************************************************************
1935
1936
1937//*************************************************************************************************
1957template< typename VT // Type of the sparse vector
1958 , bool TF > // Transpose flag
1959inline decltype(auto) tanh( const SparseVector<VT,TF>& sv )
1960{
1962
1963 return map( *sv, Tanh() );
1964}
1965//*************************************************************************************************
1966
1967
1968//*************************************************************************************************
1988template< typename VT // Type of the sparse vector
1989 , bool TF > // Transpose flag
1990inline decltype(auto) atanh( const SparseVector<VT,TF>& sv )
1991{
1993
1994 return map( *sv, Atanh() );
1995}
1996//*************************************************************************************************
1997
1998
1999//*************************************************************************************************
2016template< typename VT // Type of the sparse vector
2017 , bool TF > // Transpose flag
2018inline decltype(auto) erf( const SparseVector<VT,TF>& sv )
2019{
2021
2022 return map( *sv, Erf() );
2023}
2024//*************************************************************************************************
2025
2026
2027//*************************************************************************************************
2044template< typename VT // Type of the sparse vector
2045 , bool TF > // Transpose flag
2046inline decltype(auto) erfc( const SparseVector<VT,TF>& sv )
2047{
2049
2050 return map( *sv, Erfc() );
2051}
2052//*************************************************************************************************
2053
2054
2055
2056
2057//=================================================================================================
2058//
2059// GLOBAL RESTRUCTURING FUNCTIONS
2060//
2061//=================================================================================================
2062
2063//*************************************************************************************************
2074template< typename VT // Type of the sparse vector
2075 , bool TF > // Transpose flag
2076inline decltype(auto) abs( const SVecMapExpr<VT,Abs,TF>& sv )
2077{
2079
2080 return sv;
2081}
2083//*************************************************************************************************
2084
2085
2086//*************************************************************************************************
2097template< typename VT // Type of the sparse vector
2098 , bool TF > // Transpose flag
2099inline decltype(auto) sign( const SVecMapExpr<VT,Sign,TF>& sv )
2100{
2102
2103 return sv;
2104}
2106//*************************************************************************************************
2107
2108
2109//*************************************************************************************************
2120template< typename VT // Type of the sparse vector
2121 , bool TF > // Transpose flag
2122inline decltype(auto) floor( const SVecMapExpr<VT,Floor,TF>& sv )
2123{
2125
2126 return sv;
2127}
2129//*************************************************************************************************
2130
2131
2132//*************************************************************************************************
2143template< typename VT // Type of the sparse vector
2144 , bool TF > // Transpose flag
2145inline decltype(auto) ceil( const SVecMapExpr<VT,Ceil,TF>& sv )
2146{
2148
2149 return sv;
2150}
2152//*************************************************************************************************
2153
2154
2155//*************************************************************************************************
2166template< typename VT // Type of the sparse vector
2167 , bool TF > // Transpose flag
2168inline decltype(auto) trunc( const SVecMapExpr<VT,Trunc,TF>& sv )
2169{
2171
2172 return sv;
2173}
2175//*************************************************************************************************
2176
2177
2178//*************************************************************************************************
2189template< typename VT // Type of the sparse vector
2190 , bool TF > // Transpose flag
2191inline decltype(auto) round( const SVecMapExpr<VT,Round,TF>& sv )
2192{
2194
2195 return sv;
2196}
2198//*************************************************************************************************
2199
2200
2201//*************************************************************************************************
2219template< typename VT // Type of the sparse vector
2220 , bool TF > // Transpose flag
2221inline decltype(auto) conj( const SVecMapExpr<VT,Conj,TF>& sv )
2222{
2224
2225 return sv.operand();
2226}
2228//*************************************************************************************************
2229
2230
2231//*************************************************************************************************
2249template< typename VT // Type of the sparse vector
2250 , bool TF > // Transpose flag
2251inline decltype(auto) conj( const SVecTransExpr<SVecMapExpr<VT,Conj,TF>,!TF>& sv )
2252{
2254
2255 return trans( sv.operand().operand() );
2256}
2258//*************************************************************************************************
2259
2260
2261//*************************************************************************************************
2272template< typename VT // Type of the sparse vector
2273 , bool TF > // Transpose flag
2274inline decltype(auto) real( const SVecMapExpr<VT,Real,TF>& sv )
2275{
2277
2278 return sv;
2279}
2281//*************************************************************************************************
2282
2283} // namespace blaze
2284
2285#endif
Header file for auxiliary alias declarations.
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 all functors.
Header file for the If class template.
Header file for the IsExpression type trait class.
Header file for the IsSame and IsStrictlySame type traits.
Header file for the IsScalar type trait.
Deactivation of problematic macros.
Header file for the map trait.
Header file for the multiplication trait.
Header file for the RemoveReference type trait.
Header file for the UnderlyingBuiltin type trait.
Header file for the UnderlyingScalar type trait.
Header file for the ValueIndexPair class.
Base class for N-dimensional dense vectors.
Definition: DenseVector.h:77
Iterator over the elements of the sparse vector map expression.
Definition: SVecMapExpr.h:162
OP op_
The custom unary operation.
Definition: SVecMapExpr.h:284
DifferenceType difference_type
Difference between two iterators.
Definition: SVecMapExpr.h:182
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SVecMapExpr.h:276
ValueIndexPair< ElementType > Element
Element type of the sparse vector expression.
Definition: SVecMapExpr.h:166
ConstIterator & operator++()
Pre-increment operator.
Definition: SVecMapExpr.h:202
IteratorType it_
Iterator over the elements of the sparse vector expression.
Definition: SVecMapExpr.h:283
size_t index() const
Access to the current index of the sparse element.
Definition: SVecMapExpr.h:243
ValueType * PointerType
Pointer return type.
Definition: SVecMapExpr.h:173
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SVecMapExpr.h:265
ConstIterator(IteratorType it, OP op)
Constructor for the ConstIterator class.
Definition: SVecMapExpr.h:191
const Element operator*() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecMapExpr.h:213
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SVecMapExpr.h:254
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: SVecMapExpr.h:175
IteratorCategory iterator_category
The iterator category.
Definition: SVecMapExpr.h:178
ReturnType value() const
Access to the current value of the sparse element.
Definition: SVecMapExpr.h:233
Element ValueType
Type of the underlying pointers.
Definition: SVecMapExpr.h:172
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SVecMapExpr.h:171
ConstIterator_t< RemoveReference_t< Operand > > IteratorType
Iterator type of the sparse vector expression.
Definition: SVecMapExpr.h:169
const ConstIterator * operator->() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecMapExpr.h:223
ValueType & ReferenceType
Reference return type.
Definition: SVecMapExpr.h:174
Expression object for the sparse vector map() function.
Definition: SVecMapExpr.h:95
OP Operation
Data type of the custom unary operation.
Definition: SVecMapExpr.h:155
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: SVecMapExpr.h:358
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: SVecMapExpr.h:458
ResultType_t< VT > RT
Result type of the sparse vector expression.
Definition: SVecMapExpr.h:98
ConstIterator begin() const
Returns an iterator to the first non-zero element of the sparse vector.
Definition: SVecMapExpr.h:338
If_t< IsExpression_v< VT >, const VT, const VT & > Operand
Composite data type of the sparse vector expression.
Definition: SVecMapExpr.h:152
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecMapExpr.h:312
If_t< useAssign, const ResultType, const SVecMapExpr & > CompositeType
Data type for composite expression templates.
Definition: SVecMapExpr.h:149
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: SVecMapExpr.h:143
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecMapExpr.h:436
Operand operand() const noexcept
Returns the sparse vector operand.
Definition: SVecMapExpr.h:414
ConstIterator upperBound(size_t index) const
Returns an iterator to the first index greater then the given index.
Definition: SVecMapExpr.h:403
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecMapExpr.h:325
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecMapExpr.h:368
static constexpr bool useAssign
Compilation switch for the serial evaluation strategy of the map expression.
Definition: SVecMapExpr.h:110
Operation operation() const
Returns a copy of the custom operation.
Definition: SVecMapExpr.h:424
ConstIterator end() const
Returns an iterator just past the last non-zero element of the sparse vector.
Definition: SVecMapExpr.h:348
Operand sv_
Sparse vector of the map expression.
Definition: SVecMapExpr.h:465
ConstIterator lowerBound(size_t index) const
Returns an iterator to the first index not less then the given index.
Definition: SVecMapExpr.h:391
ReturnType_t< VT > RN
Return type of the sparse vector expression.
Definition: SVecMapExpr.h:99
SVecMapExpr(const VT &sv, OP op) noexcept
Constructor for the SVecMapExpr class.
Definition: SVecMapExpr.h:300
Operation op_
The custom unary operation.
Definition: SVecMapExpr.h:466
ConstIterator find(size_t index) const
Searches for a specific vector element.
Definition: SVecMapExpr.h:379
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: SVecMapExpr.h:291
decltype(std::declval< OP >()(std::declval< RN >())) ReturnType
Return type for expression template evaluations.
Definition: SVecMapExpr.h:146
MapTrait_t< RT, OP > ResultType
Result type for expression template evaluations.
Definition: SVecMapExpr.h:141
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecMapExpr.h:142
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecMapExpr.h:448
Base class for sparse vectors.
Definition: SparseVector.h:72
Index-value-pair for sparse vectors and matrices.
Definition: ValueIndexPair.h:75
Constraint on the data type.
Constraint on the data type.
Header file for the Computation base class.
Header file for the SparseVector base class.
Header file for the VecMapExpr base class.
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1339
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1375
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:766
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Elementwise evaluation of the given binary operation on each single element of the dense matrices lhs...
Definition: DMatDMatMapExpr.h:1144
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:812
constexpr Bind3rd< OP, A3 > bind3rd(const OP &op, const A3 &a3)
Binds the given object/value to the 3rd parameter of the given operation.
Definition: Bind3rd.h:157
constexpr Bind2nd< OP, A2 > bind2nd(const OP &op, const A2 &a2)
Binds the given object/value to the 2nd parameter of the given operation.
Definition: Bind2nd.h:155
#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_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition: SparseVector.h:61
typename MapTrait< Args... >::Type MapTrait_t
Auxiliary alias declaration for the MapTrait class template.
Definition: MapTrait.h:131
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.
Definition: MultTrait.h:165
typename UnderlyingScalar< T >::Type UnderlyingScalar_t
Auxiliary alias declaration for the UnderlyingScalar type trait.
Definition: UnderlyingScalar.h:116
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
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
decltype(auto) invcbrt(const SparseVector< VT, TF > &sv)
Computes the inverse cubic root of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1333
decltype(auto) atanh(const SparseVector< VT, TF > &sv)
Computes the inverse hyperbolic tangent of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1990
decltype(auto) abs(const SparseVector< VT, TF > &sv)
Applies the abs() function to each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:920
decltype(auto) erfc(const SparseVector< VT, TF > &sv)
Computes the complementary error function of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:2046
decltype(auto) cos(const SparseVector< VT, TF > &sv)
Computes the cosine of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1782
decltype(auto) log1p(const SparseVector< VT, TF > &sv)
Computes the natural logarithm of x+1 of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1606
decltype(auto) tan(const SparseVector< VT, TF > &sv)
Computes the tangent of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1900
decltype(auto) exp(const SparseVector< VT, TF > &sv)
Computes of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1424
decltype(auto) ctrans(const SparseVector< VT, TF > &sv)
Returns the conjugate transpose vector of sv.
Definition: SVecMapExpr.h:1125
decltype(auto) sign(const SparseVector< VT, TF > &sv)
Applies the sign() function to each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:948
decltype(auto) atan(const SparseVector< VT, TF > &sv)
Computes the inverse tangent of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1928
decltype(auto) floor(const SparseVector< VT, TF > &sv)
Applies the floor() function to each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:976
decltype(auto) sqrt(const SparseVector< VT, TF > &sv)
Computes the square root of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1240
decltype(auto) clamp(const SparseVector< VT, TF > &sv, const DT &min, const DT &max)
Restricts each single element of the sparse vector sv to the range .
Definition: SVecMapExpr.h:1364
decltype(auto) log10(const SparseVector< VT, TF > &sv)
Computes the common logarithm of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1573
decltype(auto) tanh(const SparseVector< VT, TF > &sv)
Computes the hyperbolic tangent of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1959
decltype(auto) conj(const SparseVector< VT, TF > &sv)
Returns a vector containing the complex conjugate of each single element of sv.
Definition: SVecMapExpr.h:1088
decltype(auto) invsqrt(const SparseVector< VT, TF > &sv)
Computes the inverse square root of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1271
decltype(auto) imag(const SparseVector< VT, TF > &sv)
Returns a vector containing the imaginary parts of each single element of sv.
Definition: SVecMapExpr.h:1181
decltype(auto) trunc(const SparseVector< VT, TF > &sv)
Applies the trunc() function to each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1032
decltype(auto) arg(const SparseVector< VT, TF > &sv)
Returns a vector containing the phase angle of each single element of sv.
Definition: SVecMapExpr.h:1209
decltype(auto) sinh(const SparseVector< VT, TF > &sv)
Computes the hyperbolic sine of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1726
decltype(auto) ceil(const SparseVector< VT, TF > &sv)
Applies the ceil() function to each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1004
decltype(auto) pow(const SparseVector< VT, TF > &sv, ST exp)
Computes the exponential value for each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1395
decltype(auto) log(const SparseVector< VT, TF > &sv)
Computes the natural logarithm of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1511
decltype(auto) acos(const SparseVector< VT, TF > &sv)
Computes the inverse cosine of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1813
decltype(auto) lgamma(const SparseVector< VT, TF > &sv)
Computes the natural logarithm of the absolute value of the gamma function of each non-zero element o...
Definition: SVecMapExpr.h:1639
decltype(auto) asinh(const SparseVector< VT, TF > &sv)
Computes the inverse hyperbolic sine of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1754
decltype(auto) exp2(const SparseVector< VT, TF > &sv)
Computes of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1452
decltype(auto) round(const SparseVector< VT, TF > &sv)
Applies the round() function to each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1060
decltype(auto) forEach(const SparseVector< VT, TF > &sv, OP op)
Evaluates the given custom operation on each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:892
decltype(auto) log2(const SparseVector< VT, TF > &sv)
Computes the binary logarithm of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1542
decltype(auto) cosh(const SparseVector< VT, TF > &sv)
Computes the hyperbolic cosine of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1841
decltype(auto) asin(const SparseVector< VT, TF > &sv)
Computes the inverse sine of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1698
decltype(auto) sin(const SparseVector< VT, TF > &sv)
Computes the sine of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1667
decltype(auto) cbrt(const SparseVector< VT, TF > &sv)
Computes the cubic root of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1302
decltype(auto) exp10(const SparseVector< VT, TF > &sv)
Computes of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1480
decltype(auto) erf(const SparseVector< VT, TF > &sv)
Computes the error function of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:2018
decltype(auto) acosh(const SparseVector< VT, TF > &sv)
Computes the inverse hyperbolic cosine of each non-zero element of the sparse vector sv.
Definition: SVecMapExpr.h:1872
decltype(auto) real(const SparseVector< VT, TF > &sv)
Returns a vector containing the real parts of each single element of sv.
Definition: SVecMapExpr.h:1153
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
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition: Exception.h:331
#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 serial shim.
Generic wrapper for the abs() function.
Definition: Abs.h:85
Generic wrapper for the acos() function.
Definition: Acos.h:71
Generic wrapper for the acosh() function.
Definition: Acosh.h:71
Generic wrapper for the arg() function.
Definition: Arg.h:77
Generic wrapper for the asin() function.
Definition: Asin.h:81
Generic wrapper for the asinh() function.
Definition: Asinh.h:81
Generic wrapper for the atan() function.
Definition: Atan.h:81
Generic wrapper for the atanh() function.
Definition: Atanh.h:81
Generic wrapper for the cbrt() function.
Definition: Cbrt.h:83
Generic wrapper for the ceil() function.
Definition: Ceil.h:83
Generic wrapper for the clamp() function.
Definition: Clamp.h:68
Base class for all compute expression templates.
Definition: Computation.h:68
Generic wrapper for the conj() function.
Definition: Conj.h:85
Generic wrapper for the cos() function.
Definition: Cos.h:71
Generic wrapper for the cosh() function.
Definition: Cosh.h:71
Generic wrapper for the erf() function.
Definition: Erf.h:79
Generic wrapper for the erfc() function.
Definition: Erfc.h:69
Generic wrapper for the exp10() function.
Definition: Exp10.h:69
Generic wrapper for the exp2() function.
Definition: Exp2.h:69
Generic wrapper for the exp() function.
Definition: Exp.h:71
Generic wrapper for the floor() function.
Definition: Floor.h:83
Generic wrapper for the imag() function.
Definition: Imag.h:76
Generic wrapper for the invcbrt() function.
Definition: InvCbrt.h:69
Generic wrapper for the invsqrt() function.
Definition: InvSqrt.h:71
Generic wrapper for the lgamma() function.
Definition: LGamma.h:71
Generic wrapper for the log10() function.
Definition: Log10.h:71
Generic wrapper for the log1p() function.
Definition: Log1p.h:71
Generic wrapper for the log2() function.
Definition: Log2.h:69
Generic wrapper for the log() function.
Definition: Log.h:71
Generic wrapper for the pow() function.
Definition: Pow.h:65
Generic wrapper for the real() function.
Definition: Real.h:82
Generic wrapper for the round() function.
Definition: Round.h:83
Generic wrapper for the sign() function.
Definition: Sign.h:83
Generic wrapper for the sin() function.
Definition: Sin.h:81
Generic wrapper for the sinh() function.
Definition: Sinh.h:81
Generic wrapper for the sqrt() function.
Definition: Sqrt.h:85
Generic wrapper for the tan() function.
Definition: Tan.h:81
Generic wrapper for the tanh() function.
Definition: Tanh.h:81
Generic wrapper for the trunc() function.
Definition: Trunc.h:83
Base class for all unary vector map expression templates.
Definition: VecMapExpr.h:68
Header file for the RequiresEvaluation type trait.
Header file for basic type definitions.