35 #ifndef _BLAZE_MATH_DENSE_CUSTOMVECTOR_H_ 36 #define _BLAZE_MATH_DENSE_CUSTOMVECTOR_H_ 393 template<
typename Type
396 ,
bool TF = defaultTransposeFlag >
398 :
public DenseVector< CustomVector<Type,AF,PF,TF>, TF >
428 template<
typename NewType >
437 template<
size_t NewN >
463 explicit inline CustomVector( Type* ptr,
size_t n,
size_t nn );
498 template<
typename Other,
size_t N >
511 template<
typename Other >
514 template<
typename Other >
522 inline size_t size()
const noexcept;
523 inline size_t spacing()
const noexcept;
524 inline size_t capacity()
const noexcept;
542 inline void reset( Type* ptr,
size_t n );
543 inline void reset( Type* ptr,
size_t n,
size_t nn );
550 template<
typename VT >
552 struct VectorizedAssign {
553 enum :
bool { value = useOptimizedKernels &&
554 simdEnabled && VT::simdEnabled &&
562 template<
typename VT >
564 struct VectorizedAddAssign {
565 enum :
bool { value = useOptimizedKernels &&
566 simdEnabled && VT::simdEnabled &&
575 template<
typename VT >
577 struct VectorizedSubAssign {
578 enum :
bool { value = useOptimizedKernels &&
579 simdEnabled && VT::simdEnabled &&
588 template<
typename VT >
590 struct VectorizedMultAssign {
591 enum :
bool { value = useOptimizedKernels &&
592 simdEnabled && VT::simdEnabled &&
601 template<
typename VT >
603 struct VectorizedDivAssign {
604 enum :
bool { value = useOptimizedKernels &&
605 simdEnabled && VT::simdEnabled &&
621 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
622 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
636 template<
typename VT >
639 template<
typename VT >
644 template<
typename VT >
647 template<
typename VT >
652 template<
typename VT >
655 template<
typename VT >
660 template<
typename VT >
663 template<
typename VT >
668 template<
typename VT >
671 template<
typename VT >
712 template<
typename Type
741 template<
typename Type
749 if( ptr ==
nullptr ) {
782 template<
typename Type
804 template<
typename Type
820 template<
typename Type
853 template<
typename Type
875 template<
typename Type
898 template<
typename Type
905 if( index >=
size_ ) {
908 return (*
this)[index];
923 template<
typename Type
930 if( index >=
size_ ) {
933 return (*
this)[index];
945 template<
typename Type
964 template<
typename Type
981 template<
typename Type
998 template<
typename Type
1015 template<
typename Type
1032 template<
typename Type
1049 template<
typename Type
1066 template<
typename Type
1092 template<
typename Type
1098 for(
size_t i=0UL; i<
size_; ++i )
1129 template<
typename Type
1135 if( list.size() >
size_ ) {
1139 std::fill( std::copy( list.begin(), list.end(),
v_ ),
v_+
size_, Type() );
1173 template<
typename Type
1177 template<
typename Other
1185 for(
size_t i=0UL; i<N; ++i )
1203 template<
typename Type
1226 template<
typename Type
1256 template<
typename Type
1260 template<
typename VT >
1292 template<
typename Type
1296 template<
typename VT >
1327 template<
typename Type
1331 template<
typename VT >
1362 template<
typename Type
1366 template<
typename VT >
1382 const MultType tmp( *
this * (~rhs) );
1406 template<
typename Type
1410 template<
typename VT >
1428 const DivType tmp( *
this / (~rhs) );
1451 template<
typename Type
1455 template<
typename VT >
1458 using blaze::assign;
1469 if(
size_ != 3UL || (~rhs).
size() != 3UL ) {
1473 const CrossType tmp( *
this % (~rhs) );
1474 assign( *
this, tmp );
1488 template<
typename Type
1492 template<
typename Other >
1511 template<
typename Type
1515 template<
typename Other >
1540 template<
typename Type
1559 template<
typename Type
1575 template<
typename Type
1594 template<
typename Type
1600 size_t nonzeros( 0 );
1602 for(
size_t i=0UL; i<
size_; ++i ) {
1617 template<
typename Type
1624 for(
size_t i=0UL; i<
size_; ++i )
1638 template<
typename Type
1656 template<
typename Type
1699 template<
typename Type
1703 template<
typename Other >
1706 for(
size_t i=0UL; i<
size_; ++i )
1743 template<
typename Type
1780 template<
typename Type
1811 template<
typename Type
1815 template<
typename Other >
1818 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1833 template<
typename Type
1837 template<
typename Other >
1840 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1854 template<
typename Type
1875 template<
typename Type
1881 return (
size() > SMP_DVECASSIGN_THRESHOLD );
1898 template<
typename Type
1906 return loada( index );
1908 return loadu( index );
1926 template<
typename Type
1960 template<
typename Type
1992 template<
typename Type
2019 template<
typename Type
2052 template<
typename Type
2084 template<
typename Type
2115 template<
typename Type
2119 template<
typename VT >
2125 const size_t ipos(
size_ &
size_t(-2) );
2128 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2129 v_[i ] = (~rhs)[i ];
2130 v_[i+1UL] = (~rhs)[i+1UL];
2132 if( ipos < (~rhs).size() )
2133 v_[ipos] = (~rhs)[ipos];
2149 template<
typename Type
2153 template<
typename VT >
2161 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
2164 if( AF && useStreaming &&
size_ > ( cacheSize/(
sizeof(Type) * 3UL ) ) && !(~rhs).
isAliased(
this ) )
2168 for( ; i<ipos; i+=SIMDSIZE ) {
2171 for( ; i<
size_; ++i ) {
2177 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
2184 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
2185 store( i , it.load() ); it += SIMDSIZE;
2186 store( i+SIMDSIZE , it.load() ); it += SIMDSIZE;
2187 store( i+SIMDSIZE*2UL, it.load() ); it += SIMDSIZE;
2188 store( i+SIMDSIZE*3UL, it.load() ); it += SIMDSIZE;
2190 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
2191 store( i, it.load() );
2193 for( ; i<
size_; ++i, ++it ) {
2212 template<
typename Type
2216 template<
typename VT >
2222 v_[element->index()] = element->value();
2238 template<
typename Type
2242 template<
typename VT >
2248 const size_t ipos(
size_ &
size_t(-2) );
2251 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2252 v_[i ] += (~rhs)[i ];
2253 v_[i+1UL] += (~rhs)[i+1UL];
2255 if( ipos < (~rhs).size() )
2256 v_[ipos] += (~rhs)[ipos];
2272 template<
typename Type
2276 template<
typename VT >
2284 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
2287 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
2294 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
2295 store( i ,
load(i ) + it.load() ); it += SIMDSIZE;
2296 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) + it.load() ); it += SIMDSIZE;
2297 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) + it.load() ); it += SIMDSIZE;
2298 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) + it.load() ); it += SIMDSIZE;
2300 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
2303 for( ; i<
size_; ++i, ++it ) {
2321 template<
typename Type
2325 template<
typename VT >
2331 v_[element->index()] += element->value();
2347 template<
typename Type
2351 template<
typename VT >
2357 const size_t ipos(
size_ &
size_t(-2) );
2360 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2361 v_[i ] -= (~rhs)[i ];
2362 v_[i+1UL] -= (~rhs)[i+1UL];
2364 if( ipos < (~rhs).size() )
2365 v_[ipos] -= (~rhs)[ipos];
2381 template<
typename Type
2385 template<
typename VT >
2393 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
2396 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
2403 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
2404 store( i ,
load(i ) - it.load() ); it += SIMDSIZE;
2405 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) - it.load() ); it += SIMDSIZE;
2406 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) - it.load() ); it += SIMDSIZE;
2407 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) - it.load() ); it += SIMDSIZE;
2409 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
2412 for( ; i<
size_; ++i, ++it ) {
2430 template<
typename Type
2434 template<
typename VT >
2440 v_[element->index()] -= element->value();
2456 template<
typename Type
2460 template<
typename VT >
2466 const size_t ipos(
size_ &
size_t(-2) );
2469 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2470 v_[i ] *= (~rhs)[i ];
2471 v_[i+1UL] *= (~rhs)[i+1UL];
2473 if( ipos < (~rhs).size() )
2474 v_[ipos] *= (~rhs)[ipos];
2490 template<
typename Type
2494 template<
typename VT >
2502 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
2505 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
2512 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
2513 store( i ,
load(i ) * it.load() ); it += SIMDSIZE;
2514 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) * it.load() ); it += SIMDSIZE;
2515 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) * it.load() ); it += SIMDSIZE;
2516 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) * it.load() ); it += SIMDSIZE;
2518 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
2521 for( ; i<
size_; ++i, ++it ) {
2539 template<
typename Type
2543 template<
typename VT >
2553 v_[element->index()] = tmp[element->index()] * element->value();
2569 template<
typename Type
2573 template<
typename VT >
2579 const size_t ipos(
size_ &
size_t(-2) );
2582 for(
size_t i=0UL; i<ipos; i+=2UL ) {
2583 v_[i ] /= (~rhs)[i ];
2584 v_[i+1UL] /= (~rhs)[i+1UL];
2586 if( ipos < (~rhs).size() )
2587 v_[ipos] /= (~rhs)[ipos];
2603 template<
typename Type
2607 template<
typename VT >
2615 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
2618 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
2625 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
2626 store( i ,
load(i ) / it.load() ); it += SIMDSIZE;
2627 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) / it.load() ); it += SIMDSIZE;
2628 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) / it.load() ); it += SIMDSIZE;
2629 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) / it.load() ); it += SIMDSIZE;
2631 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
2634 for( ; i<
size_; ++i, ++it ) {
2661 template<
typename Type
2665 :
public DenseVector< CustomVector<Type,AF,padded,TF>, TF >
2695 template<
typename NewType >
2704 template<
size_t NewN >
2729 explicit inline CustomVector( Type* ptr,
size_t n,
size_t nn );
2764 template<
typename Other,
size_t N >
2777 template<
typename Other >
2778 inline EnableIf_<IsNumeric<Other>,
CustomVector >& operator*=( Other rhs );
2780 template<
typename Other >
2781 inline EnableIf_<IsNumeric<Other>,
CustomVector >& operator/=( Other rhs );
2788 inline size_t size()
const noexcept;
2789 inline size_t spacing()
const noexcept;
2790 inline size_t capacity()
const noexcept;
2792 inline void reset();
2793 inline void clear();
2801 template<
typename Other >
inline CustomVector& scale(
const Other& scalar );
2808 inline void reset( Type* ptr,
size_t n,
size_t nn );
2815 template<
typename VT >
2816 struct VectorizedAssign {
2817 enum :
bool { value = useOptimizedKernels &&
2818 simdEnabled && VT::simdEnabled &&
2825 template<
typename VT >
2826 struct VectorizedAddAssign {
2827 enum :
bool { value = useOptimizedKernels &&
2828 simdEnabled && VT::simdEnabled &&
2836 template<
typename VT >
2837 struct VectorizedSubAssign {
2838 enum :
bool { value = useOptimizedKernels &&
2839 simdEnabled && VT::simdEnabled &&
2847 template<
typename VT >
2848 struct VectorizedMultAssign {
2849 enum :
bool { value = useOptimizedKernels &&
2850 simdEnabled && VT::simdEnabled &&
2858 template<
typename VT >
2859 struct VectorizedDivAssign {
2860 enum :
bool { value = useOptimizedKernels &&
2861 simdEnabled && VT::simdEnabled &&
2876 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
2877 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
2879 inline bool isAligned ()
const noexcept;
2891 template<
typename VT >
2894 template<
typename VT >
2899 template<
typename VT >
2902 template<
typename VT >
2907 template<
typename VT >
2910 template<
typename VT >
2915 template<
typename VT >
2918 template<
typename VT >
2923 template<
typename VT >
2926 template<
typename VT >
2968 template<
typename Type
3002 template<
typename Type
3010 if( ptr ==
nullptr ) {
3039 template<
typename Type
3057 template<
typename Type
3093 template<
typename Type
3116 template<
typename Type
3140 template<
typename Type
3146 if( index >=
size_ ) {
3149 return (*
this)[index];
3166 template<
typename Type
3172 if( index >=
size_ ) {
3175 return (*
this)[index];
3189 template<
typename Type
3209 template<
typename Type
3227 template<
typename Type
3245 template<
typename Type
3263 template<
typename Type
3281 template<
typename Type
3299 template<
typename Type
3317 template<
typename Type
3344 template<
typename Type
3350 for(
size_t i=0UL; i<
size_; ++i )
3383 template<
typename Type
3389 if( list.size() >
size_ ) {
3393 std::fill( std::copy( list.begin(), list.end(),
v_ ),
v_+
capacity_, Type() );
3429 template<
typename Type
3432 template<
typename Other
3441 for(
size_t i=0UL; i<N; ++i )
3461 template<
typename Type
3486 template<
typename Type
3497 rhs.capacity_ = 0UL;
3519 template<
typename Type
3522 template<
typename VT >
3557 template<
typename Type
3560 template<
typename VT >
3594 template<
typename Type
3597 template<
typename VT >
3631 template<
typename Type
3634 template<
typename VT >
3651 const MultType tmp( *
this * (~rhs) );
3677 template<
typename Type
3680 template<
typename VT >
3698 const DivType tmp( *
this / (~rhs) );
3723 template<
typename Type
3726 template<
typename VT >
3730 using blaze::assign;
3741 if(
size_ != 3UL || (~rhs).
size() != 3UL ) {
3745 const CrossType tmp( *
this % (~rhs) );
3746 assign( *
this, tmp );
3762 template<
typename Type
3765 template<
typename Other >
3786 template<
typename Type
3789 template<
typename Other >
3816 template<
typename Type
3836 template<
typename Type
3853 template<
typename Type
3873 template<
typename Type
3878 size_t nonzeros( 0 );
3880 for(
size_t i=0UL; i<
size_; ++i ) {
3897 template<
typename Type
3903 for(
size_t i=0UL; i<
size_; ++i )
3919 template<
typename Type
3939 template<
typename Type
3984 template<
typename Type
3987 template<
typename Other >
3991 for(
size_t i=0UL; i<
size_; ++i )
4030 template<
typename Type
4061 template<
typename Type
4064 template<
typename Other >
4067 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
4084 template<
typename Type
4087 template<
typename Other >
4090 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
4106 template<
typename Type
4128 template<
typename Type
4133 return (
size() > SMP_DVECASSIGN_THRESHOLD );
4152 template<
typename Type
4159 return loada( index );
4161 return loadu( index );
4181 template<
typename Type
4216 template<
typename Type
4249 template<
typename Type
4278 template<
typename Type
4313 template<
typename Type
4347 template<
typename Type
4379 template<
typename Type
4382 template<
typename VT >
4388 const size_t ipos(
size_ &
size_t(-2) );
4391 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4392 v_[i ] = (~rhs)[i ];
4393 v_[i+1UL] = (~rhs)[i+1UL];
4395 if( ipos < (~rhs).size() )
4396 v_[ipos] = (~rhs)[ipos];
4414 template<
typename Type
4417 template<
typename VT >
4427 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
4430 if( AF && useStreaming &&
size_ > ( cacheSize/(
sizeof(Type) * 3UL ) ) && !(~rhs).
isAliased(
this ) )
4434 for( ; i<ipos; i+=SIMDSIZE ) {
4437 for( ; remainder && i<
size_; ++i ) {
4443 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
4450 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
4451 store( i , it.load() ); it += SIMDSIZE;
4452 store( i+SIMDSIZE , it.load() ); it += SIMDSIZE;
4453 store( i+SIMDSIZE*2UL, it.load() ); it += SIMDSIZE;
4454 store( i+SIMDSIZE*3UL, it.load() ); it += SIMDSIZE;
4456 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
4457 store( i, it.load() );
4459 for( ; remainder && i<
size_; ++i, ++it ) {
4480 template<
typename Type
4483 template<
typename VT >
4489 v_[element->index()] = element->value();
4507 template<
typename Type
4510 template<
typename VT >
4516 const size_t ipos(
size_ &
size_t(-2) );
4519 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4520 v_[i ] += (~rhs)[i ];
4521 v_[i+1UL] += (~rhs)[i+1UL];
4523 if( ipos < (~rhs).size() )
4524 v_[ipos] += (~rhs)[ipos];
4542 template<
typename Type
4545 template<
typename VT >
4555 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
4558 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
4565 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
4566 store( i ,
load(i ) + it.load() ); it += SIMDSIZE;
4567 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) + it.load() ); it += SIMDSIZE;
4568 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) + it.load() ); it += SIMDSIZE;
4569 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) + it.load() ); it += SIMDSIZE;
4571 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
4574 for( ; remainder && i<
size_; ++i, ++it ) {
4594 template<
typename Type
4597 template<
typename VT >
4603 v_[element->index()] += element->value();
4621 template<
typename Type
4624 template<
typename VT >
4630 const size_t ipos(
size_ &
size_t(-2) );
4633 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4634 v_[i ] -= (~rhs)[i ];
4635 v_[i+1UL] -= (~rhs)[i+1UL];
4637 if( ipos < (~rhs).size() )
4638 v_[ipos] -= (~rhs)[ipos];
4656 template<
typename Type
4659 template<
typename VT >
4669 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
4672 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
4679 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
4680 store( i ,
load(i ) - it.load() ); it += SIMDSIZE;
4681 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) - it.load() ); it += SIMDSIZE;
4682 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) - it.load() ); it += SIMDSIZE;
4683 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) - it.load() ); it += SIMDSIZE;
4685 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
4688 for( ; remainder && i<
size_; ++i, ++it ) {
4708 template<
typename Type
4711 template<
typename VT >
4717 v_[element->index()] -= element->value();
4735 template<
typename Type
4738 template<
typename VT >
4744 const size_t ipos(
size_ &
size_t(-2) );
4747 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4748 v_[i ] *= (~rhs)[i ];
4749 v_[i+1UL] *= (~rhs)[i+1UL];
4751 if( ipos < (~rhs).size() )
4752 v_[ipos] *= (~rhs)[ipos];
4770 template<
typename Type
4773 template<
typename VT >
4783 const size_t ipos( ( remainder )?(
size_ &
size_t(-SIMDSIZE) ):(
size_ ) );
4786 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
4793 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
4794 store( i ,
load(i ) * it.load() ); it += SIMDSIZE;
4795 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) * it.load() ); it += SIMDSIZE;
4796 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) * it.load() ); it += SIMDSIZE;
4797 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) * it.load() ); it += SIMDSIZE;
4799 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
4802 for( ; remainder && i<
size_; ++i, ++it ) {
4822 template<
typename Type
4825 template<
typename VT >
4835 v_[element->index()] = tmp[element->index()] * element->value();
4853 template<
typename Type
4856 template<
typename VT >
4862 const size_t ipos(
size_ &
size_t(-2) );
4865 for(
size_t i=0UL; i<ipos; i+=2UL ) {
4866 v_[i ] /= (~rhs)[i ];
4867 v_[i+1UL] /= (~rhs)[i+1UL];
4869 if( ipos < (~rhs).size() )
4870 v_[ipos] /= (~rhs)[ipos];
4888 template<
typename Type
4891 template<
typename VT >
4899 const size_t ipos(
size_ &
size_t(-SIMDSIZE) );
4902 const size_t i4way(
size_ &
size_t(-SIMDSIZE*4) );
4909 for( ; i<i4way; i+=SIMDSIZE*4UL ) {
4910 store( i ,
load(i ) / it.load() ); it += SIMDSIZE;
4911 store( i+SIMDSIZE ,
load(i+SIMDSIZE ) / it.load() ); it += SIMDSIZE;
4912 store( i+SIMDSIZE*2UL,
load(i+SIMDSIZE*2UL) / it.load() ); it += SIMDSIZE;
4913 store( i+SIMDSIZE*3UL,
load(i+SIMDSIZE*3UL) / it.load() ); it += SIMDSIZE;
4915 for( ; i<ipos; i+=SIMDSIZE, it+=SIMDSIZE ) {
4918 for( ; i<
size_; ++i, ++it ) {
4941 template<
typename Type,
bool AF,
bool PF,
bool TF >
4944 template<
typename Type,
bool AF,
bool PF,
bool TF >
4947 template<
bool RF,
typename Type,
bool AF,
bool PF,
bool TF >
4950 template<
typename Type,
bool AF,
bool PF,
bool TF >
4953 template<
typename Type,
bool AF,
bool PF,
bool TF >
4966 template<
typename Type
4984 template<
typename Type
5030 return ( v.
size() == 0UL );
5056 template<
typename Type
5075 template<
typename Type
5096 template<
typename T,
bool AF,
bool PF,
bool TF >
5114 template<
typename T,
bool AF,
bool PF,
bool TF >
5132 template<
typename T,
bool AF,
bool PF,
bool TF >
5133 struct IsCustom< CustomVector<T,AF,PF,TF> >
5150 template<
typename T,
bool PF,
bool TF >
5151 struct IsAligned< CustomVector<T,aligned,PF,TF> >
5168 template<
typename T,
bool AF,
bool TF >
5169 struct IsPadded< CustomVector<T,AF,padded,TF> >
5186 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5187 struct AddTrait< CustomVector<T1,AF,PF,TF>, StaticVector<T2,N,TF> >
5192 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5193 struct AddTrait< StaticVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5198 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5199 struct AddTrait< CustomVector<T1,AF,PF,TF>, HybridVector<T2,N,TF> >
5204 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5205 struct AddTrait< HybridVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5210 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5211 struct AddTrait< CustomVector<T1,AF,PF,TF>, DynamicVector<T2,TF> >
5216 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5217 struct AddTrait< DynamicVector<T1,TF>, CustomVector<T2,AF,PF,TF> >
5222 template<
typename T1,
bool AF1,
bool PF1,
bool TF,
typename T2,
bool AF2,
bool PF2 >
5223 struct AddTrait< CustomVector<T1,AF1,PF1,TF>, CustomVector<T2,AF2,PF2,TF> >
5241 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5242 struct SubTrait< CustomVector<T1,AF,PF,TF>, StaticVector<T2,N,TF> >
5247 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5248 struct SubTrait< StaticVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5253 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5254 struct SubTrait< CustomVector<T1,AF,PF,TF>, HybridVector<T2,N,TF> >
5259 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5260 struct SubTrait< HybridVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5265 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5266 struct SubTrait< CustomVector<T1,AF,PF,TF>, DynamicVector<T2,TF> >
5271 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5272 struct SubTrait< DynamicVector<T1,TF>, CustomVector<T2,AF,PF,TF> >
5277 template<
typename T1,
bool AF1,
bool PF1,
bool TF,
typename T2,
bool AF2,
bool PF2 >
5278 struct SubTrait< CustomVector<T1,AF1,PF1,TF>, CustomVector<T2,AF2,PF2,TF> >
5296 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5297 struct MultTrait< CustomVector<T1,AF,PF,TF>, T2, EnableIf_<IsNumeric<T2> > >
5302 template<
typename T1,
typename T2,
bool AF,
bool PF,
bool TF >
5303 struct MultTrait< T1, CustomVector<T2,AF,PF,TF>, EnableIf_<IsNumeric<T1> > >
5308 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5309 struct MultTrait< CustomVector<T1,AF,PF,TF>, StaticVector<T2,N,TF> >
5314 template<
typename T1,
bool AF,
bool PF,
typename T2,
size_t N >
5315 struct MultTrait< CustomVector<T1,AF,PF,false>, StaticVector<T2,N,true> >
5320 template<
typename T1,
bool AF,
bool PF,
typename T2,
size_t N >
5321 struct MultTrait< CustomVector<T1,AF,PF,true>, StaticVector<T2,N,false> >
5326 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5327 struct MultTrait< StaticVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5332 template<
typename T1,
size_t N,
typename T2,
bool AF,
bool PF >
5333 struct MultTrait< StaticVector<T1,N,false>, CustomVector<T2,AF,PF,true> >
5338 template<
typename T1,
size_t N,
typename T2,
bool AF,
bool PF >
5339 struct MultTrait< StaticVector<T1,N,true>, CustomVector<T2,AF,PF,false> >
5344 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5345 struct MultTrait< CustomVector<T1,AF,PF,TF>, HybridVector<T2,N,TF> >
5350 template<
typename T1,
bool AF,
bool PF,
typename T2,
size_t N >
5351 struct MultTrait< CustomVector<T1,AF,PF,false>, HybridVector<T2,N,true> >
5356 template<
typename T1,
bool AF,
bool PF,
typename T2,
size_t N >
5357 struct MultTrait< CustomVector<T1,AF,PF,true>, HybridVector<T2,N,false> >
5362 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5363 struct MultTrait< HybridVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5368 template<
typename T1,
size_t N,
typename T2,
bool AF,
bool PF >
5369 struct MultTrait< HybridVector<T1,N,false>, CustomVector<T2,AF,PF,true> >
5374 template<
typename T1,
size_t N,
typename T2,
bool AF,
bool PF >
5375 struct MultTrait< HybridVector<T1,N,true>, CustomVector<T2,AF,PF,false> >
5380 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5381 struct MultTrait< CustomVector<T1,AF,PF,TF>, DynamicVector<T2,TF> >
5386 template<
typename T1,
bool AF,
bool PF,
typename T2 >
5387 struct MultTrait< CustomVector<T1,AF,PF,false>, DynamicVector<T2,true> >
5392 template<
typename T1,
bool AF,
bool PF,
typename T2 >
5393 struct MultTrait< CustomVector<T1,AF,PF,true>, DynamicVector<T2,false> >
5398 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5399 struct MultTrait< DynamicVector<T1,TF>, CustomVector<T2,AF,PF,TF> >
5404 template<
typename T1,
typename T2,
bool AF,
bool PF >
5405 struct MultTrait< DynamicVector<T1,false>, CustomVector<T2,AF,PF,true> >
5410 template<
typename T1,
typename T2,
bool AF,
bool PF >
5411 struct MultTrait< DynamicVector<T1,true>, CustomVector<T2,AF,PF,false> >
5416 template<
typename T1,
bool AF1,
bool PF1,
bool TF,
typename T2,
bool AF2,
bool PF2 >
5417 struct MultTrait< CustomVector<T1,AF1,PF1,TF>, CustomVector<T2,AF2,PF2,TF> >
5422 template<
typename T1,
bool AF1,
bool PF1,
typename T2,
bool AF2,
bool PF2 >
5423 struct MultTrait< CustomVector<T1,AF1,PF1,false>, CustomVector<T2,AF2,PF2,true> >
5428 template<
typename T1,
bool AF1,
bool PF1,
typename T2,
bool AF2,
bool PF2 >
5429 struct MultTrait< CustomVector<T1,AF1,PF1,true>, CustomVector<T2,AF2,PF2,false> >
5447 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5448 struct DivTrait< CustomVector<T1,AF,PF,TF>, T2, EnableIf_<IsNumeric<T2> > >
5453 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5454 struct DivTrait< CustomVector<T1,AF,PF,TF>, StaticVector<T2,N,TF> >
5459 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5460 struct DivTrait< StaticVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5465 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5466 struct DivTrait< CustomVector<T1,AF,PF,TF>, HybridVector<T2,N,TF> >
5471 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5472 struct DivTrait< HybridVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5477 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5478 struct DivTrait< CustomVector<T1,AF,PF,TF>, DynamicVector<T2,TF> >
5483 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5484 struct DivTrait< DynamicVector<T1,TF>, CustomVector<T2,AF,PF,TF> >
5489 template<
typename T1,
bool AF1,
bool PF1,
bool TF,
typename T2,
bool AF2,
bool PF2 >
5490 struct DivTrait< CustomVector<T1,AF1,PF1,TF>, CustomVector<T2,AF2,PF2,TF> >
5508 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5509 struct CrossTrait< CustomVector<T1,AF,PF,TF>, StaticVector<T2,3UL,TF> >
5518 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5519 struct CrossTrait< StaticVector<T1,3UL,TF>, CustomVector<T2,AF,PF,TF> >
5528 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N >
5529 struct CrossTrait< CustomVector<T1,AF,PF,TF>, HybridVector<T2,N,TF> >
5538 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF >
5539 struct CrossTrait< HybridVector<T1,N,TF>, CustomVector<T2,AF,PF,TF> >
5548 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2 >
5549 struct CrossTrait< CustomVector<T1,AF,PF,TF>, DynamicVector<T2,TF> >
5558 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF >
5559 struct CrossTrait< DynamicVector<T1,TF>, CustomVector<T2,AF,PF,TF> >
5568 template<
typename T1,
bool AF1,
bool PF1,
bool TF,
typename T2,
bool AF2,
bool PF2 >
5569 struct CrossTrait< CustomVector<T1,AF1,PF1,TF>, CustomVector<T2,AF2,PF2,TF> >
5591 template<
typename T,
bool AF,
bool PF,
bool TF,
typename OP >
5610 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N,
typename OP >
5611 struct BinaryMapTrait< CustomVector<T1,AF,PF,TF>, StaticVector<T2,N,TF>, OP >
5616 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF,
typename OP >
5617 struct BinaryMapTrait< StaticVector<T1,N,TF>, CustomVector<T2,AF,PF,TF>, OP >
5622 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
size_t N,
typename OP >
5623 struct BinaryMapTrait< CustomVector<T1,AF,PF,TF>, HybridVector<T2,N,TF>, OP >
5628 template<
typename T1,
size_t N,
bool TF,
typename T2,
bool AF,
bool PF,
typename OP >
5629 struct BinaryMapTrait< HybridVector<T1,N,TF>, CustomVector<T2,AF,PF,TF>, OP >
5634 template<
typename T1,
bool AF,
bool PF,
bool TF,
typename T2,
typename OP >
5635 struct BinaryMapTrait< CustomVector<T1,AF,PF,TF>, DynamicVector<T2,TF>, OP >
5640 template<
typename T1,
bool TF,
typename T2,
bool AF,
bool PF,
typename OP >
5641 struct BinaryMapTrait< DynamicVector<T1,TF>, CustomVector<T2,AF,PF,TF>, OP >
5646 template<
typename T1,
bool AF1,
bool PF1,
bool TF,
typename T2,
bool AF2,
bool PF2,
typename OP >
5647 struct BinaryMapTrait< CustomVector<T1,AF1,PF1,TF>, CustomVector<T2,AF2,PF2,TF>, OP >
5665 template<
typename T,
bool AF,
bool PF,
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_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: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
const Type & ConstReference
Reference to a constant vector value.
Definition: CustomVector.h:417
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:716
Iterator begin() noexcept
Returns an iterator to the first element of the custom vector.
Definition: CustomVector.h:986
Header file for basic type definitions.
Header file for the SparseVector base class.
size_t size_
The size/dimension of the custom vector.
Definition: CustomVector.h:680
Type * v_
The custom array of elements.
Definition: CustomVector.h:681
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:164
Header file for the serial shim.
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:1411
BLAZE_ALWAYS_INLINE SIMDType load(size_t index) const noexcept
Load of a SIMD element of the vector.
Definition: CustomVector.h:1903
Iterator end() noexcept
Returns an iterator just past the last element of the custom vector.
Definition: CustomVector.h:1037
void swap(CustomVector &v) noexcept
Swapping the contents of two vectors.
Definition: CustomVector.h:1660
CustomVector & operator=(const Type &rhs)
Homogenous assignment to all vector elements.
Definition: CustomVector.h:1096
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
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:224
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:171
#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:250
Efficient implementation of an arbitrary sized vector.The DynamicVector class template is the represe...
Definition: DynamicVector.h:183
System settings for performance optimizations.
Efficient implementation of a dynamic matrix.The DynamicMatrix class template is the representation ...
Definition: DynamicMatrix.h:212
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:1393
Compile time check for data types.This type trait tests whether or not the given types can be combine...
Definition: IsSIMDCombinable.h:120
SIMDTrait_< ElementType > SIMDType
SIMD type of the vector elements.
Definition: CustomVector.h:412
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:2056
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
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:133
Header file for the implementation of an arbitrarily sized vector.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CustomVector.h:413
Constraint on the data type.
Base template for the CrossTrait class.
Definition: CrossTrait.h:116
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:3289
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:1965
Header file for the DisableIf class template.
size_t size() const noexcept
Returns the size/dimension of the vector.
Definition: CustomVector.h:1544
Header file for the IsCustom type trait.
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: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:5924
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:102
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:2088
#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:1642
DenseIterator< const Type, AF > ConstIterator
Iterator over constant elements.
Definition: CustomVector.h:422
Header file for the subvector trait.
const Type * ConstPointer
Pointer to a constant vector value.
Definition: CustomVector.h:419
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:70
Compile time check for sparse vector types.This type trait tests whether or not the given template pa...
Definition: IsSparseVector.h:103
Constraint on the data type.
Efficient implementation of a customizable vector.
Definition: CustomVector.h:397
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:87
void reset()
Reset to the default initial values.
Definition: CustomVector.h:1621
ConstIterator cbegin() const noexcept
Returns an iterator to the first element of the custom vector.
Definition: CustomVector.h:1020
#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
Type & Reference
Reference to a non-constant vector value.
Definition: CustomVector.h:416
Constraint on the data type.
BLAZE_ALWAYS_INLINE void storea(size_t index, const SIMDType &value) noexcept
Aligned store of a SIMD element of the vector.
Definition: CustomVector.h:2023
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:1071
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsSMPAssignable.h:119
typename CrossTrait< T1, T2 >::Type CrossTrait_
Auxiliary alias declaration for the CrossTrait class template.The CrossTrait_ alias declaration provi...
Definition: CrossTrait.h:159
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:580
Header file for the IsPadded type trait.
typename DivTrait< T1, T2 >::Type DivTrait_
Auxiliary alias declaration for the DivTrait class template.The DivTrait_ alias declaration provides ...
Definition: DivTrait.h:250
Header file for the IsVectorizable type trait.
Resize mechanism to obtain a CustomVector with a different fixed number of elements.
Definition: CustomVector.h:438
bool canSMPAssign() const noexcept
Returns whether the vector can be used in SMP assignments.
Definition: CustomVector.h:1879
Header file for the IsNumeric type trait.
Header file for the HasConstDataAccess type trait.
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 RemoveConst type trait.
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:1579
Header file for the HasSIMDMult type trait.
Header file for the binary map trait.
Rebind mechanism to obtain a CustomVector with different data/element type.
Definition: CustomVector.h:429
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:139
Pointer data() noexcept
Low-level data access to the vector elements.
Definition: CustomVector.h:950
bool isAliased(const Other *alias) const noexcept
Returns whether the vector is aliased with the given address alias.
Definition: CustomVector.h:1838
Base template for the MultTrait class.
Definition: MultTrait.h:139
Header file for the addition trait.
Header file for the cross product trait.
Header file for the division trait.
size_t spacing() const noexcept
Returns the minimum capacity of the vector.
Definition: CustomVector.h:1563
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:903
Header file for the isDefault shim.
BLAZE_ALWAYS_INLINE void store(size_t index, const SIMDType &value) noexcept
Store of a SIMD element of the vector.
Definition: CustomVector.h:1996
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:1858
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:819
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:1816
Reference operator[](size_t index) noexcept
Subscript operator for the direct access to the vector elements.
Definition: CustomVector.h:858
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:139
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:1931
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
Type * Pointer
Pointer to a non-constant vector value.
Definition: CustomVector.h:418
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.
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:130
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:252
Type ElementType
Type of the vector elements.
Definition: CustomVector.h:411
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:600
Base template for the SubTrait class.
Definition: SubTrait.h:139
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
DenseIterator< Type, AF > Iterator
Iterator over non-constant elements.
Definition: CustomVector.h:421
Base template for the BinaryMapTrait class.
Definition: BinaryMapTrait.h:119
Base template for the UnaryMapTrait class.
Definition: UnaryMapTrait.h:117
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
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
constexpr bool padded
Padding flag for padded vectors and matrices.Via this flag it is possible to specify custom vectors a...
Definition: PaddingFlag.h:86
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: CustomVector.h:1598
#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.