Blaze  3.6
UniformVector.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_DENSE_UNIFORMVECTOR_H_
36 #define _BLAZE_MATH_DENSE_UNIFORMVECTOR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <algorithm>
44 #include <blaze/math/Aliases.h>
47 #include <blaze/math/Exception.h>
50 #include <blaze/math/shims/Clear.h>
52 #include <blaze/math/SIMD.h>
81 #include <blaze/util/Assert.h>
87 #include <blaze/util/EnableIf.h>
89 #include <blaze/util/MaybeUnused.h>
90 #include <blaze/util/Types.h>
95 
96 
97 namespace blaze {
98 
99 //=================================================================================================
100 //
101 // CLASS DEFINITION
102 //
103 //=================================================================================================
104 
105 //*************************************************************************************************
168 template< typename Type // Data type of the vector
169  , bool TF = defaultTransposeFlag > // Transpose flag
170 class UniformVector
171  : public Expression< DenseVector< UniformVector<Type,TF>, TF > >
172 {
173  public:
174  //**Type definitions****************************************************************************
177  using ResultType = This;
179  using ElementType = Type;
181  using ReturnType = const Type&;
182  using CompositeType = const UniformVector&;
183 
184  using Reference = const Type&;
185  using ConstReference = const Type&;
186  using Pointer = const Type*;
187  using ConstPointer = const Type*;
188 
191  //**********************************************************************************************
192 
193  //**Rebind struct definition********************************************************************
196  template< typename NewType > // Data type of the other vector
197  struct Rebind {
199  };
200  //**********************************************************************************************
201 
202  //**Resize struct definition********************************************************************
205  template< size_t NewN > // Number of elements of the other vector
206  struct Resize {
208  };
209  //**********************************************************************************************
210 
211  //**Compilation flags***************************************************************************
213 
217  static constexpr bool simdEnabled = IsVectorizable_v<Type>;
218 
220 
223  static constexpr bool smpAssignable = !IsSMPAssignable_v<Type>;
224  //**********************************************************************************************
225 
226  //**Constructors********************************************************************************
229  explicit inline constexpr UniformVector() noexcept;
230  explicit inline constexpr UniformVector( size_t n );
231  explicit inline constexpr UniformVector( size_t n, const Type& init );
232 
233  template< typename VT >
234  inline UniformVector( const Vector<VT,TF>& v );
235 
236  UniformVector( const UniformVector& ) = default;
237  UniformVector( UniformVector&& ) = default;
239  //**********************************************************************************************
240 
241  //**Destructor**********************************************************************************
244  ~UniformVector() = default;
246  //**********************************************************************************************
247 
248  //**Data access functions***********************************************************************
251  inline constexpr ConstReference operator[]( size_t index ) const noexcept;
252  inline ConstReference at( size_t index ) const;
253  inline constexpr ConstPointer data () const noexcept;
254  inline constexpr ConstIterator begin () const noexcept;
255  inline constexpr ConstIterator cbegin() const noexcept;
256  inline constexpr ConstIterator end () const noexcept;
257  inline constexpr ConstIterator cend () const noexcept;
259  //**********************************************************************************************
260 
261  //**Assignment operators************************************************************************
264  inline constexpr UniformVector& operator=( const Type& rhs );
265 
266  UniformVector& operator=( const UniformVector& ) = default;
267  UniformVector& operator=( UniformVector&& ) = default;
268 
269  template< typename VT > inline UniformVector& operator= ( const Vector<VT,TF>& rhs );
270  template< typename VT > inline UniformVector& operator+=( const Vector<VT,TF>& rhs );
271  template< typename VT > inline UniformVector& operator-=( const Vector<VT,TF>& rhs );
272  template< typename VT > inline UniformVector& operator*=( const Vector<VT,TF>& rhs );
273  template< typename VT > inline UniformVector& operator/=( const DenseVector<VT,TF>& rhs );
274 
275  template< typename ST >
276  inline auto operator*=( ST rhs ) -> EnableIf_t< IsNumeric_v<ST>, UniformVector& >;
277 
278  template< typename ST >
279  inline auto operator/=( ST rhs ) -> EnableIf_t< IsNumeric_v<ST>, UniformVector& >;
281  //**********************************************************************************************
282 
283  //**Utility functions***************************************************************************
286  inline constexpr size_t size() const noexcept;
287  inline constexpr size_t spacing() const noexcept;
288  inline constexpr size_t capacity() const noexcept;
289  inline size_t nonZeros() const;
290  inline constexpr void reset();
291  inline constexpr void clear();
292  inline constexpr void resize( size_t n, bool preserve=true );
293  inline constexpr void extend( size_t n, bool preserve=true );
294  inline constexpr void swap( UniformVector& v ) noexcept;
296  //**********************************************************************************************
297 
298  //**Numeric functions***************************************************************************
301  template< typename Other > inline UniformVector& scale( const Other& scalar );
303  //**********************************************************************************************
304 
305  private:
306  //**********************************************************************************************
308  static constexpr size_t SIMDSIZE = SIMDTrait<ElementType>::size;
309  //**********************************************************************************************
310 
311  public:
312  //**Expression template evaluation functions****************************************************
315  template< typename Other > inline bool canAlias ( const Other* alias ) const noexcept;
316  template< typename Other > inline bool isAliased( const Other* alias ) const noexcept;
317 
318  inline bool isAligned () const noexcept;
319  inline bool canSMPAssign() const noexcept;
320 
321  BLAZE_ALWAYS_INLINE SIMDType load ( size_t index ) const noexcept;
322  BLAZE_ALWAYS_INLINE SIMDType loada( size_t index ) const noexcept;
323  BLAZE_ALWAYS_INLINE SIMDType loadu( size_t index ) const noexcept;
325  //**********************************************************************************************
326 
327  private:
328  //**Member variables****************************************************************************
331  size_t size_;
332  Type value_;
333 
334  //**********************************************************************************************
335 
336  //**Compile time checks*************************************************************************
343  //**********************************************************************************************
344 };
345 //*************************************************************************************************
346 
347 
348 
349 
350 //=================================================================================================
351 //
352 // CONSTRUCTORS
353 //
354 //=================================================================================================
355 
356 //*************************************************************************************************
359 template< typename Type // Data type of the vector
360  , bool TF > // Transpose flag
361 inline constexpr UniformVector<Type,TF>::UniformVector() noexcept
362  : size_ ( 0UL ) // The current size/dimension of the uniform vector
363  , value_() // The value of all elements of the uniform vector
364 {}
365 //*************************************************************************************************
366 
367 
368 //*************************************************************************************************
373 template< typename Type // Data type of the vector
374  , bool TF > // Transpose flag
375 inline constexpr UniformVector<Type,TF>::UniformVector( size_t n )
376  : size_ ( n ) // The current size/dimension of the uniform vector
377  , value_() // The value of all elements of the uniform vector
378 {}
379 //*************************************************************************************************
380 
381 
382 //*************************************************************************************************
390 template< typename Type // Data type of the vector
391  , bool TF > // Transpose flag
392 inline constexpr UniformVector<Type,TF>::UniformVector( size_t n, const Type& init )
393  : size_ ( n ) // The current size/dimension of the uniform vector
394  , value_( init ) // The value of all elements of the uniform vector
395 {}
396 //*************************************************************************************************
397 
398 
399 //*************************************************************************************************
408 template< typename Type // Data type of the vector
409  , bool TF > // Transpose flag
410 template< typename VT > // Type of the foreign vector
412  : size_ ( (~v).size() ) // The current size/dimension of the uniform vector
413  , value_() // The value of all elements of the uniform vector
414 {
415  if( !IsUniform_v<VT> && !isUniform( ~v ) ) {
416  BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of uniform vector" );
417  }
418 
419  if( size_ > 0UL ) {
420  value_ = (~v)[0UL];
421  }
422 }
423 //*************************************************************************************************
424 
425 
426 
427 
428 //=================================================================================================
429 //
430 // DATA ACCESS FUNCTIONS
431 //
432 //=================================================================================================
433 
434 //*************************************************************************************************
443 template< typename Type // Data type of the vector
444  , bool TF > // Transpose flag
445 inline constexpr typename UniformVector<Type,TF>::ConstReference
446  UniformVector<Type,TF>::operator[]( size_t index ) const noexcept
447 {
448  MAYBE_UNUSED( index );
449 
450  BLAZE_USER_ASSERT( index < size_, "Invalid vector access index" );
451 
452  return value_;
453 }
454 //*************************************************************************************************
455 
456 
457 //*************************************************************************************************
467 template< typename Type // Data type of the vector
468  , bool TF > // Transpose flag
470  UniformVector<Type,TF>::at( size_t index ) const
471 {
472  if( index >= size_ ) {
473  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
474  }
475 
476  return (*this)[index];
477 }
478 //*************************************************************************************************
479 
480 
481 //*************************************************************************************************
489 template< typename Type // Data type of the vector
490  , bool TF > // Transpose flag
491 inline constexpr typename UniformVector<Type,TF>::ConstPointer
493 {
494  return &value_;
495 }
496 //*************************************************************************************************
497 
498 
499 //*************************************************************************************************
504 template< typename Type // Data type of the vector
505  , bool TF > // Transpose flag
506 inline constexpr typename UniformVector<Type,TF>::ConstIterator
508 {
509  return ConstIterator( &value_, 0UL );
510 }
511 //*************************************************************************************************
512 
513 
514 //*************************************************************************************************
519 template< typename Type // Data type of the vector
520  , bool TF > // Transpose flag
521 inline constexpr typename UniformVector<Type,TF>::ConstIterator
523 {
524  return ConstIterator( &value_, 0UL );
525 }
526 //*************************************************************************************************
527 
528 
529 //*************************************************************************************************
534 template< typename Type // Data type of the vector
535  , bool TF > // Transpose flag
536 inline constexpr typename UniformVector<Type,TF>::ConstIterator
538 {
539  return ConstIterator( &value_, size_ );
540 }
541 //*************************************************************************************************
542 
543 
544 //*************************************************************************************************
549 template< typename Type // Data type of the vector
550  , bool TF > // Transpose flag
551 inline constexpr typename UniformVector<Type,TF>::ConstIterator
553 {
554  return ConstIterator( &value_, size_ );
555 }
556 //*************************************************************************************************
557 
558 
559 
560 
561 //=================================================================================================
562 //
563 // ASSIGNMENT OPERATORS
564 //
565 //=================================================================================================
566 
567 //*************************************************************************************************
573 template< typename Type // Data type of the vector
574  , bool TF > // Transpose flag
575 inline constexpr UniformVector<Type,TF>& UniformVector<Type,TF>::operator=( const Type& rhs )
576 {
577  value_ = rhs;
578 
579  return *this;
580 }
581 //*************************************************************************************************
582 
583 
584 //*************************************************************************************************
593 template< typename Type // Data type of the vector
594  , bool TF > // Transpose flag
595 template< typename VT > // Type of the right-hand side vector
597 {
598  if( !IsUniform_v<VT> && !isUniform( ~rhs ) ) {
599  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment of uniform vector" );
600  }
601 
602  size_ = (~rhs).size();
603 
604  if( (~rhs).size() > 0UL ) {
605  value_ = (~rhs)[0UL];
606  }
607 
608  return *this;
609 }
610 //*************************************************************************************************
611 
612 
613 //*************************************************************************************************
624 template< typename Type // Data type of the vector
625  , bool TF > // Transpose flag
626 template< typename VT > // Type of the right-hand side vector
628 {
629  if( (~rhs).size() != size_ ) {
630  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
631  }
632 
633  if( !IsUniform_v<VT> && !isUniform( ~rhs ) ) {
634  BLAZE_THROW_INVALID_ARGUMENT( "Invalid addition assignment to uniform vector" );
635  }
636 
637  if( (~rhs).size() > 0UL ) {
638  value_ += (~rhs)[0UL];
639  }
640 
641  return *this;
642 }
643 //*************************************************************************************************
644 
645 
646 //*************************************************************************************************
657 template< typename Type // Data type of the vector
658  , bool TF > // Transpose flag
659 template< typename VT > // Type of the right-hand side vector
661 {
662  if( (~rhs).size() != size_ ) {
663  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
664  }
665 
666  if( !IsUniform_v<VT> && !isUniform( ~rhs ) ) {
667  BLAZE_THROW_INVALID_ARGUMENT( "Invalid subtraction assignment to uniform vector" );
668  }
669 
670  if( (~rhs).size() > 0UL ) {
671  value_ -= (~rhs)[0UL];
672  }
673 
674  return *this;
675 }
676 //*************************************************************************************************
677 
678 
679 //*************************************************************************************************
691 template< typename Type // Data type of the vector
692  , bool TF > // Transpose flag
693 template< typename VT > // Type of the right-hand side vector
695 {
696  if( (~rhs).size() != size_ ) {
697  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
698  }
699 
700  if( !IsUniform_v<VT> && !isUniform( ~rhs ) ) {
701  BLAZE_THROW_INVALID_ARGUMENT( "Invalid multiplication assignment to uniform vector" );
702  }
703 
704  if( (~rhs).size() > 0UL ) {
705  value_ *= (~rhs)[0UL];
706  }
707 
708  return *this;
709 }
710 //*************************************************************************************************
711 
712 
713 //*************************************************************************************************
724 template< typename Type // Data type of the vector
725  , bool TF > // Transpose flag
726 template< typename VT > // Type of the right-hand side vector
728 {
729  if( (~rhs).size() != size_ ) {
730  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
731  }
732 
733  if( !IsUniform_v<VT> && !isUniform( ~rhs ) ) {
734  BLAZE_THROW_INVALID_ARGUMENT( "Invalid division assignment to uniform vector" );
735  }
736 
737  if( (~rhs).size() > 0UL ) {
738  value_ /= (~rhs)[0UL];
739  }
740 
741  return *this;
742 }
743 //*************************************************************************************************
744 
745 
746 //*************************************************************************************************
753 template< typename Type // Data type of the vector
754  , bool TF > // Transpose flag
755 template< typename ST > // Data type of the right-hand side scalar
756 inline auto UniformVector<Type,TF>::operator*=( ST scalar )
758 {
759  if( size() > 0UL ) {
760  value_ *= scalar;
761  }
762 
763  return *this;
764 }
765 //*************************************************************************************************
766 
767 
768 //*************************************************************************************************
775 template< typename Type // Data type of the vector
776  , bool TF > // Transpose flag
777 template< typename ST > // Data type of the right-hand side scalar
778 inline auto UniformVector<Type,TF>::operator/=( ST scalar )
780 {
781  if( size() > 0UL ) {
782  value_ /= scalar;
783  }
784 
785  return *this;
786 }
787 //*************************************************************************************************
788 
789 
790 
791 
792 //=================================================================================================
793 //
794 // UTILITY FUNCTIONS
795 //
796 //=================================================================================================
797 
798 //*************************************************************************************************
803 template< typename Type // Data type of the vector
804  , bool TF > // Transpose flag
805 inline constexpr size_t UniformVector<Type,TF>::size() const noexcept
806 {
807  return size_;
808 }
809 //*************************************************************************************************
810 
811 
812 //*************************************************************************************************
820 template< typename Type // Data type of the vector
821  , bool TF > // Transpose flag
822 inline constexpr size_t UniformVector<Type,TF>::spacing() const noexcept
823 {
824  return size_;
825 }
826 //*************************************************************************************************
827 
828 
829 //*************************************************************************************************
834 template< typename Type // Data type of the vector
835  , bool TF > // Transpose flag
836 inline constexpr size_t UniformVector<Type,TF>::capacity() const noexcept
837 {
838  return size_;
839 }
840 //*************************************************************************************************
841 
842 
843 //*************************************************************************************************
851 template< typename Type // Data type of the vector
852  , bool TF > // Transpose flag
853 inline size_t UniformVector<Type,TF>::nonZeros() const
854 {
855  if( size_ == 0UL || isDefault( value_ ) )
856  return 0UL;
857  else
858  return size_;
859 }
860 //*************************************************************************************************
861 
862 
863 //*************************************************************************************************
868 template< typename Type // Data type of the vector
869  , bool TF > // Transpose flag
870 inline constexpr void UniformVector<Type,TF>::reset()
871 {
872  using blaze::clear;
873 
874  clear( value_ );
875 }
876 //*************************************************************************************************
877 
878 
879 //*************************************************************************************************
886 template< typename Type // Data type of the vector
887  , bool TF > // Transpose flag
888 inline constexpr void UniformVector<Type,TF>::clear()
889 {
890  size_ = 0UL;
891 }
892 //*************************************************************************************************
893 
894 
895 //*************************************************************************************************
907 template< typename Type // Data type of the vector
908  , bool TF > // Transpose flag
909 inline constexpr void UniformVector<Type,TF>::resize( size_t n, bool preserve )
910 {
911  MAYBE_UNUSED( preserve );
912 
913  size_ = n;
914 }
915 //*************************************************************************************************
916 
917 
918 //*************************************************************************************************
929 template< typename Type // Data type of the vector
930  , bool TF > // Transpose flag
931 inline constexpr void UniformVector<Type,TF>::extend( size_t n, bool preserve )
932 {
933  resize( size_+n, preserve );
934 }
935 //*************************************************************************************************
936 
937 
938 //*************************************************************************************************
944 template< typename Type // Data type of the vector
945  , bool TF > // Transpose flag
946 inline constexpr void UniformVector<Type,TF>::swap( UniformVector& v ) noexcept
947 {
948  using std::swap;
949 
950  swap( size_, v.size_ );
951  swap( value_, v.value_ );
952 }
953 //*************************************************************************************************
954 
955 
956 
957 
958 //=================================================================================================
959 //
960 // NUMERIC FUNCTIONS
961 //
962 //=================================================================================================
963 
964 //*************************************************************************************************
981 template< typename Type // Data type of the vector
982  , bool TF > // Transpose flag
983 template< typename Other > // Data type of the scalar value
985 {
986  if( size_ > 0UL ) {
987  value_ *= scalar;
988  }
989 
990  return *this;
991 }
992 //*************************************************************************************************
993 
994 
995 
996 
997 //=================================================================================================
998 //
999 // EXPRESSION TEMPLATE EVALUATION FUNCTIONS
1000 //
1001 //=================================================================================================
1002 
1003 //*************************************************************************************************
1013 template< typename Type // Data type of the vector
1014  , bool TF > // Transpose flag
1015 template< typename Other > // Data type of the foreign expression
1016 inline bool UniformVector<Type,TF>::canAlias( const Other* alias ) const noexcept
1017 {
1018  return static_cast<const void*>( this ) == static_cast<const void*>( alias );
1019 }
1020 //*************************************************************************************************
1021 
1022 
1023 //*************************************************************************************************
1033 template< typename Type // Data type of the vector
1034  , bool TF > // Transpose flag
1035 template< typename Other > // Data type of the foreign expression
1036 inline bool UniformVector<Type,TF>::isAliased( const Other* alias ) const noexcept
1037 {
1038  return static_cast<const void*>( this ) == static_cast<const void*>( alias );
1039 }
1040 //*************************************************************************************************
1041 
1042 
1043 //*************************************************************************************************
1052 template< typename Type // Data type of the vector
1053  , bool TF > // Transpose flag
1054 inline bool UniformVector<Type,TF>::isAligned() const noexcept
1055 {
1056  return true;
1057 }
1058 //*************************************************************************************************
1059 
1060 
1061 //*************************************************************************************************
1071 template< typename Type // Data type of the vector
1072  , bool TF > // Transpose flag
1073 inline bool UniformVector<Type,TF>::canSMPAssign() const noexcept
1074 {
1075  return ( size() > SMP_DVECASSIGN_THRESHOLD );
1076 }
1077 //*************************************************************************************************
1078 
1079 
1080 //*************************************************************************************************
1092 template< typename Type // Data type of the vector
1093  , bool TF > // Transpose flag
1095  UniformVector<Type,TF>::load( size_t index ) const noexcept
1096 {
1097  return loada( index );
1098 }
1099 //*************************************************************************************************
1100 
1101 
1102 //*************************************************************************************************
1115 template< typename Type // Data type of the vector
1116  , bool TF > // Transpose flag
1118  UniformVector<Type,TF>::loada( size_t index ) const noexcept
1119 {
1120  MAYBE_UNUSED( index );
1121 
1123 
1124  BLAZE_INTERNAL_ASSERT( index < size_, "Invalid vector access index" );
1125  BLAZE_INTERNAL_ASSERT( index + SIMDSIZE <= size_, "Invalid vector access index" );
1126  BLAZE_INTERNAL_ASSERT( index % SIMDSIZE == 0UL, "Invalid vector access index" );
1127 
1128  return set( value_ );
1129 }
1130 //*************************************************************************************************
1131 
1132 
1133 //*************************************************************************************************
1146 template< typename Type // Data type of the vector
1147  , bool TF > // Transpose flag
1149  UniformVector<Type,TF>::loadu( size_t index ) const noexcept
1150 {
1151  MAYBE_UNUSED( index );
1152 
1154 
1155  BLAZE_INTERNAL_ASSERT( index < size_, "Invalid vector access index" );
1156  BLAZE_INTERNAL_ASSERT( index + SIMDSIZE <= size_, "Invalid vector access index" );
1157 
1158  return set( value_ );
1159 }
1160 //*************************************************************************************************
1161 
1162 
1163 
1164 
1165 //=================================================================================================
1166 //
1167 // UNIFORMVECTOR OPERATORS
1168 //
1169 //=================================================================================================
1170 
1171 //*************************************************************************************************
1174 template< typename Type, bool TF >
1175 constexpr void reset( UniformVector<Type,TF>& v );
1176 
1177 template< typename Type, bool TF >
1178 constexpr void clear( UniformVector<Type,TF>& v );
1179 
1180 template< bool RF, typename Type, bool TF >
1181 constexpr bool isDefault( const UniformVector<Type,TF>& v );
1182 
1183 template< typename Type, bool TF >
1184 constexpr bool isIntact( const UniformVector<Type,TF>& v ) noexcept;
1185 
1186 template< typename Type, bool TF >
1187 constexpr void swap( UniformVector<Type,TF>& a, UniformVector<Type,TF>& b ) noexcept;
1189 //*************************************************************************************************
1190 
1191 
1192 //*************************************************************************************************
1199 template< typename Type // Data type of the vector
1200  , bool TF > // Transpose flag
1201 inline constexpr void reset( UniformVector<Type,TF>& v )
1202 {
1203  v.reset();
1204 }
1205 //*************************************************************************************************
1206 
1207 
1208 //*************************************************************************************************
1215 template< typename Type // Data type of the vector
1216  , bool TF > // Transpose flag
1217 inline constexpr void clear( UniformVector<Type,TF>& v )
1218 {
1219  v.clear();
1220 }
1221 //*************************************************************************************************
1222 
1223 
1224 //*************************************************************************************************
1248 template< bool RF // Relaxation flag
1249  , typename Type // Data type of the vector
1250  , bool TF > // Transpose flag
1251 inline constexpr bool isDefault( const UniformVector<Type,TF>& v )
1252 {
1253  return ( v.size() == 0UL );
1254 }
1255 //*************************************************************************************************
1256 
1257 
1258 //*************************************************************************************************
1276 template< typename Type // Data type of the vector
1277  , bool TF > // Transpose flag
1278 inline constexpr bool isIntact( const UniformVector<Type,TF>& v ) noexcept
1279 {
1280  MAYBE_UNUSED( v );
1281 
1282  return true;
1283 }
1284 //*************************************************************************************************
1285 
1286 
1287 //*************************************************************************************************
1295 template< typename Type // Data type of the vector
1296  , bool TF > // Transpose flag
1297 inline constexpr void swap( UniformVector<Type,TF>& a, UniformVector<Type,TF>& b ) noexcept
1298 {
1299  a.swap( b );
1300 }
1301 //*************************************************************************************************
1302 
1303 
1304 
1305 
1306 //=================================================================================================
1307 //
1308 // GLOBAL FUNCTIONS
1309 //
1310 //=================================================================================================
1311 
1312 //*************************************************************************************************
1338 template< bool TF = defaultTransposeFlag, typename T >
1339 inline constexpr decltype(auto) uniform( size_t n, T&& init )
1340 {
1341  return UniformVector< RemoveCVRef_t<T>, TF >( n, std::forward<T>( init ) );
1342 }
1343 //*************************************************************************************************
1344 
1345 
1346 
1347 
1348 //=================================================================================================
1349 //
1350 // ISUNIFORM SPECIALIZATIONS
1351 //
1352 //=================================================================================================
1353 
1354 //*************************************************************************************************
1356 template< typename Type, bool TF >
1357 struct IsUniform< UniformVector<Type,TF> >
1358  : public TrueType
1359 {};
1361 //*************************************************************************************************
1362 
1363 
1364 
1365 
1366 //=================================================================================================
1367 //
1368 // ISALIGNED SPECIALIZATIONS
1369 //
1370 //=================================================================================================
1371 
1372 //*************************************************************************************************
1374 template< typename Type, bool TF >
1375 struct IsAligned< UniformVector<Type,TF> >
1376  : public TrueType
1377 {};
1379 //*************************************************************************************************
1380 
1381 
1382 
1383 
1384 //=================================================================================================
1385 //
1386 // ISRESIZABLE SPECIALIZATIONS
1387 //
1388 //=================================================================================================
1389 
1390 //*************************************************************************************************
1392 template< typename Type, bool TF >
1393 struct IsResizable< UniformVector<Type,TF> >
1394  : public TrueType
1395 {};
1397 //*************************************************************************************************
1398 
1399 
1400 
1401 
1402 //=================================================================================================
1403 //
1404 // ADDTRAIT SPECIALIZATIONS
1405 //
1406 //=================================================================================================
1407 
1408 //*************************************************************************************************
1410 template< typename T1, typename T2 >
1411 struct AddTraitEval1< T1, T2
1412  , EnableIf_t< IsVector_v<T1> &&
1413  IsVector_v<T2> &&
1414  ( IsUniform_v<T1> && IsUniform_v<T2> ) &&
1415  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1416 {
1417  using ET1 = ElementType_t<T1>;
1418  using ET2 = ElementType_t<T2>;
1419 
1420  using Type = UniformVector< AddTrait_t<ET1,ET2>, TransposeFlag_v<T1> >;
1421 };
1423 //*************************************************************************************************
1424 
1425 
1426 
1427 
1428 //=================================================================================================
1429 //
1430 // SUBTRAIT SPECIALIZATIONS
1431 //
1432 //=================================================================================================
1433 
1434 //*************************************************************************************************
1436 template< typename T1, typename T2 >
1437 struct SubTraitEval1< T1, T2
1438  , EnableIf_t< IsVector_v<T1> &&
1439  IsVector_v<T2> &&
1440  ( IsUniform_v<T1> && IsUniform_v<T2> ) &&
1441  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1442 {
1443  using ET1 = ElementType_t<T1>;
1444  using ET2 = ElementType_t<T2>;
1445 
1446  using Type = UniformVector< SubTrait_t<ET1,ET2>, TransposeFlag_v<T1> >;
1447 };
1449 //*************************************************************************************************
1450 
1451 
1452 
1453 
1454 //=================================================================================================
1455 //
1456 // MULTTRAIT SPECIALIZATIONS
1457 //
1458 //=================================================================================================
1459 
1460 //*************************************************************************************************
1462 template< typename T1, typename T2 >
1463 struct MultTraitEval1< T1, T2
1464  , EnableIf_t< IsVector_v<T1> &&
1465  IsNumeric_v<T2> &&
1466  IsUniform_v<T1> && !IsZero_v<T1> > >
1467 {
1468  using ET1 = ElementType_t<T1>;
1469 
1470  using Type = UniformVector< MultTrait_t<ET1,T2>, TransposeFlag_v<T1> >;
1471 };
1472 
1473 template< typename T1, typename T2 >
1474 struct MultTraitEval1< T1, T2
1475  , EnableIf_t< IsNumeric_v<T1> &&
1476  IsVector_v<T2> &&
1477  IsUniform_v<T2> && !IsZero_v<T2> > >
1478 {
1479  using ET2 = ElementType_t<T2>;
1480 
1481  using Type = UniformVector< MultTrait_t<T1,ET2>, TransposeFlag_v<T2> >;
1482 };
1483 
1484 template< typename T1, typename T2 >
1485 struct MultTraitEval1< T1, T2
1486  , EnableIf_t< ( ( IsRowVector_v<T1> && IsRowVector_v<T2> ) ||
1487  ( IsColumnVector_v<T1> && IsColumnVector_v<T2> ) ) &&
1488  ( IsUniform_v<T1> && IsUniform_v<T2> ) &&
1489  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1490 {
1491  using ET1 = ElementType_t<T1>;
1492  using ET2 = ElementType_t<T2>;
1493 
1494  using Type = UniformVector< MultTrait_t<ET1,ET2>, TransposeFlag_v<T1> >;
1495 };
1496 
1497 template< typename T1, typename T2 >
1498 struct MultTraitEval1< T1, T2
1499  , EnableIf_t< IsMatrix_v<T1> &&
1500  IsColumnVector_v<T2> &&
1501  IsUniform_v<T1> &&
1502  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1503 {
1504  using ET1 = ElementType_t<T1>;
1505  using ET2 = ElementType_t<T2>;
1506 
1507  using Type = UniformVector< MultTrait_t<ET1,ET2>, false >;
1508 };
1509 
1510 template< typename T1, typename T2 >
1511 struct MultTraitEval1< T1, T2
1512  , EnableIf_t< IsRowVector_v<T1> &&
1513  IsMatrix_v<T2> &&
1514  IsUniform_v<T2> &&
1515  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1516 {
1517  using ET1 = ElementType_t<T1>;
1518  using ET2 = ElementType_t<T2>;
1519 
1520  using Type = UniformVector< MultTrait_t<ET1,ET2>, true >;
1521 };
1523 //*************************************************************************************************
1524 
1525 
1526 
1527 
1528 //=================================================================================================
1529 //
1530 // KRONTRAIT SPECIALIZATIONS
1531 //
1532 //=================================================================================================
1533 
1534 //*************************************************************************************************
1536 template< typename T1, typename T2 >
1537 struct KronTraitEval1< T1, T2
1538  , EnableIf_t< IsVector_v<T1> &&
1539  IsVector_v<T2> &&
1540  ( IsUniform_v<T1> && IsUniform_v<T2> ) &&
1541  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1542 {
1543  using ET1 = ElementType_t<T1>;
1544  using ET2 = ElementType_t<T2>;
1545 
1546  using Type = UniformVector< MultTrait_t<ET1,ET2>, TransposeFlag_v<T2> >;
1547 };
1549 //*************************************************************************************************
1550 
1551 
1552 
1553 
1554 //=================================================================================================
1555 //
1556 // DIVTRAIT SPECIALIZATIONS
1557 //
1558 //=================================================================================================
1559 
1560 //*************************************************************************************************
1562 template< typename T1, typename T2 >
1563 struct DivTraitEval1< T1, T2
1564  , EnableIf_t< IsVector_v<T1> &&
1565  IsNumeric_v<T2> &&
1566  IsUniform_v<T1> && !IsZero_v<T1> > >
1567 {
1568  using ET1 = ElementType_t<T1>;
1569 
1570  using Type = UniformVector< DivTrait_t<ET1,T2>, TransposeFlag_v<T1> >;
1571 };
1572 
1573 template< typename T1, typename T2 >
1574 struct DivTraitEval1< T1, T2
1575  , EnableIf_t< ( ( IsRowVector_v<T1> && IsRowVector_v<T2> ) ||
1576  ( IsColumnVector_v<T1> && IsColumnVector_v<T2> ) ) &&
1577  ( IsUniform_v<T1> && IsUniform_v<T2> ) &&
1578  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1579 {
1580  using ET1 = ElementType_t<T1>;
1581  using ET2 = ElementType_t<T2>;
1582 
1583  using Type = UniformVector< DivTrait_t<ET1,ET2>, TransposeFlag_v<T1> >;
1584 };
1586 //*************************************************************************************************
1587 
1588 
1589 
1590 
1591 //=================================================================================================
1592 //
1593 // MAPTRAIT SPECIALIZATIONS
1594 //
1595 //=================================================================================================
1596 
1597 //*************************************************************************************************
1599 template< typename T, typename OP >
1600 struct UnaryMapTraitEval1< T, OP
1601  , EnableIf_t< IsVector_v<T> &&
1602  YieldsUniform_v<OP,T> &&
1603  !YieldsZero_v<OP,T> > >
1604 {
1605  using ET = ElementType_t<T>;
1606 
1607  using Type = UniformVector< MapTrait_t<ET,OP>, TransposeFlag_v<T> >;
1608 };
1610 //*************************************************************************************************
1611 
1612 
1613 //*************************************************************************************************
1615 template< typename T1, typename T2, typename OP >
1616 struct BinaryMapTraitEval1< T1, T2, OP
1617  , EnableIf_t< IsVector_v<T1> &&
1618  IsVector_v<T2> &&
1619  YieldsUniform_v<OP,T1,T2> &&
1620  !YieldsZero_v<OP,T1,T2> > >
1621 {
1622  using ET1 = ElementType_t<T1>;
1623  using ET2 = ElementType_t<T2>;
1624 
1625  using Type = UniformVector< MapTrait_t<ET1,ET2,OP>, TransposeFlag_v<T1> >;
1626 };
1628 //*************************************************************************************************
1629 
1630 
1631 
1632 
1633 //=================================================================================================
1634 //
1635 // REDUCETRAIT SPECIALIZATIONS
1636 //
1637 //=================================================================================================
1638 
1639 //*************************************************************************************************
1641 template< typename T, typename OP, size_t RF >
1642 struct PartialReduceTraitEval1< T, OP, RF
1643  , EnableIf_t< IsMatrix_v<T> && IsUniform_v<T> > >
1644 {
1645  using ET = ElementType_t<T>;
1646  using RT = decltype( std::declval<OP>()( std::declval<ET>(), std::declval<ET>() ) );
1647 
1648  static constexpr bool TF = ( RF == 0UL );
1649 
1650  using Type = UniformVector<RT,TF>;
1651 };
1653 //*************************************************************************************************
1654 
1655 
1656 
1657 
1658 //=================================================================================================
1659 //
1660 // HIGHTYPE SPECIALIZATIONS
1661 //
1662 //=================================================================================================
1663 
1664 //*************************************************************************************************
1666 template< typename T1, bool TF, typename T2 >
1667 struct HighType< UniformVector<T1,TF>, UniformVector<T2,TF> >
1668 {
1669  using Type = UniformVector< typename HighType<T1,T2>::Type, TF >;
1670 };
1672 //*************************************************************************************************
1673 
1674 
1675 
1676 
1677 //=================================================================================================
1678 //
1679 // LOWTYPE SPECIALIZATIONS
1680 //
1681 //=================================================================================================
1682 
1683 //*************************************************************************************************
1685 template< typename T1, bool TF, typename T2 >
1686 struct LowType< UniformVector<T1,TF>, UniformVector<T2,TF> >
1687 {
1688  using Type = UniformVector< typename LowType<T1,T2>::Type, TF >;
1689 };
1691 //*************************************************************************************************
1692 
1693 
1694 
1695 
1696 //=================================================================================================
1697 //
1698 // SUBVECTORTRAIT SPECIALIZATIONS
1699 //
1700 //=================================================================================================
1701 
1702 //*************************************************************************************************
1704 template< typename VT, size_t I, size_t N >
1705 struct SubvectorTraitEval1< VT, I, N
1706  , EnableIf_t< IsUniform_v<VT> && !IsZero_v<VT> > >
1707 {
1708  using Type = UniformVector< RemoveConst_t< ElementType_t<VT> >, TransposeFlag_v<VT> >;
1709 };
1711 //*************************************************************************************************
1712 
1713 
1714 
1715 
1716 //=================================================================================================
1717 //
1718 // ELEMENTSTRAIT SPECIALIZATIONS
1719 //
1720 //=================================================================================================
1721 
1722 //*************************************************************************************************
1724 template< typename VT, size_t N >
1725 struct ElementsTraitEval1< VT, N
1726  , EnableIf_t< IsUniform_v<VT> && !IsZero_v<VT> > >
1727 {
1728  using Type = UniformVector< RemoveConst_t< ElementType_t<VT> >, TransposeFlag_v<VT> >;
1729 };
1731 //*************************************************************************************************
1732 
1733 
1734 
1735 
1736 //=================================================================================================
1737 //
1738 // ROWTRAIT SPECIALIZATIONS
1739 //
1740 //=================================================================================================
1741 
1742 //*************************************************************************************************
1744 template< typename MT, size_t I >
1745 struct RowTraitEval1< MT, I
1746  , EnableIf_t< IsUniform_v<MT> && !IsZero_v<MT> > >
1747 {
1748  using Type = UniformVector< RemoveConst_t< ElementType_t<MT> >, true >;
1749 };
1751 //*************************************************************************************************
1752 
1753 
1754 
1755 
1756 //=================================================================================================
1757 //
1758 // COLUMNTRAIT SPECIALIZATIONS
1759 //
1760 //=================================================================================================
1761 
1762 //*************************************************************************************************
1764 template< typename MT, size_t I >
1765 struct ColumnTraitEval1< MT, I
1766  , EnableIf_t< IsUniform_v<MT> && !IsZero_v<MT> > >
1767 {
1768  using Type = UniformVector< RemoveConst_t< ElementType_t<MT> >, false >;
1769 };
1771 //*************************************************************************************************
1772 
1773 
1774 
1775 
1776 //=================================================================================================
1777 //
1778 // BANDTRAIT SPECIALIZATIONS
1779 //
1780 //=================================================================================================
1781 
1782 //*************************************************************************************************
1784 template< typename MT, ptrdiff_t I >
1785 struct BandTraitEval1< MT, I
1786  , EnableIf_t< IsUniform_v<MT> && !IsZero_v<MT> > >
1787 {
1788  using Type = UniformVector< RemoveConst_t< ElementType_t<MT> >, defaultTransposeFlag >;
1789 };
1791 //*************************************************************************************************
1792 
1793 } // namespace blaze
1794 
1795 #endif
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type,...
Definition: Const.h:79
#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 auxiliary alias declarations.
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.The IsMatrix_v variable template provides a c...
Definition: IsMatrix.h:138
constexpr ConstIterator end() const noexcept
Returns an iterator just past the last element of the uniform vector.
Definition: UniformVector.h:537
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression,...
Definition: Assert.h:117
Header file for the alignment flag values.
Header file for the subtraction trait.
Header file for basic type definitions.
Rebind mechanism to obtain a UniformVector with different data/element type.
Definition: UniformVector.h:197
BLAZE_ALWAYS_INLINE SIMDType loadu(size_t index) const noexcept
Unaligned load of a SIMD element of the vector.
Definition: UniformVector.h:1149
Header file for the row trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: UniformVector.h:181
constexpr bool IsRowVector_v
Auxiliary variable template for the IsRowVector type trait.The IsRowVector_v variable template provid...
Definition: IsRowVector.h:142
constexpr ConstReference operator[](size_t index) const noexcept
Subscript operator for the direct access to the vector elements.
Definition: UniformVector.h:446
SIMDTrait_t< ElementType > SIMDType
SIMD type of the vector elements.
Definition: UniformVector.h:180
Header file for the YieldsZero type trait.
const Type & ConstReference
Reference to a constant vector value.
Definition: UniformVector.h:185
constexpr UniformVector & operator=(const Type &rhs)
Homogenous assignment to all vector elements.
Definition: UniformVector.h:575
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
Header file for the RemoveCVRef type trait.
Header file for the IsRowVector type trait.
typename SIMDTrait< T >::Type SIMDTrait_t
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_t alias declaration provid...
Definition: SIMDTrait.h:315
bool canSMPAssign() const noexcept
Returns whether the vector can be used in SMP assignments.
Definition: UniformVector.h:1073
Header file for the DenseVector base class.
Header file for the MAYBE_UNUSED function template.
static constexpr bool simdEnabled
Compilation flag for SIMD optimization.
Definition: UniformVector.h:217
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type,...
Definition: Volatile.h:79
constexpr ConstIterator cbegin() const noexcept
Returns an iterator to the first element of the uniform vector.
Definition: UniformVector.h:522
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: IntegralConstant.h:132
bool isAligned() const noexcept
Returns whether the vector is properly aligned in memory.
Definition: UniformVector.h:1054
Header file for the reduce trait.
constexpr size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: UniformVector.h:805
Header file for the elements trait.
Header file for the band trait.
Constraint on the data type.
Header file for the IsMatrix type trait.
UniformVector< Type, TF > This
Type of this UniformVector instance.
Definition: UniformVector.h:175
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
BLAZE_ALWAYS_INLINE SIMDType loada(size_t index) const noexcept
Aligned load of a SIMD element of the vector.
Definition: UniformVector.h:1118
Type ElementType
Type of the vector elements.
Definition: UniformVector.h:179
Header file for the LowType type trait.
Header file for the IsUniform type trait.
Header file for the multiplication trait.
Efficient implementation of a uniform vector.The UniformVector class template is the representation o...
Definition: Forward.h:63
constexpr ConstIterator begin() const noexcept
Returns an iterator to the first element of the uniform vector.
Definition: UniformVector.h:507
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
constexpr void extend(size_t n, bool preserve=true)
Extending the size of the vector.
Definition: UniformVector.h:931
constexpr UniformVector() noexcept
The default constructor for UniformVector.
Definition: UniformVector.h:361
bool isAliased(const Other *alias) const noexcept
Returns whether the vector is aliased with the given address alias.
Definition: UniformVector.h:1036
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
Header file for the IsSMPAssignable type trait.
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
bool canAlias(const Other *alias) const noexcept
Returns whether the vector can alias with the given address alias.
Definition: UniformVector.h:1016
Header file for the subvector trait.
constexpr bool IsNumeric_v
Auxiliary variable template for the IsNumeric type trait.The IsNumeric_v variable template provides a...
Definition: IsNumeric.h:143
Header file for all SIMD functionality.
constexpr void clear()
Clearing the vector.
Definition: UniformVector.h:888
constexpr ConstIterator cend() const noexcept
Returns an iterator just past the last element of the uniform vector.
Definition: UniformVector.h:552
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: UniformVector.h:853
Constraint on the data type.
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
Header file for the IsAligned type trait.
Header file for the Kron product trait.
#define BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE(T)
Constraint on the data type.In case the given data type T is not a vectorizable data type,...
Definition: Vectorizable.h:61
Header file for the TransposeFlag type trait.
Type value_
The value of all elements of the uniform vector.
Definition: UniformVector.h:332
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
bool isUniform(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a uniform matrix.
Definition: DenseMatrix.h:1638
Header file for the IsVector type trait.
constexpr void reset()
Reset to the default initial values.
Definition: UniformVector.h:870
constexpr size_t spacing() const noexcept
Returns the minimum capacity of the vector.
Definition: UniformVector.h:822
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: UniformVector.h:223
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:615
const Type * ConstPointer
Pointer to a constant vector value.
Definition: UniformVector.h:187
Resize mechanism to obtain a UniformVector with a different fixed number of elements.
Definition: UniformVector.h:206
Header file for the IsVectorizable type trait.
const Type * Pointer
Pointer to a non-constant vector value.
Definition: UniformVector.h:186
Header file for the IsNumeric type trait.
static constexpr size_t SIMDSIZE
The number of elements packed within a single SIMD element.
Definition: UniformVector.h:308
Header file for the RemoveConst type trait.
Header file for the YieldsUniform type trait.
Header file for run time assertion macros.
Header file for the addition trait.
constexpr void resize(size_t n, bool preserve=true)
Changing the size of the vector.
Definition: UniformVector.h:909
Header file for the division trait.
constexpr void swap(UniformVector< Type, TF > &a, UniformVector< Type, TF > &b) noexcept
Swapping the contents of two vectors.
Definition: UniformVector.h:1297
Constraint on the data type.
Header file for the IsZero type trait.
constexpr bool IsVector_v
Auxiliary variable template for the IsVector type trait.The IsVector_v variable template provides a c...
Definition: IsVector.h:139
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:295
constexpr size_t capacity() const noexcept
Returns the maximum capacity of the vector.
Definition: UniformVector.h:836
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type,...
Definition: Reference.h:79
Header file for the column trait.
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:282
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:75
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
size_t size_
The current size/dimension of the uniform vector.
Definition: UniformVector.h:331
Constraint on the data type.
constexpr ConstPointer data() const noexcept
Low-level data access to the vector elements.
Definition: UniformVector.h:492
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loada(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loada.h:79
Implementation of a generic iterator for uniform vectors and matrices.The UniformIterator represents ...
Definition: UniformIterator.h:58
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:198
Header file for the default transpose flag for all vectors of the Blaze library.
constexpr void swap(UniformVector &v) noexcept
Swapping the contents of two vectors.
Definition: UniformVector.h:946
Header file for the IntegralConstant class template.
BLAZE_ALWAYS_INLINE SIMDType load(size_t index) const noexcept
Load of a SIMD element of the vector.
Definition: UniformVector.h:1095
Header file for the map trait.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:264
const Type & Reference
Reference to a non-constant vector value.
Definition: UniformVector.h:184
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:635
Header file for the IsColumnVector type trait.
decltype(auto) constexpr uniform(size_t m, size_t n, T &&init)
Creating a uniform matrix.
Definition: UniformMatrix.h:1594
constexpr bool IsUniform_v
Auxiliary variable template for the IsUniform type trait.The IsUniform_v variable template provides a...
Definition: IsUniform.h:164
Header file for the IsResizable type trait.
ConstReference at(size_t index) const
Checked access to the vector elements.
Definition: UniformVector.h:470
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
Definition: Assert.h:101
Header file for the Expression base class.
Header file for the HighType type trait.
Header file for the clear shim.
Header file for the UniformIterator class template.