26 #ifndef _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_ 27 #define _BLAZE_MATH_DENSE_HYBRIDVECTOR_H_ 178 template<
typename Type
180 ,
bool TF = defaultTransposeFlag >
182 :
public DenseVector< HybridVector<Type,N,TF>, TF >
207 template<
typename NewType >
216 template<
size_t NewN >
234 enum :
bool { smpAssignable =
false };
242 explicit inline HybridVector(
size_t n,
const Type& init );
245 template<
typename Other >
248 template<
typename Other,
size_t Dim >
281 inline HybridVector&
operator=(
const Type& rhs );
284 template<
typename Other,
size_t Dim >
287 inline HybridVector&
operator= (
const HybridVector& rhs );
293 template<
typename VT >
inline HybridVector& operator%=(
const Vector<VT,TF>& rhs );
300 inline size_t size()
const noexcept;
301 inline size_t spacing()
const noexcept;
302 inline size_t capacity()
const noexcept;
306 inline void resize(
size_t n,
bool preserve=
true );
307 inline void extend(
size_t n,
bool preserve=
true );
308 inline void swap( HybridVector& v ) noexcept;
315 template<
typename Other >
inline HybridVector& scale(
const Other& scalar );
322 static inline void*
operator new ( std::size_t
size );
323 static inline void*
operator new[]( std::size_t
size );
324 static inline void*
operator new ( std::size_t
size,
const std::nothrow_t& );
325 static inline void*
operator new[]( std::size_t
size,
const std::nothrow_t& );
327 static inline void operator delete (
void* ptr );
328 static inline void operator delete[](
void* ptr );
329 static inline void operator delete (
void* ptr,
const std::nothrow_t& );
330 static inline void operator delete[](
void* ptr,
const std::nothrow_t& );
337 template<
typename VT >
339 struct VectorizedAssign {
340 enum :
bool { value = useOptimizedKernels &&
341 simdEnabled && VT::simdEnabled &&
349 template<
typename VT >
351 struct VectorizedAddAssign {
352 enum :
bool { value = useOptimizedKernels &&
353 simdEnabled && VT::simdEnabled &&
362 template<
typename VT >
364 struct VectorizedSubAssign {
365 enum :
bool { value = useOptimizedKernels &&
366 simdEnabled && VT::simdEnabled &&
375 template<
typename VT >
377 struct VectorizedMultAssign {
378 enum :
bool { value = useOptimizedKernels &&
379 simdEnabled && VT::simdEnabled &&
388 template<
typename VT >
390 struct VectorizedDivAssign {
391 enum :
bool { value = useOptimizedKernels &&
392 simdEnabled && VT::simdEnabled &&
408 inline bool isIntact()
const noexcept;
415 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
416 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
429 template<
typename VT >
432 template<
typename VT >
437 template<
typename VT >
440 template<
typename VT >
445 template<
typename VT >
448 template<
typename VT >
453 template<
typename VT >
456 template<
typename VT >
461 template<
typename VT >
464 template<
typename VT >
472 enum :
size_t { NN = ( usePadding )?(
nextMultiple( N, SIMDSIZE ) ):( N ) };
515 template<
typename Type
525 for(
size_t i=0UL; i<NN; ++i )
544 template<
typename Type
558 for(
size_t i=0UL; i<NN; ++i )
578 template<
typename Type
591 for(
size_t i=0UL; i<n; ++i )
595 for(
size_t i=n; i<NN; ++i )
622 template<
typename Type
635 std::fill( std::copy( list.begin(), list.end(),
v_.
data() ),
v_.
data()+NN, Type() );
665 template<
typename Type
668 template<
typename Other >
679 for(
size_t i=0UL; i<n; ++i )
683 for(
size_t i=n; i<NN; ++i )
710 template<
typename Type
713 template<
typename Other
722 for(
size_t i=0UL; i<Dim; ++i )
726 for(
size_t i=Dim; i<NN; ++i )
742 template<
typename Type
751 for(
size_t i=0UL; i<
size_; ++i )
755 for(
size_t i=size_; i<NN; ++i )
774 template<
typename Type
777 template<
typename VT >
786 if( (~v).
size() > N ) {
791 i<( IsNumeric<Type>::value ? NN :
size_ ); ++i ) {
819 template<
typename Type
840 template<
typename Type
862 template<
typename Type
868 if( index >=
size_ ) {
871 return (*
this)[index];
886 template<
typename Type
892 if( index >=
size_ ) {
895 return (*
this)[index];
907 template<
typename Type
924 template<
typename Type
939 template<
typename Type
954 template<
typename Type
969 template<
typename Type
984 template<
typename Type
1000 template<
typename Type
1016 template<
typename Type
1041 template<
typename Type
1048 for(
size_t i=0UL; i<
size_; ++i )
1074 template<
typename Type
1079 if( list.size() > N ) {
1083 resize( list.size(), false );
1084 std::copy( list.begin(), list.end(),
v_.
data() );
1110 template<
typename Type
1113 template<
typename Other
1121 for(
size_t i=0UL; i<Dim; ++i )
1137 template<
typename Type
1142 using blaze::assign;
1147 assign( *
this, ~rhs );
1166 template<
typename Type
1169 template<
typename VT >
1172 using blaze::assign;
1174 if( (~rhs).
size() > N ) {
1186 assign( *
this, ~rhs );
1206 template<
typename Type
1209 template<
typename VT >
1212 using blaze::addAssign;
1220 addAssign( *
this, tmp );
1223 addAssign( *
this, ~rhs );
1243 template<
typename Type
1246 template<
typename VT >
1249 using blaze::subAssign;
1257 subAssign( *
this, tmp );
1260 subAssign( *
this, ~rhs );
1281 template<
typename Type
1284 template<
typename VT >
1287 using blaze::assign;
1288 using blaze::multAssign;
1296 assign( *
this, tmp );
1299 multAssign( *
this, ~rhs );
1319 template<
typename Type
1322 template<
typename VT >
1325 using blaze::assign;
1326 using blaze::divAssign;
1334 assign( *
this, tmp );
1337 divAssign( *
this, ~rhs );
1358 template<
typename Type
1361 template<
typename VT >
1364 using blaze::assign;
1375 if(
size_ != 3UL || (~rhs).
size() != 3UL ) {
1379 const CrossType tmp( *
this % (~rhs) );
1380 assign( *
this, tmp );
1402 template<
typename Type
1420 template<
typename Type
1435 template<
typename Type
1453 template<
typename Type
1458 size_t nonzeros( 0 );
1460 for(
size_t i=0UL; i<
size_; ++i ) {
1475 template<
typename Type
1481 for(
size_t i=0UL; i<
size_; ++i )
1494 template<
typename Type
1535 template<
typename Type
1547 for(
size_t i=n; i<
size_; ++i )
1570 template<
typename Type
1587 template<
typename Type
1594 const size_t maxsize(
max(
size_, v.size_ ) );
1595 for(
size_t i=0UL; i<maxsize; ++i )
1627 template<
typename Type
1630 template<
typename Other >
1633 for(
size_t i=0; i<
size_; ++i )
1658 template<
typename Type
1667 return allocate<HybridVector>( 1UL );
1682 template<
typename Type
1705 template<
typename Type
1714 return allocate<HybridVector>( 1UL );
1729 template<
typename Type
1737 return allocate<HybridVector>( size/
sizeof(
HybridVector) );
1748 template<
typename Type
1753 deallocate( static_cast<HybridVector*>( ptr ) );
1764 template<
typename Type
1769 deallocate( static_cast<HybridVector*>( ptr ) );
1780 template<
typename Type
1785 deallocate( static_cast<HybridVector*>( ptr ) );
1796 template<
typename Type
1801 deallocate( static_cast<HybridVector*>( ptr ) );
1823 template<
typename Type
1832 for(
size_t i=
size_; i<NN; ++i ) {
1833 if(
v_[i] != Type() )
1861 template<
typename Type
1864 template<
typename Other >
1867 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1882 template<
typename Type
1885 template<
typename Other >
1888 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1902 template<
typename Type
1924 template<
typename Type
1930 return loada( index );
1948 template<
typename Type
1981 template<
typename Type
2012 template<
typename Type
2036 template<
typename Type
2069 template<
typename Type
2101 template<
typename Type
2132 template<
typename Type
2135 template<
typename VT >
2141 for(
size_t i=0UL; i<
size_; ++i )
2158 template<
typename Type
2161 template<
typename VT >
2171 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
2176 for( ; i<ipos; i+=SIMDSIZE ) {
2179 for( ; remainder && i<
size_; ++i ) {
2197 template<
typename Type
2200 template<
typename VT >
2206 v_[element->index()] = element->value();
2222 template<
typename Type
2225 template<
typename VT >
2231 for(
size_t i=0UL; i<
size_; ++i )
2248 template<
typename Type
2251 template<
typename VT >
2261 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
2266 for( ; i<ipos; i+=SIMDSIZE ) {
2269 for( ; remainder && i<
size_; ++i ) {
2287 template<
typename Type
2290 template<
typename VT >
2296 v_[element->index()] += element->value();
2312 template<
typename Type
2315 template<
typename VT >
2321 for(
size_t i=0UL; i<
size_; ++i )
2338 template<
typename Type
2341 template<
typename VT >
2351 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
2356 for( ; i<ipos; i+=SIMDSIZE ) {
2359 for( ; remainder && i<
size_; ++i ) {
2377 template<
typename Type
2380 template<
typename VT >
2386 v_[element->index()] -= element->value();
2402 template<
typename Type
2405 template<
typename VT >
2411 for(
size_t i=0UL; i<
size_; ++i )
2428 template<
typename Type
2431 template<
typename VT >
2441 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
2446 for( ; i<ipos; i+=SIMDSIZE ) {
2449 for( ; remainder && i<
size_; ++i ) {
2467 template<
typename Type
2470 template<
typename VT >
2480 v_[element->index()] = tmp[element->index()] * element->value();
2496 template<
typename Type
2499 template<
typename VT >
2505 for(
size_t i=0UL; i<
size_; ++i )
2522 template<
typename Type
2525 template<
typename VT >
2533 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
2538 for( ; i<ipos; i+=SIMDSIZE ) {
2541 for( ; i<
size_; ++i ) {
2563 template<
typename Type,
size_t N,
bool TF >
2566 template<
typename Type,
size_t N,
bool TF >
2569 template<
bool RF,
typename Type,
size_t N,
bool TF >
2572 template<
typename Type,
size_t N,
bool TF >
2575 template<
typename Type,
size_t N,
bool TF >
2588 template<
typename Type
2605 template<
typename Type
2645 return ( v.size() == 0UL );
2668 template<
typename Type
2673 return v.isIntact();
2686 template<
typename Type
2706 template<
typename T,
size_t N,
bool TF >
2724 template<
typename T,
size_t N,
bool TF >
2742 template<
typename T,
size_t N,
bool TF >
2743 struct IsAligned< HybridVector<T,N,TF> >
2760 template<
typename T,
size_t N,
bool TF >
2778 template<
typename T,
size_t N,
bool TF >
2779 struct IsPadded< HybridVector<T,N,TF> >
2796 template<
typename T,
size_t N,
bool TF >
2814 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2815 struct AddTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2820 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2821 struct AddTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2826 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2827 struct AddTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2845 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2846 struct SubTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2851 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2852 struct SubTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2857 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2858 struct SubTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2876 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2877 struct MultTrait< HybridVector<T1,N,TF>, T2, EnableIf_<IsNumeric<T2> > >
2882 template<
typename T1,
typename T2,
size_t N,
bool TF >
2883 struct MultTrait< T1, HybridVector<T2,N,TF>, EnableIf_<IsNumeric<T1> > >
2888 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2889 struct MultTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2894 template<
typename T1,
size_t M,
typename T2,
size_t N >
2895 struct MultTrait< HybridVector<T1,M,false>, StaticVector<T2,N,true> >
2900 template<
typename T1,
size_t M,
typename T2,
size_t N >
2901 struct MultTrait< HybridVector<T1,M,true>, StaticVector<T2,N,false> >
2906 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2907 struct MultTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2912 template<
typename T1,
size_t M,
typename T2,
size_t N >
2913 struct MultTrait< StaticVector<T1,M,false>, HybridVector<T2,N,true> >
2918 template<
typename T1,
size_t M,
typename T2,
size_t N >
2919 struct MultTrait< StaticVector<T1,M,true>, HybridVector<T2,N,false> >
2924 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2925 struct MultTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2930 template<
typename T1,
size_t M,
typename T2,
size_t N >
2931 struct MultTrait< HybridVector<T1,M,false>, HybridVector<T2,N,true> >
2936 template<
typename T1,
size_t M,
typename T2,
size_t N >
2937 struct MultTrait< HybridVector<T1,M,true>, HybridVector<T2,N,false> >
2955 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2956 struct DivTrait< HybridVector<T1,N,TF>, T2, EnableIf_<IsNumeric<T2> > >
2961 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2962 struct DivTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF> >
2967 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2968 struct DivTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF> >
2973 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
2974 struct DivTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
2992 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2993 struct CrossTrait< HybridVector<T1,N,TF>, StaticVector<T2,3UL,TF> >
3002 template<
typename T1,
bool TF,
typename T2,
size_t N >
3003 struct CrossTrait< StaticVector<T1,3UL,TF>, HybridVector<T2,N,TF> >
3012 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N >
3013 struct CrossTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF> >
3035 template<
typename T,
size_t N,
bool TF,
typename OP >
3054 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N,
typename OP >
3055 struct BinaryMapTrait< HybridVector<T1,M,TF>, StaticVector<T2,N,TF>, OP >
3060 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N,
typename OP >
3061 struct BinaryMapTrait< StaticVector<T1,M,TF>, HybridVector<T2,N,TF>, OP >
3066 template<
typename T1,
size_t M,
bool TF,
typename T2,
size_t N,
typename OP >
3067 struct BinaryMapTrait< HybridVector<T1,M,TF>, HybridVector<T2,N,TF>, OP >
3085 template<
typename T1,
size_t N,
bool TF,
typename T2 >
3086 struct HighType< HybridVector<T1,N,TF>, HybridVector<T2,N,TF> >
3104 template<
typename T1,
size_t N,
bool TF,
typename T2 >
3105 struct LowType< HybridVector<T1,N,TF>, HybridVector<T2,N,TF> >
3123 template<
typename T,
size_t N1,
bool TF,
size_t I,
size_t N2 >
3129 template<
typename T,
size_t N,
bool TF >
3148 template<
typename T,
size_t N1,
bool TF,
size_t... CEAs >
3151 using Type = StaticVector<T,
sizeof...(CEAs),TF>;
3154 template<
typename T,
size_t N,
bool TF >
Compile time check for vectorizable types.Depending on the available instruction set (SSE...
Definition: IsVectorizable.h:135
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.
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:79
Availability of a SIMD subtraction for the given data types.Depending on the available instruction se...
Definition: HasSIMDSub.h:171
Header file for mathematical functions.
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
#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
void extend(size_t n, bool preserve=true)
Extending the size of the vector.
Definition: HybridVector.h:1573
Header file for the alignment flag values.
Header file for the UNUSED_PARAMETER function template.
HybridVector()
The default constructor for HybridVector.
Definition: HybridVector.h:518
Header file for the subtraction trait.
Header file for basic type definitions.
DenseIterator< const Type, aligned > ConstIterator
Iterator over constant elements.
Definition: HybridVector.h:201
Header file for the SparseVector base class.
AlignedArray< Type, NN > v_
The statically allocated vector elements.
Definition: HybridVector.h:478
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > storea(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned store of a vector of 1-byte integral values.
Definition: Storea.h:79
Header file for the serial shim.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Availability of a SIMD multiplication for the given data types.Depending on the available instruction...
Definition: HasSIMDMult.h:172
typename SIMDTrait< T >::Type SIMDTrait_
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_ alias declaration provide...
Definition: SIMDTrait.h:316
Iterator end() noexcept
Returns an iterator just past the last element of the hybrid vector.
Definition: HybridVector.h:987
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:224
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: HybridVector.h:1405
Header file for the DenseVector base class.
Availability of a SIMD addition for the given data types.Depending on the available instruction set (...
Definition: HasSIMDAdd.h:171
Pointer data() noexcept
Low-level data access to the vector elements.
Definition: HybridVector.h:910
#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
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:291
Header file for memory allocation and deallocation functionality.
Header file for the extended initializer_list functionality.
System settings for performance optimizations.
Efficient implementation of a dynamic matrix.The DynamicMatrix class template is the representation ...
Definition: DynamicMatrix.h:217
Compile time check for data types.This type trait tests whether or not the given types can be combine...
Definition: IsSIMDCombinable.h:120
size_t capacity() const noexcept
Returns the maximum capacity of the vector.
Definition: HybridVector.h:1438
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:77
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1950
Type ElementType
Type of the vector elements.
Definition: HybridVector.h:190
Header file for the elements trait.
bool isAliased(const Other *alias) const noexcept
Returns whether the vector is aliased with the given address alias.
Definition: HybridVector.h:1886
Constraint on the data type.
Base template for the CrossTrait class.
Definition: CrossTrait.h:113
Efficient implementation of a fixed-sized vector.The StaticVector class template is the representatio...
Definition: Forward.h:61
Base template for the SubvectorTrait class.
Definition: SubvectorTrait.h:109
Efficient implementation of a dynamically sized vector with static memory.The HybridVector class temp...
Definition: Forward.h:59
Compile time check for low-level access to mutable data.This type trait tests whether the given data ...
Definition: HasMutableDataAccess.h:75
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
Type & Reference
Reference to a non-constant vector value.
Definition: HybridVector.h:195
Rebind mechanism to obtain a HybridVector with different data/element type.
Definition: HybridVector.h:208
Reference operator[](size_t index) noexcept
Subscript operator for the direct access to the vector elements.
Definition: HybridVector.h:823
BLAZE_ALWAYS_INLINE void storeu(size_t index, const SIMDType &value) noexcept
Unaligned store of a SIMD element of the vector.
Definition: HybridVector.h:2073
Compile time check for the memory layout of data types.This type trait tests whether the given data t...
Definition: IsContiguous.h:86
Headerfile for the generic max algorithm.
Header file for the DisableIf class template.
Header file for the LowType type trait.
Base template for the HighType type trait.
Definition: HighType.h:133
Header file for the multiplication trait.
Header file for the unary map trait.
Header file for the clear shim.
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
Header file for nested template disabiguation.
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5908
Header file for all forward declarations of the math module.
#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
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
Type * Pointer
Pointer to a non-constant vector value.
Definition: HybridVector.h:197
#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
Header file for the HasSIMDAdd type trait.
Header file for the DenseIterator class template.
Iterator begin() noexcept
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:942
BLAZE_ALWAYS_INLINE SIMDType loada(size_t index) const noexcept
Aligned load of a SIMD element of the vector.
Definition: HybridVector.h:1952
Header file for the subvector trait.
Header file for all SIMD functionality.
Constraint on the data type.
Availability of a SIMD division for the given data types.Depending on the available instruction set (...
Definition: HasSIMDDiv.h:150
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
Compile time check for sparse vector types.This type trait tests whether or not the given template pa...
Definition: IsSparseVector.h:103
Header file for the IsAligned type trait.
BLAZE_ALWAYS_INLINE void storea(size_t index, const SIMDType &value) noexcept
Aligned store of a SIMD element of the vector.
Definition: HybridVector.h:2040
Constraint on the data type.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loada(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loada.h:80
#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
Constraint on the data type.
Header file for the exception macros of the math module.
BLAZE_ALWAYS_INLINE SIMDType loadu(size_t index) const noexcept
Unaligned load of a SIMD element of the vector.
Definition: HybridVector.h:1985
BLAZE_ALWAYS_INLINE SIMDType load(size_t index) const noexcept
Load of a SIMD element of the vector.
Definition: HybridVector.h:1928
Base template for the ElementsTrait class.
Definition: ElementsTrait.h:108
typename CrossTrait< T1, T2 >::Type CrossTrait_
Auxiliary alias declaration for the CrossTrait class template.The CrossTrait_ alias declaration provi...
Definition: CrossTrait.h:209
Constraint on the data type.
void clear()
Clearing the vector.
Definition: HybridVector.h:1497
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:608
Header file for the IsPadded type trait.
Header file for the IsVectorizable type trait.
Header file for the IsNumeric type trait.
Base template for the LowType type trait.
Definition: LowType.h:133
size_t spacing() const noexcept
Returns the minimum capacity of the vector.
Definition: HybridVector.h:1423
Header file for the HasConstDataAccess type trait.
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
void resize(size_t n, bool preserve=true)
Changing the size of the vector.
Definition: HybridVector.h:1538
size_t size_
The current size/dimension of the vector.
Definition: HybridVector.h:484
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > stream(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned, non-temporal store of a vector of 1-byte integral values.
Definition: Stream.h:75
ConstIterator cend() const noexcept
Returns an iterator just past the last element of the hybrid vector.
Definition: HybridVector.h:1019
Header file for the IsSIMDCombinable type trait.
Header file for the IsSparseVector type trait.
Header file for the HasSIMDMult type trait.
Header file for the binary map trait.
BLAZE_ALWAYS_INLINE constexpr auto nextMultiple(T1 value, T2 factor) noexcept
Rounds up an integral value to the next multiple of a given factor.
Definition: Functions.h:156
BLAZE_ALWAYS_INLINE T1 & operator+=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Addition assignment operator for the addition of two SIMD packs.
Definition: BasicTypes.h:1357
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:119
HybridVector & operator=(const Type &rhs)
Homogenous assignment to all vector elements.
Definition: HybridVector.h:1044
Base template for the MultTrait class.
Definition: MultTrait.h:119
Header file for the addition trait.
Header file for the cross product trait.
Header file for the division trait.
bool isAligned() const noexcept
Returns whether the vector is properly aligned in memory.
Definition: HybridVector.h:1905
bool isIntact() const noexcept
Returns whether the invariants of the hybrid vector are intact.
Definition: HybridVector.h:1826
Constraint on the data type.
Header file for the IsContiguous type trait.
ConstIterator cbegin() const noexcept
Returns an iterator to the first element of the hybrid vector.
Definition: HybridVector.h:972
Header file for the AlignedArray implementation.
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:296
#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 isDefault shim.
BLAZE_ALWAYS_INLINE void stream(size_t index, const SIMDType &value) noexcept
Aligned, non-temporal store of a SIMD element of the vector.
Definition: HybridVector.h:2105
Constraint on the data type.
Header file for the HasSIMDSub type trait.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:816
Header file for the HasMutableDataAccess type trait.
Pointer data() noexcept
Low-level data access to the array elements.
Definition: AlignedArray.h:356
void swap(HybridVector &v) noexcept
Swapping the contents of two hybrid vectors.
Definition: HybridVector.h:1590
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
const Type & ConstReference
Reference to a constant vector value.
Definition: HybridVector.h:196
EnableIf_< IsBuiltin< T > > deallocate(T *address) noexcept
Deallocation of memory for built-in data types.
Definition: Memory.h:230
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
Base template for the DivTrait class.
Definition: DivTrait.h:120
DenseIterator< Type, aligned > Iterator
Iterator over non-constant elements.
Definition: HybridVector.h:200
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:58
const Type * ConstPointer
Pointer to a constant vector value.
Definition: HybridVector.h:198
BLAZE_ALWAYS_INLINE EnableIf_< And< IsIntegral< T1 >, HasSize< T1, 1UL > > > storeu(T1 *address, const SIMDi8< T2 > &value) noexcept
Unaligned store of a vector of 1-byte integral values.
Definition: Storeu.h:76
BLAZE_ALWAYS_INLINE bool checkAlignment(const T *address)
Checks the alignment of the given address.
Definition: AlignmentCheck.h:68
void reset()
Reset to the default initial values.
Definition: HybridVector.h:1478
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type...
Definition: DenseVector.h:61
SIMDTrait_< ElementType > SIMDType
SIMD type of the vector elements.
Definition: HybridVector.h:191
EnableIf_< IsNumeric< ST >, MT &> operator/=(DenseMatrix< MT, SO > &mat, ST scalar)
Division assignment operator for the division of a dense matrix by a scalar value ( )...
Definition: DenseMatrix.h:655
Reference at(size_t index)
Checked access to the vector elements.
Definition: HybridVector.h:866
HybridVector< Type, N, TF > This
Type of this HybridVector instance.
Definition: HybridVector.h:186
Resize mechanism to obtain a HybridVector with a different fixed number of elements.
Definition: HybridVector.h:217
Header file for the HasSIMDDiv type trait.
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:177
Header file for the default transpose flag for all vectors of the Blaze library.
Header file for the alignment check function.
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:130
Header file for the IntegralConstant class template.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:628
Base template for the SubTrait class.
Definition: SubTrait.h:119
BLAZE_ALWAYS_INLINE T1 & operator-=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Subtraction assignment operator for the subtraction of two SIMD packs.
Definition: BasicTypes.h:1375
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112
BLAZE_ALWAYS_INLINE void store(size_t index, const SIMDType &value) noexcept
Store of a SIMD element of the vector.
Definition: HybridVector.h:2016
EnableIf_< IsNumeric< ST >, MT &> operator*=(DenseMatrix< MT, SO > &mat, ST scalar)
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( )...
Definition: DenseMatrix.h:593
Base template for the BinaryMapTrait class.
Definition: BinaryMapTrait.h:97
Header file for the IsResizable type trait.
Base template for the UnaryMapTrait class.
Definition: UnaryMapTrait.h:95
System settings for the inline keywords.
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.In case the given data type T is not a dense or sparse vector type and in...
Definition: TransposeFlag.h:63
#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
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: HybridVector.h:1456
Header file for the HighType type trait.
Header file for the TrueType type/value trait base class.
bool canAlias(const Other *alias) const noexcept
Returns whether the vector can alias with the given address alias.
Definition: HybridVector.h:1865
const Type & ReturnType
Return type for expression template evaluations.
Definition: HybridVector.h:192