VectorBlock.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN_VECTORBLOCK_H
12 #define EIGEN_VECTORBLOCK_H
13 
14 // IWYU pragma: private
15 #include "./InternalHeaderCheck.h"
16 
17 namespace Eigen {
18 
19 namespace internal {
20 template <typename VectorType, int Size>
21 struct traits<VectorBlock<VectorType, Size> >
22  : public traits<Block<VectorType, traits<VectorType>::Flags & RowMajorBit ? 1 : Size,
23  traits<VectorType>::Flags & RowMajorBit ? Size : 1> > {};
24 } // namespace internal
25 
56 template <typename VectorType, int Size>
57 class VectorBlock : public Block<VectorType, internal::traits<VectorType>::Flags & RowMajorBit ? 1 : Size,
58  internal::traits<VectorType>::Flags & RowMajorBit ? Size : 1> {
63 
64  public:
68 
69 
72  : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start, IsColVector ? size : 1, IsColVector ? 1 : size) {
73  }
74 
78  : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start) {}
79 };
80 
81 } // end namespace Eigen
82 
83 #endif // EIGEN_VECTORBLOCK_H
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
Definition: Macros.h:1171
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)
Macro to manually inherit assignment operators. This is necessary, because the implicitly defined ass...
Definition: Macros.h:1126
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:36
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:110
Expression of a fixed-size or dynamic-size sub-vector.
Definition: VectorBlock.h:58
@ IsColVector
Definition: VectorBlock.h:62
Block< VectorType, internal::traits< VectorType >::Flags &RowMajorBit ? 1 :Size, internal::traits< VectorType >::Flags &RowMajorBit ? Size :1 > Base
Definition: VectorBlock.h:61
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE VectorBlock(VectorType &vector, Index start)
Definition: VectorBlock.h:77
const unsigned int RowMajorBit
Definition: Constants.h:70
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
Definition: Eigen_Colamd.h:49
void start(const unsigned &i)
(Re-)start i-th timer
Definition: oomph_utilities.cc:243
Definition: ForwardDeclarations.h:21
Definition: fft_test_shared.h:66