35 #ifndef _BLAZE_MATH_DENSE_DYNAMICVECTOR_H_
36 #define _BLAZE_MATH_DENSE_DYNAMICVECTOR_H_
161 template<
typename Type
190 template<
typename ET >
217 template<
typename Other >
explicit inline DynamicVector(
size_t n,
const Other* array );
219 template<
typename Other,
size_t N >
223 template<
typename VT >
inline DynamicVector(
const Vector<VT,TF>& v );
238 inline ConstReference
operator[](
size_t index )
const;
239 inline Pointer
data ();
240 inline ConstPointer
data ()
const;
241 inline Iterator
begin ();
242 inline ConstIterator
begin ()
const;
243 inline ConstIterator
cbegin()
const;
244 inline Iterator
end ();
245 inline ConstIterator
end ()
const;
246 inline ConstIterator
cend ()
const;
253 template<
typename Other,
size_t N >
258 template<
typename VT >
inline DynamicVector& operator= (
const Vector<VT,TF>& rhs );
259 template<
typename VT >
inline DynamicVector& operator+=(
const Vector<VT,TF>& rhs );
260 template<
typename VT >
inline DynamicVector& operator-=(
const Vector<VT,TF>& rhs );
261 template<
typename VT >
inline DynamicVector& operator*=(
const Vector<VT,TF>& rhs );
263 template<
typename Other >
264 inline typename EnableIf< IsNumeric<Other>,
DynamicVector >::Type&
265 operator*=( Other rhs );
267 template<
typename Other >
268 inline typename EnableIf< IsNumeric<Other>,
DynamicVector >::Type&
269 operator/=( Other rhs );
276 inline size_t size()
const;
281 inline void resize(
size_t n,
bool preserve=
true );
282 inline void extend(
size_t n,
bool preserve=
true );
283 inline void reserve(
size_t n );
284 template<
typename Other >
inline DynamicVector& scale(
const Other& scalar );
292 template<
typename VT >
294 struct VectorizedAssign {
295 enum { value = vectorizable && VT::vectorizable &&
296 IsSame<Type,typename VT::ElementType>::value };
303 template<
typename VT >
305 struct VectorizedAddAssign {
306 enum { value = vectorizable && VT::vectorizable &&
307 IsSame<Type,typename VT::ElementType>::value &&
308 IntrinsicTrait<Type>::addition };
315 template<
typename VT >
317 struct VectorizedSubAssign {
318 enum { value = vectorizable && VT::vectorizable &&
319 IsSame<Type,typename VT::ElementType>::value &&
320 IntrinsicTrait<Type>::subtraction };
327 template<
typename VT >
329 struct VectorizedMultAssign {
330 enum { value = vectorizable && VT::vectorizable &&
331 IsSame<Type,typename VT::ElementType>::value &&
332 IntrinsicTrait<Type>::multiplication };
341 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
342 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
354 template<
typename VT >
355 inline typename DisableIf< VectorizedAssign<VT> >::Type
356 assign(
const DenseVector<VT,TF>& rhs );
358 template<
typename VT >
359 inline typename EnableIf< VectorizedAssign<VT> >::Type
360 assign(
const DenseVector<VT,TF>& rhs );
362 template<
typename VT >
inline void assign(
const SparseVector<VT,TF>& rhs );
364 template<
typename VT >
365 inline typename DisableIf< VectorizedAddAssign<VT> >::Type
366 addAssign(
const DenseVector<VT,TF>& rhs );
368 template<
typename VT >
369 inline typename EnableIf< VectorizedAddAssign<VT> >::Type
370 addAssign(
const DenseVector<VT,TF>& rhs );
372 template<
typename VT >
inline void addAssign(
const SparseVector<VT,TF>& rhs );
374 template<
typename VT >
375 inline typename DisableIf< VectorizedSubAssign<VT> >::Type
376 subAssign(
const DenseVector<VT,TF>& rhs );
378 template<
typename VT >
379 inline typename EnableIf< VectorizedSubAssign<VT> >::Type
380 subAssign(
const DenseVector<VT,TF>& rhs );
382 template<
typename VT >
inline void subAssign(
const SparseVector<VT,TF>& rhs );
384 template<
typename VT >
385 inline typename DisableIf< VectorizedMultAssign<VT> >::Type
386 multAssign(
const DenseVector<VT,TF>& rhs );
388 template<
typename VT >
389 inline typename EnableIf< VectorizedMultAssign<VT> >::Type
390 multAssign(
const DenseVector<VT,TF>& rhs );
392 template<
typename VT >
inline void multAssign(
const SparseVector<VT,TF>& rhs );
441 template<
typename Type
459 template<
typename Type
482 template<
typename Type
489 for(
size_t i=0UL; i<
size_; ++i )
520 template<
typename Type
522 template<
typename Other >
528 for(
size_t i=0UL; i<n; ++i )
556 template<
typename Type
558 template<
typename Other
565 for(
size_t i=0UL; i<N; ++i )
584 template<
typename Type
604 template<
typename Type
606 template<
typename VT >
608 : size_ ( (~v).
size() )
633 template<
typename Type
656 template<
typename Type
673 template<
typename Type
691 template<
typename Type
707 template<
typename Type
721 template<
typename Type
735 template<
typename Type
749 template<
typename Type
763 template<
typename Type
777 template<
typename Type
791 template<
typename Type
826 template<
typename Type
828 template<
typename Other
834 for(
size_t i=0UL; i<N; ++i )
848 template<
typename Type
852 for(
size_t i=0UL; i<size_; ++i )
868 template<
typename Type
872 if( &rhs ==
this )
return *
this;
890 template<
typename Type
892 template<
typename VT >
895 if( (~rhs).canAlias(
this ) ) {
921 template<
typename Type
923 template<
typename VT >
926 if( (~rhs).
size() != size_ )
927 throw std::invalid_argument(
"Vector sizes do not match" );
929 if( (~rhs).canAlias(
this ) ) {
953 template<
typename Type
955 template<
typename VT >
958 if( (~rhs).
size() != size_ )
959 throw std::invalid_argument(
"Vector sizes do not match" );
961 if( (~rhs).canAlias(
this ) ) {
985 template<
typename Type
987 template<
typename VT >
990 if( (~rhs).
size() != size_ )
991 throw std::invalid_argument(
"Vector sizes do not match" );
1013 template<
typename Type
1015 template<
typename Other >
1034 template<
typename Type
1036 template<
typename Other >
1061 template<
typename Type
1075 template<
typename Type
1092 template<
typename Type
1096 size_t nonzeros( 0 );
1098 for(
size_t i=0UL; i<size_; ++i ) {
1113 template<
typename Type
1118 for(
size_t i=0UL; i<size_; ++i )
1131 template<
typename Type
1169 template<
typename Type
1176 const size_t newCapacity( adjustCapacity( n ) );
1181 std::copy( v_, v_+size_, tmp );
1185 for(
size_t i=size_; i<newCapacity; ++i )
1196 for(
size_t i=n; i<size_; ++i )
1217 template<
typename Type
1221 resize( size_+n, preserve );
1235 template<
typename Type
1242 const size_t newCapacity( adjustCapacity( n ) );
1246 std::copy( v_, v_+size_, tmp );
1249 for(
size_t i=size_; i<newCapacity; ++i )
1268 template<
typename Type
1270 template<
typename Other >
1273 for(
size_t i=0UL; i<size_; ++i )
1287 template<
typename Type
1304 template<
typename Type
1310 else return minCapacity;
1333 template<
typename Type
1335 template<
typename Other >
1338 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1353 template<
typename Type
1355 template<
typename Other >
1358 return static_cast<const void*
>( this ) == static_cast<const void*>( alias );
1372 template<
typename Type
1391 template<
typename Type
1413 template<
typename Type
1426 return load( v_+index );
1444 template<
typename Type
1456 return loadu( v_+index );
1475 template<
typename Type
1487 store( v_+index, value );
1506 template<
typename Type
1517 storeu( v_+index, value );
1536 template<
typename Type
1548 stream( v_+index, value );
1564 template<
typename Type
1566 template<
typename VT >
1572 const size_t ipos( size_ &
size_t(-2) );
1575 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1576 v_[i ] = (~rhs)[i ];
1577 v_[i+1UL] = (~rhs)[i+1UL];
1579 if( ipos < (~rhs).size() )
1580 v_[ipos] = (~rhs)[ipos];
1596 template<
typename Type
1598 template<
typename VT >
1611 for(
size_t i=0UL; i<size_; i+=
IT::size ) {
1617 const size_t ipos( size_ &
size_t(-
IT::size*4) );
1621 for(
size_t i=0UL; i<ipos; i+=
IT::size*4UL ) {
1628 store( v_+i, it.load() );
1646 template<
typename Type
1648 template<
typename VT >
1654 v_[element->index()] = element->value();
1670 template<
typename Type
1672 template<
typename VT >
1678 const size_t ipos( size_ &
size_t(-2) );
1681 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1682 v_[i ] += (~rhs)[i ];
1683 v_[i+1UL] += (~rhs)[i+1UL];
1685 if( ipos < (~rhs).size() )
1686 v_[ipos] += (~rhs)[ipos];
1702 template<
typename Type
1704 template<
typename VT >
1715 const size_t ipos( size_ &
size_t(-
IT::size*4) );
1719 for(
size_t i=0UL; i<ipos; i+=
IT::size*4UL ) {
1743 template<
typename Type
1745 template<
typename VT >
1751 v_[element->index()] += element->value();
1767 template<
typename Type
1769 template<
typename VT >
1775 const size_t ipos( size_ &
size_t(-2) );
1778 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1779 v_[i ] -= (~rhs)[i ];
1780 v_[i+1UL] -= (~rhs)[i+1UL];
1782 if( ipos < (~rhs).size() )
1783 v_[ipos] -= (~rhs)[ipos];
1799 template<
typename Type
1801 template<
typename VT >
1812 const size_t ipos( size_ &
size_t(-
IT::size*4) );
1816 for(
size_t i=0UL; i<ipos; i+=
IT::size*4UL ) {
1840 template<
typename Type
1842 template<
typename VT >
1848 v_[element->index()] -= element->value();
1864 template<
typename Type
1866 template<
typename VT >
1872 const size_t ipos( size_ &
size_t(-2) );
1875 for(
size_t i=0UL; i<ipos; i+=2UL ) {
1876 v_[i ] *= (~rhs)[i ];
1877 v_[i+1UL] *= (~rhs)[i+1UL];
1879 if( ipos < (~rhs).size() )
1880 v_[ipos] *= (~rhs)[ipos];
1896 template<
typename Type
1898 template<
typename VT >
1909 const size_t ipos( size_ &
size_t(-
IT::size*4) );
1913 for(
size_t i=0UL; i<ipos; i+=
IT::size*4UL ) {
1937 template<
typename Type
1939 template<
typename VT >
1949 v_[element->index()] = tmp[element->index()] * element->value();
1965 template<
typename Type,
bool TF >
1968 template<
typename Type,
bool TF >
1971 template<
typename Type,
bool TF >
1974 template<
typename Type,
bool TF >
1977 template<
typename Type,
bool TF >
1990 template<
typename Type
2006 template<
typename Type
2032 template<
typename Type
2036 return ( v.
size() == 0UL );
2050 template<
typename Type
2068 template<
typename Type
2087 template<
typename T,
bool TF >
2088 struct HasConstDataAccess< DynamicVector<T,TF> > :
public TrueType
2107 template<
typename T,
bool TF >
2108 struct HasMutableDataAccess< DynamicVector<T,TF> > :
public TrueType
2127 template<
typename T,
bool TF >
2128 struct IsResizable< DynamicVector<T,TF> > :
public TrueType
2147 template<
typename T1,
bool TF,
typename T2,
size_t N >
2148 struct AddTrait< DynamicVector<T1,TF>, StaticVector<T2,N,TF> >
2150 typedef StaticVector< typename AddTrait<T1,T2>::Type, N, TF > Type;
2153 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2154 struct AddTrait< StaticVector<T1,N,TF>, DynamicVector<T2,TF> >
2156 typedef StaticVector< typename AddTrait<T1,T2>::Type, N, TF > Type;
2159 template<
typename T1,
bool TF,
typename T2,
size_t N >
2160 struct AddTrait< DynamicVector<T1,TF>, HybridVector<T2,N,TF> >
2162 typedef HybridVector< typename AddTrait<T1,T2>::Type, N, TF > Type;
2165 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2166 struct AddTrait< HybridVector<T1,N,TF>, DynamicVector<T2,TF> >
2168 typedef HybridVector< typename AddTrait<T1,T2>::Type, N, TF > Type;
2171 template<
typename T1,
bool TF,
typename T2 >
2172 struct AddTrait< DynamicVector<T1,TF>, DynamicVector<T2,TF> >
2174 typedef DynamicVector< typename AddTrait<T1,T2>::Type, TF > Type;
2190 template<
typename T1,
bool TF,
typename T2,
size_t N >
2191 struct SubTrait< DynamicVector<T1,TF>, StaticVector<T2,N,TF> >
2193 typedef StaticVector< typename SubTrait<T1,T2>::Type, N, TF > Type;
2196 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2197 struct SubTrait< StaticVector<T1,N,TF>, DynamicVector<T2,TF> >
2199 typedef StaticVector< typename SubTrait<T1,T2>::Type, N, TF > Type;
2202 template<
typename T1,
bool TF,
typename T2,
size_t N >
2203 struct SubTrait< DynamicVector<T1,TF>, HybridVector<T2,N,TF> >
2205 typedef HybridVector< typename SubTrait<T1,T2>::Type, N, TF > Type;
2208 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2209 struct SubTrait< HybridVector<T1,N,TF>, DynamicVector<T2,TF> >
2211 typedef HybridVector< typename SubTrait<T1,T2>::Type, N, TF > Type;
2214 template<
typename T1,
bool TF,
typename T2 >
2215 struct SubTrait< DynamicVector<T1,TF>, DynamicVector<T2,TF> >
2217 typedef DynamicVector< typename SubTrait<T1,T2>::Type, TF > Type;
2233 template<
typename T1,
bool TF,
typename T2 >
2234 struct MultTrait< DynamicVector<T1,TF>, T2 >
2236 typedef DynamicVector< typename MultTrait<T1,T2>::Type, TF > Type;
2240 template<
typename T1,
typename T2,
bool TF >
2241 struct MultTrait< T1, DynamicVector<T2,TF> >
2243 typedef DynamicVector< typename MultTrait<T1,T2>::Type, TF > Type;
2247 template<
typename T1,
bool TF,
typename T2,
size_t N >
2248 struct MultTrait< DynamicVector<T1,TF>, StaticVector<T2,N,TF> >
2250 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2253 template<
typename T1,
typename T2,
size_t N >
2254 struct MultTrait< DynamicVector<T1,false>, StaticVector<T2,N,true> >
2256 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2259 template<
typename T1,
typename T2,
size_t N >
2260 struct MultTrait< DynamicVector<T1,true>, StaticVector<T2,N,false> >
2262 typedef typename MultTrait<T1,T2>::Type Type;
2265 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2266 struct MultTrait< StaticVector<T1,N,TF>, DynamicVector<T2,TF> >
2268 typedef StaticVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2271 template<
typename T1,
size_t N,
typename T2 >
2272 struct MultTrait< StaticVector<T1,N,false>, DynamicVector<T2,true> >
2274 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2277 template<
typename T1,
size_t N,
typename T2 >
2278 struct MultTrait< StaticVector<T1,N,true>, DynamicVector<T2,false> >
2280 typedef typename MultTrait<T1,T2>::Type Type;
2283 template<
typename T1,
bool TF,
typename T2,
size_t N >
2284 struct MultTrait< DynamicVector<T1,TF>, HybridVector<T2,N,TF> >
2286 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2289 template<
typename T1,
typename T2,
size_t N >
2290 struct MultTrait< DynamicVector<T1,false>, HybridVector<T2,N,true> >
2292 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2295 template<
typename T1,
typename T2,
size_t N >
2296 struct MultTrait< DynamicVector<T1,true>, HybridVector<T2,N,false> >
2298 typedef typename MultTrait<T1,T2>::Type Type;
2301 template<
typename T1,
size_t N,
bool TF,
typename T2 >
2302 struct MultTrait< HybridVector<T1,N,TF>, DynamicVector<T2,TF> >
2304 typedef HybridVector< typename MultTrait<T1,T2>::Type, N, TF > Type;
2307 template<
typename T1,
size_t N,
typename T2 >
2308 struct MultTrait< HybridVector<T1,N,false>, DynamicVector<T2,true> >
2310 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2313 template<
typename T1,
size_t N,
typename T2 >
2314 struct MultTrait< HybridVector<T1,N,true>, DynamicVector<T2,false> >
2316 typedef typename MultTrait<T1,T2>::Type Type;
2319 template<
typename T1,
bool TF,
typename T2 >
2320 struct MultTrait< DynamicVector<T1,TF>, DynamicVector<T2,TF> >
2322 typedef DynamicVector< typename MultTrait<T1,T2>::Type, TF > Type;
2325 template<
typename T1,
typename T2 >
2326 struct MultTrait< DynamicVector<T1,false>, DynamicVector<T2,true> >
2328 typedef DynamicMatrix< typename MultTrait<T1,T2>::Type,
false > Type;
2331 template<
typename T1,
typename T2 >
2332 struct MultTrait< DynamicVector<T1,true>, DynamicVector<T2,false> >
2334 typedef typename MultTrait<T1,T2>::Type Type;
2350 template<
typename T1,
typename T2 >
2351 struct CrossTrait< DynamicVector<T1,false>, StaticVector<T2,3UL,false> >
2354 typedef typename MultTrait<T1,T2>::Type T;
2357 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2360 template<
typename T1,
typename T2 >
2361 struct CrossTrait< StaticVector<T1,3UL,false>, DynamicVector<T2,false> >
2364 typedef typename MultTrait<T1,T2>::Type T;
2367 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2370 template<
typename T1,
typename T2,
size_t N >
2371 struct CrossTrait< DynamicVector<T1,false>, HybridVector<T2,N,false> >
2374 typedef typename MultTrait<T1,T2>::Type T;
2377 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2380 template<
typename T1,
size_t N,
typename T2 >
2381 struct CrossTrait< HybridVector<T1,N,false>, DynamicVector<T2,false> >
2384 typedef typename MultTrait<T1,T2>::Type T;
2387 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2390 template<
typename T1,
typename T2 >
2391 struct CrossTrait< DynamicVector<T1,false>, DynamicVector<T2,false> >
2394 typedef typename MultTrait<T1,T2>::Type T;
2397 typedef StaticVector< typename SubTrait<T,T>::Type, 3UL,
false > Type;
2413 template<
typename T1,
bool TF,
typename T2 >
2414 struct DivTrait< DynamicVector<T1,TF>, T2 >
2416 typedef DynamicVector< typename DivTrait<T1,T2>::Type, TF > Type;
2433 template<
typename T1,
bool TF,
typename T2 >
2434 struct MathTrait< DynamicVector<T1,TF>, DynamicVector<T2,TF> >
2436 typedef DynamicVector< typename MathTrait<T1,T2>::HighType, TF > HighType;
2437 typedef DynamicVector< typename MathTrait<T1,T2>::LowType , TF > LowType;
2453 template<
typename T1,
bool TF >
2454 struct SubvectorTrait< DynamicVector<T1,TF> >
2456 typedef DynamicVector<T1,TF> Type;
Compile time check for vectorizable types.Depending on the available instruction set (SSE...
Definition: IsVectorizable.h:108
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:116
const bool defaultTransposeFlag
The default transpose flag for all vectors of the Blaze library.This value specifies the default tran...
Definition: TransposeFlag.h:56
Type *BLAZE_RESTRICT v_
The dynamically allocated vector elements.
Definition: DynamicVector.h:409
Constraint on the data type.
#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 subtraction trait.
Pointer data()
Low-level data access to the vector elements.
Definition: DynamicVector.h:693
Header file for basic type definitions.
Header file for the SparseVector base class.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:264
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type stream(T *address, const sse_int16_t &value)
Aligned, non-temporal store of a vector of 2-byte integral values.
Definition: Stream.h:76
size_t nonZeros() const
Returns the number of non-zero elements in the vector.
Definition: DynamicVector.h:1094
BLAZE_ALWAYS_INLINE void storeu(size_t index, const IntrinsicType &value)
Unaligned store of an intrinsic element of the dense vector.
Definition: DynamicVector.h:1508
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:258
void swap(DynamicVector &v)
Swapping the contents of two vectors.
Definition: DynamicVector.h:1289
Iterator begin()
Returns an iterator to the first element of the dynamic vector.
Definition: DynamicVector.h:723
void clear()
Clearing the vector.
Definition: DynamicVector.h:1133
IT::Type IntrinsicType
Intrinsic type of the vector elements.
Definition: DynamicVector.h:176
Header file for the IsSame and IsStrictlySame type traits.
const bool useStreaming
Configuration of the streaming behavior.For large vectors and matrices non-temporal stores can provid...
Definition: Streaming.h:50
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
const Type * ConstPointer
Pointer to a constant vector value.
Definition: DynamicVector.h:182
Header file for the DenseVector base class.
#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:116
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:699
Efficient implementation of an arbitrary sized vector.The DynamicVector class template is the represe...
Definition: DynamicVector.h:163
Header file for memory allocation and deallocation functionality.
BLAZE_ALWAYS_INLINE void stream(size_t index, const IntrinsicType &value)
Aligned, non-temporal store of an intrinsic element of the dense vector.
Definition: DynamicVector.h:1538
EnableIf< IsBuiltin< T >, T * >::Type allocate(size_t size)
Aligned array allocation for built-in data types.
Definition: Memory.h:151
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:861
Constraint on the data type.
size_t capacity_
The current capacity of the pointer array.
Definition: CompressedMatrix.h:2667
~DynamicVector()
The destructor for DynamicVector.
Definition: DynamicVector.h:635
ConstIterator cbegin() const
Returns an iterator to the first element of the dynamic vector.
Definition: DynamicVector.h:751
DynamicVector< ET, TF > Other
The type of the other DynamicVector.
Definition: DynamicVector.h:192
Header file for the DisableIf class template.
This ResultType
Result type for expression template evaluations.
Definition: DynamicVector.h:173
void resize(size_t n, bool preserve=true)
Changing the size of the vector.
Definition: DynamicVector.h:1171
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
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, sse_int16_t >::Type loadu(const T *address)
Loads a vector of 2-byte integral values.
Definition: Loadu.h:76
Header file for nested template disabiguation.
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b)
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:4807
bool isAligned() const
Returns whether the vector is properly aligned in memory.
Definition: DynamicVector.h:1374
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
const Type & ReturnType
Return type for expression template evaluations.
Definition: DynamicVector.h:177
#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:116
Header file for the IsSMPAssignable type trait.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type store(T *address, const sse_int16_t &value)
Aligned store of a vector of 2-byte integral values.
Definition: Store.h:80
BLAZE_ALWAYS_INLINE IntrinsicType loadu(size_t index) const
Unaligned load of an intrinsic element of the vector.
Definition: DynamicVector.h:1447
EnableIf< IsBuiltin< T > >::Type deallocate(T *address)
Deallocation of memory for built-in data types.
Definition: Memory.h:226
Header file for the DenseIterator class template.
Header file for the subvector trait.
Constraint on the data type.
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Compile time check for sparse vector types.This type trait tests whether or not the given template pa...
Definition: IsSparseVector.h:103
void reset()
Reset to the default initial values.
Definition: DynamicVector.h:1115
size_t size() const
Returns the current size/dimension of the vector.
Definition: DynamicVector.h:1063
DenseIterator< Type > Iterator
Iterator over non-constant elements.
Definition: DynamicVector.h:183
size_t size_
The current size/dimension of the vector.
Definition: DynamicVector.h:407
#define BLAZE_RESTRICT
Platform dependent setup of the restrict keyword.
Definition: Restrict.h:81
Type & Reference
Reference to a non-constant vector value.
Definition: DynamicVector.h:179
#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:79
const Type & ConstReference
Reference to a constant vector value.
Definition: DynamicVector.h:180
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:195
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsSMPAssignable.h:120
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:535
size_t adjustCapacity(size_t minCapacity) const
Adjusting the new capacity of the vector according to its data type Type.
Definition: DynamicVector.h:1306
System settings for streaming (non-temporal stores)
DynamicVector()
The default constructor for DynamicVector.
Definition: DynamicVector.h:443
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:841
Header file for the serial shim.
Header file for the IsVectorizable type trait.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, sse_int16_t >::Type load(const T *address)
Loads a vector of 2-byte integral values.
Definition: Load.h:79
Header file for the IsNumeric type trait.
Header file for the HasConstDataAccess type trait.
size_t capacity_
The maximum capacity of the vector.
Definition: DynamicVector.h:408
bool isAliased(const Other *alias) const
Returns whether the vector is aliased with the given address alias.
Definition: DynamicVector.h:1356
BLAZE_ALWAYS_INLINE IntrinsicType load(size_t index) const
Aligned load of an intrinsic element of the vector.
Definition: DynamicVector.h:1416
EnableIf< IsDenseMatrix< MT1 > >::Type 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
Header file for the IsSparseVector type trait.
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:749
ConstIterator cend() const
Returns an iterator just past the last element of the dynamic vector.
Definition: DynamicVector.h:793
Header file for run time assertion macros.
EnableIf< IsDenseMatrix< MT1 > >::Type 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
Header file for the addition trait.
Header file for the cross product trait.
Header file for the division trait.
IntrinsicTrait< Type > IT
Intrinsic trait for the vector element type.
Definition: DynamicVector.h:167
Constraint on the data type.
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
const DynamicVector & CompositeType
Data type for composite expression templates.
Definition: DynamicVector.h:178
#define BLAZE_CONSTRAINT_MUST_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:79
void extend(size_t n, bool preserve=true)
Extending the size of the vector.
Definition: DynamicVector.h:1219
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type storeu(T *address, const sse_int16_t &value)
Unaligned store of a vector of 2-byte integral values.
Definition: Storeu.h:77
void move(DynamicMatrix< Type, SO > &dst, DynamicMatrix< Type, SO > &src)
Moving the contents of one dynamic matrix to another.
Definition: DynamicMatrix.h:4934
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:116
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2510
Rebind mechanism to obtain a DynamicVector with different data/element type.
Definition: DynamicVector.h:191
Header file for the isDefault shim.
System settings for the restrict keyword.
Type ElementType
Type of the vector elements.
Definition: DynamicVector.h:175
Type * Pointer
Pointer to a non-constant vector value.
Definition: DynamicVector.h:181
size_t capacity() const
Returns the maximum capacity of the vector.
Definition: DynamicVector.h:1077
Constraint on the data type.
Header file for the HasMutableDataAccess type trait.
void reserve(size_t n)
Setting the minimum capacity of the vector.
Definition: DynamicVector.h:1237
Substitution Failure Is Not An Error (SFINAE) class.The DisableIf class template is an auxiliary tool...
Definition: DisableIf.h:184
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b)
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:200
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a ge...
Definition: DenseIterator.h:58
Header file for all intrinsic functionality.
Header file for the mathematical trait.
bool canAlias(const Other *alias) const
Returns whether the vector can alias with the given address alias.
Definition: DynamicVector.h:1336
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:151
Header file for the default transpose flag for all vectors of the Blaze library.
EnableIf< IsDenseMatrix< MT1 > >::Type 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
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:108
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2502
bool canSMPAssign() const
Returns whether the vector can be used in SMP assignments.
Definition: DynamicVector.h:1393
boost::true_type TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
BLAZE_ALWAYS_INLINE void store(size_t index, const IntrinsicType &value)
Aligned store of an intrinsic element of the vector.
Definition: DynamicVector.h:1477
Iterator end()
Returns an iterator just past the last element of the dynamic vector.
Definition: DynamicVector.h:765
const size_t SMP_DVECASSIGN_THRESHOLD
SMP dense vector assignment threshold.This threshold specifies when an assignment of a simple dense v...
Definition: Thresholds.h:207
const size_t cacheSize
Cache size of the target architecture.This setting specifies the available cache size in Byte of the ...
Definition: CacheSize.h:48
Header file for the IsResizable type trait.
DenseIterator< const Type > ConstIterator
Iterator over constant elements.
Definition: DynamicVector.h:184
System settings for the inline keywords.
EnableIf< IsDenseVector< VT1 > >::Type 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:189
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Reference operator[](size_t index)
Subscript operator for the direct access to the vector elements.
Definition: DynamicVector.h:659
DynamicVector< Type,!TF > TransposeType
Transpose type for expression template evaluations.
Definition: DynamicVector.h:174
Header file for a safe C++ NULL pointer implementation.
DynamicVector< Type, TF > This
Type of this DynamicVector instance.
Definition: DynamicVector.h:172