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>
49 #include <blaze/math/shims/Clear.h>
51 #include <blaze/math/SIMD.h>
79 #include <blaze/util/Assert.h>
85 #include <blaze/util/EnableIf.h>
86 #include <blaze/util/Types.h>
90 #include <blaze/util/Unused.h>
91 
92 
93 namespace blaze {
94 
95 //=================================================================================================
96 //
97 // CLASS DEFINITION
98 //
99 //=================================================================================================
100 
101 //*************************************************************************************************
164 template< typename Type // Data type of the vector
165  , bool TF = defaultTransposeFlag > // Transpose flag
166 class UniformVector
167  : public DenseVector< UniformVector<Type,TF>, TF >
168 {
169  public:
170  //**Type definitions****************************************************************************
173  using ResultType = This;
175  using ElementType = Type;
177  using ReturnType = const Type&;
178  using CompositeType = const UniformVector&;
179 
180  using Reference = const Type&;
181  using ConstReference = const Type&;
182  using Pointer = const Type*;
183  using ConstPointer = const Type*;
184 
187  //**********************************************************************************************
188 
189  //**Rebind struct definition********************************************************************
192  template< typename NewType > // Data type of the other vector
193  struct Rebind {
195  };
196  //**********************************************************************************************
197 
198  //**Resize struct definition********************************************************************
201  template< size_t NewN > // Number of elements of the other vector
202  struct Resize {
204  };
205  //**********************************************************************************************
206 
207  //**Compilation flags***************************************************************************
209 
213  static constexpr bool simdEnabled = IsVectorizable_v<Type>;
214 
216 
219  static constexpr bool smpAssignable = !IsSMPAssignable_v<Type>;
220  //**********************************************************************************************
221 
222  //**Constructors********************************************************************************
225  explicit inline constexpr UniformVector() noexcept;
226  explicit inline constexpr UniformVector( size_t n );
227  explicit inline constexpr UniformVector( size_t n, const Type& init );
228 
229  template< typename VT >
230  inline UniformVector( const Vector<VT,TF>& v );
231 
232  UniformVector( const UniformVector& ) = default;
233  UniformVector( UniformVector&& ) = default;
235  //**********************************************************************************************
236 
237  //**Destructor**********************************************************************************
240  ~UniformVector() = default;
242  //**********************************************************************************************
243 
244  //**Data access functions***********************************************************************
247  inline constexpr ConstReference operator[]( size_t index ) const noexcept;
248  inline ConstReference at( size_t index ) const;
249  inline constexpr ConstPointer data () const noexcept;
250  inline constexpr ConstIterator begin () const noexcept;
251  inline constexpr ConstIterator cbegin() const noexcept;
252  inline constexpr ConstIterator end () const noexcept;
253  inline constexpr ConstIterator cend () const noexcept;
255  //**********************************************************************************************
256 
257  //**Assignment operators************************************************************************
260  inline constexpr UniformVector& operator=( const Type& rhs );
261 
262  UniformVector& operator=( const UniformVector& ) = default;
263  UniformVector& operator=( UniformVector&& ) = default;
264 
265  template< typename VT > inline UniformVector& operator= ( const Vector<VT,TF>& rhs );
266  template< typename VT > inline UniformVector& operator+=( const Vector<VT,TF>& rhs );
267  template< typename VT > inline UniformVector& operator-=( const Vector<VT,TF>& rhs );
268  template< typename VT > inline UniformVector& operator*=( const Vector<VT,TF>& rhs );
269  template< typename VT > inline UniformVector& operator/=( const DenseVector<VT,TF>& rhs );
270 
271  template< typename ST >
272  inline auto operator*=( ST rhs ) -> EnableIf_t< IsNumeric_v<ST>, UniformVector& >;
273 
274  template< typename ST >
275  inline auto operator/=( ST rhs ) -> EnableIf_t< IsNumeric_v<ST>, UniformVector& >;
277  //**********************************************************************************************
278 
279  //**Utility functions***************************************************************************
282  inline constexpr size_t size() const noexcept;
283  inline constexpr size_t spacing() const noexcept;
284  inline constexpr size_t capacity() const noexcept;
285  inline size_t nonZeros() const;
286  inline constexpr void reset();
287  inline constexpr void clear();
288  inline constexpr void resize( size_t n, bool preserve=true );
289  inline constexpr void extend( size_t n, bool preserve=true );
290  inline constexpr void swap( UniformVector& v ) noexcept;
292  //**********************************************************************************************
293 
294  //**Numeric functions***************************************************************************
297  template< typename Other > inline UniformVector& scale( const Other& scalar );
299  //**********************************************************************************************
300 
301  private:
302  //**********************************************************************************************
304  static constexpr size_t SIMDSIZE = SIMDTrait<ElementType>::size;
305  //**********************************************************************************************
306 
307  public:
308  //**Expression template evaluation functions****************************************************
311  template< typename Other > inline bool canAlias ( const Other* alias ) const noexcept;
312  template< typename Other > inline bool isAliased( const Other* alias ) const noexcept;
313 
314  inline bool isAligned () const noexcept;
315  inline bool canSMPAssign() const noexcept;
316 
317  BLAZE_ALWAYS_INLINE SIMDType load ( size_t index ) const noexcept;
318  BLAZE_ALWAYS_INLINE SIMDType loada( size_t index ) const noexcept;
319  BLAZE_ALWAYS_INLINE SIMDType loadu( size_t index ) const noexcept;
321  //**********************************************************************************************
322 
323  private:
324  //**Member variables****************************************************************************
327  size_t size_;
328  Type value_;
329 
330  //**********************************************************************************************
331 
332  //**Compile time checks*************************************************************************
339  //**********************************************************************************************
340 };
341 //*************************************************************************************************
342 
343 
344 
345 
346 //=================================================================================================
347 //
348 // CONSTRUCTORS
349 //
350 //=================================================================================================
351 
352 //*************************************************************************************************
355 template< typename Type // Data type of the vector
356  , bool TF > // Transpose flag
357 inline constexpr UniformVector<Type,TF>::UniformVector() noexcept
358  : size_ ( 0UL ) // The current size/dimension of the uniform vector
359  , value_() // The value of all elements of the uniform vector
360 {}
361 //*************************************************************************************************
362 
363 
364 //*************************************************************************************************
369 template< typename Type // Data type of the vector
370  , bool TF > // Transpose flag
371 inline constexpr UniformVector<Type,TF>::UniformVector( size_t n )
372  : size_ ( n ) // The current size/dimension of the uniform vector
373  , value_() // The value of all elements of the uniform vector
374 {}
375 //*************************************************************************************************
376 
377 
378 //*************************************************************************************************
386 template< typename Type // Data type of the vector
387  , bool TF > // Transpose flag
388 inline constexpr UniformVector<Type,TF>::UniformVector( size_t n, const Type& init )
389  : size_ ( n ) // The current size/dimension of the uniform vector
390  , value_( init ) // The value of all elements of the uniform vector
391 {}
392 //*************************************************************************************************
393 
394 
395 //*************************************************************************************************
404 template< typename Type // Data type of the vector
405  , bool TF > // Transpose flag
406 template< typename VT > // Type of the foreign vector
408  : size_ ( (~v).size() ) // The current size/dimension of the uniform vector
409  , value_() // The value of all elements of the uniform vector
410 {
411  if( !IsUniform_v<VT> && !isUniform( ~v ) ) {
412  BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of uniform vector" );
413  }
414 
415  if( size_ > 0UL ) {
416  value_ = (~v)[0UL];
417  }
418 }
419 //*************************************************************************************************
420 
421 
422 
423 
424 //=================================================================================================
425 //
426 // DATA ACCESS FUNCTIONS
427 //
428 //=================================================================================================
429 
430 //*************************************************************************************************
439 template< typename Type // Data type of the vector
440  , bool TF > // Transpose flag
441 inline constexpr typename UniformVector<Type,TF>::ConstReference
442  UniformVector<Type,TF>::operator[]( size_t index ) const noexcept
443 {
444  UNUSED_PARAMETER( index );
445 
446  BLAZE_USER_ASSERT( index < size_, "Invalid vector access index" );
447 
448  return value_;
449 }
450 //*************************************************************************************************
451 
452 
453 //*************************************************************************************************
463 template< typename Type // Data type of the vector
464  , bool TF > // Transpose flag
466  UniformVector<Type,TF>::at( size_t index ) const
467 {
468  if( index >= size_ ) {
469  BLAZE_THROW_OUT_OF_RANGE( "Invalid vector access index" );
470  }
471 
472  return (*this)[index];
473 }
474 //*************************************************************************************************
475 
476 
477 //*************************************************************************************************
485 template< typename Type // Data type of the vector
486  , bool TF > // Transpose flag
487 inline constexpr typename UniformVector<Type,TF>::ConstPointer
489 {
490  return &value_;
491 }
492 //*************************************************************************************************
493 
494 
495 //*************************************************************************************************
500 template< typename Type // Data type of the vector
501  , bool TF > // Transpose flag
502 inline constexpr typename UniformVector<Type,TF>::ConstIterator
504 {
505  return ConstIterator( &value_, 0UL );
506 }
507 //*************************************************************************************************
508 
509 
510 //*************************************************************************************************
515 template< typename Type // Data type of the vector
516  , bool TF > // Transpose flag
517 inline constexpr typename UniformVector<Type,TF>::ConstIterator
519 {
520  return ConstIterator( &value_, 0UL );
521 }
522 //*************************************************************************************************
523 
524 
525 //*************************************************************************************************
530 template< typename Type // Data type of the vector
531  , bool TF > // Transpose flag
532 inline constexpr typename UniformVector<Type,TF>::ConstIterator
534 {
535  return ConstIterator( &value_, size_ );
536 }
537 //*************************************************************************************************
538 
539 
540 //*************************************************************************************************
545 template< typename Type // Data type of the vector
546  , bool TF > // Transpose flag
547 inline constexpr typename UniformVector<Type,TF>::ConstIterator
549 {
550  return ConstIterator( &value_, size_ );
551 }
552 //*************************************************************************************************
553 
554 
555 
556 
557 //=================================================================================================
558 //
559 // ASSIGNMENT OPERATORS
560 //
561 //=================================================================================================
562 
563 //*************************************************************************************************
569 template< typename Type // Data type of the vector
570  , bool TF > // Transpose flag
571 inline constexpr UniformVector<Type,TF>& UniformVector<Type,TF>::operator=( const Type& rhs )
572 {
573  value_ = rhs;
574 
575  return *this;
576 }
577 //*************************************************************************************************
578 
579 
580 //*************************************************************************************************
589 template< typename Type // Data type of the vector
590  , bool TF > // Transpose flag
591 template< typename VT > // Type of the right-hand side vector
593 {
594  if( !IsUniform_v<VT> && !isUniform( ~rhs ) ) {
595  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment of uniform vector" );
596  }
597 
598  size_ = (~rhs).size();
599 
600  if( (~rhs).size() > 0UL ) {
601  value_ = (~rhs)[0UL];
602  }
603 
604  return *this;
605 }
606 //*************************************************************************************************
607 
608 
609 //*************************************************************************************************
620 template< typename Type // Data type of the vector
621  , bool TF > // Transpose flag
622 template< typename VT > // Type of the right-hand side vector
624 {
625  if( (~rhs).size() != size_ ) {
626  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
627  }
628 
629  if( !IsUniform_v<VT> && !isUniform( ~rhs ) ) {
630  BLAZE_THROW_INVALID_ARGUMENT( "Invalid addition assignment to uniform vector" );
631  }
632 
633  if( (~rhs).size() > 0UL ) {
634  value_ += (~rhs)[0UL];
635  }
636 
637  return *this;
638 }
639 //*************************************************************************************************
640 
641 
642 //*************************************************************************************************
653 template< typename Type // Data type of the vector
654  , bool TF > // Transpose flag
655 template< typename VT > // Type of the right-hand side vector
657 {
658  if( (~rhs).size() != size_ ) {
659  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
660  }
661 
662  if( !IsUniform_v<VT> && !isUniform( ~rhs ) ) {
663  BLAZE_THROW_INVALID_ARGUMENT( "Invalid subtraction assignment to uniform vector" );
664  }
665 
666  if( (~rhs).size() > 0UL ) {
667  value_ -= (~rhs)[0UL];
668  }
669 
670  return *this;
671 }
672 //*************************************************************************************************
673 
674 
675 //*************************************************************************************************
687 template< typename Type // Data type of the vector
688  , bool TF > // Transpose flag
689 template< typename VT > // Type of the right-hand side vector
691 {
692  if( (~rhs).size() != size_ ) {
693  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
694  }
695 
696  if( !IsUniform_v<VT> && !isUniform( ~rhs ) ) {
697  BLAZE_THROW_INVALID_ARGUMENT( "Invalid multiplication assignment to uniform vector" );
698  }
699 
700  if( (~rhs).size() > 0UL ) {
701  value_ *= (~rhs)[0UL];
702  }
703 
704  return *this;
705 }
706 //*************************************************************************************************
707 
708 
709 //*************************************************************************************************
720 template< typename Type // Data type of the vector
721  , bool TF > // Transpose flag
722 template< typename VT > // Type of the right-hand side vector
724 {
725  if( (~rhs).size() != size_ ) {
726  BLAZE_THROW_INVALID_ARGUMENT( "Vector sizes do not match" );
727  }
728 
729  if( !IsUniform_v<VT> && !isUniform( ~rhs ) ) {
730  BLAZE_THROW_INVALID_ARGUMENT( "Invalid division assignment to uniform vector" );
731  }
732 
733  if( (~rhs).size() > 0UL ) {
734  value_ /= (~rhs)[0UL];
735  }
736 
737  return *this;
738 }
739 //*************************************************************************************************
740 
741 
742 //*************************************************************************************************
749 template< typename Type // Data type of the vector
750  , bool TF > // Transpose flag
751 template< typename ST > // Data type of the right-hand side scalar
752 inline auto UniformVector<Type,TF>::operator*=( ST scalar )
754 {
755  if( size() > 0UL ) {
756  value_ *= scalar;
757  }
758 
759  return *this;
760 }
761 //*************************************************************************************************
762 
763 
764 //*************************************************************************************************
771 template< typename Type // Data type of the vector
772  , bool TF > // Transpose flag
773 template< typename ST > // Data type of the right-hand side scalar
774 inline auto UniformVector<Type,TF>::operator/=( ST scalar )
776 {
777  if( size() > 0UL ) {
778  value_ /= scalar;
779  }
780 
781  return *this;
782 }
783 //*************************************************************************************************
784 
785 
786 
787 
788 //=================================================================================================
789 //
790 // UTILITY FUNCTIONS
791 //
792 //=================================================================================================
793 
794 //*************************************************************************************************
799 template< typename Type // Data type of the vector
800  , bool TF > // Transpose flag
801 inline constexpr size_t UniformVector<Type,TF>::size() const noexcept
802 {
803  return size_;
804 }
805 //*************************************************************************************************
806 
807 
808 //*************************************************************************************************
816 template< typename Type // Data type of the vector
817  , bool TF > // Transpose flag
818 inline constexpr size_t UniformVector<Type,TF>::spacing() const noexcept
819 {
820  return size_;
821 }
822 //*************************************************************************************************
823 
824 
825 //*************************************************************************************************
830 template< typename Type // Data type of the vector
831  , bool TF > // Transpose flag
832 inline constexpr size_t UniformVector<Type,TF>::capacity() const noexcept
833 {
834  return size_;
835 }
836 //*************************************************************************************************
837 
838 
839 //*************************************************************************************************
847 template< typename Type // Data type of the vector
848  , bool TF > // Transpose flag
849 inline size_t UniformVector<Type,TF>::nonZeros() const
850 {
851  if( size_ == 0UL || isDefault( value_ ) )
852  return 0UL;
853  else
854  return size_;
855 }
856 //*************************************************************************************************
857 
858 
859 //*************************************************************************************************
864 template< typename Type // Data type of the vector
865  , bool TF > // Transpose flag
866 inline constexpr void UniformVector<Type,TF>::reset()
867 {
868  using blaze::clear;
869 
870  clear( value_ );
871 }
872 //*************************************************************************************************
873 
874 
875 //*************************************************************************************************
882 template< typename Type // Data type of the vector
883  , bool TF > // Transpose flag
884 inline constexpr void UniformVector<Type,TF>::clear()
885 {
886  size_ = 0UL;
887 }
888 //*************************************************************************************************
889 
890 
891 //*************************************************************************************************
903 template< typename Type // Data type of the vector
904  , bool TF > // Transpose flag
905 inline constexpr void UniformVector<Type,TF>::resize( size_t n, bool preserve )
906 {
907  UNUSED_PARAMETER( preserve );
908 
909  size_ = n;
910 }
911 //*************************************************************************************************
912 
913 
914 //*************************************************************************************************
925 template< typename Type // Data type of the vector
926  , bool TF > // Transpose flag
927 inline constexpr void UniformVector<Type,TF>::extend( size_t n, bool preserve )
928 {
929  resize( size_+n, preserve );
930 }
931 //*************************************************************************************************
932 
933 
934 //*************************************************************************************************
940 template< typename Type // Data type of the vector
941  , bool TF > // Transpose flag
942 inline constexpr void UniformVector<Type,TF>::swap( UniformVector& v ) noexcept
943 {
944  using std::swap;
945 
946  swap( size_, v.size_ );
947  swap( value_, v.value_ );
948 }
949 //*************************************************************************************************
950 
951 
952 
953 
954 //=================================================================================================
955 //
956 // NUMERIC FUNCTIONS
957 //
958 //=================================================================================================
959 
960 //*************************************************************************************************
977 template< typename Type // Data type of the vector
978  , bool TF > // Transpose flag
979 template< typename Other > // Data type of the scalar value
981 {
982  if( size_ > 0UL ) {
983  value_ *= scalar;
984  }
985 
986  return *this;
987 }
988 //*************************************************************************************************
989 
990 
991 
992 
993 //=================================================================================================
994 //
995 // EXPRESSION TEMPLATE EVALUATION FUNCTIONS
996 //
997 //=================================================================================================
998 
999 //*************************************************************************************************
1009 template< typename Type // Data type of the vector
1010  , bool TF > // Transpose flag
1011 template< typename Other > // Data type of the foreign expression
1012 inline bool UniformVector<Type,TF>::canAlias( const Other* alias ) const noexcept
1013 {
1014  return static_cast<const void*>( this ) == static_cast<const void*>( alias );
1015 }
1016 //*************************************************************************************************
1017 
1018 
1019 //*************************************************************************************************
1029 template< typename Type // Data type of the vector
1030  , bool TF > // Transpose flag
1031 template< typename Other > // Data type of the foreign expression
1032 inline bool UniformVector<Type,TF>::isAliased( const Other* alias ) const noexcept
1033 {
1034  return static_cast<const void*>( this ) == static_cast<const void*>( alias );
1035 }
1036 //*************************************************************************************************
1037 
1038 
1039 //*************************************************************************************************
1048 template< typename Type // Data type of the vector
1049  , bool TF > // Transpose flag
1050 inline bool UniformVector<Type,TF>::isAligned() const noexcept
1051 {
1052  return true;
1053 }
1054 //*************************************************************************************************
1055 
1056 
1057 //*************************************************************************************************
1067 template< typename Type // Data type of the vector
1068  , bool TF > // Transpose flag
1069 inline bool UniformVector<Type,TF>::canSMPAssign() const noexcept
1070 {
1071  return ( size() > SMP_DVECASSIGN_THRESHOLD );
1072 }
1073 //*************************************************************************************************
1074 
1075 
1076 //*************************************************************************************************
1088 template< typename Type // Data type of the vector
1089  , bool TF > // Transpose flag
1091  UniformVector<Type,TF>::load( size_t index ) const noexcept
1092 {
1093  return loada( index );
1094 }
1095 //*************************************************************************************************
1096 
1097 
1098 //*************************************************************************************************
1111 template< typename Type // Data type of the vector
1112  , bool TF > // Transpose flag
1114  UniformVector<Type,TF>::loada( size_t index ) const noexcept
1115 {
1116  UNUSED_PARAMETER( index );
1117 
1119 
1120  BLAZE_INTERNAL_ASSERT( index < size_, "Invalid vector access index" );
1121  BLAZE_INTERNAL_ASSERT( index + SIMDSIZE <= size_, "Invalid vector access index" );
1122  BLAZE_INTERNAL_ASSERT( index % SIMDSIZE == 0UL, "Invalid vector access index" );
1123 
1124  return set( value_ );
1125 }
1126 //*************************************************************************************************
1127 
1128 
1129 //*************************************************************************************************
1142 template< typename Type // Data type of the vector
1143  , bool TF > // Transpose flag
1145  UniformVector<Type,TF>::loadu( size_t index ) const noexcept
1146 {
1147  UNUSED_PARAMETER( index );
1148 
1150 
1151  BLAZE_INTERNAL_ASSERT( index < size_, "Invalid vector access index" );
1152  BLAZE_INTERNAL_ASSERT( index + SIMDSIZE <= size_, "Invalid vector access index" );
1153 
1154  return set( value_ );
1155 }
1156 //*************************************************************************************************
1157 
1158 
1159 
1160 
1161 //=================================================================================================
1162 //
1163 // UNIFORMVECTOR OPERATORS
1164 //
1165 //=================================================================================================
1166 
1167 //*************************************************************************************************
1170 template< typename Type, bool TF >
1171 constexpr void reset( UniformVector<Type,TF>& v );
1172 
1173 template< typename Type, bool TF >
1174 constexpr void clear( UniformVector<Type,TF>& v );
1175 
1176 template< bool RF, typename Type, bool TF >
1177 constexpr bool isDefault( const UniformVector<Type,TF>& v );
1178 
1179 template< typename Type, bool TF >
1180 constexpr bool isIntact( const UniformVector<Type,TF>& v ) noexcept;
1181 
1182 template< typename Type, bool TF >
1183 constexpr void swap( UniformVector<Type,TF>& a, UniformVector<Type,TF>& b ) noexcept;
1185 //*************************************************************************************************
1186 
1187 
1188 //*************************************************************************************************
1195 template< typename Type // Data type of the vector
1196  , bool TF > // Transpose flag
1197 inline constexpr void reset( UniformVector<Type,TF>& v )
1198 {
1199  v.reset();
1200 }
1201 //*************************************************************************************************
1202 
1203 
1204 //*************************************************************************************************
1211 template< typename Type // Data type of the vector
1212  , bool TF > // Transpose flag
1213 inline constexpr void clear( UniformVector<Type,TF>& v )
1214 {
1215  v.clear();
1216 }
1217 //*************************************************************************************************
1218 
1219 
1220 //*************************************************************************************************
1244 template< bool RF // Relaxation flag
1245  , typename Type // Data type of the vector
1246  , bool TF > // Transpose flag
1247 inline constexpr bool isDefault( const UniformVector<Type,TF>& v )
1248 {
1249  return ( v.size() == 0UL );
1250 }
1251 //*************************************************************************************************
1252 
1253 
1254 //*************************************************************************************************
1272 template< typename Type // Data type of the vector
1273  , bool TF > // Transpose flag
1274 inline constexpr bool isIntact( const UniformVector<Type,TF>& v ) noexcept
1275 {
1276  UNUSED_PARAMETER( v );
1277 
1278  return true;
1279 }
1280 //*************************************************************************************************
1281 
1282 
1283 //*************************************************************************************************
1291 template< typename Type // Data type of the vector
1292  , bool TF > // Transpose flag
1293 inline constexpr void swap( UniformVector<Type,TF>& a, UniformVector<Type,TF>& b ) noexcept
1294 {
1295  a.swap( b );
1296 }
1297 //*************************************************************************************************
1298 
1299 
1300 
1301 
1302 //=================================================================================================
1303 //
1304 // ISUNIFORM SPECIALIZATIONS
1305 //
1306 //=================================================================================================
1307 
1308 //*************************************************************************************************
1310 template< typename Type, bool TF >
1311 struct IsUniform< UniformVector<Type,TF> >
1312  : public TrueType
1313 {};
1315 //*************************************************************************************************
1316 
1317 
1318 
1319 
1320 //=================================================================================================
1321 //
1322 // ISALIGNED SPECIALIZATIONS
1323 //
1324 //=================================================================================================
1325 
1326 //*************************************************************************************************
1328 template< typename Type, bool TF >
1329 struct IsAligned< UniformVector<Type,TF> >
1330  : public TrueType
1331 {};
1333 //*************************************************************************************************
1334 
1335 
1336 
1337 
1338 //=================================================================================================
1339 //
1340 // ISRESIZABLE SPECIALIZATIONS
1341 //
1342 //=================================================================================================
1343 
1344 //*************************************************************************************************
1346 template< typename Type, bool TF >
1347 struct IsResizable< UniformVector<Type,TF> >
1348  : public TrueType
1349 {};
1351 //*************************************************************************************************
1352 
1353 
1354 
1355 
1356 //=================================================================================================
1357 //
1358 // ADDTRAIT SPECIALIZATIONS
1359 //
1360 //=================================================================================================
1361 
1362 //*************************************************************************************************
1364 template< typename T1, typename T2 >
1365 struct AddTraitEval1< T1, T2
1366  , EnableIf_t< IsVector_v<T1> &&
1367  IsVector_v<T2> &&
1368  ( IsUniform_v<T1> && IsUniform_v<T2> ) &&
1369  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1370 {
1371  using ET1 = ElementType_t<T1>;
1372  using ET2 = ElementType_t<T2>;
1373 
1374  using Type = UniformVector< AddTrait_t<ET1,ET2>, TransposeFlag_v<T1> >;
1375 };
1377 //*************************************************************************************************
1378 
1379 
1380 
1381 
1382 //=================================================================================================
1383 //
1384 // SUBTRAIT SPECIALIZATIONS
1385 //
1386 //=================================================================================================
1387 
1388 //*************************************************************************************************
1390 template< typename T1, typename T2 >
1391 struct SubTraitEval1< T1, T2
1392  , EnableIf_t< IsVector_v<T1> &&
1393  IsVector_v<T2> &&
1394  ( IsUniform_v<T1> && IsUniform_v<T2> ) &&
1395  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1396 {
1397  using ET1 = ElementType_t<T1>;
1398  using ET2 = ElementType_t<T2>;
1399 
1400  using Type = UniformVector< SubTrait_t<ET1,ET2>, TransposeFlag_v<T1> >;
1401 };
1403 //*************************************************************************************************
1404 
1405 
1406 
1407 
1408 //=================================================================================================
1409 //
1410 // MULTTRAIT SPECIALIZATIONS
1411 //
1412 //=================================================================================================
1413 
1414 //*************************************************************************************************
1416 template< typename T1, typename T2 >
1417 struct MultTraitEval1< T1, T2
1418  , EnableIf_t< IsVector_v<T1> &&
1419  IsNumeric_v<T2> &&
1420  IsUniform_v<T1> && !IsZero_v<T1> > >
1421 {
1422  using ET1 = ElementType_t<T1>;
1423 
1424  using Type = UniformVector< MultTrait_t<ET1,T2>, TransposeFlag_v<T1> >;
1425 };
1426 
1427 template< typename T1, typename T2 >
1428 struct MultTraitEval1< T1, T2
1429  , EnableIf_t< IsNumeric_v<T1> &&
1430  IsVector_v<T2> &&
1431  IsUniform_v<T2> && !IsZero_v<T2> > >
1432 {
1433  using ET2 = ElementType_t<T2>;
1434 
1435  using Type = UniformVector< MultTrait_t<T1,ET2>, TransposeFlag_v<T2> >;
1436 };
1437 
1438 template< typename T1, typename T2 >
1439 struct MultTraitEval1< T1, T2
1440  , EnableIf_t< ( ( IsRowVector_v<T1> && IsRowVector_v<T2> ) ||
1441  ( IsColumnVector_v<T1> && IsColumnVector_v<T2> ) ) &&
1442  ( IsUniform_v<T1> && IsUniform_v<T2> ) &&
1443  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1444 {
1445  using ET1 = ElementType_t<T1>;
1446  using ET2 = ElementType_t<T2>;
1447 
1448  using Type = UniformVector< MultTrait_t<ET1,ET2>, TransposeFlag_v<T1> >;
1449 };
1450 
1451 template< typename T1, typename T2 >
1452 struct MultTraitEval1< T1, T2
1453  , EnableIf_t< IsMatrix_v<T1> &&
1454  IsColumnVector_v<T2> &&
1455  IsUniform_v<T1> &&
1456  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1457 {
1458  using ET1 = ElementType_t<T1>;
1459  using ET2 = ElementType_t<T2>;
1460 
1461  using Type = UniformVector< MultTrait_t<ET1,ET2>, false >;
1462 };
1463 
1464 template< typename T1, typename T2 >
1465 struct MultTraitEval1< T1, T2
1466  , EnableIf_t< IsRowVector_v<T1> &&
1467  IsMatrix_v<T2> &&
1468  IsUniform_v<T2> &&
1469  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1470 {
1471  using ET1 = ElementType_t<T1>;
1472  using ET2 = ElementType_t<T2>;
1473 
1474  using Type = UniformVector< MultTrait_t<ET1,ET2>, true >;
1475 };
1477 //*************************************************************************************************
1478 
1479 
1480 
1481 
1482 //=================================================================================================
1483 //
1484 // DIVTRAIT SPECIALIZATIONS
1485 //
1486 //=================================================================================================
1487 
1488 //*************************************************************************************************
1490 template< typename T1, typename T2 >
1491 struct DivTraitEval1< T1, T2
1492  , EnableIf_t< IsVector_v<T1> &&
1493  IsNumeric_v<T2> &&
1494  IsUniform_v<T1> && !IsZero_v<T1> > >
1495 {
1496  using ET1 = ElementType_t<T1>;
1497 
1498  using Type = UniformVector< DivTrait_t<ET1,T2>, TransposeFlag_v<T1> >;
1499 };
1500 
1501 template< typename T1, typename T2 >
1502 struct DivTraitEval1< T1, T2
1503  , EnableIf_t< ( ( IsRowVector_v<T1> && IsRowVector_v<T2> ) ||
1504  ( IsColumnVector_v<T1> && IsColumnVector_v<T2> ) ) &&
1505  ( IsUniform_v<T1> && IsUniform_v<T2> ) &&
1506  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1507 {
1508  using ET1 = ElementType_t<T1>;
1509  using ET2 = ElementType_t<T2>;
1510 
1511  using Type = UniformVector< DivTrait_t<ET1,ET2>, TransposeFlag_v<T1> >;
1512 };
1514 //*************************************************************************************************
1515 
1516 
1517 
1518 
1519 //=================================================================================================
1520 //
1521 // MAPTRAIT SPECIALIZATIONS
1522 //
1523 //=================================================================================================
1524 
1525 //*************************************************************************************************
1527 template< typename T, typename OP >
1528 struct UnaryMapTraitEval1< T, OP
1529  , EnableIf_t< IsVector_v<T> &&
1530  YieldsUniform_v<OP,T> &&
1531  !YieldsZero_v<OP,T> > >
1532 {
1533  using ET = ElementType_t<T>;
1534 
1535  using Type = UniformVector< MapTrait_t<ET,OP>, TransposeFlag_v<T> >;
1536 };
1538 //*************************************************************************************************
1539 
1540 
1541 //*************************************************************************************************
1543 template< typename T1, typename T2, typename OP >
1544 struct BinaryMapTraitEval1< T1, T2, OP
1545  , EnableIf_t< IsVector_v<T1> &&
1546  IsVector_v<T2> &&
1547  YieldsUniform_v<OP,T1,T2> &&
1548  !YieldsZero_v<OP,T1,T2> > >
1549 {
1550  using ET1 = ElementType_t<T1>;
1551  using ET2 = ElementType_t<T2>;
1552 
1553  using Type = UniformVector< MapTrait_t<ET1,ET2,OP>, TransposeFlag_v<T1> >;
1554 };
1556 //*************************************************************************************************
1557 
1558 
1559 
1560 
1561 //=================================================================================================
1562 //
1563 // REDUCETRAIT SPECIALIZATIONS
1564 //
1565 //=================================================================================================
1566 
1567 //*************************************************************************************************
1569 template< typename T, typename OP, size_t RF >
1570 struct PartialReduceTraitEval1< T, OP, RF
1571  , EnableIf_t< IsMatrix_v<T> && IsUniform_v<T> > >
1572 {
1573  static constexpr bool TF = ( RF == 0UL );
1574 
1575  using Type = UniformVector< ElementType_t<T>, TF >;
1576 };
1578 //*************************************************************************************************
1579 
1580 
1581 
1582 
1583 //=================================================================================================
1584 //
1585 // HIGHTYPE SPECIALIZATIONS
1586 //
1587 //=================================================================================================
1588 
1589 //*************************************************************************************************
1591 template< typename T1, bool TF, typename T2 >
1592 struct HighType< UniformVector<T1,TF>, UniformVector<T2,TF> >
1593 {
1594  using Type = UniformVector< typename HighType<T1,T2>::Type, TF >;
1595 };
1597 //*************************************************************************************************
1598 
1599 
1600 
1601 
1602 //=================================================================================================
1603 //
1604 // LOWTYPE SPECIALIZATIONS
1605 //
1606 //=================================================================================================
1607 
1608 //*************************************************************************************************
1610 template< typename T1, bool TF, typename T2 >
1611 struct LowType< UniformVector<T1,TF>, UniformVector<T2,TF> >
1612 {
1613  using Type = UniformVector< typename LowType<T1,T2>::Type, TF >;
1614 };
1616 //*************************************************************************************************
1617 
1618 
1619 
1620 
1621 //=================================================================================================
1622 //
1623 // SUBVECTORTRAIT SPECIALIZATIONS
1624 //
1625 //=================================================================================================
1626 
1627 //*************************************************************************************************
1629 template< typename VT, size_t I, size_t N >
1630 struct SubvectorTraitEval1< VT, I, N
1631  , EnableIf_t< IsUniform_v<VT> && !IsZero_v<VT> > >
1632 {
1633  using Type = UniformVector< RemoveConst_t< ElementType_t<VT> >, TransposeFlag_v<VT> >;
1634 };
1636 //*************************************************************************************************
1637 
1638 
1639 
1640 
1641 //=================================================================================================
1642 //
1643 // ELEMENTSTRAIT SPECIALIZATIONS
1644 //
1645 //=================================================================================================
1646 
1647 //*************************************************************************************************
1649 template< typename VT, size_t N >
1650 struct ElementsTraitEval1< VT, N
1651  , EnableIf_t< IsUniform_v<VT> && !IsZero_v<VT> > >
1652 {
1653  using Type = UniformVector< RemoveConst_t< ElementType_t<VT> >, TransposeFlag_v<VT> >;
1654 };
1656 //*************************************************************************************************
1657 
1658 
1659 
1660 
1661 //=================================================================================================
1662 //
1663 // ROWTRAIT SPECIALIZATIONS
1664 //
1665 //=================================================================================================
1666 
1667 //*************************************************************************************************
1669 template< typename MT, size_t I >
1670 struct RowTraitEval1< MT, I
1671  , EnableIf_t< IsUniform_v<MT> && !IsZero_v<MT> > >
1672 {
1673  using Type = UniformVector< RemoveConst_t< ElementType_t<MT> >, true >;
1674 };
1676 //*************************************************************************************************
1677 
1678 
1679 
1680 
1681 //=================================================================================================
1682 //
1683 // COLUMNTRAIT SPECIALIZATIONS
1684 //
1685 //=================================================================================================
1686 
1687 //*************************************************************************************************
1689 template< typename MT, size_t I >
1690 struct ColumnTraitEval1< MT, I
1691  , EnableIf_t< IsUniform_v<MT> && !IsZero_v<MT> > >
1692 {
1693  using Type = UniformVector< RemoveConst_t< ElementType_t<MT> >, false >;
1694 };
1696 //*************************************************************************************************
1697 
1698 
1699 
1700 
1701 //=================================================================================================
1702 //
1703 // BANDTRAIT SPECIALIZATIONS
1704 //
1705 //=================================================================================================
1706 
1707 //*************************************************************************************************
1709 template< typename MT, ptrdiff_t I >
1710 struct BandTraitEval1< MT, I
1711  , EnableIf_t< IsUniform_v<MT> && !IsZero_v<MT> > >
1712 {
1713  using Type = UniformVector< RemoveConst_t< ElementType_t<MT> >, defaultTransposeFlag >;
1714 };
1716 //*************************************************************************************************
1717 
1718 } // namespace blaze
1719 
1720 #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, a compilation error is created.
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 ConstIterator end() const noexcept
Returns an iterator just past the last element of the uniform vector.
Definition: UniformVector.h:533
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the alignment flag values.
Header file for the UNUSED_PARAMETER function template.
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:193
BLAZE_ALWAYS_INLINE SIMDType loadu(size_t index) const noexcept
Unaligned load of a SIMD element of the vector.
Definition: UniformVector.h:1145
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.The IsMatrix_v variable template provides a c...
Definition: IsMatrix.h:139
Header file for the row trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: UniformVector.h:177
constexpr ConstReference operator[](size_t index) const noexcept
Subscript operator for the direct access to the vector elements.
Definition: UniformVector.h:442
SIMDTrait_t< ElementType > SIMDType
SIMD type of the vector elements.
Definition: UniformVector.h:176
Header file for the YieldsZero type trait.
const Type & ConstReference
Reference to a constant vector value.
Definition: UniformVector.h:181
constexpr UniformVector & operator=(const Type &rhs)
Homogenous assignment to all vector elements.
Definition: UniformVector.h:571
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:591
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:1069
Header file for the DenseVector base class.
static constexpr bool simdEnabled
Compilation flag for SIMD optimization.
Definition: UniformVector.h:213
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:79
constexpr ConstIterator cbegin() const noexcept
Returns an iterator to the first element of the uniform vector.
Definition: UniformVector.h:518
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
bool isAligned() const noexcept
Returns whether the vector is properly aligned in memory.
Definition: UniformVector.h:1050
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Header file for the reduce trait.
constexpr size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: UniformVector.h:801
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:171
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:1114
Type ElementType
Type of the vector elements.
Definition: UniformVector.h:175
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:503
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
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5907
constexpr void extend(size_t n, bool preserve=true)
Extending the size of the vector.
Definition: UniformVector.h:927
constexpr UniformVector() noexcept
The default constructor for UniformVector.
Definition: UniformVector.h:357
bool isAliased(const Other *alias) const noexcept
Returns whether the vector is aliased with the given address alias.
Definition: UniformVector.h:1032
#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:1012
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
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:884
constexpr ConstIterator cend() const noexcept
Returns an iterator just past the last element of the uniform vector.
Definition: UniformVector.h:548
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: UniformVector.h:849
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
Header file for the IsAligned 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:140
#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:328
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:849
Header file for the IsVector type trait.
constexpr void reset()
Reset to the default initial values.
Definition: UniformVector.h:866
constexpr size_t spacing() const noexcept
Returns the minimum capacity of the vector.
Definition: UniformVector.h:818
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: UniformVector.h:219
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:611
const Type * ConstPointer
Pointer to a constant vector value.
Definition: UniformVector.h:183
Resize mechanism to obtain a UniformVector with a different fixed number of elements.
Definition: UniformVector.h:202
Header file for the IsVectorizable type trait.
const Type * Pointer
Pointer to a non-constant vector value.
Definition: UniformVector.h:182
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:304
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:905
Header file for the division trait.
Constraint on the data type.
Header file for the IsZero type trait.
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:832
#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, a compilation error is created.
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:281
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:327
Constraint on the data type.
constexpr ConstPointer data() const noexcept
Low-level data access to the vector elements.
Definition: UniformVector.h:488
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
constexpr bool IsRowVector_v
Auxiliary variable template for the IsRowVector type trait.The IsRowVector_v variable template provid...
Definition: IsRowVector.h:143
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:186
Header file for the 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:942
constexpr bool IsUniform_v
Auxiliary variable template for the IsUniform type trait.The IsUniform_v variable template provides a...
Definition: IsUniform.h:163
BLAZE_ALWAYS_INLINE SIMDType load(size_t index) const noexcept
Load of a SIMD element of the vector.
Definition: UniformVector.h:1091
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:263
const Type & Reference
Reference to a non-constant vector value.
Definition: UniformVector.h:180
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:631
Header file for the IsColumnVector type trait.
Header file for the IsResizable type trait.
ConstReference at(size_t index) const
Checked access to the vector elements.
Definition: UniformVector.h:466
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, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the HighType type trait.
Header file for the clear shim.
Header file for the UniformIterator class template.