35 #ifndef _BLAZE_MATH_DENSE_CUSTOMVECTOR_H_ 36 #define _BLAZE_MATH_DENSE_CUSTOMVECTOR_H_ 45 #include <boost/smart_ptr/shared_array.hpp> 418 template<
typename Type
447 template<
typename NewType >
456 template<
size_t NewN >
482 explicit inline CustomVector( Type* ptr,
size_t n,
size_t nn );
484 template<
typename Deleter,
typename = DisableIf_< IsIntegral<Deleter> > >
485 explicit inline CustomVector( Type* ptr,
size_t n, Deleter d );
487 template<
typename Deleter >
488 explicit inline CustomVector( Type* ptr,
size_t n,
size_t nn, Deleter d );
502 inline Reference
operator[](
size_t index ) noexcept;
503 inline ConstReference
operator[](
size_t index )
const noexcept;
504 inline Reference
at(
size_t index );
505 inline ConstReference
at(
size_t index )
const;
506 inline Pointer
data () noexcept;
507 inline ConstPointer
data ()
const noexcept;
508 inline Iterator
begin () noexcept;
509 inline ConstIterator
begin ()
const noexcept;
510 inline ConstIterator
cbegin()
const noexcept;
511 inline Iterator
end () noexcept;
512 inline ConstIterator
end ()
const noexcept;
513 inline ConstIterator
cend ()
const noexcept;
523 template<
typename Other,
size_t N >
535 template<
typename Other >
538 template<
typename Other >
546 inline size_t size()
const noexcept;
547 inline size_t capacity()
const noexcept;
565 inline void reset( Type* ptr,
size_t n );
566 inline void reset( Type* ptr,
size_t n,
size_t nn );
568 template<
typename Deleter,
typename = DisableIf_< IsIntegral<Deleter> > >
569 inline void reset( Type* ptr,
size_t n, Deleter d );
571 template<
typename Deleter >
572 inline void reset( Type* ptr,
size_t n,
size_t nn, Deleter d );
579 template<
typename VT >
581 struct VectorizedAssign {
583 simdEnabled && VT::simdEnabled &&
591 template<
typename VT >
593 struct VectorizedAddAssign {
595 simdEnabled && VT::simdEnabled &&
604 template<
typename VT >
606 struct VectorizedSubAssign {
608 simdEnabled && VT::simdEnabled &&
617 template<
typename VT >
619 struct VectorizedMultAssign {
621 simdEnabled && VT::simdEnabled &&
630 template<
typename VT >
632 struct VectorizedDivAssign {
634 simdEnabled && VT::simdEnabled &&
650 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
651 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
665 template<
typename VT >
668 template<
typename VT >
673 template<
typename VT >
676 template<
typename VT >
681 template<
typename VT >
684 template<
typename VT >
689 template<
typename VT >
692 template<
typename VT >
697 template<
typename VT >
700 template<
typename VT >
710 boost::shared_array<Type>
v_;
742 template<
typename Type
771 template<
typename Type
779 if( ptr ==
nullptr ) {
814 template<
typename Type
847 template<
typename Type
851 template<
typename Deleter
857 if( ptr ==
nullptr ) {
892 template<
typename Type
896 template<
typename Deleter >
915 template<
typename Type
931 template<
typename Type
937 ,
v_ ( std::move( v.v_ ) )
963 template<
typename Type
985 template<
typename Type
1008 template<
typename Type
1015 if( index >=
size_ ) {
1018 return (*
this)[index];
1033 template<
typename Type
1040 if( index >=
size_ ) {
1043 return (*
this)[index];
1055 template<
typename Type
1074 template<
typename Type
1091 template<
typename Type
1108 template<
typename Type
1125 template<
typename Type
1142 template<
typename Type
1159 template<
typename Type
1176 template<
typename Type
1202 template<
typename Type
1208 for(
size_t i=0UL; i<
size_; ++i )
1239 template<
typename Type
1245 if( list.size() >
size_ ) {
1249 std::fill( std::copy( list.begin(), list.end(),
v_.get() ),
v_.get()+
size_, Type() );
1283 template<
typename Type
1287 template<
typename Other
1295 for(
size_t i=0UL; i<N; ++i )
1313 template<
typename Type
1336 template<
typename Type
1344 v_ = std::move( rhs.v_ );
1365 template<
typename Type
1369 template<
typename VT >
1401 template<
typename Type
1405 template<
typename VT >
1436 template<
typename Type
1440 template<
typename VT >
1471 template<
typename Type
1475 template<
typename VT >
1491 const MultType tmp( *
this * (~rhs) );
1513 template<
typename Type
1517 template<
typename VT >
1534 const DivType tmp( *
this / (~rhs) );
1553 template<
typename Type
1557 template<
typename Other >
1576 template<
typename Type
1580 template<
typename Other >
1605 template<
typename Type
1621 template<
typename Type
1640 template<
typename Type
1646 size_t nonzeros( 0 );
1648 for(
size_t i=0UL; i<
size_; ++i ) {
1663 template<
typename Type
1670 for(
size_t i=0UL; i<
size_; ++i )
1684 template<
typename Type
1702 template<
typename Type
1730 template<
typename Type
1734 template<
typename Other >
1737 for(
size_t i=0UL; i<
size_; ++i )
1774 template<
typename Type
1811 template<
typename Type
1846 template<
typename Type
1850 template<
typename Deleter
1885 template<
typename Type
1889 template<
typename Deleter >
1917 template<
typename Type
1921 template<
typename Other >
1924 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1939 template<
typename Type
1943 template<
typename Other >
1946 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1960 template<
typename Type
1981 template<
typename Type
1987 return (
size() > SMP_DVECASSIGN_THRESHOLD );
2004 template<
typename Type
2012 return loada( index );
2014 return loadu( index );
2032 template<
typename Type
2048 return loada(
v_.get()+index );
2066 template<
typename Type
2080 return loadu(
v_.get()+index );
2098 template<
typename Type
2125 template<
typename Type
2158 template<
typename Type
2190 template<
typename Type
2221 template<
typename Type
2225 template<
typename VT >
2231 const size_t ipos(
size_ &
size_t(-2) );
2234 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2235 v_[i ] = (~rhs)[i ];
2236 v_[i+1UL] = (~rhs)[i+1UL];
2238 if( ipos < (~rhs).size() )
2239 v_[ipos] = (~rhs)[ipos];
2255 template<
typename Type
2259 template<
typename VT >
2267 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
2274 for( ; i<ipos; i+=SIMDSIZE ) {
2277 for( ; i<
size_; ++i ) {
2283 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
2290 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
2291 store( i , it.load() ); it += SIMDSIZE;
2292 store( i+SIMDSIZE , it.load() ); it += SIMDSIZE;
2293 store( i+SIMDSIZE*2UL, it.load() ); it += SIMDSIZE;
2294 store( i+SIMDSIZE*3UL, it.load() ); it += SIMDSIZE;
2296 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
2297 store( i, it.load() );
2299 for( ; i<
size_; ++i, ++it ) {
2318 template<
typename Type
2322 template<
typename VT >
2328 v_[element->index()] = element->value();
2344 template<
typename Type
2348 template<
typename VT >
2354 const size_t ipos(
size_ &
size_t(-2) );
2357 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2358 v_[i ] += (~rhs)[i ];
2359 v_[i+1UL] += (~rhs)[i+1UL];
2361 if( ipos < (~rhs).size() )
2362 v_[ipos] += (~rhs)[ipos];
2378 template<
typename Type
2382 template<
typename VT >
2390 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
2393 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
2400 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
2401 store( i ,
load(i ) + it.load() ); it += SIMDSIZE;
2402 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) + it.load() ); it += SIMDSIZE;
2403 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) + it.load() ); it += SIMDSIZE;
2404 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) + it.load() ); it += SIMDSIZE;
2406 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
2409 for( ; i<
size_; ++i, ++it ) {
2427 template<
typename Type
2431 template<
typename VT >
2437 v_[element->index()] += element->value();
2453 template<
typename Type
2457 template<
typename VT >
2463 const size_t ipos(
size_ &
size_t(-2) );
2466 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2467 v_[i ] -= (~rhs)[i ];
2468 v_[i+1UL] -= (~rhs)[i+1UL];
2470 if( ipos < (~rhs).size() )
2471 v_[ipos] -= (~rhs)[ipos];
2487 template<
typename Type
2491 template<
typename VT >
2499 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
2502 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
2509 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
2510 store( i ,
load(i ) - it.load() ); it += SIMDSIZE;
2511 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) - it.load() ); it += SIMDSIZE;
2512 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) - it.load() ); it += SIMDSIZE;
2513 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) - it.load() ); it += SIMDSIZE;
2515 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
2518 for( ; i<
size_; ++i, ++it ) {
2536 template<
typename Type
2540 template<
typename VT >
2546 v_[element->index()] -= element->value();
2562 template<
typename Type
2566 template<
typename VT >
2572 const size_t ipos(
size_ &
size_t(-2) );
2575 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2576 v_[i ] *= (~rhs)[i ];
2577 v_[i+1UL] *= (~rhs)[i+1UL];
2579 if( ipos < (~rhs).size() )
2580 v_[ipos] *= (~rhs)[ipos];
2596 template<
typename Type
2600 template<
typename VT >
2608 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
2611 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
2618 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
2619 store( i ,
load(i ) * it.load() ); it += SIMDSIZE;
2620 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) * it.load() ); it += SIMDSIZE;
2621 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) * it.load() ); it += SIMDSIZE;
2622 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) * it.load() ); it += SIMDSIZE;
2624 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
2627 for( ; i<
size_; ++i, ++it ) {
2645 template<
typename Type
2649 template<
typename VT >
2659 v_[element->index()] = tmp[element->index()] * element->value();
2675 template<
typename Type
2679 template<
typename VT >
2685 const size_t ipos(
size_ &
size_t(-2) );
2688 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2689 v_[i ] /= (~rhs)[i ];
2690 v_[i+1UL] /= (~rhs)[i+1UL];
2692 if( ipos < (~rhs).size() )
2693 v_[ipos] /= (~rhs)[ipos];
2709 template<
typename Type
2713 template<
typename VT >
2721 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
2724 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
2731 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
2732 store( i ,
load(i ) / it.load() ); it += SIMDSIZE;
2733 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) / it.load() ); it += SIMDSIZE;
2734 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) / it.load() ); it += SIMDSIZE;
2735 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) / it.load() ); it += SIMDSIZE;
2737 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
2740 for( ; i<
size_; ++i, ++it ) {
2767 template<
typename Type
2771 :
public DenseVector< CustomVector<Type,AF,padded,TF>, TF >
2795 template<
typename NewType >
2804 template<
size_t NewN >
2829 explicit inline CustomVector( Type* ptr,
size_t n,
size_t nn );
2831 template<
typename Deleter >
2832 explicit inline CustomVector( Type* ptr,
size_t n,
size_t nn, Deleter d );
2846 inline Reference
operator[](
size_t index ) noexcept;
2847 inline ConstReference
operator[](
size_t index )
const noexcept;
2848 inline Reference
at(
size_t index );
2849 inline ConstReference
at(
size_t index )
const;
2850 inline Pointer
data () noexcept;
2851 inline ConstPointer
data ()
const noexcept;
2852 inline Iterator
begin () noexcept;
2853 inline ConstIterator
begin ()
const noexcept;
2854 inline ConstIterator
cbegin()
const noexcept;
2855 inline Iterator
end () noexcept;
2856 inline ConstIterator
end ()
const noexcept;
2857 inline ConstIterator
cend ()
const noexcept;
2867 template<
typename Other,
size_t N >
2879 template<
typename Other >
2880 inline EnableIf_<IsNumeric<Other>,
CustomVector >& operator*=( Other rhs );
2882 template<
typename Other >
2883 inline EnableIf_<IsNumeric<Other>,
CustomVector >& operator/=( Other rhs );
2890 inline size_t size()
const noexcept;
2891 inline size_t capacity()
const noexcept;
2893 inline void reset();
2894 inline void clear();
2902 template<
typename Other >
inline CustomVector& scale(
const Other& scalar );
2909 inline void reset( Type* ptr,
size_t n,
size_t nn );
2910 template<
typename Deleter >
inline void reset( Type* ptr,
size_t n,
size_t nn, Deleter d );
2917 template<
typename VT >
2918 struct VectorizedAssign {
2920 simdEnabled && VT::simdEnabled &&
2927 template<
typename VT >
2928 struct VectorizedAddAssign {
2930 simdEnabled && VT::simdEnabled &&
2938 template<
typename VT >
2939 struct VectorizedSubAssign {
2941 simdEnabled && VT::simdEnabled &&
2949 template<
typename VT >
2950 struct VectorizedMultAssign {
2952 simdEnabled && VT::simdEnabled &&
2960 template<
typename VT >
2961 struct VectorizedDivAssign {
2963 simdEnabled && VT::simdEnabled &&
2978 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
2979 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
2981 inline bool isAligned ()
const noexcept;
2993 template<
typename VT >
2996 template<
typename VT >
3001 template<
typename VT >
3004 template<
typename VT >
3009 template<
typename VT >
3012 template<
typename VT >
3017 template<
typename VT >
3020 template<
typename VT >
3025 template<
typename VT >
3028 template<
typename VT >
3039 boost::shared_array<Type>
v_;
3071 template<
typename Type
3105 template<
typename Type
3113 if( ptr ==
nullptr ) {
3157 template<
typename Type
3160 template<
typename Deleter >
3166 if( ptr ==
nullptr ) {
3197 template<
typename Type
3215 template<
typename Type
3221 ,
v_ ( std::move( v.
v_ ) )
3250 template<
typename Type
3273 template<
typename Type
3297 template<
typename Type
3303 if( index >=
size_ ) {
3306 return (*
this)[index];
3323 template<
typename Type
3329 if( index >=
size_ ) {
3332 return (*
this)[index];
3346 template<
typename Type
3366 template<
typename Type
3384 template<
typename Type
3402 template<
typename Type
3420 template<
typename Type
3438 template<
typename Type
3456 template<
typename Type
3474 template<
typename Type
3501 template<
typename Type
3507 for(
size_t i=0UL; i<
size_; ++i )
3540 template<
typename Type
3546 if( list.size() >
size_ ) {
3550 std::fill( std::copy( list.begin(), list.end(),
v_.get() ),
v_.get()+
capacity_, Type() );
3586 template<
typename Type
3589 template<
typename Other
3598 for(
size_t i=0UL; i<N; ++i )
3618 template<
typename Type
3643 template<
typename Type
3651 v_ = std::move( rhs.
v_ );
3654 rhs.capacity_ = 0UL;
3675 template<
typename Type
3678 template<
typename VT >
3713 template<
typename Type
3716 template<
typename VT >
3750 template<
typename Type
3753 template<
typename VT >
3787 template<
typename Type
3790 template<
typename VT >
3807 const MultType tmp( *
this * (~rhs) );
3831 template<
typename Type
3834 template<
typename VT >
3851 const DivType tmp( *
this / (~rhs) );
3872 template<
typename Type
3875 template<
typename Other >
3896 template<
typename Type
3899 template<
typename Other >
3926 template<
typename Type
3943 template<
typename Type
3963 template<
typename Type
3968 size_t nonzeros( 0 );
3970 for(
size_t i=0UL; i<
size_; ++i ) {
3987 template<
typename Type
3993 for(
size_t i=0UL; i<
size_; ++i )
4009 template<
typename Type
4029 template<
typename Type
4059 template<
typename Type
4062 template<
typename Other >
4066 for(
size_t i=0UL; i<
size_; ++i )
4105 template<
typename Type
4140 template<
typename Type
4143 template<
typename Deleter >
4172 template<
typename Type
4175 template<
typename Other >
4178 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
4195 template<
typename Type
4198 template<
typename Other >
4201 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
4217 template<
typename Type
4239 template<
typename Type
4244 return (
size() > SMP_DVECASSIGN_THRESHOLD );
4263 template<
typename Type
4270 return loada( index );
4272 return loadu( index );
4292 template<
typename Type
4307 return loada(
v_.get()+index );
4327 template<
typename Type
4340 return loadu(
v_.get()+index );
4360 template<
typename Type
4389 template<
typename Type
4424 template<
typename Type
4458 template<
typename Type
4490 template<
typename Type
4493 template<
typename VT >
4499 const size_t ipos(
size_ &
size_t(-2) );
4502 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4503 v_[i ] = (~rhs)[i ];
4504 v_[i+1UL] = (~rhs)[i+1UL];
4506 if( ipos < (~rhs).size() )
4507 v_[ipos] = (~rhs)[ipos];
4525 template<
typename Type
4528 template<
typename VT >
4538 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
4545 for( ; i<ipos; i+=SIMDSIZE ) {
4548 for( ; remainder && i<
size_; ++i ) {
4554 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
4561 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
4562 store( i , it.load() ); it += SIMDSIZE;
4563 store( i+SIMDSIZE , it.load() ); it += SIMDSIZE;
4564 store( i+SIMDSIZE*2UL, it.load() ); it += SIMDSIZE;
4565 store( i+SIMDSIZE*3UL, it.load() ); it += SIMDSIZE;
4567 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
4568 store( i, it.load() );
4570 for( ; remainder && i<
size_; ++i, ++it ) {
4591 template<
typename Type
4594 template<
typename VT >
4600 v_[element->index()] = element->value();
4618 template<
typename Type
4621 template<
typename VT >
4627 const size_t ipos(
size_ &
size_t(-2) );
4630 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4631 v_[i ] += (~rhs)[i ];
4632 v_[i+1UL] += (~rhs)[i+1UL];
4634 if( ipos < (~rhs).size() )
4635 v_[ipos] += (~rhs)[ipos];
4653 template<
typename Type
4656 template<
typename VT >
4666 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
4669 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
4676 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
4677 store( i ,
load(i ) + it.load() ); it += SIMDSIZE;
4678 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) + it.load() ); it += SIMDSIZE;
4679 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) + it.load() ); it += SIMDSIZE;
4680 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) + it.load() ); it += SIMDSIZE;
4682 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
4685 for( ; remainder && i<
size_; ++i, ++it ) {
4705 template<
typename Type
4708 template<
typename VT >
4714 v_[element->index()] += element->value();
4732 template<
typename Type
4735 template<
typename VT >
4741 const size_t ipos(
size_ &
size_t(-2) );
4744 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4745 v_[i ] -= (~rhs)[i ];
4746 v_[i+1UL] -= (~rhs)[i+1UL];
4748 if( ipos < (~rhs).size() )
4749 v_[ipos] -= (~rhs)[ipos];
4767 template<
typename Type
4770 template<
typename VT >
4780 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
4783 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
4790 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
4791 store( i ,
load(i ) - it.load() ); it += SIMDSIZE;
4792 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) - it.load() ); it += SIMDSIZE;
4793 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) - it.load() ); it += SIMDSIZE;
4794 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) - it.load() ); it += SIMDSIZE;
4796 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
4799 for( ; remainder && i<
size_; ++i, ++it ) {
4819 template<
typename Type
4822 template<
typename VT >
4828 v_[element->index()] -= element->value();
4846 template<
typename Type
4849 template<
typename VT >
4855 const size_t ipos(
size_ &
size_t(-2) );
4858 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4859 v_[i ] *= (~rhs)[i ];
4860 v_[i+1UL] *= (~rhs)[i+1UL];
4862 if( ipos < (~rhs).size() )
4863 v_[ipos] *= (~rhs)[ipos];
4881 template<
typename Type
4884 template<
typename VT >
4894 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
4897 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
4904 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
4905 store( i ,
load(i ) * it.load() ); it += SIMDSIZE;
4906 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) * it.load() ); it += SIMDSIZE;
4907 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) * it.load() ); it += SIMDSIZE;
4908 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) * it.load() ); it += SIMDSIZE;
4910 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
4913 for( ; remainder && i<
size_; ++i, ++it ) {
4933 template<
typename Type
4936 template<
typename VT >
4946 v_[element->index()] = tmp[element->index()] * element->value();
4964 template<
typename Type
4967 template<
typename VT >
4973 const size_t ipos(
size_ &
size_t(-2) );
4976 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4977 v_[i ] /= (~rhs)[i ];
4978 v_[i+1UL] /= (~rhs)[i+1UL];
4980 if( ipos < (~rhs).size() )
4981 v_[ipos] /= (~rhs)[ipos];
4999 template<
typename Type
5002 template<
typename VT >
5010 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
5013 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
5020 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
5021 store( i ,
load(i ) / it.load() ); it += SIMDSIZE;
5022 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) / it.load() ); it += SIMDSIZE;
5023 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) / it.load() ); it += SIMDSIZE;
5024 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) / it.load() ); it += SIMDSIZE;
5026 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
5029 for( ; i<
size_; ++i, ++it ) {
5052 template<
typename Type,
bool AF,
bool PF,
bool TF >
5055 template<
typename Type,
bool AF,
bool PF,
bool TF >
5058 template<
bool RF,
typename Type,
bool AF,
bool PF,
bool TF >
5061 template<
typename Type,
bool AF,
bool PF,
bool TF >
5064 template<
typename Type,
bool AF,
bool PF,
bool TF >
5077 template<
typename Type
5095 template<
typename Type
5141 return ( v.
size() == 0UL );
5167 template<
typename Type
5186 template<
typename Type
5207 template<
typename T,
bool AF,
bool PF,
bool TF >
5224 template<
typename T,
bool AF,
bool PF,
bool TF >
5241 template<
typename T,
bool AF,
bool PF,
bool TF >
5258 template<
typename T,
bool PF,
bool TF >
5275 template<
typename T,
bool AF,
bool TF >
5292 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5293 struct AddTrait< CustomVector<T1,AF,PF,TF>, StaticVector<T2,N,TF> >
5298 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5299 struct AddTrait< StaticVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5304 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5305 struct AddTrait< CustomVector<T1,AF,PF,TF>, HybridVector<T2,N,TF> >
5310 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5311 struct AddTrait< HybridVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5316 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5317 struct AddTrait< CustomVector<T1,AF,PF,TF>, DynamicVector<T2,TF> >
5322 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5323 struct AddTrait< DynamicVector<T1,TF>, CustomVector<T2,AF,PF,TF> >
5328 template<
typename T1,
bool AF1,
bool PF1,
bool TF,
typename T2,
bool AF2,
bool PF2 >
5329 struct AddTrait< CustomVector<T1,AF1,PF1,TF>, CustomVector<T2,AF2,PF2,TF> >
5347 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5348 struct SubTrait< CustomVector<T1,AF,PF,TF>, StaticVector<T2,N,TF> >
5353 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5354 struct SubTrait< StaticVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5359 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5360 struct SubTrait< CustomVector<T1,AF,PF,TF>, HybridVector<T2,N,TF> >
5365 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5366 struct SubTrait< HybridVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5371 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5372 struct SubTrait< CustomVector<T1,AF,PF,TF>, DynamicVector<T2,TF> >
5377 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5378 struct SubTrait< DynamicVector<T1,TF>, CustomVector<T2,AF,PF,TF> >
5383 template<
typename T1,
bool AF1,
bool PF1,
bool TF,
typename T2,
bool AF2,
bool PF2 >
5384 struct SubTrait< CustomVector<T1,AF1,PF1,TF>, CustomVector<T2,AF2,PF2,TF> >
5402 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5403 struct MultTrait< CustomVector<T1,AF,PF,TF>, T2, EnableIf_<IsNumeric<T2> > >
5408 template<
typename T1,
typename T2,
bool AF,
bool PF,
bool TF >
5409 struct MultTrait< T1, CustomVector<T2,AF,PF,TF>, EnableIf_<IsNumeric<T1> > >
5414 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5415 struct MultTrait< CustomVector<T1,AF,PF,TF>, StaticVector<T2,N,TF> >
5420 template<
typename T1,
bool AF,
bool PF,
typename T2,
size_t N >
5421 struct MultTrait< CustomVector<T1,AF,PF,false>, StaticVector<T2,N,true> >
5426 template<
typename T1,
bool AF,
bool PF,
typename T2,
size_t N >
5427 struct MultTrait< CustomVector<T1,AF,PF,true>, StaticVector<T2,N,false> >
5432 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5433 struct MultTrait< StaticVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5438 template<
typename T1,
size_t N,
typename T2,
bool AF,
bool PF >
5439 struct MultTrait< StaticVector<T1,N,false>, CustomVector<T2,AF,PF,true> >
5444 template<
typename T1,
size_t N,
typename T2,
bool AF,
bool PF >
5445 struct MultTrait< StaticVector<T1,N,true>, CustomVector<T2,AF,PF,false> >
5450 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5451 struct MultTrait< CustomVector<T1,AF,PF,TF>, HybridVector<T2,N,TF> >
5456 template<
typename T1,
bool AF,
bool PF,
typename T2,
size_t N >
5457 struct MultTrait< CustomVector<T1,AF,PF,false>, HybridVector<T2,N,true> >
5462 template<
typename T1,
bool AF,
bool PF,
typename T2,
size_t N >
5463 struct MultTrait< CustomVector<T1,AF,PF,true>, HybridVector<T2,N,false> >
5468 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5469 struct MultTrait< HybridVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5474 template<
typename T1,
size_t N,
typename T2,
bool AF,
bool PF >
5475 struct MultTrait< HybridVector<T1,N,false>, CustomVector<T2,AF,PF,true> >
5480 template<
typename T1,
size_t N,
typename T2,
bool AF,
bool PF >
5481 struct MultTrait< HybridVector<T1,N,true>, CustomVector<T2,AF,PF,false> >
5486 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5487 struct MultTrait< CustomVector<T1,AF,PF,TF>, DynamicVector<T2,TF> >
5492 template<
typename T1,
bool AF,
bool PF,
typename T2 >
5493 struct MultTrait< CustomVector<T1,AF,PF,false>, DynamicVector<T2,true> >
5498 template<
typename T1,
bool AF,
bool PF,
typename T2 >
5499 struct MultTrait< CustomVector<T1,AF,PF,true>, DynamicVector<T2,false> >
5504 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5505 struct MultTrait< DynamicVector<T1,TF>, CustomVector<T2,AF,PF,TF> >
5510 template<
typename T1,
typename T2,
bool AF,
bool PF >
5511 struct MultTrait< DynamicVector<T1,false>, CustomVector<T2,AF,PF,true> >
5516 template<
typename T1,
typename T2,
bool AF,
bool PF >
5517 struct MultTrait< DynamicVector<T1,true>, CustomVector<T2,AF,PF,false> >
5522 template<
typename T1,
bool AF1,
bool PF1,
bool TF,
typename T2,
bool AF2,
bool PF2 >
5523 struct MultTrait< CustomVector<T1,AF1,PF1,TF>, CustomVector<T2,AF2,PF2,TF> >
5528 template<
typename T1,
bool AF1,
bool PF1,
typename T2,
bool AF2,
bool PF2 >
5529 struct MultTrait< CustomVector<T1,AF1,PF1,false>, CustomVector<T2,AF2,PF2,true> >
5534 template<
typename T1,
bool AF1,
bool PF1,
typename T2,
bool AF2,
bool PF2 >
5535 struct MultTrait< CustomVector<T1,AF1,PF1,true>, CustomVector<T2,AF2,PF2,false> >
5553 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5554 struct CrossTrait< CustomVector<T1,AF,PF,TF>, StaticVector<T2,3UL,TF> >
5563 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5564 struct CrossTrait< StaticVector<T1,3UL,TF>, CustomVector<T2,AF,PF,TF> >
5573 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5574 struct CrossTrait< CustomVector<T1,AF,PF,TF>, HybridVector<T2,N,TF> >
5583 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5584 struct CrossTrait< HybridVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5593 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5594 struct CrossTrait< CustomVector<T1,AF,PF,TF>, DynamicVector<T2,TF> >
5603 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5604 struct CrossTrait< DynamicVector<T1,TF>, CustomVector<T2,AF,PF,TF> >
5613 template<
typename T1,
bool AF1,
bool PF1,
bool TF,
typename T2,
bool AF2,
bool PF2 >
5614 struct CrossTrait< CustomVector<T1,AF1,PF1,TF>, CustomVector<T2,AF2,PF2,TF> >
5636 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5637 struct DivTrait< CustomVector<T1,AF,PF,TF>, T2, EnableIf_<IsNumeric<T2> > >
5642 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5643 struct DivTrait< CustomVector<T1,AF,PF,TF>, StaticVector<T2,N,TF> >
5648 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5649 struct DivTrait< StaticVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5654 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5655 struct DivTrait< CustomVector<T1,AF,PF,TF>, HybridVector<T2,N,TF> >
5660 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5661 struct DivTrait< HybridVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5666 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5667 struct DivTrait< CustomVector<T1,AF,PF,TF>, DynamicVector<T2,TF> >
5672 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5673 struct DivTrait< DynamicVector<T1,TF>, CustomVector<T2,AF,PF,TF> >
5678 template<
typename T1,
bool AF1,
bool PF1,
bool TF,
typename T2,
bool AF2,
bool PF2 >
5679 struct DivTrait< CustomVector<T1,AF1,PF1,TF>, CustomVector<T2,AF2,PF2,TF> >
5697 template<
typename T1,
bool AF,
bool PF,
bool TF >
Compile time check for vectorizable types.Depending on the available instruction set (SSE...
Definition: IsVectorizable.h:133
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.
Availability of a SIMD subtraction for the given data types.Depending on the available instruction se...
Definition: HasSIMDSub.h:163
constexpr bool useOptimizedKernels
Configuration switch for optimized kernels.This configuration switch enables/disables all optimized c...
Definition: Optimizations.h:84
DenseVector< This, TF > BaseType
Base type of this CustomVector instance.
Definition: CustomVector.h:427
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
Header file for the alignment flag values.
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
CustomVector()
The default constructor for CustomVector.
Definition: CustomVector.h:746
Iterator begin() noexcept
Returns an iterator to the first element of the custom vector.
Definition: CustomVector.h:1096
Header file for basic type definitions.
No-delete policy class.
Definition: NoDelete.h:51
Header file for the SparseVector base class.
size_t size_
The size/dimension of the custom vector.
Definition: CustomVector.h:709
const Type & ReturnType
Return type for expression template evaluations.
Definition: CustomVector.h:432
const Type * ConstPointer
Pointer to a constant vector value.
Definition: CustomVector.h:438
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
EnableIf_< IsDenseMatrix< MT1 > > smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
const Type & ConstReference
Reference to a constant vector value.
Definition: CustomVector.h:436
Header file for the serial shim.
constexpr size_t cacheSize
Cache size of the target architecture.This setting specifies the available cache size in Byte of the ...
Definition: CacheSize.h:48
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
BLAZE_ALWAYS_INLINE T1 & operator/=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Division assignment operator for the division of two SIMD packs.
Definition: BasicTypes.h:1339
BLAZE_ALWAYS_INLINE SIMDType load(size_t index) const noexcept
Load of a SIMD element of the vector.
Definition: CustomVector.h:2009
Iterator end() noexcept
Returns an iterator just past the last element of the custom vector.
Definition: CustomVector.h:1147
void swap(CustomVector &v) noexcept
Swapping the contents of two vectors.
Definition: CustomVector.h:1706
CustomVector & operator=(const Type &rhs)
Homogenous assignment to all vector elements.
Definition: CustomVector.h:1206
Availability of a SIMD multiplication for the given data types.Depending on the available instruction...
Definition: HasSIMDMult.h:162
typename SIMDTrait< T >::Type SIMDTrait_
Auxiliary alias declaration for the SIMDTrait class template.The SIMDTrait_ alias declaration provide...
Definition: SIMDTrait.h:315
EnableIf_< IsDenseVector< VT1 > > smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:193
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
DynamicVector< Type,!TF > TransposeType
Transpose type for expression template evaluations.
Definition: CustomVector.h:429
Header file for the IsIntegral type trait.
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:163
#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
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
Efficient implementation of an arbitrary sized vector.The DynamicVector class template is the represe...
Definition: DynamicVector.h:177
System settings for performance optimizations.
Efficient implementation of a dynamic matrix.The DynamicMatrix class template is the representation ...
Definition: DynamicMatrix.h:204
BLAZE_ALWAYS_INLINE T1 & operator*=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Multiplication assignment operator for the multiplication of two SIMD packs.
Definition: BasicTypes.h:1321
Compile time check for data types.This type trait tests whether or not the given types can be combine...
Definition: IsSIMDCombinable.h:120
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
BLAZE_ALWAYS_INLINE void storeu(size_t index, const SIMDType &value) noexcept
Unaligned store of a SIMD element of the vector.
Definition: CustomVector.h:2162
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
EnableIf_< IsDenseMatrix< MT1 > > smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
Header file for the implementation of an arbitrarily sized vector.
Header file for the NoDelete policy classes.
Constraint on the data type.
Base template for the CrossTrait class.
Definition: CrossTrait.h:110
Efficient implementation of a fixed-sized vector.The StaticVector class template is the representatio...
Definition: Forward.h:61
size_t capacity_
The current capacity of the pointer array.
Definition: CompressedMatrix.h:3137
Header file for the std::initializer_list aliases.
Base template for the SubvectorTrait class.
Definition: SubvectorTrait.h:120
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
BLAZE_ALWAYS_INLINE SIMDType loadu(size_t index) const noexcept
Unaligned load of a SIMD element of the vector.
Definition: CustomVector.h:2071
Header file for the DisableIf class template.
size_t size() const noexcept
Returns the size/dimension of the vector.
Definition: CustomVector.h:1609
Header file for the IsCustom type trait.
Header file for the multiplication trait.
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#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:5635
constexpr bool useStreaming
Configuration of the streaming behavior.For large vectors and matrices non-temporal stores can provid...
Definition: Optimizations.h:68
constexpr bool defaultTransposeFlag
The default transpose flag for all vectors of the Blaze library.This value specifies the default tran...
Definition: TransposeFlag.h:56
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
Header file for the IsSMPAssignable type trait.
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
EnableIf_< IsDenseMatrix< MT1 > > smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
const bool padded
Padding flag for padded vectors and matrices.Via this flag it is possible to specify custom vectors a...
Definition: PaddingFlag.h:86
BLAZE_ALWAYS_INLINE void stream(size_t index, const SIMDType &value) noexcept
Aligned, non-temporal store of a SIMD element of the vector.
Definition: CustomVector.h:2194
#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.
void clear()
Clearing the vector to its default state.
Definition: CustomVector.h:1688
Header file for the subvector trait.
Header file for all SIMD functionality.
DenseIterator< const Type, AF > ConstIterator
Iterator over constant elements.
Definition: CustomVector.h:441
Constraint on the data type.
boost::shared_array< Type > v_
The custom array of elements.
Definition: CustomVector.h:710
Availability of a SIMD division for the given data types.Depending on the available instruction set (...
Definition: HasSIMDDiv.h:144
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Compile time check for sparse vector types.This type trait tests whether or not the given template pa...
Definition: IsSparseVector.h:78
Constraint on the data type.
Efficient implementation of a customizable vector.
Definition: CustomVector.h:422
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
Compile time check for custom data types.This type trait tests whether the given data type is a custo...
Definition: IsCustom.h:84
void reset()
Reset to the default initial values.
Definition: CustomVector.h:1667
ConstIterator cbegin() const noexcept
Returns an iterator to the first element of the custom vector.
Definition: CustomVector.h:1130
#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
BLAZE_ALWAYS_INLINE void storea(size_t index, const SIMDType &value) noexcept
Aligned store of a SIMD element of the vector.
Definition: CustomVector.h:2129
CustomVector< Type, AF, PF, TF > Other
The type of the other CustomVector.
Definition: CustomVector.h:458
Header file for the exception macros of the math module.
ConstIterator cend() const noexcept
Returns an iterator just past the last element of the custom vector.
Definition: CustomVector.h:1181
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsSMPAssignable.h:119
DenseIterator< Type, AF > Iterator
Iterator over non-constant elements.
Definition: CustomVector.h:440
Constraint on the data type.
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for the IsPadded type trait.
DynamicVector< Type, TF > ResultType
Result type for expression template evaluations.
Definition: CustomVector.h:428
typename DivTrait< T1, T2 >::Type DivTrait_
Auxiliary alias declaration for the DivTrait class template.The DivTrait_ alias declaration provides ...
Definition: DivTrait.h:245
CustomVector< NewType, AF, PF, TF > Other
The type of the other CustomVector.
Definition: CustomVector.h:449
Header file for the IsVectorizable type trait.
Resize mechanism to obtain a CustomVector with a different fixed number of elements.
Definition: CustomVector.h:457
bool canSMPAssign() const noexcept
Returns whether the vector can be used in SMP assignments.
Definition: CustomVector.h:1985
Header file for the IsNumeric type trait.
Header file for the HasConstDataAccess type trait.
SIMDTrait_< ElementType > SIMDType
SIMD type of the vector elements.
Definition: CustomVector.h:431
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
Header file for the IsSIMDCombinable type trait.
Header file for the IsSparseVector type trait.
size_t capacity() const noexcept
Returns the maximum capacity of the vector.
Definition: CustomVector.h:1625
Header file for the HasSIMDMult type trait.
Rebind mechanism to obtain a CustomVector with different data/element type.
Definition: CustomVector.h:448
Type * Pointer
Pointer to a non-constant vector value.
Definition: CustomVector.h:437
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:1285
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:143
Pointer data() noexcept
Low-level data access to the vector elements.
Definition: CustomVector.h:1060
bool isAliased(const Other *alias) const noexcept
Returns whether the vector is aliased with the given address alias.
Definition: CustomVector.h:1944
Base template for the MultTrait class.
Definition: MultTrait.h:143
Header file for the addition trait.
Header file for the cross product trait.
Header file for the division trait.
Constraint on the data type.
EnableIf_< IsDenseVector< VT1 > > smpDivAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP division assignment of a vector to a dense vector.
Definition: DenseVector.h:222
SIMD characteristics of data types.The SIMDTrait class template provides the SIMD characteristics of ...
Definition: SIMDTrait.h:296
Header file for the cache size of the target architecture.
#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
Reference at(size_t index)
Checked access to the vector elements.
Definition: CustomVector.h:1013
Header file for the isDefault shim.
Type & Reference
Reference to a non-constant vector value.
Definition: CustomVector.h:435
BLAZE_ALWAYS_INLINE void store(size_t index, const SIMDType &value) noexcept
Store of a SIMD element of the vector.
Definition: CustomVector.h:2102
Constraint on the data type.
Header file for the HasSIMDSub type trait.
bool isAligned() const noexcept
Returns whether the vector is properly aligned in memory.
Definition: CustomVector.h:1964
Header file for the HasMutableDataAccess type trait.
#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
bool canAlias(const Other *alias) const noexcept
Returns whether the vector can alias with the given address alias.
Definition: CustomVector.h:1922
Reference operator[](size_t index) noexcept
Subscript operator for the direct access to the vector elements.
Definition: CustomVector.h:968
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
Base template for the DivTrait class.
Definition: DivTrait.h:143
Header file for the padding flag values.
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:58
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
BLAZE_ALWAYS_INLINE SIMDType loada(size_t index) const noexcept
Aligned load of a SIMD element of the vector.
Definition: CustomVector.h:2037
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
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:164
Header file for the default transpose flag for all vectors of the Blaze library.
Initializer list type 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:120
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:249
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Base template for the SubTrait class.
Definition: SubTrait.h:143
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:1303
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
Type ElementType
Type of the vector elements.
Definition: CustomVector.h:430
CustomVector< Type, AF, PF, TF > This
Type of this CustomVector instance.
Definition: CustomVector.h:426
System settings for the inline keywords.
const CustomVector & CompositeType
Data type for composite expression templates.
Definition: CustomVector.h:433
#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
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: CustomVector.h:1644
#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 TrueType type/value trait base class.