Blaze 3.9
DVecGenExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_DVECGENEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DVECGENEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <iterator>
44#include <utility>
45#include <blaze/math/Aliases.h>
63#include <blaze/util/Assert.h>
68#include <blaze/util/TypeList.h>
69#include <blaze/util/Types.h>
72
73
74namespace blaze {
75
76//=================================================================================================
77//
78// CLASS DVECGENEXPR
79//
80//=================================================================================================
81
82//*************************************************************************************************
89template< typename VT // Type of the dense vector
90 , typename OP // Type of the custom unary operation
91 , bool TF > // Transpose flag
93 : public VecGenExpr< DenseVector< DVecGenExpr<VT,OP,TF>, TF > >
94 , private Computation
95{
96 public:
97 //**Type definitions****************************************************************************
100
103
107
109 using ReturnType = decltype( std::declval<OP>()( std::declval<size_t>() ) );
110
113
115 using Operation = OP;
116 //**********************************************************************************************
117
118 //**ConstIterator class definition**************************************************************
122 {
123 public:
124 //**Type definitions*************************************************************************
125 using IteratorCategory = std::random_access_iterator_tag;
129 using DifferenceType = ptrdiff_t;
130
131 // STL iterator requirements
137 //*******************************************************************************************
138
139 //**Constructor******************************************************************************
145 inline BLAZE_DEVICE_CALLABLE ConstIterator( size_t index, OP op )
146 : index_( index ) // Index of the current vector element
147 , op_ ( std::move(op) ) // The custom unary operation
148 {}
149 //*******************************************************************************************
150
151 //**Addition assignment operator*************************************************************
158 index_ += inc;
159 return *this;
160 }
161 //*******************************************************************************************
162
163 //**Subtraction assignment operator**********************************************************
170 index_ -= dec;
171 return *this;
172 }
173 //*******************************************************************************************
174
175 //**Prefix increment operator****************************************************************
181 ++index_;
182 return *this;
183 }
184 //*******************************************************************************************
185
186 //**Postfix increment operator***************************************************************
192 return ConstIterator( index_++, op_ );
193 }
194 //*******************************************************************************************
195
196 //**Prefix decrement operator****************************************************************
202 --index_;
203 return *this;
204 }
205 //*******************************************************************************************
206
207 //**Postfix decrement operator***************************************************************
213 return ConstIterator( index_--, op_ );
214 }
215 //*******************************************************************************************
216
217 //**Element access operator******************************************************************
223 return op_( index_ );
224 }
225 //*******************************************************************************************
226
227 //**Equality operator************************************************************************
233 inline BLAZE_DEVICE_CALLABLE bool operator==( const ConstIterator& rhs ) const noexcept {
234 return index_ == rhs.index_;
235 }
236 //*******************************************************************************************
237
238 //**Inequality operator**********************************************************************
244 inline BLAZE_DEVICE_CALLABLE bool operator!=( const ConstIterator& rhs ) const noexcept {
245 return index_ != rhs.index_;
246 }
247 //*******************************************************************************************
248
249 //**Less-than operator***********************************************************************
255 inline BLAZE_DEVICE_CALLABLE bool operator<( const ConstIterator& rhs ) const noexcept {
256 return index_ < rhs.index_;
257 }
258 //*******************************************************************************************
259
260 //**Greater-than operator********************************************************************
266 inline BLAZE_DEVICE_CALLABLE bool operator>( const ConstIterator& rhs ) const noexcept {
267 return index_ > rhs.index_;
268 }
269 //*******************************************************************************************
270
271 //**Less-or-equal-than operator**************************************************************
277 inline BLAZE_DEVICE_CALLABLE bool operator<=( const ConstIterator& rhs ) const noexcept {
278 return index_ <= rhs.index_;
279 }
280 //*******************************************************************************************
281
282 //**Greater-or-equal-than operator***********************************************************
288 inline BLAZE_DEVICE_CALLABLE bool operator>=( const ConstIterator& rhs ) const noexcept {
289 return index_ >= rhs.index_;
290 }
291 //*******************************************************************************************
292
293 //**Subtraction operator*********************************************************************
299 inline BLAZE_DEVICE_CALLABLE DifferenceType operator-( const ConstIterator& rhs ) const noexcept {
300 return index_ - rhs.index_;
301 }
302 //*******************************************************************************************
303
304 //**Addition operator************************************************************************
311 friend inline BLAZE_DEVICE_CALLABLE const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
312 return ConstIterator( it.index_ + inc, it.op_ );
313 }
314 //*******************************************************************************************
315
316 //**Addition operator************************************************************************
323 friend inline BLAZE_DEVICE_CALLABLE const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
324 return ConstIterator( it.index_ + inc, it.op_ );
325 }
326 //*******************************************************************************************
327
328 //**Subtraction operator*********************************************************************
335 friend inline BLAZE_DEVICE_CALLABLE const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
336 return ConstIterator( it.index_ - dec, it.op_ );
337 }
338 //*******************************************************************************************
339
340 private:
341 //**Member variables*************************************************************************
342 size_t index_;
343 OP op_;
344 //*******************************************************************************************
345 };
346 //**********************************************************************************************
347
348 public:
349 //**Compilation flags***************************************************************************
351 static constexpr bool simdEnabled = false;
352
354 static constexpr bool smpAssignable = true;
355 //**********************************************************************************************
356
357 //**Constructor*********************************************************************************
363 inline DVecGenExpr( size_t size, OP&& op ) noexcept
364 : size_( size ) // The size/dimension of the dense vector generator
365 , op_ ( std::move( op ) ) // The custom unary operation
366 {}
367 //**********************************************************************************************
368
369 //**Subscript operator**************************************************************************
375 inline ReturnType operator[]( size_t index ) const {
376 return op_( index );
377 }
378 //**********************************************************************************************
379
380 //**At function*********************************************************************************
387 inline ReturnType at( size_t index ) const {
388 if( index >= size_ ) {
389 BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
390 }
391 return (*this)[index];
392 }
393 //**********************************************************************************************
394
395 //**Begin function******************************************************************************
400 inline ConstIterator begin() const {
401 return ConstIterator( 0UL, op_ );
402 }
403 //**********************************************************************************************
404
405 //**End function********************************************************************************
410 inline ConstIterator end() const {
411 return ConstIterator( size_, op_ );
412 }
413 //**********************************************************************************************
414
415 //**Size function*******************************************************************************
420 inline size_t size() const noexcept {
421 return size_;
422 }
423 //**********************************************************************************************
424
425 //**Operation access****************************************************************************
430 inline Operation operation() const {
431 return op_;
432 }
433 //**********************************************************************************************
434
435 //**********************************************************************************************
441 template< typename T >
442 inline bool canAlias( const T* alias ) const noexcept {
443 MAYBE_UNUSED( alias );
444 return false;
445 }
446 //**********************************************************************************************
447
448 //**********************************************************************************************
454 template< typename T >
455 inline bool isAliased( const T* alias ) const noexcept {
456 MAYBE_UNUSED( alias );
457 return false;
458 }
459 //**********************************************************************************************
460
461 //**********************************************************************************************
466 inline bool isAligned() const noexcept {
467 return true;
468 }
469 //**********************************************************************************************
470
471 //**********************************************************************************************
476 inline bool canSMPAssign() const noexcept {
477 return true;
478 }
479 //**********************************************************************************************
480
481 private:
482 //**Member variables****************************************************************************
483 size_t size_;
485 //**********************************************************************************************
486
487 //**Compile time checks*************************************************************************
493 //**********************************************************************************************
494};
495//*************************************************************************************************
496
497
498
499
500//=================================================================================================
501//
502// GLOBAL FUNCTIONS
503//
504//=================================================================================================
505
506//*************************************************************************************************
545template< typename VT // Type of the dense vector
546 , typename OP > // Type of the custom unary operation
547inline decltype(auto) generate( size_t size, OP op )
548{
550
551 if( Size_v<VT,0UL> != DefaultSize_v && size_t( Size_v<VT,0UL> ) != size ) {
552 BLAZE_THROW_INVALID_ARGUMENT( "Invalid size specification" );
553 }
554
555 using ReturnType = const DVecGenExpr< VT, OP, TransposeFlag_v<VT> >;
556 return ReturnType( size, std::move( op ) );
557}
559//*************************************************************************************************
560
561
562//*************************************************************************************************
599template< bool TF = defaultTransposeFlag // Transpose flag
600 , typename OP > // Type of the custom unary operation
601inline decltype(auto) generate( size_t size, OP op )
602{
604
605 using ET = RemoveCVRef_t< decltype( std::declval<OP>()( std::declval<size_t>() ) ) >;
606 using VT = DynamicVector<ET,TF>;
607
608 return generate<VT>( size, std::move( op ) );
609}
610//*************************************************************************************************
611
612
613//*************************************************************************************************
646template< bool TF = defaultTransposeFlag // Transpose flag
647 , typename T > // Type of the delimiters
648inline decltype(auto) linspace( size_t size, T start, T end )
649{
651
652 using BT = UnderlyingBuiltin_t<T>;
653 using ET = If_t< IsFloatingPoint_v<BT>, BT, double >;
654
655 ET divisor{ 1.0 };
656
657 if( size > 2UL ) {
658 divisor = static_cast<ET>( size - 1UL );
659 }
660 else {
661 start = end;
662 }
663
664 auto delta( evaluate( ( end - start ) / divisor ) );
665
666 return generate<TF>( size, [ start=std::move(start), delta=std::move(delta) ]( size_t index ) {
667 return evaluate( start + index*delta );
668 } );
669}
670//*************************************************************************************************
671
672
673//*************************************************************************************************
702template< bool TF = defaultTransposeFlag // Transpose flag
703 , typename T > // Type of the delimiters
704inline decltype(auto) logspace( size_t size, T start, T end )
705{
707
708 using BT = UnderlyingBuiltin_t<T>;
709 using ET = If_t< IsFloatingPoint_v<BT>, BT, double >;
710
711 ET divisor{ 1.0 };
712
713 if( size > 2UL ) {
714 divisor = static_cast<ET>( size - 1UL );
715 }
716 else {
717 start = end;
718 }
719
720 auto delta( evaluate( ( end - start ) / divisor ) );
721
722 return generate<TF>( size, [ start=std::move(start), delta=std::move(delta) ]( size_t index ) {
723 return evaluate( exp10( start + index*delta ) );
724 } );
725}
726//*************************************************************************************************
727
728
729
730
731//=================================================================================================
732//
733// GLOBAL RESTRUCTURING FUNCTIONS (SUBVECTOR)
734//
735//=================================================================================================
736
737//*************************************************************************************************
750template< AlignmentFlag AF // Alignment flag
751 , size_t I // Index of the first subvector element
752 , size_t N // Size of the subvector
753 , typename VT // Type of the dense vector
754 , typename OP // Type of the custom unary operation
755 , bool TF // Transpose flag
756 , typename... RSAs > // Optional arguments
757inline decltype(auto) subvector( const DVecGenExpr<VT,OP,TF>& expr, RSAs... args )
758{
760
761 MAYBE_UNUSED( args... );
762
763 constexpr bool isChecked( !Contains_v< TypeList<RSAs...>, Unchecked > );
764
765 if( isChecked ) {
766 if( I + N > expr.size() ) {
767 BLAZE_THROW_INVALID_ARGUMENT( "Invalid subvector specification" );
768 }
769 }
770 else {
771 BLAZE_USER_ASSERT( I + N <= expr.size(), "Invalid subvector specification" );
772 }
773
774 return generate( N, [op=expr.operation()]( size_t i ) {
775 return op( i+I );
776 } );
777}
779//*************************************************************************************************
780
781
782//*************************************************************************************************
797template< AlignmentFlag AF // Alignment flag
798 , typename VT // Type of the dense vector
799 , typename OP // Type of the custom unary operation
800 , bool TF // Transpose flag
801 , typename... RSAs > // Optional arguments
802inline decltype(auto) subvector( const DVecGenExpr<VT,OP,TF>& expr, size_t index, size_t size, RSAs... args )
803{
805
806 MAYBE_UNUSED( args... );
807
808 constexpr bool isChecked( !Contains_v< TypeList<RSAs...>, Unchecked > );
809
810 if( isChecked ) {
811 if( index + size > expr.size() ) {
812 BLAZE_THROW_INVALID_ARGUMENT( "Invalid subvector specification" );
813 }
814 }
815 else {
816 BLAZE_USER_ASSERT( index + size <= expr.size(), "Invalid subvector specification" );
817 }
818
819 return generate( size, [op=expr.operation(),index]( size_t i ) {
820 return op( i+index );
821 } );
822}
824//*************************************************************************************************
825
826
827
828
829//=================================================================================================
830//
831// GLOBAL RESTRUCTURING FUNCTIONS (ELEMENTS)
832//
833//=================================================================================================
834
835//*************************************************************************************************
848template< size_t I // First element index
849 , size_t... Is // Remaining element indices
850 , typename VT // Type of the dense vector
851 , typename OP // Type of the custom unary operation
852 , bool TF // Transpose flag
853 , typename... REAs > // Optional element arguments
854inline decltype(auto) elements( const DVecGenExpr<VT,OP,TF>& expr, REAs... args )
855{
857
858 MAYBE_UNUSED( args... );
859
860 constexpr bool isChecked( !Contains_v< TypeList<REAs...>, Unchecked > );
861
862 if( isChecked ) {
863 static constexpr size_t indices[] = { I, Is... };
864 for( size_t i=0UL; i<sizeof...(Is)+1UL; ++i ) {
865 if( expr.size() <= indices[i] ) {
866 BLAZE_THROW_INVALID_ARGUMENT( "Invalid elements specification" );
867 }
868 }
869 }
870
871 return generate( sizeof...(Is)+1UL, [op=expr.operation()]( size_t i ) {
872 static constexpr size_t indices[] = { I, Is... };
873 return op( indices[i] );
874 } );
875}
877//*************************************************************************************************
878
879
880//*************************************************************************************************
895template< typename VT // Type of the dense vector
896 , typename OP // Type of the custom unary operation
897 , bool TF // Transpose flag
898 , typename T // Type of the element indices
899 , typename... REAs > // Optional element arguments
900inline decltype(auto) elements( const DVecGenExpr<VT,OP,TF>& expr, T* indices, size_t n, REAs... args )
901{
903
904 MAYBE_UNUSED( args... );
905
906 constexpr bool isChecked( !Contains_v< TypeList<REAs...>, Unchecked > );
907
908 if( isChecked ) {
909 for( size_t i=0UL; i<n; ++i ) {
910 if( expr.size() <= size_t( indices[i] ) ) {
911 BLAZE_THROW_INVALID_ARGUMENT( "Invalid elements specification" );
912 }
913 }
914 }
915
916 SmallArray<size_t,128UL> newIndices( indices, indices+n );
917
918 return generate( n, [op=expr.operation(),newIndices]( size_t i ) {
919 return op( newIndices[i] );
920 } );
921}
923//*************************************************************************************************
924
925
926//*************************************************************************************************
941template< typename VT // Type of the dense vector
942 , typename OP // Type of the custom unary operation
943 , bool TF // Transpose flag
944 , typename P // Type of the index producer
945 , typename... REAs > // Optional element arguments
946inline decltype(auto) elements( const DVecGenExpr<VT,OP,TF>& expr, P p, size_t n, REAs... args )
947{
949
950 MAYBE_UNUSED( args... );
951
952 constexpr bool isChecked( !Contains_v< TypeList<REAs...>, Unchecked > );
953
954 if( isChecked ) {
955 for( size_t i=0UL; i<n; ++i ) {
956 if( expr.size() <= size_t( p(i) ) ) {
957 BLAZE_THROW_INVALID_ARGUMENT( "Invalid elements specification" );
958 }
959 }
960 }
961
962 return generate( n, [op=expr.operation(),p]( size_t i ) {
963 return op( p( i ) );
964 } );
965}
967//*************************************************************************************************
968
969} // namespace blaze
970
971#endif
Header file for auxiliary alias declarations.
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
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 blaze::checked and blaze::unchecked instances.
Header file for the evaluate shim.
Header file for the function trace functionality.
Macro for CUDA compatibility.
Header file for the IsFloatingPoint type trait.
Header file for the MAYBE_UNUSED function template.
Header file for the RemoveCVRef type trait.
Header file for the SmallArray implementation.
Compile time assertion.
Header file for the type list functionality.
Header file for the UnderlyingBuiltin type trait.
Iterator over the elements of the dense vector generator expression.
Definition: DVecGenExpr.h:122
BLAZE_DEVICE_CALLABLE bool operator==(const ConstIterator &rhs) const noexcept
Equality comparison between two ConstIterator objects.
Definition: DVecGenExpr.h:233
BLAZE_DEVICE_CALLABLE ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecGenExpr.h:201
BLAZE_DEVICE_CALLABLE bool operator>=(const ConstIterator &rhs) const noexcept
Greater-than comparison between two ConstIterator objects.
Definition: DVecGenExpr.h:288
size_t index_
Index of the current vector element.
Definition: DVecGenExpr.h:342
BLAZE_DEVICE_CALLABLE const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecGenExpr.h:191
BLAZE_DEVICE_CALLABLE ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecGenExpr.h:222
friend BLAZE_DEVICE_CALLABLE const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecGenExpr.h:311
BLAZE_DEVICE_CALLABLE const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecGenExpr.h:212
BLAZE_DEVICE_CALLABLE DifferenceType operator-(const ConstIterator &rhs) const noexcept
Calculating the number of elements between two iterators.
Definition: DVecGenExpr.h:299
BLAZE_DEVICE_CALLABLE ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecGenExpr.h:169
ReferenceType reference
Reference return type.
Definition: DVecGenExpr.h:135
BLAZE_DEVICE_CALLABLE bool operator!=(const ConstIterator &rhs) const noexcept
Inequality comparison between two ConstIterator objects.
Definition: DVecGenExpr.h:244
ElementType & ReferenceType
Reference return type.
Definition: DVecGenExpr.h:128
OP op_
The custom unary operation.
Definition: DVecGenExpr.h:343
BLAZE_DEVICE_CALLABLE ConstIterator(size_t index, OP op)
Constructor for the ConstIterator class.
Definition: DVecGenExpr.h:145
IteratorCategory iterator_category
The iterator category.
Definition: DVecGenExpr.h:132
BLAZE_DEVICE_CALLABLE ConstIterator & operator++()
Pre-increment operator.
Definition: DVecGenExpr.h:180
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecGenExpr.h:129
ElementType * PointerType
Pointer return type.
Definition: DVecGenExpr.h:127
DifferenceType difference_type
Difference between two iterators.
Definition: DVecGenExpr.h:136
BLAZE_DEVICE_CALLABLE bool operator>(const ConstIterator &rhs) const noexcept
Greater-than comparison between two ConstIterator objects.
Definition: DVecGenExpr.h:266
BLAZE_DEVICE_CALLABLE bool operator<=(const ConstIterator &rhs) const noexcept
Less-than comparison between two ConstIterator objects.
Definition: DVecGenExpr.h:277
BLAZE_DEVICE_CALLABLE bool operator<(const ConstIterator &rhs) const noexcept
Less-than comparison between two ConstIterator objects.
Definition: DVecGenExpr.h:255
ValueType value_type
Type of the underlying elements.
Definition: DVecGenExpr.h:133
friend BLAZE_DEVICE_CALLABLE const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecGenExpr.h:323
ElementType ValueType
Type of the underlying elements.
Definition: DVecGenExpr.h:126
BLAZE_DEVICE_CALLABLE ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecGenExpr.h:157
PointerType pointer
Pointer return type.
Definition: DVecGenExpr.h:134
friend BLAZE_DEVICE_CALLABLE const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecGenExpr.h:335
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecGenExpr.h:125
Expression object for the dense vector generate() function.
Definition: DVecGenExpr.h:95
TransposeType_t< VT > TransposeType
Transpose type for expression template evaluations.
Definition: DVecGenExpr.h:105
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecGenExpr.h:410
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DVecGenExpr.h:442
ElementType_t< VT > ElementType
Resulting element type.
Definition: DVecGenExpr.h:106
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DVecGenExpr.h:354
size_t size_
The size/dimension of the dense vector generator.
Definition: DVecGenExpr.h:483
OP Operation
Data type of the custom unary operation.
Definition: DVecGenExpr.h:115
Operation operation() const
Returns a copy of the custom unary operation.
Definition: DVecGenExpr.h:430
DVecGenExpr(size_t size, OP &&op) noexcept
Constructor for the DVecGenExpr class.
Definition: DVecGenExpr.h:363
Operation op_
The custom unary operation.
Definition: DVecGenExpr.h:484
RemoveCVRef_t< VT > ResultType
Result type for expression template evaluations.
Definition: DVecGenExpr.h:104
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecGenExpr.h:375
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: DVecGenExpr.h:387
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DVecGenExpr.h:455
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DVecGenExpr.h:351
decltype(std::declval< OP >()(std::declval< size_t >())) ReturnType
Return type for expression template evaluations.
Definition: DVecGenExpr.h:109
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: DVecGenExpr.h:420
bool isAligned() const noexcept
Returns whether the operands of the expression are properly aligned in memory.
Definition: DVecGenExpr.h:466
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecGenExpr.h:400
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: DVecGenExpr.h:476
Efficient implementation of an arbitrary sized vector.
Definition: DynamicVector.h:223
Constraint on the data type.
Constraint on the data type.
Header file for the Computation base class.
Header file for the DenseVector base class.
Header file for the VecGenExpr base class.
decltype(auto) exp10(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1857
decltype(auto) generate(size_t size, OP op)
Generates a new dense vector filled via the given custom unary operation.
Definition: DVecGenExpr.h:601
decltype(auto) linspace(size_t size, T start, T end)
Generates a new dense vector filled with linearly spaced elements.
Definition: DVecGenExpr.h:648
decltype(auto) logspace(size_t size, T start, T end)
Generates a new dense vector filled with logarithmically spaced elements.
Definition: DVecGenExpr.h:704
decltype(auto) elements(Vector< VT, TF > &vector, REAs... args)
Creating a view on a selection of elements of the given vector.
Definition: Elements.h:143
#define BLAZE_CONSTRAINT_MUST_NOT_BE_EXPRESSION_TYPE(T)
Constraint on the data type.
Definition: Expression.h:81
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.
Definition: TransposeFlag.h:63
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.
Definition: DenseVector.h:61
typename UnderlyingBuiltin< T >::Type UnderlyingBuiltin_t
Auxiliary alias declaration for the UnderlyingBuiltin type trait.
Definition: UnderlyingBuiltin.h:117
constexpr ptrdiff_t DefaultSize_v
Default size of the Size type trait.
Definition: Size.h:72
AlignmentFlag
Alignment flag for (un-)aligned vectors and matrices.
Definition: AlignmentFlag.h:63
MT::ResultType evaluate(const Matrix< MT, SO > &matrix)
Evaluates the given matrix expression.
Definition: Matrix.h:1282
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:584
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:676
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition: Assert.h:117
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:158
constexpr bool defaultTransposeFlag
The default transpose flag for all vectors of the Blaze library.
Definition: TransposeFlag.h:75
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
typename RemoveCVRef< T >::Type RemoveCVRef_t
Auxiliary alias declaration for the RemoveCVRef type trait.
Definition: RemoveCVRef.h:99
constexpr bool Contains_v
Auxiliary variable template for the Contains type trait.
Definition: Contains.h:138
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
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_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
Check< false > Unchecked
Type of the blaze::unchecked instance.
Definition: Check.h:104
constexpr bool isChecked(const Ts &... args)
Extracting blaze::Check arguments from a given list of arguments.
Definition: Check.h:225
Header file for the exception macros of the math module.
Constraint on the data type.
Header file for all forward declarations for dense vectors and matrices.
Header file for all forward declarations for expression class templates.
Header file for the Size type trait.
Header file for the TransposeFlag type trait.
Header file for the exp10 shim.
Base class for all compute expression templates.
Definition: Computation.h:68
Base class for all vector generator expression templates.
Definition: VecGenExpr.h:68
Header file for the default transpose flag for all vectors of the Blaze library.
Header file for basic type definitions.