Blaze 3.9
ZeroMatrix.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_SPARSE_ZEROMATRIX_H_
36#define _BLAZE_MATH_SPARSE_ZEROMATRIX_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <blaze/math/Aliases.h>
48#include <blaze/math/Forward.h>
89#include <blaze/util/Assert.h>
94#include <blaze/util/EnableIf.h>
98#include <blaze/util/Types.h>
100
101
102namespace blaze {
103
104//=================================================================================================
105//
106// CLASS DEFINITION
107//
108//=================================================================================================
109
110//*************************************************************************************************
192template< typename Type // Data type of the matrix
193 , bool SO // Storage order
194 , typename Tag > // Type tag
196 : public Expression< SparseMatrix< ZeroMatrix<Type,SO,Tag>, SO > >
197{
198 private:
199 //**Type definitions****************************************************************************
201 //**********************************************************************************************
202
203 public:
204 //**Type definitions****************************************************************************
207
210
213
216
217 using ElementType = Type;
218 using TagType = Tag;
219 using ReturnType = const Type&;
220 using CompositeType = const This&;
221
222 using Reference = const Type&;
223 using ConstReference = const Type&;
224 using Iterator = Element*;
225 using ConstIterator = const Element*;
226 //**********************************************************************************************
227
228 //**Rebind struct definition********************************************************************
231 template< typename NewType > // Data type of the other matrix
232 struct Rebind {
234 };
235 //**********************************************************************************************
236
237 //**Resize struct definition********************************************************************
240 template< size_t NewM // Number of rows of the other matrix
241 , size_t NewN > // Number of columns of the other matrix
242 struct Resize {
244 };
245 //**********************************************************************************************
246
247 //**Compilation flags***************************************************************************
249
252 static constexpr bool smpAssignable = !IsSMPAssignable_v<Type>;
253 //**********************************************************************************************
254
255 //**Constructors********************************************************************************
258 constexpr ZeroMatrix() noexcept;
259 constexpr ZeroMatrix( size_t m, size_t n ) noexcept;
260
261 template< typename MT, bool SO2 >
262 inline ZeroMatrix( const Matrix<MT,SO2>& m );
263
264 ZeroMatrix( const ZeroMatrix& ) = default;
265 ZeroMatrix( ZeroMatrix&& ) = default;
267 //**********************************************************************************************
268
269 //**Destructor**********************************************************************************
272 ~ZeroMatrix() = default;
274 //**********************************************************************************************
275
276 //**Data access functions***********************************************************************
279 constexpr ConstReference operator()( size_t i, size_t j ) const noexcept;
280 inline ConstReference at( size_t i, size_t j ) const;
281 constexpr ConstIterator begin ( size_t i ) const noexcept;
282 constexpr ConstIterator cbegin( size_t i ) const noexcept;
283 constexpr ConstIterator end ( size_t i ) const noexcept;
284 constexpr ConstIterator cend ( size_t i ) const noexcept;
286 //**********************************************************************************************
287
288 //**Assignment operators************************************************************************
291 template< typename MT, bool SO2 >
292 inline ZeroMatrix& operator=( const Matrix<MT,SO2>& rhs ) &;
293
294 ZeroMatrix& operator=( const ZeroMatrix& ) & = default;
295 ZeroMatrix& operator=( ZeroMatrix&& ) & = default;
297 //**********************************************************************************************
298
299 //**Utility functions***************************************************************************
302 constexpr size_t rows() const noexcept;
303 constexpr size_t columns() const noexcept;
304 constexpr size_t capacity() const noexcept;
305 constexpr size_t capacity( size_t i ) const noexcept;
306 constexpr size_t nonZeros() const noexcept;
307 constexpr size_t nonZeros( size_t i ) const noexcept;
308 constexpr void clear() noexcept;
309 constexpr void resize( size_t m, size_t n ) noexcept;
310 constexpr void swap( ZeroMatrix& m ) noexcept;
312 //**********************************************************************************************
313
314 //**Lookup functions****************************************************************************
317 inline ConstIterator find ( size_t i, size_t j ) const;
318 inline ConstIterator lowerBound( size_t i, size_t j ) const;
319 inline ConstIterator upperBound( size_t i, size_t j ) const;
321 //**********************************************************************************************
322
323 //**Numeric functions***************************************************************************
326 constexpr ZeroMatrix& transpose() noexcept;
327 constexpr ZeroMatrix& ctranspose() noexcept;
329 //**********************************************************************************************
330
331 //**Expression template evaluation functions****************************************************
334 template< typename Other > inline bool canAlias ( const Other* alias ) const noexcept;
335 template< typename Other > inline bool isAliased( const Other* alias ) const noexcept;
336
337 inline bool canSMPAssign() const noexcept;
339 //**********************************************************************************************
340
341 private:
342 //**Member variables****************************************************************************
345 size_t m_;
346 size_t n_;
347
348 static const Type zero_;
350 //**********************************************************************************************
351
352 //**Compile time checks*************************************************************************
359 //**********************************************************************************************
360};
361//*************************************************************************************************
362
363
364
365
366//=================================================================================================
367//
368// DEFINITION AND INITIALIZATION OF THE STATIC MEMBER VARIABLES
369//
370//=================================================================================================
371
372template< typename Type // Data type of the matrix
373 , bool SO // Storage order
374 , typename Tag > // Type tag
375const Type ZeroMatrix<Type,SO,Tag>::zero_{};
376
377
378
379
380//=================================================================================================
381//
382// CONSTRUCTORS
383//
384//=================================================================================================
385
386//*************************************************************************************************
389template< typename Type // Data type of the matrix
390 , bool SO // Storage order
391 , typename Tag > // Type tag
393 : m_( 0UL ) // The current number of rows of the zero matrix
394 , n_( 0UL ) // The current number of columns of the zero matrix
395{}
396//*************************************************************************************************
397
398
399//*************************************************************************************************
405template< typename Type // Data type of the matrix
406 , bool SO // Storage order
407 , typename Tag > // Type tag
408constexpr ZeroMatrix<Type,SO,Tag>::ZeroMatrix( size_t m, size_t n ) noexcept
409 : m_( m ) // The current number of rows of the zero matrix
410 , n_( n ) // The current number of columns of the zero matrix
411{}
412//*************************************************************************************************
413
414
415//*************************************************************************************************
424template< typename Type // Data type of the matrix
425 , bool SO // Storage order
426 , typename Tag > // Type tag
427template< typename MT // Type of the foreign zero matrix
428 , bool SO2 > // Storage order of the foreign zero matrix
430 : m_( (*m).rows() ) // The current number of rows of the zero matrix
431 , n_( (*m).columns() ) // The current number of columns of the zero matrix
432{
434
435 if( !IsZero_v<MT> && !isZero( *m ) ) {
436 BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of zero matrix" );
437 }
438}
439//*************************************************************************************************
440
441
442
443
444//=================================================================================================
445//
446// DATA ACCESS FUNCTIONS
447//
448//=================================================================================================
449
450//*************************************************************************************************
460template< typename Type // Data type of the matrix
461 , bool SO // Storage order
462 , typename Tag > // Type tag
464 ZeroMatrix<Type,SO,Tag>::operator()( size_t i, size_t j ) const noexcept
465{
466 MAYBE_UNUSED( i, j );
467
468 BLAZE_USER_ASSERT( i < rows() , "Invalid zero matrix row access index" );
469 BLAZE_USER_ASSERT( j < columns(), "Invalid zero matrix column access index" );
470
471 return zero_;
472}
473//*************************************************************************************************
474
475
476//*************************************************************************************************
487template< typename Type // Data type of the matrix
488 , bool SO // Storage order
489 , typename Tag > // Type tag
491 ZeroMatrix<Type,SO,Tag>::at( size_t i, size_t j ) const
492{
493 if( i >= m_ ) {
494 BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
495 }
496 if( j >= n_ ) {
497 BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
498 }
499
500 return zero_;
501}
502//*************************************************************************************************
503
504
505//*************************************************************************************************
516template< typename Type // Data type of the matrix
517 , bool SO // Storage order
518 , typename Tag > // Type tag
520 ZeroMatrix<Type,SO,Tag>::begin( size_t i ) const noexcept
521{
522 MAYBE_UNUSED( i );
523
524 BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
525
526 return nullptr;
527}
528//*************************************************************************************************
529
530
531//*************************************************************************************************
542template< typename Type // Data type of the matrix
543 , bool SO // Storage order
544 , typename Tag > // Type tag
546 ZeroMatrix<Type,SO,Tag>::cbegin( size_t i ) const noexcept
547{
548 MAYBE_UNUSED( i );
549
550 BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
551
552 return nullptr;
553}
554//*************************************************************************************************
555
556
557//*************************************************************************************************
568template< typename Type // Data type of the matrix
569 , bool SO // Storage order
570 , typename Tag > // Type tag
572 ZeroMatrix<Type,SO,Tag>::end( size_t i ) const noexcept
573{
574 MAYBE_UNUSED( i );
575
576 BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
577
578 return nullptr;
579}
580//*************************************************************************************************
581
582
583//*************************************************************************************************
594template< typename Type // Data type of the matrix
595 , bool SO // Storage order
596 , typename Tag > // Type tag
598 ZeroMatrix<Type,SO,Tag>::cend( size_t i ) const noexcept
599{
600 MAYBE_UNUSED( i );
601
602 BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
603
604 return nullptr;
605}
606//*************************************************************************************************
607
608
609
610
611//=================================================================================================
612//
613// ASSIGNMENT OPERATORS
614//
615//=================================================================================================
616
617//*************************************************************************************************
627template< typename Type // Data type of the matrix
628 , bool SO // Storage order
629 , typename Tag > // Type tag
630template< typename MT // Type of the right-hand side zero matrix
631 , bool SO2 > // Storage order of the right-hand side zero matrix
634{
636
637 if( !IsZero_v<MT> && !isZero( *rhs ) ) {
638 BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment of zero matrix" );
639 }
640
641 const size_t m( (*rhs).rows() );
642 const size_t n( (*rhs).columns() );
643
644 m_ = m;
645 n_ = n;
646
647 return *this;
648}
649//*************************************************************************************************
650
651
652
653
654//=================================================================================================
655//
656// UTILITY FUNCTIONS
657//
658//=================================================================================================
659
660//*************************************************************************************************
665template< typename Type // Data type of the matrix
666 , bool SO // Storage order
667 , typename Tag > // Type tag
668constexpr size_t ZeroMatrix<Type,SO,Tag>::rows() const noexcept
669{
670 return m_;
671}
672//*************************************************************************************************
673
674
675//*************************************************************************************************
680template< typename Type // Data type of the matrix
681 , bool SO // Storage order
682 , typename Tag > // Type tag
683constexpr size_t ZeroMatrix<Type,SO,Tag>::columns() const noexcept
684{
685 return n_;
686}
687//*************************************************************************************************
688
689
690//*************************************************************************************************
695template< typename Type // Data type of the matrix
696 , bool SO // Storage order
697 , typename Tag > // Type tag
698constexpr size_t ZeroMatrix<Type,SO,Tag>::capacity() const noexcept
699{
700 return 0UL;
701}
702//*************************************************************************************************
703
704
705//*************************************************************************************************
716template< typename Type // Data type of the matrix
717 , bool SO // Storage order
718 , typename Tag > // Type tag
719constexpr size_t ZeroMatrix<Type,SO,Tag>::capacity( size_t i ) const noexcept
720{
721 MAYBE_UNUSED( i );
722
723 BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
724
725 return 0UL;
726}
727//*************************************************************************************************
728
729
730//*************************************************************************************************
735template< typename Type // Data type of the matrix
736 , bool SO // Storage order
737 , typename Tag > // Type tag
738constexpr size_t ZeroMatrix<Type,SO,Tag>::nonZeros() const noexcept
739{
740 return 0UL;
741}
742//*************************************************************************************************
743
744
745//*************************************************************************************************
756template< typename Type // Data type of the matrix
757 , bool SO // Storage order
758 , typename Tag > // Type tag
759constexpr size_t ZeroMatrix<Type,SO,Tag>::nonZeros( size_t i ) const noexcept
760{
761 MAYBE_UNUSED( i );
762
763 BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
764
765 return 0UL;
766}
767//*************************************************************************************************
768
769
770//*************************************************************************************************
777template< typename Type // Data type of the matrix
778 , bool SO // Storage order
779 , typename Tag > // Type tag
780constexpr void ZeroMatrix<Type,SO,Tag>::clear() noexcept
781{
782 m_ = 0UL;
783 n_ = 0UL;
784}
785//*************************************************************************************************
786
787
788//*************************************************************************************************
799template< typename Type // Data type of the matrix
800 , bool SO // Storage order
801 , typename Tag > // Type tag
802void constexpr ZeroMatrix<Type,SO,Tag>::resize( size_t m, size_t n ) noexcept
803{
804 m_ = m;
805 n_ = n;
806}
807//*************************************************************************************************
808
809
810//*************************************************************************************************
816template< typename Type // Data type of the matrix
817 , bool SO // Storage order
818 , typename Tag > // Type tag
819constexpr void ZeroMatrix<Type,SO,Tag>::swap( ZeroMatrix& m ) noexcept
820{
821 const size_t tmp1( m_ );
822 m_ = m.m_;
823 m.m_ = tmp1;
824
825 const size_t tmp2( n_ );
826 n_ = m.n_;
827 m.n_ = tmp2;
828}
829//*************************************************************************************************
830
831
832
833
834//=================================================================================================
835//
836// LOOKUP FUNCTIONS
837//
838//=================================================================================================
839
840//*************************************************************************************************
853template< typename Type // Data type of the matrix
854 , bool SO // Storage order
855 , typename Tag > // Type tag
857 ZeroMatrix<Type,SO,Tag>::find( size_t i, size_t j ) const
858{
859 MAYBE_UNUSED( i, j );
860
861 BLAZE_USER_ASSERT( SO || i < rows() , "Invalid zero matrix row access index" );
862 BLAZE_USER_ASSERT( !SO || j < columns(), "Invalid zero matrix column access index" );
863
864 return nullptr;
865}
866//*************************************************************************************************
867
868
869//*************************************************************************************************
882template< typename Type // Data type of the matrix
883 , bool SO // Storage order
884 , typename Tag > // Type tag
886 ZeroMatrix<Type,SO,Tag>::lowerBound( size_t i, size_t j ) const
887{
888 MAYBE_UNUSED( i, j );
889
890 BLAZE_USER_ASSERT( SO || i < rows() , "Invalid zero matrix row access index" );
891 BLAZE_USER_ASSERT( !SO || j < columns(), "Invalid zero matrix column access index" );
892
893 return nullptr;
894}
895//*************************************************************************************************
896
897
898//*************************************************************************************************
911template< typename Type // Data type of the matrix
912 , bool SO // Storage order
913 , typename Tag > // Type tag
915 ZeroMatrix<Type,SO,Tag>::upperBound( size_t i, size_t j ) const
916{
917 MAYBE_UNUSED( i, j );
918
919 BLAZE_USER_ASSERT( SO || i < rows() , "Invalid zero matrix row access index" );
920 BLAZE_USER_ASSERT( !SO || j < columns(), "Invalid zero matrix column access index" );
921
922 return nullptr;
923}
924//*************************************************************************************************
925
926
927
928
929//=================================================================================================
930//
931// NUMERIC FUNCTIONS
932//
933//=================================================================================================
934
935//*************************************************************************************************
940template< typename Type // Data type of the matrix
941 , bool SO // Storage order
942 , typename Tag > // Type tag
944{
945 const size_t tmp( m_ );
946 m_ = n_;
947 n_ = tmp;
948
949 return *this;
950}
951//*************************************************************************************************
952
953
954//*************************************************************************************************
959template< typename Type // Data type of the matrix
960 , bool SO // Storage order
961 , typename Tag > // Type tag
963{
964 const size_t tmp( m_ );
965 m_ = n_;
966 n_ = tmp;
967
968 return *this;
969}
970//*************************************************************************************************
971
972
973
974
975//=================================================================================================
976//
977// EXPRESSION TEMPLATE EVALUATION FUNCTIONS
978//
979//=================================================================================================
980
981//*************************************************************************************************
991template< typename Type // Data type of the matrix
992 , bool SO // Storage order
993 , typename Tag > // Type tag
994template< typename Other > // Data type of the foreign expression
995inline bool ZeroMatrix<Type,SO,Tag>::canAlias( const Other* alias ) const noexcept
996{
997 MAYBE_UNUSED( alias );
998
999 return false;
1000}
1001//*************************************************************************************************
1002
1003
1004//*************************************************************************************************
1014template< typename Type // Data type of the matrix
1015 , bool SO // Storage order
1016 , typename Tag > // Type tag
1017template< typename Other > // Data type of the foreign expression
1018inline bool ZeroMatrix<Type,SO,Tag>::isAliased( const Other* alias ) const noexcept
1019{
1020 MAYBE_UNUSED( alias );
1021
1022 return false;
1023}
1024//*************************************************************************************************
1025
1026
1027//*************************************************************************************************
1037template< typename Type // Data type of the matrix
1038 , bool SO // Storage order
1039 , typename Tag > // Type tag
1040inline bool ZeroMatrix<Type,SO,Tag>::canSMPAssign() const noexcept
1041{
1042 return false;
1043}
1044//*************************************************************************************************
1045
1046
1047
1048
1049
1050
1051
1052
1053//=================================================================================================
1054//
1055// ZEROMATRIX OPERATORS
1056//
1057//=================================================================================================
1058
1059//*************************************************************************************************
1062template< RelaxationFlag RF, typename Type, bool SO, typename Tag >
1063constexpr bool isDefault( const ZeroMatrix<Type,SO,Tag>& m ) noexcept;
1064
1065template< typename Type, bool SO, typename Tag >
1066constexpr bool isIntact( const ZeroMatrix<Type,SO,Tag>& m ) noexcept;
1067
1068template< typename Type, bool SO, typename Tag >
1069constexpr void swap( ZeroMatrix<Type,SO,Tag>& a, ZeroMatrix<Type,SO,Tag>& b ) noexcept;
1071//*************************************************************************************************
1072
1073
1074//*************************************************************************************************
1099template< RelaxationFlag RF // Relaxation flag
1100 , typename Type // Data type of the matrix
1101 , bool SO // Storage order
1102 , typename Tag > // Type tag
1103constexpr bool isDefault( const ZeroMatrix<Type,SO,Tag>& m ) noexcept
1104{
1105 return ( m.rows() == 0UL && m.columns() == 0UL );
1106}
1107//*************************************************************************************************
1108
1109
1110//*************************************************************************************************
1127template< typename Type // Data type of the matrix
1128 , bool SO // Storage order
1129 , typename Tag > // Type tag
1130constexpr bool isIntact( const ZeroMatrix<Type,SO,Tag>& m ) noexcept
1131{
1132 MAYBE_UNUSED( m );
1133
1134 return true;
1135}
1136//*************************************************************************************************
1137
1138
1139//*************************************************************************************************
1147template< typename Type // Data type of the matrix
1148 , bool SO // Storage order
1149 , typename Tag > // Type tag
1151{
1152 a.swap( b );
1153}
1154//*************************************************************************************************
1155
1156
1157//*************************************************************************************************
1167template< typename Type // Data type of the matrix
1168 , bool SO // Storage order
1169 , typename Tag > // Type tag
1170inline void erase( ZeroMatrix<Type,SO,Tag>& m, size_t i, size_t j )
1171{
1172 MAYBE_UNUSED( m, i, j );
1173}
1175//*************************************************************************************************
1176
1177
1178//*************************************************************************************************
1192template< typename Type // Data type of the matrix
1193 , bool SO // Storage order
1194 , typename Tag // Type tag
1195 , typename Iterator > // Type of the matrix iterator
1196inline Iterator erase( ZeroMatrix<Type,SO,Tag>& m, size_t i, Iterator pos )
1197{
1198 MAYBE_UNUSED( m, i, pos );
1199 return Iterator();
1200}
1202//*************************************************************************************************
1203
1204
1205//*************************************************************************************************
1221template< typename Type // Data type of the matrix
1222 , bool SO // Storage order
1223 , typename Tag // Type tag
1224 , typename Iterator > // Type of the matrix iterator
1225inline Iterator erase( ZeroMatrix<Type,SO,Tag>& m, size_t i, Iterator first, Iterator last )
1226{
1227 MAYBE_UNUSED( m, i, first, last );
1228 return Iterator();
1229}
1231//*************************************************************************************************
1232
1233
1234//*************************************************************************************************
1258template< typename Type // Data type of the matrix
1259 , bool SO // Storage order
1260 , typename Tag // Type tag
1261 , typename Pred > // Type of the unary predicate
1262inline void erase( ZeroMatrix<Type,SO,Tag>& m, Pred predicate )
1263{
1264 MAYBE_UNUSED( m, predicate );
1265}
1267//*************************************************************************************************
1268
1269
1270//*************************************************************************************************
1300template< typename Type // Data type of the matrix
1301 , bool SO // Storage order
1302 , typename Tag // Type tag
1303 , typename Iterator // Type of the matrix iterator
1304 , typename Pred > // Type of the unary predicate
1305inline void erase( ZeroMatrix<Type,SO,Tag>& m, size_t i, Iterator first, Iterator last, Pred predicate )
1306{
1307 MAYBE_UNUSED( m, i, first, last, predicate );
1308}
1310//*************************************************************************************************
1311
1312
1313
1314
1315//=================================================================================================
1316//
1317// GLOBAL FUNCTIONS
1318//
1319//=================================================================================================
1320
1321//*************************************************************************************************
1355template< typename T, bool SO = defaultStorageOrder >
1356constexpr decltype(auto) zero( size_t m, size_t n ) noexcept
1357{
1358 return ZeroMatrix<T,SO>( m, n );
1359}
1360//*************************************************************************************************
1361
1362
1363//*************************************************************************************************
1379template< typename MT // Type of the matrix
1380 , bool SO > // Storage order
1381inline ZeroMatrix<ElementType_t<MT>,SO>
1383{
1385
1386 return ZeroMatrix<ElementType_t<MT>,SO>( (*m).rows(), (*m).columns() );
1387}
1388//*************************************************************************************************
1389
1390
1391
1392
1393//=================================================================================================
1394//
1395// ISUNIFORM SPECIALIZATIONS
1396//
1397//=================================================================================================
1398
1399//*************************************************************************************************
1401template< typename Type, bool SO, typename Tag >
1402struct IsUniform< ZeroMatrix<Type,SO,Tag> >
1403 : public TrueType
1404{};
1406//*************************************************************************************************
1407
1408
1409
1410
1411//=================================================================================================
1412//
1413// ISZERO SPECIALIZATIONS
1414//
1415//=================================================================================================
1416
1417//*************************************************************************************************
1419template< typename Type, bool SO, typename Tag >
1420struct IsZero< ZeroMatrix<Type,SO,Tag> >
1421 : public TrueType
1422{};
1424//*************************************************************************************************
1425
1426
1427
1428
1429//=================================================================================================
1430//
1431// ADDTRAIT SPECIALIZATIONS
1432//
1433//=================================================================================================
1434
1435//*************************************************************************************************
1437template< typename T1, typename T2 >
1438struct AddTraitEval1< T1, T2
1439 , EnableIf_t< IsMatrix_v<T1> &&
1440 IsMatrix_v<T2> &&
1441 !IsZero_v<T1> && IsZero_v<T2> > >
1442{
1443 using Type = Rebind_t< ResultType_t<T1>, AddTrait_t< ElementType_t<T1>, ElementType_t<T2> > >;
1444};
1445
1446template< typename T1, typename T2 >
1447struct AddTraitEval1< T1, T2
1448 , EnableIf_t< IsMatrix_v<T1> &&
1449 IsMatrix_v<T2> &&
1450 IsZero_v<T1> && !IsZero_v<T2> > >
1451{
1452 using Type = Rebind_t< ResultType_t<T2>, AddTrait_t< ElementType_t<T1>, ElementType_t<T2> > >;
1453};
1454
1455template< typename T1, typename T2 >
1456struct AddTraitEval1< T1, T2
1457 , EnableIf_t< IsMatrix_v<T1> &&
1458 IsMatrix_v<T2> &&
1459 IsZero_v<T1> && IsZero_v<T2> > >
1460{
1461 using Type = ZeroMatrix< AddTrait_t< ElementType_t<T1>, ElementType_t<T2> >
1462 , ( StorageOrder_v<T1> && StorageOrder_v<T2> )
1463 , AddTrait_t< TagType_t<T1>, TagType_t<T2> > >;
1464};
1466//*************************************************************************************************
1467
1468
1469
1470
1471//=================================================================================================
1472//
1473// SUBTRAIT SPECIALIZATIONS
1474//
1475//=================================================================================================
1476
1477//*************************************************************************************************
1479template< typename T1, typename T2 >
1480struct SubTraitEval1< T1, T2
1481 , EnableIf_t< IsMatrix_v<T1> &&
1482 IsMatrix_v<T2> &&
1483 !IsZero_v<T1> && IsZero_v<T2> > >
1484{
1485 using Type = Rebind_t< ResultType_t<T1>, SubTrait_t< ElementType_t<T1>, ElementType_t<T2> > >;
1486};
1487
1488template< typename T1, typename T2 >
1489struct SubTraitEval1< T1, T2
1490 , EnableIf_t< IsMatrix_v<T1> &&
1491 IsMatrix_v<T2> &&
1492 IsZero_v<T1> && !IsZero_v<T2> && !IsIdentity_v<T2> > >
1493{
1494 using Type = Rebind_t< ResultType_t<T2>, SubTrait_t< ElementType_t<T1>, ElementType_t<T2> > >;
1495};
1496
1497template< typename T1, typename T2 >
1498struct SubTraitEval1< T1, T2
1499 , EnableIf_t< IsMatrix_v<T1> &&
1500 IsMatrix_v<T2> &&
1501 IsZero_v<T1> && IsZero_v<T2> > >
1502{
1503 using Type = ZeroMatrix< SubTrait_t< ElementType_t<T1>, ElementType_t<T2> >
1504 , ( StorageOrder_v<T1> && StorageOrder_v<T2> )
1505 , SubTrait_t< TagType_t<T1>, TagType_t<T2> > >;
1506};
1508//*************************************************************************************************
1509
1510
1511
1512
1513//=================================================================================================
1514//
1515// SCHURTRAIT SPECIALIZATIONS
1516//
1517//=================================================================================================
1518
1519//*************************************************************************************************
1521template< typename T1, typename T2 >
1522struct SchurTraitEval1< T1, T2
1523 , EnableIf_t< IsMatrix_v<T1> &&
1524 IsMatrix_v<T2> &&
1525 ( IsZero_v<T1> ||
1526 IsZero_v<T2> ||
1527 ( IsStrictlyLower_v<T1> && IsUpper_v<T2> ) ||
1528 ( IsStrictlyUpper_v<T1> && IsLower_v<T2> ) ||
1529 ( IsLower_v<T1> && IsStrictlyUpper_v<T2> ) ||
1530 ( IsUpper_v<T1> && IsStrictlyLower_v<T2> ) ) > >
1531{
1532 static constexpr bool SO1 = StorageOrder_v<T1>;
1533 static constexpr bool SO2 = StorageOrder_v<T2>;
1534
1535 static constexpr bool SO = ( IsSparseMatrix_v<T1> ^ IsSparseMatrix_v<T2>
1536 ? ( IsSparseMatrix_v<T1>
1537 ? SO1
1538 : SO2 )
1539 : SO1 && SO2 );
1540
1541 using Type = ZeroMatrix< MultTrait_t< ElementType_t<T1>, ElementType_t<T2> >
1542 , SO
1543 , MultTrait_t< TagType_t<T1>, TagType_t<T2> > >;
1544};
1546//*************************************************************************************************
1547
1548
1549
1550
1551//=================================================================================================
1552//
1553// MULTTRAIT SPECIALIZATIONS
1554//
1555//=================================================================================================
1556
1557//*************************************************************************************************
1559template< typename T1, typename T2 >
1560struct MultTraitEval1< T1, T2
1561 , EnableIf_t< IsMatrix_v<T1> && IsZero_v<T1> && IsScalar_v<T2> > >
1562{
1563 using Type = ZeroMatrix< MultTrait_t< ElementType_t<T1>, T2 >
1564 , StorageOrder_v<T1>
1565 , MultTrait_t< TagType_t<T1>, T2 > >;
1566};
1567
1568template< typename T1, typename T2 >
1569struct MultTraitEval1< T1, T2
1570 , EnableIf_t< IsScalar_v<T1> && IsMatrix_v<T2> && IsZero_v<T2> > >
1571{
1572 using Type = ZeroMatrix< MultTrait_t< T1, ElementType_t<T2> >
1573 , StorageOrder_v<T2>
1574 , MultTrait_t< T1, TagType_t<T2> > >;
1575};
1576
1577template< typename T1, typename T2 >
1578struct MultTraitEval1< T1, T2
1580 IsRowVector_v<T2> &&
1581 ( IsZero_v<T1> || IsZero_v<T2> ) > >
1582{
1583 using Type = ZeroMatrix< MultTrait_t< ElementType_t<T1>, ElementType_t<T2> >
1584 , ( IsSparseVector_v<T1> && IsDenseVector_v<T2> )
1585 , MultTrait_t< TagType_t<T1>, TagType_t<T2> > >;
1586};
1587
1588template< typename T1, typename T2 >
1589struct MultTraitEval1< T1, T2
1590 , EnableIf_t< IsMatrix_v<T1> &&
1591 IsMatrix_v<T2> &&
1592 ( IsZero_v<T1> || IsZero_v<T2> ) > >
1593{
1594 using MultType = MultTrait_t< ElementType_t<T1>, ElementType_t<T2> >;
1595 using MultTag = MultTrait_t< TagType_t<T1>, TagType_t<T2> >;
1596
1597 using Type = ZeroMatrix< AddTrait_t<MultType,MultType>
1598 , ( IsZero_v<T1> ? StorageOrder_v<T1> : StorageOrder_v<T2> )
1599 , AddTrait_t<MultTag,MultTag> >;
1600};
1602//*************************************************************************************************
1603
1604
1605
1606
1607//=================================================================================================
1608//
1609// KRONTRAIT SPECIALIZATIONS
1610//
1611//=================================================================================================
1612
1613//*************************************************************************************************
1615template< typename T1, typename T2 >
1616struct KronTraitEval1< T1, T2
1617 , EnableIf_t< IsMatrix_v<T1> &&
1618 IsMatrix_v<T2> &&
1619 ( IsZero_v<T1> ||
1620 IsZero_v<T2> ) > >
1621{
1622 using Type = ZeroMatrix< MultTrait_t< ElementType_t<T1>, ElementType_t<T2> >
1623 , ( IsZero_v<T2> ? StorageOrder_v<T2> : StorageOrder_v<T1> )
1624 , MultTrait_t< TagType_t<T1>, TagType_t<T2> > >;
1625};
1627//*************************************************************************************************
1628
1629
1630
1631
1632//=================================================================================================
1633//
1634// DIVTRAIT SPECIALIZATIONS
1635//
1636//=================================================================================================
1637
1638//*************************************************************************************************
1640template< typename T1, typename T2 >
1641struct DivTraitEval1< T1, T2
1642 , EnableIf_t< IsMatrix_v<T1> &&
1643 IsScalar_v<T2> &&
1644 IsZero_v<T1> > >
1645{
1646 using Type = ZeroMatrix< DivTrait_t< ElementType_t<T1>, T2 >
1647 , StorageOrder_v<T1>
1648 , DivTrait_t< TagType_t<T1>, T2 > >;
1649};
1651//*************************************************************************************************
1652
1653
1654
1655
1656//=================================================================================================
1657//
1658// MAPTRAIT SPECIALIZATIONS
1659//
1660//=================================================================================================
1661
1662//*************************************************************************************************
1664template< typename T, typename OP >
1665struct UnaryMapTraitEval1< T, OP
1666 , EnableIf_t< IsMatrix_v<T> &&
1667 YieldsZero_v<OP,T> > >
1668{
1669 using ElementType = decltype( std::declval<OP>()( std::declval< ElementType_t<T> >() ) );
1670
1671 using Type = ZeroMatrix< EvaluateTrait_t<ElementType>
1672 , StorageOrder_v<T>
1673 , MapTrait_t< TagType_t<T>, OP > >;
1674};
1676//*************************************************************************************************
1677
1678
1679//*************************************************************************************************
1681template< typename T1, typename T2, typename OP >
1682struct BinaryMapTraitEval1< T1, T2, OP
1683 , EnableIf_t< IsMatrix_v<T1> &&
1684 IsMatrix_v<T2> &&
1685 YieldsZero_v<OP,T1,T2> > >
1686{
1687 using ElementType = decltype( std::declval<OP>()( std::declval< ElementType_t<T1> >()
1688 , std::declval< ElementType_t<T2> >() ) );
1689
1690 using Type = ZeroMatrix< EvaluateTrait_t<ElementType>
1691 , ( StorageOrder_v<T1> && StorageOrder_v<T2> )
1692 , MapTrait_t< TagType_t<T1>, TagType_t<T2>, OP > >;
1693};
1695//*************************************************************************************************
1696
1697
1698
1699
1700//=================================================================================================
1701//
1702// EXPANDTRAIT SPECIALIZATIONS
1703//
1704//=================================================================================================
1705
1706//*************************************************************************************************
1708template< typename T // Type to be expanded
1709 , size_t E > // Compile time expansion
1710struct ExpandTraitEval1< T, E
1711 , EnableIf_t< IsVector_v<T> &&
1712 IsZero_v<T> > >
1713{
1714 using Type = ZeroMatrix< ElementType_t<T>
1715 , ( IsColumnVector_v<T> ? columnMajor : rowMajor )
1716 , TagType_t<T> >;
1717};
1719//*************************************************************************************************
1720
1721
1722
1723
1724//=================================================================================================
1725//
1726// REPEATTRAIT SPECIALIZATIONS
1727//
1728//=================================================================================================
1729
1730//*************************************************************************************************
1732template< typename T, size_t R0, size_t R1 >
1733struct RepeatTraitEval1< T, R0, R1, inf
1734 , EnableIf_t< IsMatrix_v<T> &&
1735 IsZero_v<T> > >
1736{
1737 using Type = ZeroMatrix< ElementType_t<T>
1738 , StorageOrder_v<T>
1739 , TagType_t<T> >;
1740};
1742//*************************************************************************************************
1743
1744
1745
1746
1747//=================================================================================================
1748//
1749// DECLSTRLOWTRAIT SPECIALIZATIONS
1750//
1751//=================================================================================================
1752
1753//*************************************************************************************************
1755template< typename T, bool SO, typename Tag >
1756struct DeclStrLowTrait< ZeroMatrix<T,SO,Tag> >
1757{
1758 using Type = ZeroMatrix<T,SO,Tag>;
1759};
1761//*************************************************************************************************
1762
1763
1764
1765
1766//=================================================================================================
1767//
1768// DECLSTRUPPTRAIT SPECIALIZATIONS
1769//
1770//=================================================================================================
1771
1772//*************************************************************************************************
1774template< typename T, bool SO, typename Tag >
1775struct DeclStrUppTrait< ZeroMatrix<T,SO,Tag> >
1776{
1777 using Type = ZeroMatrix<T,SO,Tag>;
1778};
1780//*************************************************************************************************
1781
1782
1783
1784
1785//=================================================================================================
1786//
1787// HIGHTYPE SPECIALIZATIONS
1788//
1789//=================================================================================================
1790
1791//*************************************************************************************************
1793template< typename T1, bool SO, typename Tag, typename T2 >
1794struct HighType< ZeroMatrix<T1,SO,Tag>, ZeroMatrix<T2,SO,Tag> >
1795{
1796 using Type = ZeroMatrix< typename HighType<T1,T2>::Type, SO, Tag >;
1797};
1799//*************************************************************************************************
1800
1801
1802
1803
1804//=================================================================================================
1805//
1806// LOWTYPE SPECIALIZATIONS
1807//
1808//=================================================================================================
1809
1810//*************************************************************************************************
1812template< typename T1, bool SO, typename Tag, typename T2 >
1813struct LowType< ZeroMatrix<T1,SO,Tag>, ZeroMatrix<T2,SO,Tag> >
1814{
1815 using Type = ZeroMatrix< typename LowType<T1,T2>::Type, SO, Tag >;
1816};
1818//*************************************************************************************************
1819
1820
1821
1822
1823//=================================================================================================
1824//
1825// SUBMATRIXTRAIT SPECIALIZATIONS
1826//
1827//=================================================================================================
1828
1829//*************************************************************************************************
1831template< typename MT, size_t I, size_t J, size_t M, size_t N >
1832struct SubmatrixTraitEval1< MT, I, J, M, N
1833 , EnableIf_t< IsZero_v<MT> > >
1834{
1835 using Type = ZeroMatrix< RemoveConst_t< ElementType_t<MT> >
1836 , StorageOrder_v<MT>
1837 , TagType_t<MT> >;
1838};
1840//*************************************************************************************************
1841
1842
1843
1844
1845//=================================================================================================
1846//
1847// ROWSTRAIT SPECIALIZATIONS
1848//
1849//=================================================================================================
1850
1851//*************************************************************************************************
1853template< typename MT, size_t M >
1854struct RowsTraitEval1< MT, M
1855 , EnableIf_t< IsZero_v<MT> > >
1856{
1857 using Type = ZeroMatrix< RemoveConst_t< ElementType_t<MT> >
1858 , false
1859 , TagType_t<MT> >;
1860};
1862//*************************************************************************************************
1863
1864
1865
1866
1867//=================================================================================================
1868//
1869// COLUMNSTRAIT SPECIALIZATIONS
1870//
1871//=================================================================================================
1872
1873//*************************************************************************************************
1875template< typename MT, size_t N >
1876struct ColumnsTraitEval1< MT, N
1877 , EnableIf_t< IsZero_v<MT> > >
1878{
1879 using Type = ZeroMatrix< RemoveConst_t< ElementType_t<MT> >
1880 , true
1881 , TagType_t<MT> >;
1882};
1884//*************************************************************************************************
1885
1886} // namespace blaze
1887
1888#endif
Header file for the addition trait.
Header file for auxiliary alias declarations.
typename ResultType_t< T >::TagType TagType_t
Alias declaration for nested TagType type definitions.
Definition: Aliases.h:530
Header file for run time assertion macros.
Header file for the columns trait.
Constraint on the data type.
Header file for the declstrlow trait.
Header file for the declstrupp trait.
Header file for the division trait.
Header file for the EnableIf class template.
Header file for the EvaluateTrait class template.
Header file for the expand trait.
Header file for the function trace functionality.
Header file for the HighType type trait.
Header file for the IntegralConstant class template.
Header file for the IsColumnVector type trait.
Header file for the IsDenseVector type trait.
Header file for the IsIdentity type trait.
Header file for the IsLower type trait.
Header file for the IsMatrix type trait.
Header file for the IsRowVector type trait.
Header file for the IsSMPAssignable type trait.
Header file for the IsScalar type trait.
Header file for the IsSparseMatrix type trait.
Header file for the IsSparseVector type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsUniform type trait.
Header file for the IsUpper type trait.
Header file for the IsVector type trait.
Header file for the Kron product trait.
Header file for the LowType type trait.
Header file for the map trait.
Header file for the MAYBE_UNUSED function template.
Header file for the multiplication trait.
Constraint on the data type.
Constraint on the data type.
Header file for the relaxation flag enumeration.
Header file for the RemoveConst type trait.
Header file for the repeat trait.
Header file for the rows trait.
Data type constraint.
Header file for the Schur product trait.
Header file for the subtraction trait.
Header file for the submatrix trait.
Header file for the ValueIndexPair class.
Constraint on the data type.
Header file for the YieldsZero type trait.
Base class for matrices.
Definition: Matrix.h:85
Index-value-pair for sparse vectors and matrices.
Definition: ValueIndexPair.h:75
Efficient implementation of an zero matrix.
Definition: ZeroMatrix.h:197
constexpr size_t rows() const noexcept
Returns the current number of rows of the zero matrix.
Definition: ZeroMatrix.h:668
constexpr ConstIterator begin(size_t i) const noexcept
Returns an iterator to the first non-zero element of row/column i.
Definition: ZeroMatrix.h:520
size_t n_
The current number of columns of the zero matrix.
Definition: ZeroMatrix.h:346
ConstIterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: ZeroMatrix.h:886
constexpr void clear() noexcept
Clearing the zero matrix.
Definition: ZeroMatrix.h:780
bool canAlias(const Other *alias) const noexcept
Returns whether the matrix can alias with the given address alias.
Definition: ZeroMatrix.h:995
constexpr ZeroMatrix() noexcept
The default constructor for ZeroMatrix.
Definition: ZeroMatrix.h:392
constexpr ConstIterator end(size_t i) const noexcept
Returns an iterator just past the last non-zero element of row/column i.
Definition: ZeroMatrix.h:572
const Type & Reference
Reference to a zero matrix element.
Definition: ZeroMatrix.h:222
ConstIterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: ZeroMatrix.h:915
constexpr size_t capacity() const noexcept
Returns the maximum capacity of the zero matrix.
Definition: ZeroMatrix.h:698
constexpr ZeroMatrix & transpose() noexcept
In-place transpose of the matrix.
Definition: ZeroMatrix.h:943
constexpr ConstIterator cbegin(size_t i) const noexcept
Returns an iterator to the first non-zero element of row/column i.
Definition: ZeroMatrix.h:546
constexpr ZeroMatrix & ctranspose() noexcept
In-place conjugate transpose of the matrix.
Definition: ZeroMatrix.h:962
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: ZeroMatrix.h:857
constexpr size_t nonZeros() const noexcept
Returns the number of non-zero elements in the zero matrix.
Definition: ZeroMatrix.h:738
constexpr size_t columns() const noexcept
Returns the current number of columns of the zero matrix.
Definition: ZeroMatrix.h:683
constexpr ConstIterator cend(size_t i) const noexcept
Returns an iterator just past the last non-zero element of row/column i.
Definition: ZeroMatrix.h:598
const Type & ConstReference
Reference to a constant zero matrix element.
Definition: ZeroMatrix.h:223
constexpr void swap(ZeroMatrix &m) noexcept
Swapping the contents of two zero matrices.
Definition: ZeroMatrix.h:819
constexpr void resize(size_t m, size_t n) noexcept
Changing the size of the zero matrix.
Definition: ZeroMatrix.h:802
static const Type zero_
The zero element.
Definition: ZeroMatrix.h:348
Type ElementType
Type of the zero matrix elements.
Definition: ZeroMatrix.h:217
constexpr ConstReference operator()(size_t i, size_t j) const noexcept
2D-access to the zero matrix elements.
Definition: ZeroMatrix.h:464
bool canSMPAssign() const noexcept
Returns whether the matrix can be used in SMP assignments.
Definition: ZeroMatrix.h:1040
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: ZeroMatrix.h:252
size_t m_
The current number of rows of the zero matrix.
Definition: ZeroMatrix.h:345
bool isAliased(const Other *alias) const noexcept
Returns whether the matrix is aliased with the given address alias.
Definition: ZeroMatrix.h:1018
ConstReference at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: ZeroMatrix.h:491
Tag TagType
Tag type of this ZeroMatrix instance.
Definition: ZeroMatrix.h:218
const Type & ReturnType
Return type for expression template evaluations.
Definition: ZeroMatrix.h:219
ZeroMatrix< Type, SO, Tag > This
Type of this ZeroMatrix instance.
Definition: ZeroMatrix.h:205
Header file for the Expression base class.
Header file for the SparseMatrix base class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.
Definition: Volatile.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.
Definition: Pointer.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.
Definition: Const.h:79
#define BLAZE_CONSTRAINT_MUST_BE_SAME_TAG(A, B)
Data type constraint.
Definition: SameTag.h:68
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.
Definition: Reference.h:79
bool isZero(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a zero matrix.
Definition: DenseMatrix.h:1819
typename MapTrait< Args... >::Type MapTrait_t
Auxiliary alias declaration for the MapTrait class template.
Definition: MapTrait.h:131
typename AddTrait< T1, T2 >::Type AddTrait_t
Auxiliary alias declaration for the AddTrait class template.
Definition: AddTrait.h:163
typename SubTrait< T1, T2 >::Type SubTrait_t
Auxiliary alias declaration for the SubTrait class template.
Definition: SubTrait.h:163
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.
Definition: MultTrait.h:165
constexpr bool IsScalar_v
Auxiliary variable template for the IsScalar type trait.
Definition: IsScalar.h:104
constexpr bool IsVector_v
Auxiliary variable template for the IsVector type trait.
Definition: IsVector.h:125
constexpr bool IsZero_v
Auxiliary variable template for the IsZero type trait.
Definition: IsZero.h:166
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.
Definition: IsMatrix.h:124
constexpr bool IsColumnVector_v
Auxiliary variable template for the IsColumnVector type trait.
Definition: IsColumnVector.h:126
RelaxationFlag
Relaxation flag for strict or relaxed semantics.
Definition: RelaxationFlag.h:66
constexpr Infinity inf
Global Infinity instance.
Definition: Infinity.h:1080
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:644
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:660
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition: Assert.h:117
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
#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
ZeroMatrix< ElementType_t< MT >, SO > declzero(const Matrix< MT, SO > &m)
Declares the given matrix expression m as zero matrix.
Definition: ZeroMatrix.h:1382
constexpr decltype(auto) zero(size_t m, size_t n) noexcept
Creating a zero matrix.
Definition: ZeroMatrix.h:1356
constexpr void swap(ZeroMatrix< Type, SO, Tag > &a, ZeroMatrix< Type, SO, Tag > &b) noexcept
Swapping the contents of two zero matrices.
Definition: ZeroMatrix.h:1150
constexpr bool isDefault(const ZeroMatrix< Type, SO, Tag > &m) noexcept
Returns whether the given zero matrix is in default state.
Definition: ZeroMatrix.h:1103
constexpr bool isIntact(const ZeroMatrix< Type, SO, Tag > &m) noexcept
Returns whether the invariants of the given zero matrix are intact.
Definition: ZeroMatrix.h:1130
Header file for the exception macros of the math module.
Header file for all forward declarations of the math module.
constexpr bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
constexpr bool columnMajor
Storage order flag for column-major matrices.
Definition: StorageOrder.h:99
Header file for all forward declarations for sparse vectors and matrices.
Header file for the StorageOrder type trait.
Header file for the isZero shim.
Base class for all expression templates.
Definition: Expression.h:60
Rebind mechanism to obtain a ZeroMatrix with different data/element type.
Definition: ZeroMatrix.h:232
Resize mechanism to obtain a ZeroMatrix with different fixed dimensions.
Definition: ZeroMatrix.h:242
Header file for the default storage order for all vectors of the Blaze library.
Header file for the IsZero type trait.
Header file for basic type definitions.