Vector.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_VECTOR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_VECTOR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Exception.h>
46 #include <blaze/system/Inline.h>
47 #include <blaze/util/Assert.h>
48 #include <blaze/util/DisableIf.h>
49 #include <blaze/util/EnableIf.h>
51 #include <blaze/util/Types.h>
53 #include <blaze/util/Unused.h>
54 
55 
56 namespace blaze {
57 
58 //=================================================================================================
59 //
60 // CLASS DEFINITION
61 //
62 //=================================================================================================
63 
64 //*************************************************************************************************
76 template< typename VT // Type of the vector
77  , bool TF > // Transpose flag
78 struct Vector
79 {
80  //**Type definitions****************************************************************************
81  using VectorType = VT;
82  //**********************************************************************************************
83 
84  //**Compilation flags***************************************************************************
85  static constexpr bool transposeFlag = TF;
86  //**********************************************************************************************
87 
88  //**Non-const conversion operator***************************************************************
93  BLAZE_ALWAYS_INLINE constexpr VectorType& operator~() noexcept {
94  return *static_cast<VectorType*>( this );
95  }
96  //**********************************************************************************************
97 
98  //**Const conversion operators******************************************************************
103  BLAZE_ALWAYS_INLINE constexpr const VectorType& operator~() const noexcept {
104  return *static_cast<const VectorType*>( this );
105  }
106  //**********************************************************************************************
107 };
108 //*************************************************************************************************
109 
110 
111 
112 
113 //=================================================================================================
114 //
115 // GLOBAL FUNCTIONS
116 //
117 //=================================================================================================
118 
119 //*************************************************************************************************
122 template< typename VT, bool TF >
123 typename VT::Iterator begin( Vector<VT,TF>& vector );
124 
125 template< typename VT, bool TF >
126 typename VT::ConstIterator begin( const Vector<VT,TF>& vector );
127 
128 template< typename VT, bool TF >
129 typename VT::ConstIterator cbegin( const Vector<VT,TF>& vector );
130 
131 template< typename VT, bool TF >
132 typename VT::Iterator end( Vector<VT,TF>& vector );
133 
134 template< typename VT, bool TF >
135 typename VT::ConstIterator end( const Vector<VT,TF>& vector );
136 
137 template< typename VT, bool TF >
138 typename VT::ConstIterator cend( const Vector<VT,TF>& vector );
139 
140 template< typename VT, bool TF >
141 constexpr size_t size( const Vector<VT,TF>& vector ) noexcept;
142 
143 template< typename VT, bool TF >
144 size_t capacity( const Vector<VT,TF>& vector ) noexcept;
145 
146 template< typename VT, bool TF >
147 size_t nonZeros( const Vector<VT,TF>& vector );
148 
149 template< typename VT, bool TF >
150 void resize( Vector<VT,TF>& vector, size_t n, bool preserve=true );
151 
152 template< typename VT, bool TF >
153 void shrinkToFit( Vector<VT,TF>& vector );
154 
155 template< typename VT, bool TF >
156 const typename VT::ResultType evaluate( const Vector<VT,TF>& vector );
157 
158 template< typename VT, bool TF >
159 constexpr bool isEmpty( const Vector<VT,TF>& vector ) noexcept;
160 
161 template< typename VT1, bool TF1, typename VT2, bool TF2 >
162 bool isSame( const Vector<VT1,TF1>& a, const Vector<VT2,TF2>& b ) noexcept;
164 //*************************************************************************************************
165 
166 
167 //*************************************************************************************************
174 template< typename VT // Type of the vector
175  , bool TF > // Transpose flag of the vector
177 {
178  return (~vector).begin();
179 }
180 //*************************************************************************************************
181 
182 
183 //*************************************************************************************************
190 template< typename VT // Type of the vector
191  , bool TF > // Transpose flag of the vector
193 {
194  return (~vector).begin();
195 }
196 //*************************************************************************************************
197 
198 
199 //*************************************************************************************************
206 template< typename VT // Type of the vector
207  , bool TF > // Transpose flag of the vector
209 {
210  return (~vector).begin();
211 }
212 //*************************************************************************************************
213 
214 
215 //*************************************************************************************************
222 template< typename VT // Type of the vector
223  , bool TF > // Transpose flag of the vector
225 {
226  return (~vector).end();
227 }
228 //*************************************************************************************************
229 
230 
231 //*************************************************************************************************
238 template< typename VT // Type of the vector
239  , bool TF > // Transpose flag of the vector
241 {
242  return (~vector).end();
243 }
244 //*************************************************************************************************
245 
246 
247 //*************************************************************************************************
254 template< typename VT // Type of the vector
255  , bool TF > // Transpose flag of the vector
257 {
258  return (~vector).end();
259 }
260 //*************************************************************************************************
261 
262 
263 //*************************************************************************************************
270 template< typename VT // Type of the vector
271  , bool TF > // Transpose flag of the vector
272 BLAZE_ALWAYS_INLINE constexpr size_t size( const Vector<VT,TF>& vector ) noexcept
273 {
274  return (~vector).size();
275 }
276 //*************************************************************************************************
277 
278 
279 //*************************************************************************************************
286 template< typename VT // Type of the vector
287  , bool TF > // Transpose flag of the vector
288 BLAZE_ALWAYS_INLINE size_t capacity( const Vector<VT,TF>& vector ) noexcept
289 {
290  return (~vector).capacity();
291 }
292 //*************************************************************************************************
293 
294 
295 //*************************************************************************************************
305 template< typename VT // Type of the vector
306  , bool TF > // Transpose flag of the vector
308 {
309  return (~vector).nonZeros();
310 }
311 //*************************************************************************************************
312 
313 
314 //*************************************************************************************************
328 template< typename VT // Type of the vector
329  , bool TF > // Transpose flag of the vector
330 BLAZE_ALWAYS_INLINE auto resize_backend( Vector<VT,TF>& vector, size_t n, bool preserve )
331  -> DisableIf_t< IsResizable_v<VT> >
332 {
333  UNUSED_PARAMETER( preserve );
334 
335  if( (~vector).size() != n ) {
336  BLAZE_THROW_INVALID_ARGUMENT( "Vector cannot be resized" );
337  }
338 }
340 //*************************************************************************************************
341 
342 
343 //*************************************************************************************************
355 template< typename VT // Type of the vector
356  , bool TF > // Transpose flag of the vector
357 BLAZE_ALWAYS_INLINE auto resize_backend( Vector<VT,TF>& vector, size_t n, bool preserve )
358  -> EnableIf_t< IsResizable_v<VT> >
359 {
360  (~vector).resize( n, preserve );
361 }
363 //*************************************************************************************************
364 
365 
366 //*************************************************************************************************
394 template< typename VT // Type of the vector
395  , bool TF > // Transpose flag of the vector
396 BLAZE_ALWAYS_INLINE void resize( Vector<VT,TF>& vector, size_t n, bool preserve )
397 {
398  resize_backend( vector, n, preserve );
399 }
400 //*************************************************************************************************
401 
402 
403 //*************************************************************************************************
411 template< typename VT // Type of the vector
412  , bool TF > // Transpose flag of the vector
413 BLAZE_ALWAYS_INLINE auto shrinkToFit_backend( Vector<VT,TF>& vector )
414  -> DisableIf_t< IsShrinkable_v<VT> >
415 {
416  UNUSED_PARAMETER( vector );
417 }
419 //*************************************************************************************************
420 
421 
422 //*************************************************************************************************
430 template< typename VT // Type of the vector
431  , bool TF > // Transpose flag of the vector
432 BLAZE_ALWAYS_INLINE auto shrinkToFit_backend( Vector<VT,TF>& vector )
433  -> EnableIf_t< IsShrinkable_v<VT> >
434 {
435  (~vector).shrinkToFit();
436 }
438 //*************************************************************************************************
439 
440 
441 //*************************************************************************************************
454 template< typename VT // Type of the vector
455  , bool TF > // Transpose flag of the vector
457 {
458  shrinkToFit_backend( vector );
459 }
460 //*************************************************************************************************
461 
462 
463 //*************************************************************************************************
513 template< typename VT // Type of the vector
514  , bool TF > // Transpose flag of the vector
515 inline const typename VT::ResultType evaluate( const Vector<VT,TF>& vector )
516 {
517  const typename VT::ResultType tmp( ~vector );
518  return tmp;
519 }
520 //*************************************************************************************************
521 
522 
523 //*************************************************************************************************
533 template< typename VT // Type of the vector
534  , bool TF > // Transpose flag of the vector
535 BLAZE_ALWAYS_INLINE constexpr bool isEmpty( const Vector<VT,TF>& vector ) noexcept
536 {
537  return size( ~vector ) == 0UL;
538 }
539 //*************************************************************************************************
540 
541 
542 //*************************************************************************************************
572 template< typename VT1 // Type of the left-hand side vector
573  , bool TF1 // Transpose flag of the left-hand side vector
574  , typename VT2 // Type of the right-hand side vector
575  , bool TF2 > // Transpose flag of the right-hand side vector
576 BLAZE_ALWAYS_INLINE bool isSame( const Vector<VT1,TF1>& a, const Vector<VT2,TF2>& b ) noexcept
577 {
578  return ( IsSame_v<VT1,VT2> &&
579  reinterpret_cast<const void*>( &a ) == reinterpret_cast<const void*>( &b ) );
580 }
581 //*************************************************************************************************
582 
583 
584 //*************************************************************************************************
599 template< typename VT1 // Type of the left-hand side vector
600  , bool TF1 // Transpose flag of the left-hand side vector
601  , typename VT2 // Type of the right-hand side vector
602  , bool TF2 > // Transpose flag of the right-hand side vector
603 BLAZE_ALWAYS_INLINE void assign( Vector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
604 {
606 
607  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
608  (~lhs).assign( ~rhs );
609 }
611 //*************************************************************************************************
612 
613 
614 //*************************************************************************************************
629 template< typename VT1 // Type of the left-hand side vector
630  , bool TF1 // Transpose flag of the left-hand side vector
631  , typename VT2 // Type of the right-hand side vector
632  , bool TF2 > // Transpose flag of the right-hand side vector
633 BLAZE_ALWAYS_INLINE void addAssign( Vector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
634 {
636 
637  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
638  (~lhs).addAssign( ~rhs );
639 }
641 //*************************************************************************************************
642 
643 
644 //*************************************************************************************************
659 template< typename VT1 // Type of the left-hand side vector
660  , bool TF1 // Transpose flag of the left-hand side vector
661  , typename VT2 // Type of the right-hand side vector
662  , bool TF2 > // Transpose flag of the right-hand side vector
663 BLAZE_ALWAYS_INLINE void subAssign( Vector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
664 {
666 
667  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
668  (~lhs).subAssign( ~rhs );
669 }
671 //*************************************************************************************************
672 
673 
674 //*************************************************************************************************
689 template< typename VT1 // Type of the left-hand side vector
690  , bool TF1 // Transpose flag of the left-hand side vector
691  , typename VT2 // Type of the right-hand side vector
692  , bool TF2 > // Transpose flag of the right-hand side vector
693 BLAZE_ALWAYS_INLINE void multAssign( Vector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
694 {
696 
697  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
698  (~lhs).multAssign( ~rhs );
699 }
701 //*************************************************************************************************
702 
703 
704 //*************************************************************************************************
719 template< typename VT1 // Type of the left-hand side vector
720  , bool TF1 // Transpose flag of the left-hand side vector
721  , typename VT2 // Type of the right-hand side vector
722  , bool TF2 > // Transpose flag of the right-hand side vector
723 BLAZE_ALWAYS_INLINE void divAssign( Vector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
724 {
726 
727  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
728  (~lhs).divAssign( ~rhs );
729 }
731 //*************************************************************************************************
732 
733 
734 //*************************************************************************************************
749 template< typename VT // Type of the vector
750  , bool TF // Transpose flag
751  , typename ET > // Type of the element
752 BLAZE_ALWAYS_INLINE bool trySet( const Vector<VT,TF>& vec, size_t index, const ET& value )
753 {
754  BLAZE_INTERNAL_ASSERT( index < (~vec).size(), "Invalid vector access index" );
755 
756  UNUSED_PARAMETER( vec, index, value );
757 
758  return true;
759 }
761 //*************************************************************************************************
762 
763 
764 //*************************************************************************************************
779 template< typename VT // Type of the vector
780  , bool TF // Transpose flag
781  , typename ET > // Type of the element
782 BLAZE_ALWAYS_INLINE bool tryAdd( const Vector<VT,TF>& vec, size_t index, const ET& value )
783 {
784  BLAZE_INTERNAL_ASSERT( index < (~vec).size(), "Invalid vector access index" );
785 
786  UNUSED_PARAMETER( vec, index, value );
787 
788  return true;
789 }
791 //*************************************************************************************************
792 
793 
794 //*************************************************************************************************
809 template< typename VT // Type of the vector
810  , bool TF // Transpose flag
811  , typename ET > // Type of the element
812 BLAZE_ALWAYS_INLINE bool trySub( const Vector<VT,TF>& vec, size_t index, const ET& value )
813 {
814  BLAZE_INTERNAL_ASSERT( index < (~vec).size(), "Invalid vector access index" );
815 
816  UNUSED_PARAMETER( vec, index, value );
817 
818  return true;
819 }
821 //*************************************************************************************************
822 
823 
824 //*************************************************************************************************
839 template< typename VT // Type of the vector
840  , bool TF // Transpose flag
841  , typename ET > // Type of the element
842 BLAZE_ALWAYS_INLINE bool tryMult( const Vector<VT,TF>& vec, size_t index, const ET& value )
843 {
844  BLAZE_INTERNAL_ASSERT( index < (~vec).size(), "Invalid vector access index" );
845 
846  UNUSED_PARAMETER( vec, index, value );
847 
848  return true;
849 }
851 //*************************************************************************************************
852 
853 
854 //*************************************************************************************************
870 template< typename VT // Type of the vector
871  , bool TF // Transpose flag
872  , typename ET > // Type of the element
874  tryMult( const Vector<VT,TF>& vec, size_t index, size_t size, const ET& value )
875 {
876  BLAZE_INTERNAL_ASSERT( index <= (~vec).size(), "Invalid vector access index" );
877  BLAZE_INTERNAL_ASSERT( index + size <= (~vec).size(), "Invalid range size" );
878 
879  UNUSED_PARAMETER( vec, index, size, value );
880 
881  return true;
882 }
884 //*************************************************************************************************
885 
886 
887 //*************************************************************************************************
902 template< typename VT // Type of the vector
903  , bool TF // Transpose flag
904  , typename ET > // Type of the element
905 BLAZE_ALWAYS_INLINE bool tryDiv( const Vector<VT,TF>& vec, size_t index, const ET& value )
906 {
907  BLAZE_INTERNAL_ASSERT( index < (~vec).size(), "Invalid vector access index" );
908 
909  UNUSED_PARAMETER( vec, index, value );
910 
911  return true;
912 }
914 //*************************************************************************************************
915 
916 
917 //*************************************************************************************************
933 template< typename VT // Type of the vector
934  , bool TF // Transpose flag
935  , typename ET > // Type of the element
937  tryDiv( const Vector<VT,TF>& vec, size_t index, size_t size, const ET& value )
938 {
939  BLAZE_INTERNAL_ASSERT( index <= (~vec).size(), "Invalid vector access index" );
940  BLAZE_INTERNAL_ASSERT( index + size <= (~vec).size(), "Invalid range size" );
941 
942  UNUSED_PARAMETER( vec, index, size, value );
943 
944  return true;
945 }
947 //*************************************************************************************************
948 
949 
950 //*************************************************************************************************
965 template< typename VT1 // Type of the left-hand side vector
966  , bool TF1 // Transpose flag of the left-hand side vector
967  , typename VT2 // Type of the right-hand side vector
968  , bool TF2 > // Transpose flag of the right-hand side vector
969 BLAZE_ALWAYS_INLINE bool tryAssign( const Vector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs, size_t index )
970 {
971  BLAZE_INTERNAL_ASSERT( index <= (~lhs).size(), "Invalid vector access index" );
972  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= (~lhs).size(), "Invalid vector size" );
973 
974  UNUSED_PARAMETER( lhs, rhs, index );
975 
976  return true;
977 }
979 //*************************************************************************************************
980 
981 
982 //*************************************************************************************************
997 template< typename VT1 // Type of the left-hand side vector
998  , bool TF1 // Transpose flag of the left-hand side vector
999  , typename VT2 // Type of the right-hand side vector
1000  , bool TF2 > // Transpose flag of the right-hand side vector
1001 BLAZE_ALWAYS_INLINE bool tryAddAssign( const Vector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs, size_t index )
1002 {
1003  BLAZE_INTERNAL_ASSERT( index <= (~lhs).size(), "Invalid vector access index" );
1004  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= (~lhs).size(), "Invalid vector size" );
1005 
1006  UNUSED_PARAMETER( lhs, rhs, index );
1007 
1008  return true;
1009 }
1011 //*************************************************************************************************
1012 
1013 
1014 //*************************************************************************************************
1029 template< typename VT1 // Type of the left-hand side vector
1030  , bool TF1 // Transpose flag of the left-hand side vector
1031  , typename VT2 // Type of the right-hand side vector
1032  , bool TF2 > // Transpose flag of the right-hand side vector
1033 BLAZE_ALWAYS_INLINE bool trySubAssign( const Vector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs, size_t index )
1034 {
1035  BLAZE_INTERNAL_ASSERT( index <= (~lhs).size(), "Invalid vector access index" );
1036  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= (~lhs).size(), "Invalid vector size" );
1037 
1038  UNUSED_PARAMETER( lhs, rhs, index );
1039 
1040  return true;
1041 }
1043 //*************************************************************************************************
1044 
1045 
1046 //*************************************************************************************************
1061 template< typename VT1 // Type of the left-hand side vector
1062  , bool TF1 // Transpose flag of the left-hand side vector
1063  , typename VT2 // Type of the right-hand side vector
1064  , bool TF2 > // Transpose flag of the right-hand side vector
1065 BLAZE_ALWAYS_INLINE bool tryMultAssign( const Vector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs, size_t index )
1066 {
1067  BLAZE_INTERNAL_ASSERT( index <= (~lhs).size(), "Invalid vector access index" );
1068  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= (~lhs).size(), "Invalid vector size" );
1069 
1070  UNUSED_PARAMETER( lhs, rhs, index );
1071 
1072  return true;
1073 }
1075 //*************************************************************************************************
1076 
1077 
1078 //*************************************************************************************************
1093 template< typename VT1 // Type of the left-hand side vector
1094  , bool TF1 // Transpose flag of the left-hand side vector
1095  , typename VT2 // Type of the right-hand side vector
1096  , bool TF2 > // Transpose flag of the right-hand side vector
1097 BLAZE_ALWAYS_INLINE bool tryDivAssign( const Vector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs, size_t index )
1098 {
1099  BLAZE_INTERNAL_ASSERT( index <= (~lhs).size(), "Invalid vector access index" );
1100  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= (~lhs).size(), "Invalid vector size" );
1101 
1102  UNUSED_PARAMETER( lhs, rhs, index );
1103 
1104  return true;
1105 }
1107 //*************************************************************************************************
1108 
1109 
1110 //*************************************************************************************************
1125 template< typename VT // Type of the vector
1126  , bool TF > // Transpose flag of the vector
1127 BLAZE_ALWAYS_INLINE VT& derestrict( Vector<VT,TF>& vector )
1128 {
1129  return ~vector;
1130 }
1132 //*************************************************************************************************
1133 
1134 } // namespace blaze
1135 
1136 #endif
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Header file for the UNUSED_PARAMETER function template.
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:546
bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b) noexcept
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:992
Header file for basic type definitions.
static constexpr bool transposeFlag
Transpose flag of the vector.
Definition: Vector.h:85
Header file for the IsSame and IsStrictlySame type traits.
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:3077
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:799
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:584
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3085
const MT::ResultType evaluate(const Matrix< MT, SO > &matrix)
Evaluates the given matrix expression.
Definition: Matrix.h:912
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
MT::ConstIterator cend(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:482
MT::ConstIterator cbegin(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:416
Header file for the DisableIf class template.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Expression object for sparse matrix-sparse vector multiplications.The TSMatSVecMultExpr class represe...
Definition: Forward.h:176
Header file for the IsShrinkable type trait.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
BLAZE_ALWAYS_INLINE constexpr const VectorType & operator~() const noexcept
Conversion operator for constant vectors.
Definition: Vector.h:103
Header file for the exception macros of the math module.
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:738
MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:438
Header file for the EnableIf class template.
BLAZE_ALWAYS_INLINE constexpr VectorType & operator~() noexcept
Conversion operator for non-constant vectors.
Definition: Vector.h:93
Header file for run time assertion macros.
constexpr bool isEmpty(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is empty.
Definition: Matrix.h:932
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:186
Header file for the IsResizable type trait.
System settings for the inline keywords.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the function trace functionality.